This repository was archived by the owner on Mar 25, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -221,5 +221,21 @@ Account tags are available only for the last API version. If you are using anoth
221
221
"accountTagsEnabled": false
222
222
```
223
223
224
+ ### Sidebar Order
225
+ This configuration allows a user to set a list of left-sidebar sections. Configure possible if property “allowReorderingSidebar” is true.
226
+ For example,
227
+ ```
228
+ "sidebarOrder": [
229
+ "vms",
230
+ "volumes",
231
+ "templates",
232
+ "sgs",
233
+ "events",
234
+ "ssh",
235
+ "accounts",
236
+ "settings"
237
+ ]
238
+ ```
239
+
224
240
### Extensions
225
241
Please check [ Wiki] ( https://github.com/bwsw/cloudstack-ui/wiki/Plugins ) for extension configuration options.
Original file line number Diff line number Diff line change 67
67
(change) ="handleRouteChecked($event) "
68
68
[@handleSlide] ="!editing ? 'in' : '' "
69
69
> </ mat-checkbox >
70
- < div [@linkSlide] ="'out' ">
71
- < div class ="link-element " [innerHTML] ="route.text | translate "> </ div >
72
- </ div >
70
+ < div class ="link-element-edit " [innerHTML] ="route.text | translate "> </ div >
73
71
</ div >
74
72
</ ng-container >
75
73
</ div >
Original file line number Diff line number Diff line change 40
40
display : inline-block ;
41
41
border-color : inherit ;
42
42
vertical-align : middle ;
43
+ & -edit {
44
+ transform : translateX (60px );
45
+ }
43
46
}
44
47
45
48
a {
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export class AppSidebarComponent extends WithUnsubscribe()
62
62
}
63
63
64
64
public ngOnInit ( ) {
65
+ this . setUpRoutes ( ) ;
65
66
this . setUpDragula ( ) ;
66
67
this . initNavigationOrder ( ) ;
67
68
}
@@ -164,4 +165,13 @@ export class AppSidebarComponent extends WithUnsubscribe()
164
165
private toggleState ( ) : void {
165
166
this . _editing = ! this . _editing ;
166
167
}
168
+
169
+ public setUpRoutes ( ) {
170
+ if ( this . canEdit ) {
171
+ const defaultOrder = this . configService . get < Array < string > > ( 'sidebarOrder' ) ;
172
+ if ( defaultOrder ) {
173
+ this . routes = this . routes . filter ( route => defaultOrder . some ( _ => _ . toUpperCase ( ) === route . id ) ) ;
174
+ }
175
+ }
176
+ }
167
177
}
You can’t perform that action at this time.
0 commit comments