|
9149 | 9149 |
|
9150 | 9150 | // Granular settings for cluster |
9151 | 9151 | settings: { |
9152 | | - title: 'label.menu.global.settings', |
| 9152 | + title: 'Settings', |
9153 | 9153 | custom: cloudStack.uiCustom.granularSettings({ |
9154 | 9154 | dataProvider: function(args) { |
9155 | | - args.response.success({ |
9156 | | - data: [ |
9157 | | - { name: 'config.param.1', value: 1 }, |
9158 | | - { name: 'config.param.2', value: 2 } |
9159 | | - ] |
9160 | | - }); |
| 9155 | + $.ajax({ |
| 9156 | + url:createURL('listConfigurations&clusterid=' + args.context.clusters[0].id), |
| 9157 | + data: { page: args.page, pageSize: pageSize, listAll: true }, |
| 9158 | + success:function(json){ |
| 9159 | + args.response.success({ |
| 9160 | + data:json.listconfigurationsresponse.configuration |
| 9161 | + |
| 9162 | + }); |
| 9163 | + |
| 9164 | + }, |
| 9165 | + |
| 9166 | + error:function(json){ |
| 9167 | + args.response.error(parseXMLHttpResponse(json)); |
| 9168 | + |
| 9169 | + } |
| 9170 | + }); |
| 9171 | + |
9161 | 9172 | }, |
9162 | 9173 | actions: { |
9163 | 9174 | edit: function(args) { |
9164 | 9175 | // call updateClusterLevelParameters |
9165 | | - args.response.success(); |
| 9176 | + |
| 9177 | + var data = { |
| 9178 | + name: args.data.jsonObj.name, |
| 9179 | + value: args.data.value |
| 9180 | + }; |
| 9181 | + |
| 9182 | + $.ajax({ |
| 9183 | + url:createURL('updateConfiguration&clusterid=' + args.context.clusters[0].id), |
| 9184 | + data:data, |
| 9185 | + success:function(json){ |
| 9186 | + var item = json.updateconfigurationresponse.configuration; |
| 9187 | + args.response.success({data:item}); |
| 9188 | + }, |
| 9189 | + |
| 9190 | + error: function(json) { |
| 9191 | + args.response.error(parseXMLHttpResponse(json)); |
| 9192 | + } |
| 9193 | + |
| 9194 | + }); |
| 9195 | + |
9166 | 9196 | } |
9167 | 9197 | } |
9168 | 9198 | }) |
|
0 commit comments