{"size": 1417, "ext": "js", "max_stars_repo_path": "src/apps/charts/cfd/project/ProjectCFDSettings.js", "max_stars_repo_name": "rdayan1/app-catalog", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/apps/charts/cfd/project/ProjectCFDSettings.js", "max_issues_repo_name": "rdayan1/app-catalog", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/apps/charts/cfd/project/ProjectCFDSettings.js", "max_forks_repo_name": "rdayan1/app-catalog", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.7358490566, "max_line_length": 86, "alphanum_fraction": 0.4721242061}
(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()
            ];
        }
    });
}());
