Skip to content

Commit 1bb0136

Browse files
committed
Add granular settings widget
1 parent 202930f commit 1bb0136

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

ui/index.jsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,7 @@ under the License.
16471647
<script type="text/javascript" src="scripts/ui-custom/autoscaler.js?t=<%=now%>"></script>
16481648
<script type="text/javascript" src="scripts/ui-custom/healthCheck.js?t=<%=now%>"></script>
16491649
<script type="text/javascript" src="scripts/autoscaler.js?t=<%=now%>"></script>
1650+
<script type="text/javascript" src="scripts/ui-custom/granularSettings.js?t=<%=now%>"></script>
16501651
<script type="text/javascript" src="scripts/ui-custom/zoneChart.js?t=<%=now%>"></script>
16511652
<script type="text/javascript" src="scripts/ui-custom/dashboard.js?t=<%=now%>"></script>
16521653
<script type="text/javascript" src="scripts/installWizard.js?t=<%=now%>"></script>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
(function($, cloudStack) {
19+
cloudStack.uiCustom.granularSettings = function(args) {
20+
var dataProvider = args.dataProvider;
21+
var actions = args.actions;
22+
23+
return function(args) {
24+
var context = args.context;
25+
26+
var listView = {
27+
id: 'settings',
28+
fields: {
29+
name: { label: 'label.name' },
30+
value: { label: 'label.value', editable: true }
31+
},
32+
actions: {
33+
edit: {
34+
label: 'label.change.value',
35+
action: actions.edit
36+
}
37+
},
38+
dataProvider: dataProvider
39+
};
40+
41+
var $listView = $('<div>').listView({ context: context, listView: listView });
42+
43+
return $listView;
44+
}
45+
};
46+
}(jQuery, cloudStack));

0 commit comments

Comments
 (0)