mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-09 14:33:58 +00:00
ui: iscsi: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
9cb3c1d6e4
commit
624271842b
@ -15,7 +15,7 @@ Ext.define('PVE.storage.IScsiScan', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onTriggerClick: function() {
|
onTriggerClick: function() {
|
||||||
var me = this;
|
let me = this;
|
||||||
|
|
||||||
if (!me.queryCaching || me.lastQuery !== me.portal) {
|
if (!me.queryCaching || me.lastQuery !== me.portal) {
|
||||||
me.store.removeAll();
|
me.store.removeAll();
|
||||||
@ -27,26 +27,24 @@ Ext.define('PVE.storage.IScsiScan', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setPortal: function(portal) {
|
setPortal: function(portal) {
|
||||||
var me = this;
|
let me = this;
|
||||||
|
|
||||||
me.portal = portal;
|
me.portal = portal;
|
||||||
},
|
},
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
var me = this;
|
let me = this;
|
||||||
|
|
||||||
if (!me.nodename) {
|
if (!me.nodename) {
|
||||||
me.nodename = 'localhost';
|
me.nodename = 'localhost';
|
||||||
}
|
}
|
||||||
|
|
||||||
var store = Ext.create('Ext.data.Store', {
|
let store = Ext.create('Ext.data.Store', {
|
||||||
fields: ['target', 'portal'],
|
fields: ['target', 'portal'],
|
||||||
proxy: {
|
proxy: {
|
||||||
type: 'proxmox',
|
type: 'proxmox',
|
||||||
url: '/api2/json/nodes/' + me.nodename + '/scan/iscsi',
|
url: `/api2/json/nodes/${me.nodename}/scan/iscsi`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
store.sort('target', 'ASC');
|
store.sort('target', 'ASC');
|
||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
|
Loading…
Reference in New Issue
Block a user