Skip to content

Commit 8618392

Browse files
committed
move instance-list to attribute
1 parent 4d2a83d commit 8618392

File tree

3 files changed

+55
-56
lines changed

3 files changed

+55
-56
lines changed

client/directives/instanceList/directiveInstanceList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function instanceList(
1212
$state
1313
) {
1414
return {
15-
restrict: 'E',
15+
restrict: 'A',
1616
templateUrl: 'viewInstanceList',
1717
scope: {
1818
data: '=',
Lines changed: 52 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,61 @@
1-
section.row.boxes
2-
3-
.spinner-wrapper.spinner-md.in(
4-
ng-if = "state.loadingInstances"
5-
ng-include = "'spinner'"
1+
.spinner-wrapper.spinner-md.in(
2+
ng-if = "state.loadingInstances"
3+
ng-include = "'spinner'"
4+
)
5+
6+
h2.sub-header.load(
7+
)
8+
span.sub-header-text Boxes
9+
a.btn.btn-sm.white.sub-header-action(
10+
ng-click = "stateToNew()"
11+
ng-href = "/{{ data.activeAccount.oauthName() }}/new"
12+
tooltip = "New Box"
13+
tooltip-options = "{\"class\":\"bottom\",\"left\":6,\"top\":30}"
614
)
15+
svg.iconnables.icons-add
16+
use(
17+
xlink:href = "#icons-add"
18+
)
719

8-
h2.sub-header.load(
20+
//- *
21+
//- LINKED NAV LAYOUT
22+
//- *
23+
24+
ul.box-group
25+
//- .active for current active box
26+
//- .active.expanded for current active box with links
27+
//- .runnning for running box
28+
29+
//- if not .active
30+
li.box-group-item.btn.white.load(
31+
ng-class = "getInstanceClasses(instance)"
32+
ng-repeat = "instance in data.instances.models | orderBy:'attrs.name'"
33+
ng-show = "data.instances.models.length && !state.loadingInstances"
34+
tooltip = "{{ instance.attrs.name }}"
35+
tooltip-options = "{\"class\":\"nav-tooltips right\",\"left\":31,\"top\":10}"
936
)
10-
span.sub-header-text Boxes
11-
a.btn.btn-sm.white.sub-header-action(
12-
ng-click = "stateToNew()"
13-
ng-href = "/{{ data.activeAccount.oauthName() }}/new"
14-
tooltip = "New Box"
15-
tooltip-options = "{\"class\":\"bottom\",\"left\":6,\"top\":30}"
37+
a.box-item-name.text-overflow(
38+
ng-click = "stateToInstance(instance)"
39+
ng-href = "/{{ data.activeAccount.oauthName() }}/{{ instance.attrs.name }}"
40+
ng-model = "instance"
41+
) {{ instance.attrs.name }}
42+
span.icons-status(
43+
title = "{{ getInstanceAltTitle(instance) }}"
44+
)
45+
linked-instances(
46+
instances = 'data.instances'
47+
instance-dependencies = "instance.dependencies"
48+
ng-if = "getInstanceClasses(instance).expanded"
49+
state-to-instance = 'stateToInstance'
50+
type = "sidebar"
1651
)
17-
svg.iconnables.icons-add
18-
use(
19-
xlink:href = "#icons-add"
20-
)
21-
2252
//- *
23-
//- LINKED NAV LAYOUT
53+
//- 0.3 linked boxes
2454
//- *
25-
26-
ul.box-group
27-
//- .active for current active box
28-
//- .active.expanded for current active box with links
29-
//- .runnning for running box
30-
31-
//- if not .active
32-
li.box-group-item.btn.white.load(
33-
ng-class = "getInstanceClasses(instance)"
34-
ng-repeat = "instance in data.instances.models | orderBy:'attrs.name'"
35-
ng-show = "data.instances.models.length && !state.loadingInstances"
36-
tooltip = "{{ instance.attrs.name }}"
37-
tooltip-options = "{\"class\":\"nav-tooltips right\",\"left\":31,\"top\":10}"
38-
)
39-
a.box-item-name.text-overflow(
40-
ng-click = "stateToInstance(instance)"
41-
ng-href = "/{{ data.activeAccount.oauthName() }}/{{ instance.attrs.name }}"
42-
ng-model = "instance"
43-
) {{ instance.attrs.name }}
44-
span.icons-status(
45-
title = "{{ getInstanceAltTitle(instance) }}"
46-
)
47-
linked-instances(
48-
instances = 'data.instances'
49-
instance-dependencies = "instance.dependencies"
50-
ng-if = "getInstanceClasses(instance).expanded"
51-
state-to-instance = 'stateToInstance'
52-
type = "sidebar"
53-
)
54-
//- *
55-
//- 0.3 linked boxes
56-
//- *
57-
//- if .active
55+
//- if .active
5856
5957
6058
61-
//- *
62-
//- END LINKED NAV LAYOUT
63-
//- *
59+
//- *
60+
//- END LINKED NAV LAYOUT
61+
//- *

client/templates/abstractLayouts/instanceLayout/viewInstanceLayout.jade

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ nav.sidebar.global-sidebar(
77
accounts-select
88
data = "dataApp.data"
99
)
10-
instance-list(
10+
section.row.boxes(
11+
instance-list
1112
data = "dataApp.data"
1213
state = "dataInstanceLayout.state"
1314
)

0 commit comments

Comments
 (0)