forked from electric-cloud/DSL-Samples
-
Notifications
You must be signed in to change notification settings - Fork 6
/
FlowMenuExtension.groovy
executable file
·47 lines (39 loc) · 1.27 KB
/
FlowMenuExtension.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
ElectricFlow DSL Example
Add menu items to the ElectricFlow UI
The ElectricFlow menu can be extended by creating a property, /server/ec_ui/flowMenuExtension. The content of this property should be XML with 'menu', 'tab', 'label' and 'url' tags arranged in the following manner:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<!-- A top level menu item -->
<tab>
<label>some label text</label>
<url>a link</url>
</tab>
<!-- A top level menu item with a sub menu -->
<tab>
<label>a root menu...</label>
<tab>
<label>a sub menu item</label>
<url>a link</url>
</tab>
</tab>
<!-- etcetera -->
</menu>
Note that the URLs are referenced from the 'commander' node, so referencing Flow UI items requires ../flow
Instructions
- Copy and paste this document into the DSL IDE and 'Submit DSL', or
- ectool evalDsl --dslFile FlowMenuExtension.groovy
*/
property "/server/ec_ui/flowMenuExtension", value: '''\
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tab>
<label>Master Components</label>
<url>../flow/#applications/components</url>
</tab>
<tab>
<label>CI</label>
<url>pages/EC-CIManager/configure</url>
</tab>
</menu>
'''.stripIndent()