Simon Hunt
Committed by Gerrit Code Review

Properties need to be unique, even when they have the same name..

Change-Id: Ifc992458778860c6c8f574c76aad0e9f92699193
...@@ -37,6 +37,7 @@ public class SettingsViewMessageHandler extends UiMessageHandler { ...@@ -37,6 +37,7 @@ public class SettingsViewMessageHandler extends UiMessageHandler {
37 37
38 private static final String COMPONENT = "component"; 38 private static final String COMPONENT = "component";
39 private static final String FQ_COMPONENT = "fqComponent"; 39 private static final String FQ_COMPONENT = "fqComponent";
40 + private static final String PROP = "prop";
40 private static final String ID = "id"; 41 private static final String ID = "id";
41 private static final String TYPE = "type"; 42 private static final String TYPE = "type";
42 private static final String VALUE = "value"; 43 private static final String VALUE = "value";
...@@ -46,7 +47,7 @@ public class SettingsViewMessageHandler extends UiMessageHandler { ...@@ -46,7 +47,7 @@ public class SettingsViewMessageHandler extends UiMessageHandler {
46 private static final char DOT = '.'; 47 private static final char DOT = '.';
47 48
48 private static final String[] COL_IDS = { 49 private static final String[] COL_IDS = {
49 - COMPONENT, FQ_COMPONENT, ID, TYPE, VALUE, DEFAULT, DESC 50 + COMPONENT, FQ_COMPONENT, PROP, ID, TYPE, VALUE, DEFAULT, DESC
50 }; 51 };
51 52
52 @Override 53 @Override
...@@ -95,9 +96,12 @@ public class SettingsViewMessageHandler extends UiMessageHandler { ...@@ -95,9 +96,12 @@ public class SettingsViewMessageHandler extends UiMessageHandler {
95 96
96 private void populateRow(TableModel.Row row, String fqComp, 97 private void populateRow(TableModel.Row row, String fqComp,
97 ConfigProperty prop) { 98 ConfigProperty prop) {
98 - row.cell(COMPONENT, simpleName(fqComp)) 99 + String simple = simpleName(fqComp);
100 +
101 + row.cell(ID, simple + DELIM + prop.name())
99 .cell(FQ_COMPONENT, fqComp) 102 .cell(FQ_COMPONENT, fqComp)
100 - .cell(ID, prop.name()) 103 + .cell(COMPONENT, simple)
104 + .cell(PROP, prop.name())
101 .cell(TYPE, typeName(prop)) 105 .cell(TYPE, typeName(prop))
102 .cell(VALUE, prop.value()) 106 .cell(VALUE, prop.value())
103 .cell(DEFAULT, prop.defaultValue()) 107 .cell(DEFAULT, prop.defaultValue())
...@@ -113,5 +117,7 @@ public class SettingsViewMessageHandler extends UiMessageHandler { ...@@ -113,5 +117,7 @@ public class SettingsViewMessageHandler extends UiMessageHandler {
113 private String typeName(ConfigProperty prop) { 117 private String typeName(ConfigProperty prop) {
114 return prop.type().toString().toLowerCase(); 118 return prop.type().toString().toLowerCase();
115 } 119 }
120 +
121 + private static final String DELIM = "::";
116 } 122 }
117 } 123 }
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
43 cursor: pointer; 43 cursor: pointer;
44 } 44 }
45 45
46 -#settings-details-panel .top .settings-title { 46 +#settings-details-panel .top .settings-title-1 {
47 width: 90%; 47 width: 90%;
48 - height: 62px; 48 + height: 28px;
49 - font-size: 20pt; 49 + font-size: 14pt;
50 font-weight: lighter; 50 font-weight: lighter;
51 overflow: hidden; 51 overflow: hidden;
52 white-space: nowrap; 52 white-space: nowrap;
...@@ -55,6 +55,18 @@ ...@@ -55,6 +55,18 @@
55 margin-bottom: 5px; 55 margin-bottom: 5px;
56 } 56 }
57 57
58 +#settings-details-panel .top .settings-title-2 {
59 + width: 90%;
60 + height: 52px;
61 + font-size: 20pt;
62 + font-weight: lighter;
63 + overflow: hidden;
64 + white-space: nowrap;
65 + padding: 0 6px 0 2px;
66 + margin-top: 5px;
67 + margin-bottom: 5px;
68 +}
69 +
58 #settings-details-panel td.label { 70 #settings-details-panel td.label {
59 font-weight: bold; 71 font-weight: bold;
60 text-align: right; 72 text-align: right;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
15 <table> 15 <table>
16 <tr> 16 <tr>
17 <td colId="component" sortable col-width="260px">Component </td> 17 <td colId="component" sortable col-width="260px">Component </td>
18 - <td colId="id" sortable col-width="260px">Property </td> 18 + <td colId="prop" sortable col-width="260px">Property </td>
19 <td colId="type" sortable col-width="100px">Type </td> 19 <td colId="type" sortable col-width="100px">Type </td>
20 <td colId="value" sortable col-width="100px">Value </td> 20 <td colId="value" sortable col-width="100px">Value </td>
21 <td colId="desc">Description </td> 21 <td colId="desc">Description </td>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 ng-class="{selected: prop.id === selId}" 36 ng-class="{selected: prop.id === selId}"
37 ng-repeat-complete row-id="{{prop.id}}"> 37 ng-repeat-complete row-id="{{prop.id}}">
38 <td>{{prop.component}}</td> 38 <td>{{prop.component}}</td>
39 - <td>{{prop.id}}</td> 39 + <td>{{prop.prop}}</td>
40 <td>{{prop.type}}</td> 40 <td>{{prop.type}}</td>
41 <td ng-class="{notdef: prop.value !== prop.defValue}"> 41 <td ng-class="{notdef: prop.value !== prop.defValue}">
42 {{prop.value}} 42 {{prop.value}}
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 var pName = 'settings-details-panel', 36 var pName = 'settings-details-panel',
37 panelWidth = 540, 37 panelWidth = 540,
38 topPdg = 60, 38 topPdg = 60,
39 - propOrder = ['fqComponent', 'id', 'type', 'value', 'defValue', 'desc'], 39 + propOrder = ['fqComponent', 'prop', 'type', 'value', 'defValue', 'desc'],
40 friendlyProps = [ 40 friendlyProps = [
41 'Component', 'Property', 'Type', 'Value', 'Default Value', 41 'Component', 'Property', 'Type', 'Value', 'Default Value',
42 'Description' 42 'Description'
...@@ -93,7 +93,8 @@ ...@@ -93,7 +93,8 @@
93 } 93 }
94 } 94 }
95 95
96 - ndiv('settings-title'); 96 + ndiv('settings-title-1');
97 + ndiv('settings-title-2');
97 ndiv('settings-props', true); 98 ndiv('settings-props', true);
98 } 99 }
99 100
...@@ -111,7 +112,8 @@ ...@@ -111,7 +112,8 @@
111 function populateTop(details) { 112 function populateTop(details) {
112 var propsBody = top.select('.settings-props').append('tbody'); 113 var propsBody = top.select('.settings-props').append('tbody');
113 114
114 - top.select('.settings-title').text(details.id); 115 + top.select('.settings-title-1').text(details.component);
116 + top.select('.settings-title-2').text(details.prop);
115 117
116 propOrder.forEach(function (prop, i) { 118 propOrder.forEach(function (prop, i) {
117 addProp(propsBody, i, details[prop]); 119 addProp(propsBody, i, details[prop]);
......