You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2015/05/19 00:35:59 UTC
svn commit: r1680118 [2/2] - in /lucene/dev/trunk/solr: ./ webapp/web/
webapp/web/css/angular/ webapp/web/js/angular/
webapp/web/js/angular/controllers/ webapp/web/partials/
Added: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/schema-browser.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/schema-browser.js?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/schema-browser.js (added)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/schema-browser.js Mon May 18 22:35:59 2015
@@ -0,0 +1,432 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+var cookie_schema_browser_autoload = 'schema-browser_autoload';
+
+solrAdminApp.controller('SchemaBrowserController',
+ function($scope, $routeParams, $location, $cookies, Luke) {
+ $scope.resetMenu("schema-browser");
+
+ $scope.refresh = function () {
+ Luke.schema({core: $routeParams.core}, function (schema) {
+ Luke.index({core: $routeParams.core}, function (index) {
+
+ var data = mergeIndexAndSchemaData(index, schema.schema);
+
+ $scope.fieldsAndTypes = getFieldsAndTypes(data);
+ $scope.is = {};
+
+ var search = $location.search();
+ leftbar = {};
+ $scope.isField = $scope.isDynamicField = $scope.isType = false;
+ if (search.field) {
+ $scope.selectedType = "Field";
+ $scope.is.field = true;
+ $scope.name = search.field;
+ leftbar.fields = [$scope.name];
+ var field = data.fields[$scope.name];
+ leftbar.types = [field.type];
+ if (field.dynamicBase) leftbar.dynamicFields = [field.dynamicBase];
+ if (field.copySources && field.copySources.length>0) leftbar.copyFieldSources = field.copySources.sort();
+ if (field.copyDests && field.copyDests.length>0) leftbar.copyFieldDests = field.copyDests.sort();
+ $scope.fieldOrType = "field=" + $scope.name;
+ } else if (search["dynamic-field"]) {
+ $scope.selectedType = "Dynamic Field";
+ $scope.is.dynamicField = true;
+ $scope.name = search["dynamic-field"];
+ leftbar.dynamicFields = [$scope.name];
+ leftbar.types = [data.dynamic_fields[$scope.name].type];
+ $scope.fieldOrType = "dynamic-field=" + $scope.name;
+ } else if (search.type) {
+ $scope.selectedType = "Type";
+ $scope.is.type = true;
+ $scope.name = search.type;
+ leftbar.types = [$scope.name];
+ leftbar.fields = filterFields("fields", data, $scope.name);
+ leftbar.dynamicFields = filterFields("dynamic_fields", data, $scope.name);
+ $scope.fieldOrType = "type=" + $scope.name;
+ }
+ $scope.leftbar = leftbar;
+ $scope.core = $routeParams.core;
+ $scope.defaultSearchField = data.default_search_field;
+ $scope.uniqueKeyField = data.unique_key_field;
+ $scope.isDefaultSearchField = ($scope.selectedType == "Field" && $scope.name == $scope.defaultSearchField);
+ $scope.isUniqueKeyField = ($scope.selectedType == "Field" && $scope.name == $scope.uniqueKeyField);
+
+ $scope.display = getFieldProperties(index, $routeParams.core, $scope.is, $scope.name);
+ $scope.analysis = getAnalysisInfo(data, $scope.is, $scope.name);
+
+ $scope.isAutoload = $cookies[cookie_schema_browser_autoload] == "true";
+ if ($scope.isAutoload) {
+ $scope.toggleTerms();
+ }
+ });
+ });
+ };
+ $scope.refresh();
+
+ $scope.selectFieldOrType = function() {
+ $location.search($scope.fieldOrType);
+ }
+
+ $scope.toggleAnalyzer = function(analyzer) {
+ analyzer.show = !analyzer.show;
+ }
+
+ $scope.loadTermInfo = function() {
+ var params = {fl: $scope.name, core: $routeParams.core};
+ if ($scope.topTermsCount) {
+ params.numTerms = $scope.topTermsCount;
+ }
+ $scope.isLoadingTerms = true;
+ Luke.field(params, function (data) {
+ $scope.isLoadingTerms = false;
+ $scope.termInfo = getTermInfo(data.fields[$scope.name]);
+ if (!$scope.topTermsCount) {
+ $scope.topTermsCount = $scope.termInfo.termCount;
+ }
+ });
+ }
+
+ $scope.toggleTerms = function() {
+ $scope.showTerms = !$scope.showTerms;
+
+ if ($scope.showTerms) {
+ $scope.loadTermInfo();
+ }
+ }
+
+ $scope.loadAllTerms = function() {
+ $scope.topTermsCount = $scope.termInfo.maxTerms;
+ $scope.loadTermInfo();
+ }
+
+ $scope.toggleAutoload = function() {
+ $scope.isAutoload = !$scope.isAutoload;
+ $cookies[cookie_schema_browser_autoload] = $scope.isAutoload;
+ console.log("cookie: " + $cookies[cookie_schema_browser_autoload]);
+ }
+ }
+);
+
+var getFieldsAndTypes = function(data) {
+ var fieldsAndTypes = [];
+ for (var field in data.fields) {
+ fieldsAndTypes.push({
+ group: "Fields",
+ value: "field=" + field,
+ label: field
+ });
+ }
+ for (var field in data.dynamic_fields) {
+ fieldsAndTypes.push({
+ group: "Dynamic Fields",
+ value: "dynamic-field=" + field,
+ label: field
+ });
+ }
+ for (var type in data.types) {
+ fieldsAndTypes.push({
+ group: "Types",
+ value: "type=" + type,
+ label: type
+ });
+ }
+ return fieldsAndTypes;
+};
+
+var filterFields = function(type, data, name) {
+ var fields = [];
+ for (var i in data.types[name].fields) {
+ var field = data.types[name].fields[i];
+ if (data[type][field]) {
+ fields.push(field)
+ }
+ }
+ return fields.sort();
+}
+
+var mergeIndexAndSchemaData = function(index, schema) {
+
+ var data = {
+ default_search_field: null,
+ unique_key_field: null,
+ key: {},
+ fields: {},
+ dynamic_fields: {},
+ types: {},
+ relations: {
+ f_df: {},
+ f_t: {},
+ df_f: {},
+ df_t: {},
+ t_f: {},
+ t_df: {}
+ }
+ };
+
+ data.fields = index.fields;
+
+ data.key = index.info.key;
+
+ data.default_search_field = schema.defaultSearchField;
+ data.unique_key_field = schema.uniqueKeyField;
+
+ data.dynamic_fields = schema.dynamicFields;
+ data.types = schema.types;
+
+ for (var field in schema.fields) {
+ data.fields[field] =
+ $.extend({}, data.fields[field], schema.fields[field]);
+ }
+
+ for (var field in data.fields) {
+ var copy_dests = data.fields[field].copyDests;
+ for (var i in copy_dests) {
+ var copy_dest = copy_dests[i];
+ if (!data.fields[copy_dest]) {
+ data.fields[copy_dest] = {
+ partial: true,
+ copySources: []
+ };
+ }
+
+ if (data.fields[copy_dest].partial) {
+ data.fields[copy_dest].copySources.push(field);
+ }
+ }
+
+ var copy_sources = data.fields[field].copySources;
+ for (var i in copy_sources) {
+ var copy_source = copy_sources[i];
+ if (!data.fields[copy_source]) {
+ data.fields[copy_source] = {
+ partial: true,
+ copyDests: []
+ };
+ }
+
+ if (data.fields[copy_source].partial) {
+ data.fields[copy_source].copyDests.push(field);
+ }
+ }
+
+ data.relations.f_t[field] = data.fields[field].type;
+
+ if (!data.relations.t_f[data.fields[field].type]) {
+ data.relations.t_f[data.fields[field].type] = [];
+ }
+ data.relations.t_f[data.fields[field].type].push(field);
+
+ if (data.fields[field].dynamicBase) {
+ data.relations.f_df[field] = data.fields[field].dynamicBase;
+
+ if (!data.relations.df_f[data.fields[field].dynamicBase]) {
+ data.relations.df_f[data.fields[field].dynamicBase] = [];
+ }
+ data.relations.df_f[data.fields[field].dynamicBase].push(field);
+ }
+ }
+
+ for (var dynamic_field in data.dynamic_fields) {
+ data.relations.df_t[dynamic_field] = data.dynamic_fields[dynamic_field].type;
+
+ if (!data.relations.t_df[data.dynamic_fields[dynamic_field].type]) {
+ data.relations.t_df[data.dynamic_fields[dynamic_field].type] = [];
+ }
+ data.relations.t_df[data.dynamic_fields[dynamic_field].type].push(dynamic_field);
+ }
+ return data;
+};
+
+var getFieldProperties = function(data, core, is, field) {
+
+ var display = {};
+
+ display.partialState = is.field && !!data.fields[field].partial;
+
+ display.columns = [];
+ display.rows = [];
+ var allFlags = "";
+
+ var addRow = function(name, flags) {
+ if (flags[0]!='(') {
+ display.rows.push({name:name, flags:flags});
+ for (var i in flags) {
+ if (flags[i]!="-" && allFlags.indexOf(flags[i])<0) {
+ allFlags+=flags[i];
+ }
+ }
+ } else {
+ display.rows.push({name:name, comment:flags});
+ }
+ }
+
+ // Identify the rows for our field property table
+ if (is.field && data.fields[field]) {
+ if (data.fields[field].flags) {
+ addRow('Properties', data.fields[field].flags);
+ }
+ if (data.fields[field].schema) {
+ addRow('Schema', data.fields[field].schema);
+ }
+ if (data.fields[field].index) {
+ addRow('Index', data.fields[field].index);
+ }
+ display.docs = data.fields[field].docs;
+ display.docsUrl = "#/" + core + "/query?q=" + field + ":[* TO *]";
+ display.distinct = data.fields[field].distinct;
+ display.positionIncrementGap = data.fields[field].positionIncrementGap;
+ display.similarity = data.fields[field].similarity;
+ } else if (is.dynamicField && data.dynamic_fields[field] && data.dynamic_fields[field].flags) {
+ addRow('Properties', data.dynamic_fields[field].flags);
+ }
+
+ // identify columns in field property table:
+ for (var key in data.info.key) {
+ if (allFlags.indexOf(key)>=0) {
+ display.columns.push({key: key, name: data.info.key[key]});
+ }
+ }
+
+ // identify rows and cell values in field property table:
+ for (var i in display.rows) {
+ var row = display.rows[i];
+ row.cells = [];
+
+ for (var j in display.columns) {
+ var flag = display.columns[j].key;
+ row.cells.push({key: flag, value: row.flags.indexOf(flag)>=0});
+ }
+ }
+
+ return display;
+};
+
+var getAnalysisInfo = function(data, is, name) {
+
+ var analysis = {};
+
+ if (is.field) {
+ var type = data.relations.f_t[name];
+ analysis.query = "analysis.fieldname=" + name;
+ }
+ else if (is.dynamicField) {
+ var type = data.relations.df_t[name];
+ analysis.query = "analysis.fieldtype=" + type;
+ }
+ else if (is.type) {
+ var type = name;
+ analysis.query = "analysis.fieldtype=" + name;
+ }
+
+ var processComponentType = function (label, key, componentTypeData) {
+ if (componentTypeData) {
+ var components = [];
+ console.dir(componentTypeData);
+ for (var componentName in componentTypeData) {
+ console.log(componentName);
+ var componentData = componentTypeData[componentName];
+ var component = {className: componentData.className, args:[]};
+ if (componentData.args) {
+ for (var argName in componentData.args) {
+ var argValue = componentData.args[argName];
+ if (argValue == "1" || argValue == "true") {
+ component.args.push({name: argName, booleanValue:true});
+ } else if (argValue == "0" || argValue == "false") {
+ component.args.push({name: argName, booleanValue:false});
+ } else {
+ component.args.push({name: argName, value:argValue});
+ }
+ }
+ }
+ components.push(component);
+ }
+ return {label: label, key: key, components: components};
+ } else {
+ return {label: label, key: key};
+ }
+ }
+
+ var buildAnalyzer = function (analyzerData) {
+ var analyzer = {};
+ analyzer.className = analyzerData.className;
+ analyzer.componentTypes = [];
+ if (analyzerData.tokenizer) {
+ analyzer.componentTypes.push(processComponentType("Char Filters", "charFilters", analyzerData.charFilters));
+ analyzer.componentTypes.push(processComponentType("Tokenizer", "tokenizer", {tokenizer: analyzerData.tokenizer}));
+ analyzer.componentTypes.push(processComponentType("Token Filters", "tokenFilters", analyzerData.filters));
+ }
+ return analyzer;
+ }
+
+ analysis.data = data.types[type];
+ if (analysis.data) {
+ analysis.analyzers = [
+ {key: "index", name: "Index", detail: buildAnalyzer(analysis.data.indexAnalyzer)},
+ {key: "query", name: "Query", detail: buildAnalyzer(analysis.data.queryAnalyzer)}
+ ];
+ }
+ return analysis;
+}
+
+var getTermInfo = function(data) {
+
+ var termInfo = {};
+ if (data && data.topTerms) {
+ termInfo.topTerms = [];
+
+ var currentGroup = {count: 0}
+ for (var i = 0; i < data.topTerms.length; i += 2) {
+ var count = data.topTerms[i + 1];
+ if (currentGroup.count != count) {
+ currentGroup = {count: count, terms: []};
+ termInfo.topTerms.push(currentGroup);
+ }
+ currentGroup.terms.push(data.topTerms[i]);
+ }
+ termInfo.termCount = data.topTerms.length / 2;
+ termInfo.maxTerms = data.distinct;
+ }
+
+ if(data && data.histogram) {
+ termInfo.histogram = [];
+ termInfo.histogramMax = 0;
+ for (var i = 0; i < data.histogram.length; i += 2) {
+ termInfo.histogram.push({key: data.histogram[i], value: data.histogram[i + 1]});
+ termInfo.histogramMax = Math.max(termInfo.histogramMax, data.histogram[i + 1]);
+ }
+ }
+ return termInfo;
+};
+
+/*
+ var get_width = function get_width()
+ {
+ return $( this ).width();
+ }
+
+ var max_width = 10 + Math.max.apply( Math, $( 'p', topterms_table_element ).map( get_width ).get() );
+ topterms:
+ p { width: {{maxWidth}}px !important; }
+ ul { margin-left: {{max_width + 5 }}px !important; }
+
+ var max_width = 10 + Math.max.apply( Math, $( 'dt', histogram_holder_element ).map( get_width ).get() );
+ histogram_holder:
+ ul { margin-left: {{maxWidth}}px !important; }
+ li dt { left: {{-maxWidth}}px !important; width: {{maxWidth}}px !important; }
+*/
Added: lucene/dev/trunk/solr/webapp/web/js/angular/controllers/segments.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/controllers/segments.js?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/controllers/segments.js (added)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/controllers/segments.js Mon May 18 22:35:59 2015
@@ -0,0 +1,94 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+var MB_FACTOR = 1024*1024;
+
+solrAdminApp.controller('SegmentsController', function($scope, $routeParams, $interval, Segments) {
+ $scope.resetMenu("segments");
+
+ $scope.refresh = function() {
+
+ Segments.get({core: $routeParams.core}, function(data) {
+ var segments = data.segments;
+
+ var segmentSizeInBytesMax = getLargestSegmentSize(segments);
+ $scope.segmentMB = Math.floor(segmentSizeInBytesMax / MB_FACTOR);
+ $scope.xaxis = calculateXAxis(segmentSizeInBytesMax);
+
+ $scope.documentCount = 0;
+ $scope.deletionCount = 0;
+
+ $scope.segments = [];
+ for (var name in segments) {
+ var segment = segments[name];
+
+ var segmentSizeInBytesLog = Math.log(segment.sizeInBytes);
+ var segmentSizeInBytesMaxLog = Math.log(segmentSizeInBytesMax);
+
+ segment.totalSize = Math.floor((segmentSizeInBytesLog / segmentSizeInBytesMaxLog ) * 100);
+
+ segment.deletedDocSize = Math.floor((segment.delCount / (segment.delCount + segment.totalSize)) * segment.totalSize);
+ if (segment.delDocSize <= 0.001) delete segment.deletedDocSize;
+
+ segment.aliveDocSize = segment.totalSize - segment.deletedDocSize;
+
+ $scope.segments.push(segment);
+
+ $scope.documentCount += segment.size;
+ $scope.deletionCount += segment.delCount;
+ }
+ $scope.deletionsPercentage = calculateDeletionsPercentage($scope.documentCount, $scope.deletionCount);
+ });
+ };
+
+ $scope.toggleAutoRefresh = function() {
+ $scope.autorefresh = !$scope.autorefresh;
+ if ($scope.autorefresh) {
+ $scope.interval = $interval($scope.refresh, 1000);
+ } else if ($scope.interval) {
+ $interval.cancel($scope.interval);
+ }
+ };
+ $scope.refresh();
+});
+
+var calculateXAxis = function(segmentInBytesMax) {
+ var steps = [];
+ var log = Math.log(segmentInBytesMax);
+
+ for (var j=0, step=log/4; j<3; j++, step+=log/4) {
+ steps.push({pos:j, value:Math.floor((Math.pow(Math.E, step))/MB_FACTOR)})
+ }
+ return steps;
+};
+
+var getLargestSegmentSize = function(segments) {
+ var max = 0;
+ for (var name in segments) {
+ max = Math.max(max, segments[name].sizeInBytes);
+ }
+ return max;
+};
+
+var calculateDeletionsPercentage = function(docCount, delCount) {
+ if (docCount == 0) {
+ return 0;
+ } else {
+ var percent = delCount / docCount * 100;
+ return Math.round(percent * 100) / 100;
+ }
+};
Modified: lucene/dev/trunk/solr/webapp/web/js/angular/services.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/angular/services.js?rev=1680118&r1=1680117&r2=1680118&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/angular/services.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/angular/services.js Mon May 18 22:35:59 2015
@@ -67,8 +67,9 @@ solrAdminServices.factory('System',
}])
.factory('Replication',
['$resource', function($resource) {
- return $resource('/solr/:core/replication', {'wt':'json', core: "@core", 'command': 'details', '_':Date.now()}, {
- "details": {params: {command: "details"}}
+ return $resource('/solr/:core/replication', {'wt':'json', core: "@core", '_':Date.now()}, {
+ "details": {params: {command: "details"}},
+ "command": {params: {}}
});
}])
.factory('CoreSystem',
@@ -106,8 +107,21 @@ solrAdminServices.factory('System',
.factory('Luke',
['$resource', function($resource) {
return $resource('/solr/:core/admin/luke', {core: '@core', wt:'json', _:Date.now()}, {
+ "index": {params: {numTerms: 0}},
"schema": {params: {show:'schema'}},
- "index": {params: {show:'index', numTerms: 0}}
+ "field": {},
+ "fields": {params: {show:'schema'}, interceptor: {
+ response: function(response) {
+ var fieldsAndTypes = [];
+ for (var field in response.data.schema.fields) {
+ fieldsAndTypes.push({group: "Fields", label: field, value: "fieldname=" + field});
+ }
+ for (var type in response.data.schema.types) {
+ fieldsAndTypes.push({group: "Types", label: type, value: "fieldtype=" + type});
+ }
+ return fieldsAndTypes;
+ }
+ }}
});
}])
.factory('Analysis',
@@ -116,6 +130,19 @@ solrAdminServices.factory('System',
"field": {params: {"analysis.showmatch": true}}
});
}])
+.factory('DataImport',
+ ['$resource', function($resource) {
+ return $resource('/solr/:core/dataimport', {core: '@core', indent:'on', wt:'json', _:Date.now()}, {
+ "config": {params: {command: "show-config"}, transformResponse: function(data) {
+ return {config: data};
+ }},
+ "status": {params: {command: "status"}},
+ "reload": {params: {command: "reload-config"}},
+ "post": {method: "POST",
+ headers: {'Content-type': 'application/x-www-form-urlencoded'},
+ transformRequest: function(data) { return $.param(data) }}
+ });
+ }])
.factory('Ping',
['$resource', function($resource) {
return $resource('/solr/:core/admin/ping', {wt:'json', core: '@core', ts:Date.now(), _:Date.now()}, {
@@ -127,6 +154,7 @@ solrAdminServices.factory('System',
['$resource', function($resource) {
return $resource('/solr/:core/admin/mbeans', {'wt':'json', core: '@core', '_':Date.now()}, {
stats: {params: {stats: true}},
+ info: {},
reference: {
params: {wt: "xml", stats: true}, transformResponse: function (data) {
return {reference: data}
@@ -161,11 +189,11 @@ solrAdminServices.factory('System',
}).success(callback);
}
}}
+])
+.factory('Segments',
+ ['$resource', function($resource) {
+ return $resource('/solr/:core/admin/segments', {'wt':'json', core: '@core', _:Date.now()}, {
+ get: {}
+ });
+ }
]);
-/*
-http://localhost:8983/solr/techproducts/admin/mbeans?cat=QUERYHANDLER&wt=json&_=1419614354276
-PING:
-http://localhost:8983/solr/techproducts/admin/ping?wt=json&ts=1419614393324&_=1419614393325
-*/
-
-
Modified: lucene/dev/trunk/solr/webapp/web/partials/analysis.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/analysis.html?rev=1680118&r1=1680117&r2=1680118&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/analysis.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/analysis.html Mon May 18 22:35:59 2015
@@ -41,7 +41,7 @@ limitations under the License.
<li class="settings-holder clearfix">
<div class="settings clearfix">
<label for="type_or_name">Analyse Fieldname / FieldType:</label>
- <select id="type_or_name" ng-model="fieldOrType" ng-options="f.value as f.label group by f.group for f in fieldsAndTypes"></select>
+ <select chosen id="type_or_name" ng-model="fieldOrType" ng-options="f.value as f.label group by f.group for f in fieldsAndTypes"></select>
<a id="tor_schema" href="#"><span>Schema Browser</span> </a>
Modified: lucene/dev/trunk/solr/webapp/web/partials/cloud.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/cloud.html?rev=1680118&r1=1680117&r2=1680118&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/cloud.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/cloud.html Mon May 18 22:35:59 2015
@@ -17,15 +17,15 @@ limitations under the License.
<div id="cloud" class="clearfix">
<div id="frame">
-{{here}}
+
<div id="tree-content" class="content clearfix" ng-show="showTree">
- <jstree class="tree" on-select="showTreeLink(url)" config="jstree" data="tree" id="tree"></jstree>
+ <jstree class="tree" on-select="showTreeLink(url)" id="tree"></jstree>
<div id="file-content" class="clearfix">
<div id="prop" ng-show="znode.prop && showData">
<ul>
- <li ng-class:"odd:$odd" ng-repeat="(key, prop) in znode.prop">
+ <li ng-class="{odd:$odd}" ng-repeat="(key, prop) in znode.prop">
<dl class="clearfix">
<dt>{{ key }}</dt>
<dd>{{ prop }}</dd>
Modified: lucene/dev/trunk/solr/webapp/web/partials/core_overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/core_overview.html?rev=1680118&r1=1680117&r2=1680118&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/core_overview.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/core_overview.html Mon May 18 22:35:59 2015
@@ -33,7 +33,7 @@ limitations under the License.
<dt>Last Modified:</dt>
<dd class="value">{{index.lastModified | timeago}}</dd>
- <dt>Num Docs:</dt>
+ <dt class="index_num-docs">Num Docs:</dt>
<dd class="value">{{index.numDocs}}</dd>
<dt class="index_max-doc">Max Doc:</dt>
Added: lucene/dev/trunk/solr/webapp/web/partials/dataimport.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/dataimport.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/dataimport.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/dataimport.html Mon May 18 22:35:59 2015
@@ -0,0 +1,209 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="dataimport" class="clearfix">
+
+ <div ng-show="!hasHandlers">Sorry, no dataimport-handler defined!</div>
+ <div id="frame" ng-show="hasHandlers">
+
+ <div id="error" ng-show="error"></div>
+
+ <div id="current_state" class="{{status}}">
+
+ <p class="last_update">Last Update: <abbr title="{{lastUpdateUTC}}">{{lastUpdate}}</abbr></p>
+ <div class="info">
+
+ <strong>{{info.text}}<span ng-show="info.timeTaken"> (Duration: {{info.timeTaken | readableSeconds }})</span>
+ </strong>
+ <div class="details" ng-show="info.showDetails">
+ <div class="docs">
+ <span ng-repeat="doc in info.docs">
+ <abbr style="display:inline" title="{{ doc.desc }}">{{ doc.name }}</abbr>: {{doc.value | number}}<!-- remove whitespace!
+ --><span style="display:inline" ng-show="doc.speed">{{ doc.speed | number}}/s</span><!-- remove whitespace!
+ --><span style="display:inline" ng-show="!$last">, </span>
+ </span>
+ </div>
+ <div class="dates">
+ <span ng-repeat="date in info.dates">
+ <abbr title="{{ date.desc }}">{{ date.name }}</abbr>:
+ <abbr class="time">{{ date.value | timeago }}</abbr>
+ </span>
+ </div>
+ </div>
+
+ <button class="abort-import" ng-class="{warn:!isAborting, success: isAborting}" ng-click="abort()" ng-show="isRunning">
+ <span ng-show="isAborting">Aborting Import</span>
+ <span ng-show="!isAborting">Abort Import</span>
+ </button>
+
+ </div>
+
+ </div>
+
+ <div class="block" id="raw_output" >
+
+ <h2>
+ <a class="toggle" ng-click="toggleRawStatus()"><span>Raw Status-Output</span></a>
+ </h2>
+
+ <div class="message-container" ng-show="showRawStatus">
+ <div class="message"></div>
+ </div>
+
+ <div class="content" ng-show="showRawStatus">
+
+ <div id="raw_output_container"><pre class="syntax language-json"><code ng-bind-html="rawStatus | highlight:'json' | unsafe"></code></pre></div>
+
+ </div>
+
+ </div>
+
+ <div class="block" id="config" ng-class="{debug_mode:isDebugMode}">
+
+ <h2 class="clearfix">
+ <a class="toggle" ng-click="toggleConfiguration()"><span>Configuration</span></a>
+ <a class="r reload_config" ng-class="{success:reloaded}" ng-click="reload()" title="Reload Configuration">Reload</a>
+ <a class="r debug_mode" ng-click="toggleDebug()">Debug-Mode</a>
+ </h2>
+
+ <div class="message-container" ng-show="showConfiguration">
+ <div class="message"></div>
+ </div>
+
+ <div class="content" ng-show="showConfiguration">
+ <div id="dataimport_config">
+
+ <div class="formatted" ng-show="!isDebugMode">
+
+ <pre class="syntax language-xml"><code ng-bind-html="config | highlight:'xml'| unsafe"></code></pre>
+
+ </div>
+
+ <div class="editable" ng-show="isDebugMode">
+
+ <textarea>{{config}}</textarea>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div class="block" id="debug_response" ng-show="form.showDebug">
+
+ <h2>
+ <a class="toggle" ng-click="toggleRawDebug()"><span>Raw Debug-Response</span></a>
+ </h2>
+
+ <div class="message-container" ng-show="showRawDebug">
+ <div class="message"></div>
+ </div>
+
+ <div class="content" ng-show="showRawDebug">
+ <span ng-show="true">
+ <em>No Request executed</em>
+ </span>
+ <span ng-show="false">
+ <pre class="syntax language-json"><code ng-bind-html="rawResponse | highlight:'xml' | unsafe"></code></pre>
+ </span>
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="form" ng-show="hasHandlers">
+
+ <div id="navigation">
+
+ <ul>
+ <li ng-class="{current: currentHandler == handler}" ng-repeat="handler in handlers">
+ <a href="#/{{form.core}}/dataimport/{{handler}}">{{handler}}</a>
+ </li>
+ </ul>
+
+ </div>
+
+ <form action="#" method="get">
+
+ <label for="command">
+ <a rel="help">Command</a>
+ </label>
+ <select name="command" id="command" ng-model="form.command">
+ <option>full-import</option>
+ <option>delta-import</option>
+ </select>
+
+ <label for="verbose" class="checkbox">
+ <input type="checkbox" name="verbose" id="verbose" ng-model="form.verbose">
+ Verbose
+ </label>
+
+ <label for="clean" class="checkbox">
+ <input type="checkbox" name="clean" id="clean" ng-model="form.clean">
+ Clean
+ </label>
+
+ <label for="commit" class="checkbox">
+ <input type="checkbox" name="commit" id="commit" ng-model="form.commit">
+ Commit
+ </label>
+
+ <label for="optimize" class="checkbox">
+ <input type="checkbox" name="optimize" id="optimize" ng-model="form.optimize">
+ Optimize
+ </label>
+
+ <label for="debug" class="checkbox">
+ <input type="checkbox" name="debug" id="debug" ng-model="form.showDebug">
+ Debug
+ </label>
+
+ <label for="entity">
+ <a rel="help">Entity</a>
+ </label>
+ <select ng-model="form.entity" id="entity">
+ <option value=""></option>
+ <option ng-repeat="entity in entities">{{entity}}</option>
+ </select>
+
+ <label for="start">
+ <a rel="help">Start</a>,
+ <a rel="help">Rows</a>
+ </label>
+ <div class="clearfix">
+ <input type="text" id="start" placeholder="0" ng-model="form.start">
+ <input type="text" id="rows" placeholder="10" ng-model="form.rows">
+ </div>
+
+ <label for="custom_parameters">
+ <a rel="help">Custom Parameters</a>
+ </label>
+ <input type="text" id="custom_parameters" ng-model="form.custom" placeholder="key1=val1&key2=val2">
+ </form>
+ <button class="execute" type="submit" ng-click="submit()">
+ <span ng-show="isDebugMode">Execute with this Configuration â</span>
+ <span ng-show="!isDebugMode">Execute</span>
+ </button>
+ <button class="refresh-status" ng-click="refreshStatus()" ng-class="{loader: isStatusLoading, success: statusUpdated}"><span>Refresh Status</span></button>
+
+ <p id="auto-refresh-status"><a ng-click="updateAutoRefresh()" ng-class="{on:autorefresh}">Auto-Refresh Status</a></p>
+
+ </div>
+
+</div>
\ No newline at end of file
Added: lucene/dev/trunk/solr/webapp/web/partials/documents.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/documents.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/documents.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/documents.html Mon May 18 22:35:59 2015
@@ -0,0 +1,118 @@
+<!--
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+-->
+
+<div id="documents" class="clearfix">
+ <div id="form">
+ <form>
+ <label for="qt">
+ <a rel="help">Request-Handler (qt)</a>
+ </label>
+ <input ng-model="handler" type="text" id="qt" value="/update" title="Request handler in solrconfig.xml.">
+ <label for="document-type">
+ <a rel="help">Document Type</a>
+ </label>
+
+ <div><select ng-model="type" id="document-type" ng-change="changeDocumentType()" placeholder="The type of the document field">
+ <!-- TODO: support the Builder -->
+ <option value="csv">CSV</option>
+ <option value="wizard">Document Builder</option>
+ <option value="upload">File Upload</option>
+ <option value="json">JSON</option>
+ <option value="solr">Solr Command (raw XML or JSON)</option>
+ <option value="xml">XML</option>
+ </select>
+ </div>
+ <div id="document-container">
+ <div id="wizard" ng-show="type=='wizard'">
+ <div id="wizard-fields">
+ <div><span class="description">Field</span>: <select ng-model="fieldName" id="wiz-field-select" name="wiz-field-select"
+ ng-options="field for field in fields"></select>
+ </div>
+ <div><span id="wiz-field-data"><span class="description">Field Data</span>:</span>
+ <textarea ng-model="fieldData"
+ id="wizard-doc"
+ name="wizard-doc"
+ rows="10"
+ cols="40"
+ placeholder="Enter your field text here and then click 'Add Field' to add the field to the document.">
+ </textarea>
+ </div>
+ </div>
+ <div id="wizard-add"><a ng-click="addWizardField()" id="add-field-href"><img border="0" src="./img/ico/plus-button.png"/>Add
+ Field</a></div>
+ </div>
+ <label for="document">
+ <a rel="help">Document(s)</a>
+ </label>
+ <textarea ng-show="type!='upload'" ng-model="document" name="document" id="document" title="The Document" rows="10"
+ cols="70" placeholder="{{placeholder}}"></textarea>
+
+ <div id="file-upload" ng-show="type=='upload'">
+ <input type="file" id="the-file" name="the-file" file-model="fileUpload"/>
+ </div>
+ </div>
+
+ <div id="advanced">
+ <!-- TODO: only show for JSON/XML-->
+ <div id="attribs">
+ <div id="upload-only" ng-show="type=='upload'">
+ <label for="erh-params"><!-- TODO: cleaner way to do this? -->
+ <a rel="help">Extracting Req. Handler Params</a>
+ </label>
+ <input ng-model="literalParams" type="text" id="erh-params" value="&literal.id=change.me"
+ title="Extracting Request Handler Parameters" size="50">
+ </div>
+ <div id="general-attribs">
+ <label for="commitWithin">
+ <a rel="help">Commit Within</a>
+ </label>
+ <input type="text" ng-model="commitWithin" id="commitWithin" value="1000" title="Commit Within (ms)">
+ <label for="overwrite">
+ <a rel="help">Overwrite</a>
+ </label>
+ <input ng-model="overwrite" type="text" id="overwrite" value="true" title="Overwrite">
+ </div>
+ <!-- Boost is json only, since the XML has it embedded -->
+ <div id="json-only" ng-show="type=='json'">
+ <label for="boost">
+ <a rel="help">Boost</a>
+ </label>
+ <input ng-model="boost" type="text" id="boost" value="1.0" title="Document Boost">
+ </div>
+ </div>
+ </div>
+
+ <button type="submit" ng-click="submit()" id="submit">Submit Document</button>
+ </form>
+ </div>
+ <div id="result">
+ <div id="response" ng-show="response">
+ <div>
+ <span class="description">Status: </span>{{ responseStatus }}
+ </div>
+ <div>
+ <span class="description">Response:</span>
+ <pre class="syntax language-json"><code ng-bind-html="response | highlight:'json' | unsafe"></code></pre>
+ </div>
+ </div>
+
+ </div>
+</div>
+
+
Added: lucene/dev/trunk/solr/webapp/web/partials/files.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/files.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/files.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/files.html Mon May 18 22:35:59 2015
@@ -0,0 +1,47 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="files" class="clearfix">
+
+ <div id="frame">
+
+ <div id="tree-holder">
+
+ <jstree class="tree" on-select="showTreeLink(data)" data="tree" id="tree"></jstree>
+
+ </div>
+ <div id="file-content" class="clearfix">
+
+ <div class="top clearfix">
+
+ <a id="url" class="address-bar" href="{{url}}" ng-show="url">{{url}}</a>
+
+ </div>
+
+ <div class="view-file">
+
+ <div class="response" ng-show="content">
+ <pre class="syntax language-{{lang}}"><code ng-bind-html="content | highlight:lang | unsafe"></code></pre>
+ </div>
+
+
+ </div>
+
+ </div>
+
+ </div>
+
+</div>
\ No newline at end of file
Modified: lucene/dev/trunk/solr/webapp/web/partials/logging.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/logging.html?rev=1680118&r1=1680117&r2=1680118&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/logging.html (original)
+++ lucene/dev/trunk/solr/webapp/web/partials/logging.html Mon May 18 22:35:59 2015
@@ -25,6 +25,7 @@ limitations under the License.
<tr>
<th class="time">Time (<span>{{timezone}}</span>)</th>
<th class="level">Level</th>
+ <th class="core">Core</th>
<th class="logger">Logger</th>
<th class="message">Message</th>
</tr>
@@ -33,6 +34,7 @@ limitations under the License.
<tr ng-click="toggleRow(event)" class="{{event.trace ? 'has-trace': ''}} {{'level-'+event.level.toLowerCase()}}">
<td class="span"><a><span>{{ timezone == "UTC" ? event.utc_time : event.local_time }}</span></a></td>
<td class="level span"><a><span>{{ event.level }} {{event.showTrace}}</span></span></a></td>
+ <td class="span"><a><span>{{ event.core }}</span></a></td>
<td class="span"><a><span><abbr title="{{event.logger}}">{{event.loggerBase}}</abbr></span></a></td>
<td class="message span"><a><span>{{ event.message }}</span></a></td>
</tr>
Added: lucene/dev/trunk/solr/webapp/web/partials/plugins.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/plugins.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/plugins.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/plugins.html Mon May 18 22:35:59 2015
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="plugins" class="clearfix">
+
+ <div id="frame">
+ <ul>
+ <li class="entry" ng-class="{changed: plugin.changed}" ng-repeat="plugin in type.plugins">
+ <a ng-click="selectPlugin(plugin)">
+ <span>{{ plugin.name }}</span>
+ </a>
+ <ul class="detail" ng-show="plugin.open">
+ <li ng-repeat="(key, value) in plugin.properties" ng-class="{odd: $odd}">
+ <dl class="clearfix">
+ <dt>{{ key }}:</dt>
+ <!--<dd ng-repeat="v in value">{{v}}</dd><!-- is AN ARRAY!!-->
+ <dd>{{value}}</dd>
+ </dl>
+ </li>
+ <li class="stats clearfix" ng-show="plugin.stats">
+ <span>stats:</span>
+ <ul>
+ <li ng-repeat="(key, value) in plugin.stats" ng-class="{odd: $odd}">
+ <dl class="clearfix">
+ <dt>{{key}}:</dt>
+ <dd>{{value}}</dd>
+ </dl>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </ul>
+ </div>
+
+ <div id="navigation" class="clearfix">
+
+ <ul>
+ <li ng-repeat="type in types" class="{{type.lower}}">
+ <a ng-click="selectPluginType(type)" rel="{{type.name}}">{{type.name}}
+ <span ng-show="type.changes">{{type.changes}}</span>
+ </a>
+ </li>
+ <li class="PLUGINCHANGES"><a ng-click="startRecording()">Watch Changes</a></li>
+ <li class="RELOAD"><a ng-click="refresh()">Refresh Values</a></li>
+ </ul>
+
+ </div>
+
+ <div id="recording" ng-show="isRecording">
+ <div class="wrapper clearfix">
+
+ <p class="loader">Watching for Changes</p>
+ <button class="primary" ng-click="stopRecording()">Stop & Show Changes</button>
+
+ </div>
+ <div id="blockUI"></div>
+ </div>
+
+</div>
Added: lucene/dev/trunk/solr/webapp/web/partials/replication.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/replication.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/replication.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/replication.html Mon May 18 22:35:59 2015
@@ -0,0 +1,239 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="replication" class="clearfix" ng-class="{replicating:settings.isReplicating}">
+
+ <div id="frame">
+
+ <div id="error" ng-show="progress.ERROR">{{ progress.ERROR }}</div>
+
+ <div class="replicating block" ng-show="settings.isReplicating">
+
+ <div id="progress">
+
+ <div id="start"><div class="info">
+
+ <span>{{progress.replicationStartTime}}</span>
+
+ </div></div>
+
+ <div id="speed"><div class="info">
+
+ <span>5.1 MB</span>/s
+
+ </div></div>
+
+ <div id="bar">
+
+ <div id="bar-info"><div class="info">
+
+ <div class="files"><span>{{progress.numFilesToDownload}}</span> File<span ng-show="progress.numFilesToDownload>1">s</span></div>
+ <div class="size"><span>{{progress.bytesToDownload}}</span></div>
+
+ </div></div>
+
+ <div id="eta"><div class="info">
+
+ ETA: <span>{{progress.timeRemaining | readableSeconds }}</span>
+
+ </div></div>
+
+ <div id="done" style="width: {{progress.totalPercentWidth}}">
+
+ <div class="percent">
+
+ <span>{{progress.totalPercent}}</span>%
+
+ </div>
+
+ <div id="done-info"><div class="info">
+
+ <div class="files"><span>{{progress.numFilesDownloaded}}</span> File<span ng-show="progress.numFilesDownloaded>1">s</span></div>
+ <div class="size"><span>{{progress.bytesDownloaded}}</span></div>
+
+ </div></div>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="current-file" class="clearfix">
+
+ <div class="label"><span class="loader">Current File:</span></div>
+ <div class="file">{{progress.currentFile}}</div>
+ <div class="progress">
+ <span class="done">{{progress.currentFileSizeDownloaded}}</span> / <span class="total">{{progress.currentFileSize}}</span> [<span class="percent">{{progress.currentFileSizePercent}}</span>%]
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="iterations" class="slaveOnly block clearfix" ng-show="isSlave">
+
+ <div class="label"><span class="">Iterations:</span></div>
+ <div class="iterations" ng-show="iterations && showIterations">
+ <ul>
+ <li class="{{iteration.status}}" ng-class="{latest:iteration.latest}" ng-repeat="iteration in iterations |limitTo:iterationCount">{{iteration.date}}</li>
+ </ul>
+ <span ng-show="iterations.length>1">
+ <a ng-show="iterationCount==1" ng-click="showIterations()"><span class="expand">Show all Iterations</span></a>
+ <a ng-show="iterationCount>1" ng-click="hideIterations()"><span class="collapse">Hide past Iterations</span></a>
+ </span>
+
+ </div>
+
+ </div>
+
+ <div id="details" class="block clearfix">
+
+ <table border="0" cellspacing="0" cellpadding="0">
+
+ <thead>
+
+ <tr>
+
+ <td><span>Index</span></td>
+ <th>Version</th>
+ <th><abbr title="Generation">Gen</abbr></th>
+ <th>Size</th>
+
+ </tr>
+
+ </thead>
+ <tbody>
+
+ <tr class="masterSearch">
+
+ <th>Master (Searching)</th>
+ <td class="version" ng-class="{diff:versions.changedVersion}">
+ <div>{{versions.masterSearch.version}}</div>
+ </td>
+ <td class="generation" ng-class="{diff:versions.changedGeneration}">
+ <div>{{versions.masterSearch.generation}}</div>
+ </td>
+ <td class="size">
+ <div>{{versions.masterSearch.size}}</div>
+ </td>
+
+ </tr>
+
+ <tr class="master">
+
+ <th>Master (Replicable)</th>
+ <td class="version" ng-class="{diff:versions.changedVersion}">
+ <div>{{versions.master.version}}</div>
+ </td>
+ <td class="generation" ng-class="{diff:versions.changedGeneration}">
+ <div>{{versions.master.generation}}</div>
+ </td>
+ <td class="size">
+ <div>{{versions.master.size}}</div>
+ </td>
+
+ </tr>
+
+ <tr class="slave slaveOnly" ng-show="isSlave">
+
+ <th>Slave (Searching)</th>
+ <td class="version" ng-class="{diff:versions.changedVersion}">
+ <div>{{versions.slave.version}}</div>
+ </td>
+ <td class="generation" ng-class="{diff:versions.changedGeneration}">
+ <div>{{versions.slave.generation}}</div>
+ </td>
+ <td class="size">
+ <div>{{versions.slave.size}}</div>
+ </td>
+
+ </tr>
+
+ </tbody>
+
+ </table>
+
+ </div>
+
+ <div id="settings" class="settings block clearfix slaveOnly" ng-show="isSlave">
+
+ <div class="label"><span>Settings:</span></div>
+ <ul>
+ <li class="masterUrl" ng-show="settings.masterUrl">
+ <dl class="clearfix">
+ <dt>master url:</dt>
+ <dd>{{settings.masterUrl}}</dd>
+ </dl>
+ </li>
+ <li class="isPollingDisabled"><dl class="clearfix">
+ <dt>polling enable:</dt>
+ <dd class="ico" ng-class="{'ico-0':settings.isPollingDisabled, 'ico-1':!settings.isPollingDisabled}">
+ <span ng-show="settings.pollInterval">(interval: {{settings.pollInterval}})</span>
+ </dd>
+ </dl></li>
+ </ul>
+
+ </div>
+
+ <div id="master-settings" class="settings block clearfix">
+
+ <div class="label"><span>Settings (Master):</span></div>
+ <ul>
+ <li class="replicationEnabled"><dl class="clearfix">
+ <dt>replication enable:</dt>
+ <dd class="ico" ng-class="{'ico-0':!master.replicationEnabled, 'ico-1':master.replicationEnabled}"> </dd>
+ </dl></li>
+ <li class="replicateAfter"><dl class="clearfix">
+ <dt>replicateAfter:</dt>
+ <dd>{{master.replicateAfter}}</dd>
+ </dl></li>
+ <li class="confFiles" ng-show="master.files"><dl class="clearfix">
+ <dt>confFiles:</dt>
+ <dd><span ng-repeat="file in master.files"><attr title="{{file.title}}">{{file.name}}</attr>{{ $last ? '' :', '}}</span></dd>
+ </dl></li>
+ </ul>
+
+ </div>
+
+ </div>
+
+ <div id="navigation">
+
+ <div class="timer" ng-show="isSlave && !settings.isPollingDisabled &&!settings.isReplicating">
+
+ <p>Next Run: <span class="approx" ng-show="settings.isApprox">~</span><span class="tick">{{settings.tick | readableSeconds}}</span></p>
+ <small ng-show="settings.nextExecutionAt">{{settings.nextExecutionAt}}</small>
+ </div>
+
+ <button class="refresh-status" ng-click="refresh()"><span>Refresh Status</span></button>
+
+ <div class="slaveOnly" ng-show="isSlave">
+ <button class="optional replicate-now primary" ng-click="execute('fetchindex')" ng-show="!settings.isReplicating"><span>Replicate now</span></button>
+ <button class="optional abort-replication warn" ng-click="execute('abortfetch')" ng-show="settings.isReplicating"><span>Abort Replication</span></button>
+
+ <button class="optional disable-polling" ng-click="execute('disablepoll')" ng-show="!settings.isPollingDisabled"><span>Disable Polling</span></button>
+ <button class="optional enable-polling" ng-click="execute('enablepoll')" ng-show="settings.isPollingDisabled"><span>Enable Polling</span></button>
+ </div>
+
+ <div class="masterOnly" ng-show="!isSlave">
+ <button class="optional disable-replication warn" ng-click="execute('disablereplication')" ng-show="master.replicationEnabled"><span>Disable Replication</span></button>
+ <button class="optional enable-replication warn" ng-click="execute('enablereplication')" ng-show="!master.replicationEnabled"><span>Enable Replication</span></button>
+ </div>
+
+ </div>
+
+</div>
Added: lucene/dev/trunk/solr/webapp/web/partials/schema-browser.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/schema-browser.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/schema-browser.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/schema-browser.html Mon May 18 22:35:59 2015
@@ -0,0 +1,206 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="schema-browser" class="loaded">
+
+ <div class="clearfix">
+
+ <div id="data">
+
+ <div id="field">
+
+ <div class="field-options">
+
+ <div class="block head">
+ <h2>
+ <span class="type">{{selectedType}}</span>:
+ <span class="name">{{name}}</span>
+ </h2>
+ </div>
+
+ <div class="partial" ng-show="partialState">
+
+ <p>Because your Index is empty, we do not have enough Information about this Field</p>
+
+ </div>
+
+ <dl class="options clearfix">
+
+ <dt class="field-type">Field-Type:</dt>
+ <dd class="field-type">{{analysis.data.className}}</dd>
+
+ <dt class="similarity" ng-show="display.similarity">Similarity:</dt>
+ <dd class="similarity" ng-show="display.similarity">{{ display.similarity.details }} ({{ similarity.className }}) </dd>
+
+ <dt class="position-increment-gap" ng-show="display.positionIncrementGap"><abbr title="Position Increment Gap">PI Gap</abbr>:</dt>
+ <dd class="position-increment-gap" ng-show="display.positionIncrementGap">{{ display.positionIncrementGap }}</dd>
+
+ <dt class="docs" ng-show="display.docs">Docs:</dt>
+ <dd class="docs" ng-show="display.docs"><a href="{{display.docsUrl}}">{{display.docs | number}}</a></dd>
+
+ <dt class="distinct" ng-show="display.distinct">Distinct:</dt>
+ <dd class="distinct" ng-show="display.distinct">{{display.distinct}}</dd>
+
+ </dl>
+
+ <table class="flags" cellspacing="0" cellpadding="0" border="0">
+
+ <thead>
+
+ <tr>
+
+ <td>Flags:</td>
+ <th ng-repeat="key in display.columns">{{key.name}}</th>
+
+ </tr>
+
+ </thead>
+
+ <tbody>
+ <tr ng-repeat="row in display.rows track by row.name">
+ <th>{{row.name}}</th>
+ <td colspan="2" class="text" ng-show="row.comment">{{row.comment}}</td>
+ <td ng-repeat="cell in row.cells"
+ ng-class="{'check':cell.value}">
+ <span ng-show="cell.value">â</span>
+ <span ng-show="!cell.value"> </span>
+ </td>
+ </tr>
+ </tbody>
+
+ </table>
+
+ <ul class="analyzer">
+ <li class="clearfix {{analyzer.key}}" ng-class="{open: analyzer.show}" ng-repeat="analyzer in analysis.analyzers">
+
+ <p><a class="analysis" ng-href="#/{{core}}/analysis?{{analysis.query}}"><span>{{analyzer.name}} Analyzer:</span></a></p>
+ <dl>
+ <dt><a ng-click="toggleAnalyzer(analyzer)" class="toggle">{{analyzer.detail.className}}</a></dt>
+ </dl>
+ <ul ng-show="analyzer.show">
+ <li class="clearfix {{componentType.key}} data" ng-repeat="componentType in analyzer.detail.componentTypes" ng-show="componentType.components">
+ <p>{{componentType.label}}:</p>
+ <dl>
+ <dt ng-repeat-start="component in componentType.components">{{component.className}}</dt>
+ <dd ng-repeat-end ng-repeat="arg in component.args"
+ ng-class="{'ico-1': arg.booleanValue, 'ico-0': arg.booleanValue==false}">
+ {{arg.name}}<span ng-show="arg.value">: {{arg.value}}</span>
+ </dd>
+ </dl>
+ </li>
+ </ul>
+ </li>
+ </ul>
+
+ </div>
+
+ <div class="terminfo-holder loaded clearfix" ng-class="{disabled: noTermData}" ng-show="is.field">
+
+ <div class="trigger">
+
+ <button class="submit" ng-click="toggleTerms()"><span ng-class="{loader:isLoadingTerms}">Load Term Info</span></button>
+
+ <a ng-show="showTerms" ng-click="toggleAutoload()" ng-class="{on:isAutoload}" class="autoload" title="Automatically load Term Info?"><span>Autoload</span></a>
+
+ </div>
+
+ <p ng-show="showTerms && noTerms" class="status">Sorry, no Term Info available :(</p>
+
+ <div ng-show="showTerms && termInfo.topTerms" class="topterms-holder">
+
+ <form>
+ <p class="head">
+ <input type="text" ng-model="topTermsCount" ng-change="loadTermInfo()">
+ <a class="max-holder" ng-click="loadAllTopTerms()" title="Load all Top-Terms">/<span class="max">{{termInfo.maxTerms | number}}</span></a> Top-Terms:
+ <a id="query_link" href="#/{{core}}/query?q={{name}}:[* TO *]"><span>Query</span> </a>
+ </p>
+ </form>
+
+ <ul>
+ <li class="clearfix" ng-repeat="countGroup in termInfo.topTerms">
+ <p><span>{{countGroup.count}}</span></p>
+ <ul>
+ <li ng-repeat="term in countGroup.terms" ng-class="{odd:$odd}"><a href="#/{{core}}/query?q={{name}}:{{term}}">{{term}}</a></li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </div>
+
+ <div ng-show="showTerms && termInfo.histogram" class="histogram-holder">
+
+ <p class="head">Histogram:</p>
+ <ul>
+ <li ng-repeat="row in termInfo.histogram" ng-class="{odd:$odd}">
+ <dl class="clearfix" style="width: {{(( row.value / termInfo.histogramMax ) * 100 )}}%;">
+ <dt><span>{{ row.key | number}}</span></dt>
+ <dd><span>{{ row.value | number }}</span></dd>
+ </dl>
+ </li>
+
+ </ul>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="related">
+ <select id="type_or_name"
+ ng-model="fieldOrType"
+ chosen
+ data-placeholder="Please select ..."
+ ng-change="selectFieldOrType()"
+ ng-options="f.value as f.label group by f.group for f in fieldsAndTypes"></select>
+
+ <dl id="f-df-t">
+
+ <dt class="field" ng-class="{active: selectedType=='Field'}" ng-show="leftbar.fields">Field</dt>
+ <dd class="field" ng-class="{active: selectedType=='Field'}" ng-repeat="field in leftbar.fields"><a href="#/{{core}}/schema-browser?field={{field}}">{{field}}</a></dd>
+
+ <dt class="copyfield" ng-show="leftbar.copyFieldSources">Copied from</dt>
+ <dd class="copyfield" ng-repeat="field in leftbar.copyFieldSources"><a href="#/{{core}}/schema-browser?field={{field}}">{{field}}</a></dd>
+
+ <dt class="copyfield" ng-show="leftbar.copyFieldDests">Copied to</dt>
+ <dd class="copyfield" ng-repeat="field in leftbar.copyFieldDests"><a href="#/{{core}}/schema-browser?field={{field}}">{{field}}</a></dd>
+
+ <dt class="dynamic-field" ng-class="{active: selectedType=='Dynamic Field'}" ng-show="leftbar.dynamicFields">Dynamic Field {{dynamicFields}} / {{dynamicFields.length()}}</dt>
+ <dd class="dynamic-field" ng-class="{active: selectedType=='Dynamic Field'}" ng-repeat="field in leftbar.dynamicFields"><a href="#/{{core}}/schema-browser?dynamic-field={{field}}">{{field}}</a></dd>
+
+ <dt class="type" ng-class="{active: selectedType=='Type'}" ng-show="leftbar.types">Type</dt>
+ <dd class="type" ng-class="{active: selectedType=='Type'}" ng-repeat="type in leftbar.types"><a href="#/{{core}}/schema-browser?type={{type}}">{{type}}</a></dd>
+
+ </dl>
+
+ <dl class="ukf-dsf">
+
+ <dt class="unique-key-field" ng-class="{active: isUniqueKeyField}" ng-show="uniqueKeyField">Unique Key Field</dt>
+ <dd class="unique-key-field" ng-class="{active: isUniqueKeyField}"><a ng-href="#/{{core}}/schema-browser?field={{uniqueKeyField}}">{{uniqueKeyField}}</a></dd>
+
+ <dt class="default-search-field" ng-class="{active: isDefaultSearchField}" ng-show="defaultSearchField">Default Search Field</dt>
+ <dd class="default-search-field" ng-class="{active: isDefaultSearchField}"><a ng-href="#/{{core}}/schema-browser?field={{defaultSearchField}}">{{defaultSearchField}}</a></dd>
+
+ </dl>
+
+ </div>
+
+ </div>
+
+</div>
Added: lucene/dev/trunk/solr/webapp/web/partials/segments.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/partials/segments.html?rev=1680118&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/partials/segments.html (added)
+++ lucene/dev/trunk/solr/webapp/web/partials/segments.html Mon May 18 22:35:59 2015
@@ -0,0 +1,99 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="segments">
+ <div class="clearfix">
+
+ <div class="block fieldlist" id="statistics">
+
+ <h2><span>Segments</span></h2>
+ <p id="auto-refresh"><a ng-click="toggleAutoRefresh()" ng-class="{on:autorefresh}">Auto-Refresh</a></p>
+ <a class="reload" ng-click="refresh()"><span>reload</span></a>
+
+ <div class="message-container">
+ <div class="message"></div>
+ </div>
+
+ <div class="content">
+
+ <div id="result">
+
+ <div id="response">
+
+ <div class="segments-holder">
+
+ <ul>
+ <li>
+ <dl class="clearfix" style="width:100%;">
+ <dt>
+ <div>Size</div>
+ </dt>
+ <dd>
+ <div class="start">0</div>
+ <div class="w5" ng-repeat="x in xaxis">
+ <span ng-show="x>0.001">{{x.value}}</span>
+ <span ng-hide="x>0.001"> </span>
+ </div>
+ <div class="end">{{segmentMB | number}} MB</div>
+ </dd>
+ </dl>
+ </li>
+ <li ng-repeat="segment in segments">
+ <dl class="clearfix" ng-style="{width: segment.totalSize+'%'}">
+ <dt>
+ <div>{{ segment.name }}</div>
+ </dt>
+ <dd>
+ <div class="live" ng-class="{'merge-candidate':segment.mergeCandidate}"
+ ng-style="{width: segment.aliveDocSize+'%'}"> </div>
+ <div class="tooltip">
+ <div>Segment <b>{{segment.name}}</b>:</div>
+ <div class="label">#docs:</div>
+ <div>{{ segment.size | number }}</div>
+ <div class="label">#dels:</div>
+ <div>{{ segment.delCount | number }}</div>
+ <div class="label">size:</div>
+ <div>{{ segment.sizeInBytes | number }} bytes</div>
+ <div class="label">age:</div>
+ <div>{{ segment.age }}</div>
+ <div class="label">source:</div>
+ <div>{{ segment.source }}</div>
+ </div>
+ <div class="deleted" ng-show="segment.deletedDocSize"
+ style="width: {{ segment.deletedDocSize }}%; margin-left:{{ segment.aliveDocSize}}%;">
+ </div>
+ </dd>
+ </dl>
+ </li>
+ <li>
+ <dl>
+ <dt></dt>
+ <dd>Deletions: {{ deletionsPercentage }}%</dd>
+ </dl>
+ </li>
+ </ul>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+</div>
\ No newline at end of file