]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/RuleInfo.js
remove BETA, do not display repoid
[pmg-gui.git] / js / RuleInfo.js
index 4b9236070f6b4cdb3f2fd8570789054bd58f20d8..8e15b20b2287f678323d8e50e18579f8d2b6f3f4 100644 (file)
@@ -1,3 +1,6 @@
+/*global Proxmox*/
+/*jslint confusion: true*/
+/* bind is a function function */
 Ext.define('PMG.RuleInfo', {
     extend: 'Ext.panel.Panel',
     xtype: 'pmgRuleInfo',
@@ -112,7 +115,7 @@ Ext.define('PMG.RuleInfo', {
                            // FIXME
                            // actions have the ogroup as a string
                            // -> parseInt
-                           return (ids.indexOf(parseInt(record.data[idField])) === -1);
+                           return (ids.indexOf(parseInt(record.data[idField], 10)) === -1);
                        }
                    });
                    store.load();
@@ -157,12 +160,12 @@ Ext.define('PMG.RuleInfo', {
            'tabpanel[reference=availobjects] > grid': {
                drop: 'removeDrop'
            }
-       },
+       }
     },
 
     viewModel: {
        data: {
-           baseurl: undefined,
+           baseurl: ''
        },
 
        stores: {
@@ -176,7 +179,7 @@ Ext.define('PMG.RuleInfo', {
                model: 'pmg-action-list',
                proxy: {
                    type: 'proxmox',
-                   url: "/api2/json/config/ruledb/action/objects",
+                   url: "/api2/json/config/ruledb/action/objects"
                },
                sorters: 'name'
            },
@@ -184,7 +187,7 @@ Ext.define('PMG.RuleInfo', {
                model: 'pmg-object-group',
                proxy: {
                    type: 'proxmox',
-                   url: "/api2/json/config/ruledb/who",
+                   url: "/api2/json/config/ruledb/who"
                },
                sorters: 'name'
            },
@@ -192,7 +195,7 @@ Ext.define('PMG.RuleInfo', {
                model: 'pmg-object-group',
                proxy: {
                    type: 'proxmox',
-                   url: "/api2/json/config/ruledb/who",
+                   url: "/api2/json/config/ruledb/who"
                },
                sorters: 'name'
            },
@@ -200,7 +203,7 @@ Ext.define('PMG.RuleInfo', {
                model: 'pmg-object-group',
                proxy: {
                    type: 'proxmox',
-                   url: "/api2/json/config/ruledb/what",
+                   url: "/api2/json/config/ruledb/what"
                },
                sorters: 'name'
            },
@@ -208,16 +211,16 @@ Ext.define('PMG.RuleInfo', {
                model: 'pmg-object-group',
                proxy: {
                    type: 'proxmox',
-                   url: "/api2/json/config/ruledb/when",
+                   url: "/api2/json/config/ruledb/when"
                },
                sorters: 'name'
-           },
+           }
        }
     },
 
 
     defaults: {
-       padding: '5 10 5 10',
+       padding: '5 10 5 10'
     },
 
     bodyPadding: '5 0 5 0',
@@ -232,9 +235,9 @@ Ext.define('PMG.RuleInfo', {
     items: [
        {
            xtype: 'panel',
-           bodyPadding: 10,
+           bodyPadding: '10 10 10 10',
            data: {
-               name: false,
+               name: ''
            },
            bind: {
                data: {
@@ -254,7 +257,7 @@ Ext.define('PMG.RuleInfo', {
                '<tpl else>',
                gettext('Please select a rule.'),
                '</tpl>'
-           ],
+           ]
        },
        {
            xtype: 'grid',
@@ -293,7 +296,7 @@ Ext.define('PMG.RuleInfo', {
                {
                    header: gettext('Type'),
                    dataIndex: 'oclass',
-                   hidden: true,
+                   hidden: true
                },
                {
                    header: gettext('Name'),
@@ -318,7 +321,7 @@ Ext.define('PMG.RuleInfo', {
            bind: {
                store: '{objects}',
                hidden: '{!selectedRule}'
-           },
+           }
        },
        {
            xtype: 'tabpanel',
@@ -364,7 +367,7 @@ Ext.define('PMG.RuleInfo', {
                            }
                        ]
                    }
-               ],
+               ]
            },
            items: [
                {
@@ -373,7 +376,7 @@ Ext.define('PMG.RuleInfo', {
                        store: '{actionobjects}'
                    },
                    type: 'action',
-                   iconCls: 'fa fa-flag',
+                   iconCls: 'fa fa-flag'
                },
                {
                    title: gettext('From'),
@@ -381,7 +384,7 @@ Ext.define('PMG.RuleInfo', {
                    type: 'from',
                    bind: {
                        store: '{fromobjects}'
-                   },
+                   }
                },
                {
                    title: gettext('To'),
@@ -389,7 +392,7 @@ Ext.define('PMG.RuleInfo', {
                    type: 'to',
                    bind: {
                        store: '{toobjects}'
-                   },
+                   }
                },
                {
                    title: gettext('What'),
@@ -397,7 +400,7 @@ Ext.define('PMG.RuleInfo', {
                    type: 'what',
                    bind: {
                        store: '{whatobjects}'
-                   },
+                   }
                },
                {
                    title: gettext('When'),
@@ -405,8 +408,8 @@ Ext.define('PMG.RuleInfo', {
                    type: 'when',
                    bind: {
                        store: '{whenobjects}'
-                   },
-               },
+                   }
+               }
            ]
        }
     ]