ui: some more eslint auto-fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -10,11 +10,11 @@ Ext.define('PBS.MainView', {
|
||||
':path:subpath': {
|
||||
action: 'changePath',
|
||||
before: 'beforeChangePath',
|
||||
conditions : {
|
||||
':path' : '(?:([%a-zA-Z0-9\\-\\_\\s,\.]+))',
|
||||
':subpath' : '(?:(?::)([%a-zA-Z0-9\\-\\_\\s,]+))?'
|
||||
}
|
||||
}
|
||||
conditions: {
|
||||
':path': '(?:([%a-zA-Z0-9\\-\\_\\s,.]+))',
|
||||
':subpath': '(?:(?::)([%a-zA-Z0-9\\-\\_\\s,]+))?',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
beforeChangePath: function(path, subpath, action) {
|
||||
@ -79,7 +79,7 @@ Ext.define('PBS.MainView', {
|
||||
obj = contentpanel.add({
|
||||
xtype: path,
|
||||
nodename: 'localhost',
|
||||
border: false
|
||||
border: false,
|
||||
});
|
||||
}
|
||||
|
||||
@ -113,7 +113,6 @@ Ext.define('PBS.MainView', {
|
||||
if (lastpanel) {
|
||||
contentpanel.remove(lastpanel, { destroy: true });
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
logout: function() {
|
||||
@ -126,8 +125,8 @@ Ext.define('PBS.MainView', {
|
||||
|
||||
control: {
|
||||
'[reference=logoutButton]': {
|
||||
click: 'logout'
|
||||
}
|
||||
click: 'logout',
|
||||
},
|
||||
},
|
||||
|
||||
init: function(view) {
|
||||
@ -139,7 +138,7 @@ Ext.define('PBS.MainView', {
|
||||
// show login on requestexception
|
||||
// fixme: what about other errors
|
||||
Ext.Ajax.on('requestexception', function(conn, response, options) {
|
||||
if (response.status == 401) { // auth failure
|
||||
if (response.status === 401 || response.status === '401') { // auth failure
|
||||
me.logout();
|
||||
}
|
||||
});
|
||||
@ -155,7 +154,7 @@ Ext.define('PBS.MainView', {
|
||||
Ext.Ajax.request({
|
||||
params: {
|
||||
username: Proxmox.UserName,
|
||||
password: ticket
|
||||
password: ticket,
|
||||
},
|
||||
url: '/api2/json/access/ticket',
|
||||
method: 'POST',
|
||||
@ -165,17 +164,17 @@ Ext.define('PBS.MainView', {
|
||||
success: function(response, opts) {
|
||||
var obj = Ext.decode(response.responseText);
|
||||
PBS.Utils.updateLoginData(obj.data);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
interval: 15*60*1000
|
||||
interval: 15*60*1000,
|
||||
});
|
||||
|
||||
|
||||
// select treeitem and load page from url fragment, if set
|
||||
let token = Ext.util.History.getToken() || 'pbsDashboard';
|
||||
this.redirectTo(token, true);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
plugins: 'viewport',
|
||||
@ -188,7 +187,7 @@ Ext.define('PBS.MainView', {
|
||||
xtype: 'container',
|
||||
layout: {
|
||||
type: 'hbox',
|
||||
align: 'middle'
|
||||
align: 'middle',
|
||||
},
|
||||
margin: '2 0 2 5',
|
||||
height: 38,
|
||||
@ -229,7 +228,7 @@ Ext.define('PBS.MainView', {
|
||||
style: {
|
||||
// proxmox dark grey p light grey as border
|
||||
backgroundColor: '#464d4d',
|
||||
borderColor: '#ABBABA'
|
||||
borderColor: '#ABBABA',
|
||||
},
|
||||
margin: '0 5 0 0',
|
||||
iconCls: 'fa fa-user',
|
||||
@ -241,7 +240,7 @@ Ext.define('PBS.MainView', {
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
xtype: 'panel',
|
||||
@ -250,7 +249,7 @@ Ext.define('PBS.MainView', {
|
||||
region: 'west',
|
||||
layout: {
|
||||
type: 'vbox',
|
||||
align: 'stretch'
|
||||
align: 'stretch',
|
||||
},
|
||||
items: [{
|
||||
xtype: 'navigationtree',
|
||||
@ -260,20 +259,20 @@ Ext.define('PBS.MainView', {
|
||||
// because of a bug where a viewcontroller does not detect
|
||||
// the selectionchange event of a treelist
|
||||
listeners: {
|
||||
selectionchange: 'navigate'
|
||||
}
|
||||
selectionchange: 'navigate',
|
||||
},
|
||||
}, {
|
||||
xtype: 'box',
|
||||
cls: 'x-treelist-nav',
|
||||
flex: 1
|
||||
}]
|
||||
flex: 1,
|
||||
}],
|
||||
},
|
||||
{
|
||||
xtype: 'panel',
|
||||
layout: { type: 'card' },
|
||||
region: 'center',
|
||||
border: false,
|
||||
reference: 'contentpanel'
|
||||
}
|
||||
]
|
||||
reference: 'contentpanel',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
Reference in New Issue
Block a user