You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2020/02/28 09:38:00 UTC
[lucene-solr] branch branch_8x updated: SOLR-14287: Admin UI
Properties screen does not show colons (#1300)
This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 3c8ab72 SOLR-14287: Admin UI Properties screen does not show colons (#1300)
3c8ab72 is described below
commit 3c8ab725c5a3c8883c5afde625441da06fee3407
Author: Jan Høydahl <ja...@apache.org>
AuthorDate: Fri Feb 28 10:32:09 2020 +0100
SOLR-14287: Admin UI Properties screen does not show colons (#1300)
(cherry picked from commit 198d9db6745118e593feeab68f9697471e1deeae)
---
solr/CHANGES.txt | 4 +++-
.../web/js/angular/controllers/java-properties.js | 20 ++++++++++----------
solr/webapp/web/partials/java-properties.html | 2 +-
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c460860..8d72e68 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -157,7 +157,9 @@ Bug Fixes
* SOLR-14252: Avoid NullPointerException in AggregateMetric. (Andy Webb via ab)
-* SOLR-13411: Deny atomic update for route.field, uniqueKey, version and throw exception. (Dr Oleg Savrasov via Mikhail Khludnev)
+* SOLR-13411: Deny atomic update for route.field, uniqueKey, version and throw exception. (Dr Oleg Savrasov via Mikhail Khludnev)
+
+* SOLR-14287: Admin UI Properties screen does not show colons (janhoy)
Other Changes
---------------------
diff --git a/solr/webapp/web/js/angular/controllers/java-properties.js b/solr/webapp/web/js/angular/controllers/java-properties.js
index 001edfb..817f98a 100644
--- a/solr/webapp/web/js/angular/controllers/java-properties.js
+++ b/solr/webapp/web/js/angular/controllers/java-properties.js
@@ -25,18 +25,18 @@ solrAdminApp.controller('JavaPropertiesController',
var props = [];
for (var key in sysprops) {
var value = sysprops[key];
- var key = key.replace(/\./g, '.​');
- if (key.indexOf(".path")!=-1 || key.indexOf(".dirs")) {
- var values = [];
- var parts = value.split(sep);
- for (var i in parts) {
- values.push({pos:i, value:parts[i]})
- }
- props.push({name: key, values: values});
- } else {
- props.push({name: key, values: [value]});
+ var values = value.split(sep);
+ if (value === sep) {
+ values = [':'];
}
+ props.push({
+ name: key.replace(/\./g, '.​')
+ .replace(/</g, '<')
+ .replace(/>/g, '>'),
+ values: values
+ });
}
+ $scope.pathSeparator = sep;
$scope.props = props;
});
};
diff --git a/solr/webapp/web/partials/java-properties.html b/solr/webapp/web/partials/java-properties.html
index 047de48..9c67c7b 100644
--- a/solr/webapp/web/partials/java-properties.html
+++ b/solr/webapp/web/partials/java-properties.html
@@ -19,7 +19,7 @@ limitations under the License.
<li ng-class="{odd:$odd}" ng-repeat="prop in props | orderObjectBy:'name'">
<dl class="clearfix">
<dt ng-bind-html="prop.name | unsafe"></dt>
- <dd ng-class="{odd:$odd, multi:props.length>1}" ng-repeat="value in prop.values">{{value.value}}</dd>
+ <dd ng-class="{odd:$odd, multi:props.length>1}"><span ng-repeat-start="val in prop.values">{{val}}</span><span ng-repeat-end ng-if="!$last">{{pathSeparator}}{{"​"}}</span></dd>
</dl>
</li>
</ul>