forked from RallyApps/app-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectCFDSettings.js
52 lines (45 loc) · 1.38 KB
/
ProjectCFDSettings.js
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
48
49
50
51
52
(function () {
var Ext = window.Ext4 || window.Ext;
Ext.define("Rally.apps.charts.cfd.project.ProjectCFDSettings", {
requires: [
"Rally.apps.charts.settings.StateFieldPicker",
"Rally.apps.charts.settings.ProjectPicker",
"Rally.ui.datetime.TimeFrame"
],
config: {
app: undefined // Parent RallyApp instance
},
constructor: function (config) {
this.mergeConfig(config);
},
_getTimeFrame: function () {
return {
xtype: "rallytimeframe",
name: "timeFrame",
label: "Time Frame",
mapsToMultiplePreferenceKeys: [ "timeFrameQuantity", "timeFrameUnit" ]
};
},
_getStatePicker: function () {
return {
xtype: 'rallychartssettingsstatefieldpicker',
name: 'stateField',
settings: this.config.app.getSettings()
};
},
_getProjectPicker: function () {
return {
type: "project",
name: "project",
label: "Project"
};
},
getFields: function () {
return [
this._getStatePicker(),
this._getTimeFrame(),
this._getProjectPicker()
];
}
});
}());