|
6 | 6 | cloudStack.sections.system = { |
7 | 7 | title: 'System', |
8 | 8 | id: 'system', |
| 9 | + // Network-as-a-service configuration |
| 10 | + naas: { |
| 11 | + networks: { |
| 12 | + actions: { |
| 13 | + add: { |
| 14 | + label: 'Add Network', |
| 15 | + action: function(args) { |
| 16 | + args.response.success(); |
| 17 | + } |
| 18 | + } |
| 19 | + }, |
| 20 | + dataProvider: function(args) { |
| 21 | + setTimeout(function() { |
| 22 | + args.response.success({ |
| 23 | + data: [ |
| 24 | + { id: 1, name: 'Network A' }, |
| 25 | + { id: 2, name: 'Network B' }, |
| 26 | + { id: 3, name: 'Network C' } |
| 27 | + ] |
| 28 | + }); |
| 29 | + }, 500); |
| 30 | + } |
| 31 | + }, |
| 32 | + |
| 33 | + networkProviders: { |
| 34 | + // Returns state of each network provider type |
| 35 | + statusCheck: function(args) { |
| 36 | + return { |
| 37 | + virtualRouter: 'enabled', |
| 38 | + netscaler: 'disabled', |
| 39 | + f5: 'shutdown', |
| 40 | + srx: 'enabled', |
| 41 | + securityGroups: 'enabled' |
| 42 | + }; |
| 43 | + }, |
| 44 | + |
| 45 | + // Actions performed on entire net. provider type |
| 46 | + actions: { |
| 47 | + enable: function(args) { |
| 48 | + args.response.success(); |
| 49 | + }, |
| 50 | + |
| 51 | + disable: function(args) { |
| 52 | + args.response.success(); |
| 53 | + } |
| 54 | + }, |
| 55 | + |
| 56 | + types: { |
| 57 | + // Virtual router |
| 58 | + virtualRouter: { |
| 59 | + label: 'Virtual Router', |
| 60 | + fields: { |
| 61 | + name: { label: 'Name' }, |
| 62 | + ipaddress: { label: 'IP Address' }, |
| 63 | + state: { label: 'Status' } |
| 64 | + }, |
| 65 | + dataProvider: function(args) { |
| 66 | + args.response.success({ |
| 67 | + data: [ |
| 68 | + { |
| 69 | + name: 'Router0001S', |
| 70 | + ipaddress: '192.168.1.1', |
| 71 | + state: 'Enabled' |
| 72 | + }, |
| 73 | + { |
| 74 | + name: 'Router0001B', |
| 75 | + ipaddress: '192.168.1.155', |
| 76 | + state: 'Enabled' |
| 77 | + }, |
| 78 | + { |
| 79 | + name: 'Router0002', |
| 80 | + ipaddress: '192.168.1.13', |
| 81 | + state: 'Enabled' |
| 82 | + } |
| 83 | + ] |
| 84 | + }); |
| 85 | + } |
| 86 | + }, |
| 87 | + |
| 88 | + // NetScaler |
| 89 | + netscaler: { |
| 90 | + label: 'NetScaler', |
| 91 | + fields: { |
| 92 | + name: { label: 'Name' }, |
| 93 | + ipaddress: { label: 'IP Address' }, |
| 94 | + state: { label: 'Status' } |
| 95 | + }, |
| 96 | + dataProvider: function(args) { |
| 97 | + args.response.success({ |
| 98 | + data: [ |
| 99 | + { |
| 100 | + name: 'Router0001S', |
| 101 | + ipaddress: '192.168.1.1', |
| 102 | + state: 'Enabled' |
| 103 | + }, |
| 104 | + { |
| 105 | + name: 'Router0001B', |
| 106 | + ipaddress: '192.168.1.155', |
| 107 | + state: 'Enabled' |
| 108 | + }, |
| 109 | + { |
| 110 | + name: 'Router0002', |
| 111 | + ipaddress: '192.168.1.13', |
| 112 | + state: 'Enabled' |
| 113 | + } |
| 114 | + ] |
| 115 | + }); |
| 116 | + } |
| 117 | + }, |
| 118 | + |
| 119 | + // F5 |
| 120 | + f5: { |
| 121 | + label: 'F5', |
| 122 | + fields: { |
| 123 | + name: { label: 'Name' }, |
| 124 | + ipaddress: { label: 'IP Address' }, |
| 125 | + state: { label: 'Status' } |
| 126 | + }, |
| 127 | + dataProvider: function(args) { |
| 128 | + args.response.success({ |
| 129 | + data: [ |
| 130 | + { |
| 131 | + name: 'Router0001S', |
| 132 | + ipaddress: '192.168.1.1', |
| 133 | + state: 'Enabled' |
| 134 | + }, |
| 135 | + { |
| 136 | + name: 'Router0001B', |
| 137 | + ipaddress: '192.168.1.155', |
| 138 | + state: 'Enabled' |
| 139 | + }, |
| 140 | + { |
| 141 | + name: 'Router0002', |
| 142 | + ipaddress: '192.168.1.13', |
| 143 | + state: 'Enabled' |
| 144 | + } |
| 145 | + ] |
| 146 | + }); |
| 147 | + } |
| 148 | + }, |
| 149 | + |
| 150 | + // SRX |
| 151 | + srx: { |
| 152 | + label: 'SRX', |
| 153 | + fields: { |
| 154 | + name: { label: 'Name' }, |
| 155 | + ipaddress: { label: 'IP Address' }, |
| 156 | + state: { label: 'Status' } |
| 157 | + }, |
| 158 | + dataProvider: function(args) { |
| 159 | + args.response.success({ |
| 160 | + data: [ |
| 161 | + { |
| 162 | + name: 'Router0001S', |
| 163 | + ipaddress: '192.168.1.1', |
| 164 | + state: 'Enabled' |
| 165 | + }, |
| 166 | + { |
| 167 | + name: 'Router0001B', |
| 168 | + ipaddress: '192.168.1.155', |
| 169 | + state: 'Enabled' |
| 170 | + }, |
| 171 | + { |
| 172 | + name: 'Router0002', |
| 173 | + ipaddress: '192.168.1.13', |
| 174 | + state: 'Enabled' |
| 175 | + } |
| 176 | + ] |
| 177 | + }); |
| 178 | + } |
| 179 | + }, |
| 180 | + |
| 181 | + // Security groups |
| 182 | + securityGroups: { |
| 183 | + label: 'Security Groups', |
| 184 | + fields: { |
| 185 | + name: { label: 'Name' }, |
| 186 | + ipaddress: { label: 'IP Address' }, |
| 187 | + state: { label: 'Status' } |
| 188 | + }, |
| 189 | + dataProvider: function(args) { |
| 190 | + args.response.success({ |
| 191 | + data: [ |
| 192 | + { |
| 193 | + name: 'Router0001S', |
| 194 | + ipaddress: '192.168.1.1', |
| 195 | + state: 'Enabled' |
| 196 | + }, |
| 197 | + { |
| 198 | + name: 'Router0001B', |
| 199 | + ipaddress: '192.168.1.155', |
| 200 | + state: 'Enabled' |
| 201 | + }, |
| 202 | + { |
| 203 | + name: 'Router0002', |
| 204 | + ipaddress: '192.168.1.13', |
| 205 | + state: 'Enabled' |
| 206 | + } |
| 207 | + ] |
| 208 | + }); |
| 209 | + } |
| 210 | + } |
| 211 | + } |
| 212 | + } |
| 213 | + }, |
9 | 214 | show: cloudStack.uiCustom.physicalResources({ |
10 | 215 | sectionSelect: { |
11 | 216 | label: 'Select view' |
|
0 commit comments