diff --git a/www/manager6/Makefile b/www/manager6/Makefile index f9b6deb46..da01f71cc 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -120,8 +120,6 @@ JSSRC= \ node/Disks.js \ node/DNSEdit.js \ node/DNSView.js \ - node/TimeView.js \ - node/TimeEdit.js \ node/StatusView.js \ node/Summary.js \ node/ServiceView.js \ diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js index 1b1cc8018..5ead4878e 100644 --- a/www/manager6/node/Config.js +++ b/www/manager6/node/Config.js @@ -178,7 +178,8 @@ Ext.define('PVE.node.Config', { title: gettext('Time'), itemId: 'time', groups: ['services'], - xtype: 'pveNodeTimeView', + nodename: nodename, + xtype: 'proxmoxNodeTimeView', iconCls: 'fa fa-clock-o' }); } diff --git a/www/manager6/node/TimeEdit.js b/www/manager6/node/TimeEdit.js deleted file mode 100644 index 62d3c2114..000000000 --- a/www/manager6/node/TimeEdit.js +++ /dev/null @@ -1,39 +0,0 @@ -Ext.define('PVE.node.TimeEdit', { - extend: 'PVE.window.Edit', - alias: ['widget.pveNodeTimeEdit'], - - initComponent : function() { - var me = this; - - var nodename = me.pveSelNode.data.node; - if (!nodename) { - throw "no node name specified"; - } - - Ext.applyIf(me, { - subject: gettext('Time zone'), - url: "/api2/extjs/nodes/" + nodename + "/time", - fieldDefaults: { - labelWidth: 70 - }, - width: 400, - items: { - xtype: 'combo', - fieldLabel: gettext('Time zone'), - name: 'timezone', - queryMode: 'local', - store: Ext.create('PVE.data.TimezoneStore'), - valueField: 'zone', - displayField: 'zone', - triggerAction: 'all', - forceSelection: true, - editable: false, - allowBlank: false - } - }); - - me.callParent(); - - me.load(); - } -}); diff --git a/www/manager6/node/TimeView.js b/www/manager6/node/TimeView.js deleted file mode 100644 index 20c831061..000000000 --- a/www/manager6/node/TimeView.js +++ /dev/null @@ -1,57 +0,0 @@ -Ext.define('PVE.node.TimeView', { - extend: 'PVE.grid.ObjectGrid', - alias: ['widget.pveNodeTimeView'], - - initComponent : function() { - var me = this; - - var nodename = me.pveSelNode.data.node; - if (!nodename) { - throw "no node name specified"; - } - - var tzoffset = (new Date()).getTimezoneOffset()*60000; - var renderlocaltime = function(value) { - var servertime = new Date((value * 1000) + tzoffset); - return Ext.Date.format(servertime, 'Y-m-d H:i:s'); - }; - - var run_editor = function() { - var win = Ext.create('PVE.node.TimeEdit', { - pveSelNode: me.pveSelNode - }); - win.show(); - }; - - Ext.apply(me, { - url: "/api2/json/nodes/" + nodename + "/time", - cwidth1: 150, - interval: 1000, - rows: { - timezone: { - header: gettext('Time zone'), - required: true - }, - localtime: { - header: gettext('Server time'), - required: true, - renderer: renderlocaltime - } - }, - tbar: [ - { - text: gettext("Edit"), - handler: run_editor - } - ], - listeners: { - itemdblclick: run_editor - } - }); - - me.callParent(); - - me.on('activate', me.rstore.startUpdate); - me.on('destroy', me.rstore.stopUpdate); - } -});