GUI -- Added application view buttons. (WIP - require click handlers still)
- cleaned up icon.css rules. Change-Id: If76f1e731da80e44391077c265f7671b07ef34db
Showing
4 changed files
with
78 additions
and
72 deletions
... | @@ -22,45 +22,49 @@ svg#IconLibDefs { | ... | @@ -22,45 +22,49 @@ svg#IconLibDefs { |
22 | display: none; | 22 | display: none; |
23 | } | 23 | } |
24 | 24 | ||
25 | -svg.embeddedIcon .icon .glyph { | 25 | +svg .svgIcon { |
26 | - stroke: none; | ||
27 | - fill: white; | ||
28 | fill-rule: evenodd; | 26 | fill-rule: evenodd; |
29 | } | 27 | } |
30 | 28 | ||
31 | -/* | 29 | +svg.embeddedIcon g.icon { |
32 | - FIXME: The following should be consolidated to result in much less CSS and | ||
33 | - not to require entries for every icon. | ||
34 | - */ | ||
35 | - | ||
36 | -.light svg.embeddedIcon .icon.appActive, | ||
37 | -.light svg.embeddedIcon .icon.appInactive { | ||
38 | fill: none; | 30 | fill: none; |
39 | } | 31 | } |
40 | 32 | ||
41 | -.dark svg.embeddedIcon .icon.appActive, | 33 | +svg.embeddedIcon g.icon rect { |
42 | -.dark svg.embeddedIcon .icon.appInactive { | 34 | + stroke: none; |
43 | fill: none; | 35 | fill: none; |
44 | } | 36 | } |
45 | 37 | ||
46 | -.light svg.embeddedIcon .icon.appActive .glyph { | 38 | +svg.embeddedIcon g.icon .glyph { |
47 | - fill: green; | 39 | + stroke: none; |
40 | + fill: white; | ||
41 | + fill-rule: evenodd; | ||
48 | } | 42 | } |
49 | -.dark svg.embeddedIcon .icon.appActive .glyph { | 43 | + |
50 | - fill: #266610; | 44 | + |
45 | +/* Sortable table headers */ | ||
46 | +.light div.tableColSort svg.embeddedIcon .icon .glyph { | ||
47 | + fill: black; | ||
48 | +} | ||
49 | +.dark div.tableColSort svg.embeddedIcon .icon .glyph { | ||
50 | + fill: #ccc; | ||
51 | } | 51 | } |
52 | 52 | ||
53 | 53 | ||
54 | -.light svg.embeddedIcon .icon.deviceOnline, | 54 | +/* color schemes for specific icon classes */ |
55 | -.light svg.embeddedIcon .icon.deviceOffline { | 55 | + |
56 | - fill: none; | 56 | +svg.embeddedIcon .icon.appInactive .glyph { |
57 | + fill: rgba(166, 166, 166, 0.52); | ||
57 | } | 58 | } |
58 | 59 | ||
59 | -.dark svg.embeddedIcon .icon.deviceOnline, | 60 | +.light svg.embeddedIcon .icon.appActive .glyph { |
60 | -.dark svg.embeddedIcon .icon.deviceOffline { | 61 | + fill: green; |
61 | - fill: none; | 62 | +} |
63 | +.dark svg.embeddedIcon .icon.appActive .glyph { | ||
64 | + fill: #308C10; | ||
62 | } | 65 | } |
63 | 66 | ||
67 | + | ||
64 | .light svg.embeddedIcon .icon.devIcon_SWITCH { | 68 | .light svg.embeddedIcon .icon.devIcon_SWITCH { |
65 | fill: #ccc; | 69 | fill: #ccc; |
66 | } | 70 | } |
... | @@ -81,55 +85,8 @@ svg.embeddedIcon .icon .glyph { | ... | @@ -81,55 +85,8 @@ svg.embeddedIcon .icon .glyph { |
81 | fill: darkred; | 85 | fill: darkred; |
82 | } | 86 | } |
83 | .dark svg.embeddedIcon .icon.deviceOnline .glyph { | 87 | .dark svg.embeddedIcon .icon.deviceOnline .glyph { |
84 | - fill: #266610; | 88 | + fill: #308C10; |
85 | } | 89 | } |
86 | .dark svg.embeddedIcon .icon.deviceOffline .glyph { | 90 | .dark svg.embeddedIcon .icon.deviceOffline .glyph { |
87 | - fill: #610000; | 91 | + fill: #AD2D2D; |
88 | -} | ||
89 | - | ||
90 | -.light svg.embeddedIcon .icon.tableColSortAsc .glyph, | ||
91 | -.light svg.embeddedIcon .icon.tableColSortDesc .glyph { | ||
92 | - fill: black; | ||
93 | -} | ||
94 | -.dark svg.embeddedIcon .icon.tableColSortAsc .glyph, | ||
95 | -.dark svg.embeddedIcon .icon.tableColSortDesc .glyph { | ||
96 | - fill: #ccc; | ||
97 | -} | ||
98 | - | ||
99 | -.light svg.embeddedIcon .icon.appActive rect, | ||
100 | -.light svg.embeddedIcon .icon.appInactive rect, | ||
101 | -.dark svg.embeddedIcon .icon.appActive rect, | ||
102 | -.dark svg.embeddedIcon .icon.appInactive rect, | ||
103 | -.light svg.embeddedIcon .icon.deviceOnline rect, | ||
104 | -.light svg.embeddedIcon .icon.deviceOffline rect, | ||
105 | -.dark svg.embeddedIcon .icon.deviceOnline rect, | ||
106 | -.dark svg.embeddedIcon .icon.deviceOffline rect { | ||
107 | - stroke: none; | ||
108 | - fill: none; | ||
109 | -} | ||
110 | - | ||
111 | -svg.embeddedIcon .icon.tableColSortAsc rect, | ||
112 | -svg.embeddedIcon .icon.tableColSortDesc rect { | ||
113 | - stroke: none; | ||
114 | - fill: none; | ||
115 | -} | ||
116 | - | ||
117 | -svg.embeddedIcon .icon rect { | ||
118 | - stroke: black; | ||
119 | - stroke-width: 1px; | ||
120 | -} | ||
121 | -.dark svg.embeddedIcon .icon.deviceOnline rect | ||
122 | -.dark svg.embeddedIcon .icon.deviceOffline rect { | ||
123 | - stroke: none; | ||
124 | -} | ||
125 | -.dark svg.embeddedIcon .icon rect { | ||
126 | - stroke: #ccc; | ||
127 | -} | ||
128 | -.dark svg.embeddedIcon .icon.tableColSortAsc rect, | ||
129 | -.dark svg.embeddedIcon .icon.tableColSortDesc rect { | ||
130 | - stroke: none; | ||
131 | -} | ||
132 | - | ||
133 | -svg .svgIcon { | ||
134 | - fill-rule: evenodd; | ||
135 | } | 92 | } | ... | ... |
... | @@ -31,6 +31,10 @@ | ... | @@ -31,6 +31,10 @@ |
31 | var glyphMapping = { | 31 | var glyphMapping = { |
32 | appActive: 'checkMark', | 32 | appActive: 'checkMark', |
33 | appInactive: 'unknown', | 33 | appInactive: 'unknown', |
34 | + appPlus: 'plus', | ||
35 | + appMinus: 'minus', | ||
36 | + appPlay: 'play', | ||
37 | + appStop: 'stop', | ||
34 | 38 | ||
35 | deviceOnline: 'checkMark', | 39 | deviceOnline: 'checkMark', |
36 | deviceOffline: 'xMark', | 40 | deviceOffline: 'xMark', |
... | @@ -179,11 +183,13 @@ | ... | @@ -179,11 +183,13 @@ |
179 | function sortAsc(div) { | 183 | function sortAsc(div) { |
180 | div.style('display', 'inline-block'); | 184 | div.style('display', 'inline-block'); |
181 | loadEmbeddedIcon(div, 'tableColSortAsc', 10); | 185 | loadEmbeddedIcon(div, 'tableColSortAsc', 10); |
186 | + div.classed('tableColSort', true); | ||
182 | } | 187 | } |
183 | 188 | ||
184 | function sortDesc(div) { | 189 | function sortDesc(div) { |
185 | div.style('display', 'inline-block'); | 190 | div.style('display', 'inline-block'); |
186 | loadEmbeddedIcon(div, 'tableColSortDesc', 10); | 191 | loadEmbeddedIcon(div, 'tableColSortDesc', 10); |
192 | + div.classed('tableColSort', true); | ||
187 | } | 193 | } |
188 | 194 | ||
189 | function sortNone(div) { | 195 | function sortNone(div) { | ... | ... |
... | @@ -18,5 +18,40 @@ | ... | @@ -18,5 +18,40 @@ |
18 | ONOS GUI -- Host View -- CSS file | 18 | ONOS GUI -- Host View -- CSS file |
19 | */ | 19 | */ |
20 | 20 | ||
21 | -#ov-app td { | 21 | +#ov-app h2 { |
22 | + display: inline-block; | ||
23 | +} | ||
24 | + | ||
25 | +#ov-app div.ctrl-btns { | ||
26 | + display:inline-block; | ||
27 | + float: right; | ||
28 | + width: 200px; | ||
29 | + height: 44px; | ||
30 | + margin-right: 24px; | ||
31 | + margin-top: 7px; | ||
32 | +} | ||
33 | + | ||
34 | +div.ctrl-btns div { | ||
35 | + display: inline-block; | ||
36 | + padding: 4px; | ||
37 | + cursor: pointer; | ||
38 | +} | ||
39 | + | ||
40 | +.light div.ctrl-btns div svg.embeddedIcon g.icon use { | ||
41 | + fill: white; | ||
42 | +} | ||
43 | +.dark div.ctrl-btns div svg.embeddedIcon g.icon use { | ||
44 | + fill: #333; | ||
45 | +} | ||
46 | + | ||
47 | +.light div.ctrl-btns div svg.embeddedIcon g.icon rect { | ||
48 | + fill: #dde; | ||
49 | +} | ||
50 | +.dark div.ctrl-btns div svg.embeddedIcon g.icon rect { | ||
51 | + fill: #556; | ||
52 | +} | ||
53 | + | ||
54 | +/* rows are selectable */ | ||
55 | +table.summary-list td { | ||
56 | + cursor: pointer; | ||
22 | } | 57 | } | ... | ... |
1 | <!-- app partial HTML --> | 1 | <!-- app partial HTML --> |
2 | <div id="ov-app"> | 2 | <div id="ov-app"> |
3 | + <div> | ||
3 | <h2>Applications ({{ctrl.appData.length}} total)</h2> | 4 | <h2>Applications ({{ctrl.appData.length}} total)</h2> |
5 | + <div class="ctrl-btns"> | ||
6 | + <div icon icon-size="36" icon-id="appPlus"></div> | ||
7 | + <div icon icon-size="36" icon-id="appMinus"></div> | ||
8 | + <div icon icon-size="36" icon-id="appPlay"></div> | ||
9 | + <div icon icon-size="36" icon-id="appStop"></div> | ||
10 | + </div> | ||
11 | + </div> | ||
4 | <table class="summary-list" | 12 | <table class="summary-list" |
5 | onos-fixed-header | 13 | onos-fixed-header |
6 | onos-sortable-header | 14 | onos-sortable-header | ... | ... |
-
Please register or login to post a comment