GUI -- Application View Details Panel -
- simplified DOM structure - refactored code to reduce boilerplate - cleaned up CSS Change-Id: Iff443d7f038f1f770e7b3e9ed383c65b96ba6886
Showing
3 changed files
with
20 additions
and
45 deletions
... | @@ -58,7 +58,7 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { | ... | @@ -58,7 +58,7 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { |
58 | private static final String URL = "url"; | 58 | private static final String URL = "url"; |
59 | private static final String README = "readme"; | 59 | private static final String README = "readme"; |
60 | private static final String ROLE = "role"; | 60 | private static final String ROLE = "role"; |
61 | - private static final String REQUIRED_APPS = "_required_apps"; | 61 | + private static final String REQUIRED_APPS = "required_apps"; |
62 | private static final String FEATURES = "features"; | 62 | private static final String FEATURES = "features"; |
63 | private static final String PERMISSIONS = "permissions"; | 63 | private static final String PERMISSIONS = "permissions"; |
64 | 64 | ||
... | @@ -175,13 +175,13 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { | ... | @@ -175,13 +175,13 @@ public class ApplicationViewMessageHandler extends UiMessageHandler { |
175 | 175 | ||
176 | // process required applications | 176 | // process required applications |
177 | ArrayNode requiredApps = arrayNode(); | 177 | ArrayNode requiredApps = arrayNode(); |
178 | - app.requiredApps().forEach(s -> requiredApps.add(s)); | 178 | + app.requiredApps().forEach(requiredApps::add); |
179 | 179 | ||
180 | data.set(REQUIRED_APPS, requiredApps); | 180 | data.set(REQUIRED_APPS, requiredApps); |
181 | 181 | ||
182 | // process features | 182 | // process features |
183 | ArrayNode features = arrayNode(); | 183 | ArrayNode features = arrayNode(); |
184 | - app.features().forEach(f -> features.add(f)); | 184 | + app.features().forEach(features::add); |
185 | 185 | ||
186 | data.set(FEATURES, features); | 186 | data.set(FEATURES, features); |
187 | 187 | ... | ... |
... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* | 17 | /* |
18 | - ONOS GUI -- Host View -- CSS file | 18 | + ONOS GUI -- Applications View -- CSS file |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ov-app h2 { | 21 | #ov-app h2 { |
... | @@ -75,7 +75,7 @@ | ... | @@ -75,7 +75,7 @@ |
75 | } | 75 | } |
76 | 76 | ||
77 | #application-details-panel .container { | 77 | #application-details-panel .container { |
78 | - padding: 0 12px; | 78 | + padding: 0 10px; |
79 | } | 79 | } |
80 | 80 | ||
81 | #application-details-panel .close-btn { | 81 | #application-details-panel .close-btn { |
... | @@ -91,60 +91,48 @@ | ... | @@ -91,60 +91,48 @@ |
91 | fill: #ccc; | 91 | fill: #ccc; |
92 | } | 92 | } |
93 | 93 | ||
94 | -#application-details-panel .dev-icon { | 94 | +#application-details-panel .app-icon { |
95 | display: inline-block; | 95 | display: inline-block; |
96 | padding: 0 6px 0 0; | 96 | padding: 0 6px 0 0; |
97 | vertical-align: middle; | 97 | vertical-align: middle; |
98 | } | 98 | } |
99 | -.light .dev-icon svg.embeddedIcon .glyph { | ||
100 | - fill: rgb(0, 172, 229); | ||
101 | -} | ||
102 | -.dark .dev-icon svg.embeddedIcon .glyph { | ||
103 | - fill: #486D91; | ||
104 | -} | ||
105 | 99 | ||
106 | #application-details-panel h2 { | 100 | #application-details-panel h2 { |
107 | display: inline-block; | 101 | display: inline-block; |
108 | margin: 8px 0; | 102 | margin: 8px 0; |
103 | + font-size: 12pt; | ||
109 | } | 104 | } |
110 | 105 | ||
111 | #application-details-panel .top div.left { | 106 | #application-details-panel .top div.left { |
112 | float: left; | 107 | float: left; |
113 | - padding: 0 18px 0 0; | 108 | + padding: 0 12px 0 0; |
114 | } | 109 | } |
115 | #application-details-panel .top div.right { | 110 | #application-details-panel .top div.right { |
116 | display: inline-block; | 111 | display: inline-block; |
112 | + overflow: hidden; | ||
113 | + width: 320px; | ||
117 | } | 114 | } |
118 | 115 | ||
119 | -#application-details-panel td.label { | 116 | +#application-details-panel td.label, |
117 | +#application-details-panel .app-url i { | ||
120 | font-style: italic; | 118 | font-style: italic; |
121 | padding-right: 12px; | 119 | padding-right: 12px; |
122 | /* works for both light and dark themes ... */ | 120 | /* works for both light and dark themes ... */ |
123 | color: #777; | 121 | color: #777; |
124 | } | 122 | } |
125 | 123 | ||
126 | -#application-details-panel .actionBtns div { | 124 | +#application-details-panel td.value-bold { |
127 | - padding: 12px 6px; | 125 | + font-weight: bold; |
128 | } | 126 | } |
129 | 127 | ||
130 | -#application-details-panel .top hr { | 128 | +#application-details-panel .app-url { |
131 | - width: 95%; | 129 | + padding: 10px 6px 6px; |
132 | - margin: 0 auto; | ||
133 | } | 130 | } |
134 | 131 | ||
135 | -.light #application-details-panel hr { | 132 | +#application-details-panel hr { |
136 | - opacity: .5; | ||
137 | - border-color: #FFF; | ||
138 | -} | ||
139 | -.dark #application-details-panel hr { | ||
140 | - border-color: #666; | ||
141 | -} | ||
142 | - | ||
143 | -#application-details-panel .middle hr { | ||
144 | width: 95%; | 133 | width: 95%; |
145 | - margin: 0 auto; | 134 | + margin: 10px auto; |
146 | } | 135 | } |
147 | - | ||
148 | .light #application-details-panel hr { | 136 | .light #application-details-panel hr { |
149 | opacity: .5; | 137 | opacity: .5; |
150 | border-color: #FFF; | 138 | border-color: #FFF; |
... | @@ -155,25 +143,12 @@ | ... | @@ -155,25 +143,12 @@ |
155 | 143 | ||
156 | #application-details-panel .bottom table { | 144 | #application-details-panel .bottom table { |
157 | border-spacing: 0; | 145 | border-spacing: 0; |
146 | + width: 100%; | ||
158 | } | 147 | } |
159 | 148 | ||
160 | -#application-details-panel .bottom th { | ||
161 | - letter-spacing: 0.02em; | ||
162 | -} | ||
163 | - | ||
164 | -.light #application-details-panel .bottom th { | ||
165 | - background-color: #CCC; | ||
166 | - /* default text color */ | ||
167 | -} | ||
168 | -.dark #application-details-panel .bottom th { | ||
169 | - background-color: #131313; | ||
170 | - color: #ccc; | ||
171 | -} | ||
172 | - | ||
173 | -#application-details-panel .bottom th, | ||
174 | #application-details-panel .bottom td { | 149 | #application-details-panel .bottom td { |
175 | padding: 6px 12px; | 150 | padding: 6px 12px; |
176 | - text-align: center; | 151 | + text-align: left; |
177 | } | 152 | } |
178 | 153 | ||
179 | .light #application-details-panel .bottom tr:nth-child(odd) { | 154 | .light #application-details-panel .bottom tr:nth-child(odd) { | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment