SOLR-7717 angular: Prevent java-properties tab throwing exceptions

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1687732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Upayavira 2015-06-26 10:06:08 +00:00
parent 565319ec76
commit 522de68c54
2 changed files with 7 additions and 2 deletions

View File

@ -27,7 +27,12 @@ solrAdminApp.controller('JavaPropertiesController',
var value = sysprops[key];
var key = key.replace(/\./g, '.​');
if (key.indexOf(".path")!=-1 || key.indexOf(".dirs")) {
props.push({name: key, values: value.split(sep)});
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]});
}

View File

@ -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&gt;1}" ng-repeat="value in prop.values">{{value}}</dd>
<dd ng-class="{odd:$odd, multi:props.length&gt;1}" ng-repeat="value in prop.values">{{value.value}}</dd>
</dl>
</li>
</ul>