[pve-devel] r6046 - in pve-manager/pve2/www/new: . cluster dc panel
svn-commits at proxmox.com
svn-commits at proxmox.com
Mon May 30 13:54:31 CEST 2011
Author: dietmar
Date: 2011-05-30 13:54:31 +0200 (Mon, 30 May 2011)
New Revision: 6046
Added:
pve-manager/pve2/www/new/dc/Log.js
pve-manager/pve2/www/new/dc/Tasks.js
Removed:
pve-manager/pve2/www/new/cluster/Log.js
pve-manager/pve2/www/new/cluster/Tasks.js
Modified:
pve-manager/pve2/www/new/Makefile.am
pve-manager/pve2/www/new/panel/StatusPanel.js
Log:
rename cluster to dc (datacenter)
Modified: pve-manager/pve2/www/new/Makefile.am
===================================================================
--- pve-manager/pve2/www/new/Makefile.am 2011-05-30 11:49:19 UTC (rev 6045)
+++ pve-manager/pve2/www/new/Makefile.am 2011-05-30 11:54:31 UTC (rev 6046)
@@ -25,8 +25,8 @@
form/NodeSelector.js \
form/FileSelector.js \
form/StorageSelector.js \
- cluster/Tasks.js \
- cluster/Log.js \
+ dc/Tasks.js \
+ dc/Log.js \
panel/StatusPanel.js \
panel/RRDView.js \
window/LoginWindow.js \
Deleted: pve-manager/pve2/www/new/cluster/Log.js
===================================================================
--- pve-manager/pve2/www/new/cluster/Log.js 2011-05-30 11:49:19 UTC (rev 6045)
+++ pve-manager/pve2/www/new/cluster/Log.js 2011-05-30 11:54:31 UTC (rev 6046)
@@ -1,89 +0,0 @@
-Ext.define('PVE.cluster.Log', {
- extend: 'Ext.grid.GridPanel',
-
- alias: ['widget.pveClusterLog'],
-
- initComponent : function() {
- var me = this;
-
- var logstore = new PVE.data.UpdateStore({
- storeid: 'pve-cluster-log',
- model: 'pve-cluster-log',
- proxy: {
- type: 'pve',
- url: '/api2/json/cluster/log'
- }
- });
-
- var store = Ext.create('PVE.data.DiffStore', {
- rstore: logstore,
- appendAtStart: true
- });
-
- Ext.apply(me, {
- store: store,
- stateful: false,
-
- viewConfig: {
- trackOver: false,
- stripeRows: false, // does not work with getRowClass()
-
- getRowClass: function(record, index) {
- var pri = record.get('pri');
-
- if (pri && pri <= 3)
- return "x-form-invalid-field";
- }
- },
- sortableColumns: false,
- columns: [
- {
- header: "Start Time",
- dataIndex: 'time',
- width: 100,
- renderer: function(value) {
- return Ext.Date.format(value, "M d H:i:s");
- }
- },
- {
- header: "Node",
- dataIndex: 'node',
- width: 100
- },
- {
- header: "Tag",
- dataIndex: 'tag',
- width: 100
- },
- {
- header: "PID",
- dataIndex: 'pid',
- width: 100,
- },
- {
- header: "User",
- dataIndex: 'user',
- width: 150
- },
- {
- header: "Severity",
- dataIndex: 'pri',
- renderer: PVE.Utils.render_serverity,
- width: 100
- },
- {
- header: "Message",
- dataIndex: 'msg',
- flex: 1
- }
- ],
- listeners: {
- show: logstore.startUpdate,
- hide: logstore.stopUpdate,
- destroy: logstore.stopUpdate
- }
- });
-
- me.callParent();
- }
-});
\ No newline at end of file
Deleted: pve-manager/pve2/www/new/cluster/Tasks.js
===================================================================
--- pve-manager/pve2/www/new/cluster/Tasks.js 2011-05-30 11:49:19 UTC (rev 6045)
+++ pve-manager/pve2/www/new/cluster/Tasks.js 2011-05-30 11:54:31 UTC (rev 6046)
@@ -1,120 +0,0 @@
-Ext.define('PVE.cluster.Tasks', {
- extend: 'Ext.grid.GridPanel',
-
- alias: ['widget.pveClusterTasks'],
-
- initComponent : function() {
- var me = this;
-
- var taskstore = new PVE.data.UpdateStore({
- storeid: 'pve-cluster-tasks',
- model: 'pve-tasks',
- proxy: {
- type: 'pve',
- url: '/api2/json/cluster/tasks'
- },
- sorters: [
- {
- property : 'starttime',
- direction: 'ASC'
- }
- ]
- });
-
- var store = Ext.create('PVE.data.DiffStore', {
- rstore: taskstore,
- appendAtStart: true
- });
-
- var run_task_viewer = function() {
- var sm = me.getSelectionModel();
- var rec = sm.getLastSelected();
- if (!rec)
- return;
-
- var win = Ext.create('PVE.window.TaskViewer', {
- upid: rec.data.upid
- });
- win.show();
- };
-
- Ext.apply(me, {
- store: store,
- stateful: false,
-
- viewConfig: {
- trackOver: false,
- stripeRows: false, // does not work with getRowClass()
-
- getRowClass: function(record, index) {
- var status = record.get('status');
-
- if (status && status != 'OK')
- return "x-form-invalid-field";
- }
- },
- sortableColumns: false,
- columns: [
- {
- header: "Start Time",
- dataIndex: 'starttime',
- width: 100,
- renderer: function(value) {
- return Ext.Date.format(value, "M d H:i:s");
- }
- },
- {
- header: "End Time",
- dataIndex: 'endtime',
- width: 100,
- renderer: function(value, metaData, record) {
- if (record.data.pid) {
- metaData.css = "x-grid-row-loading";
- return "";
- }
- return Ext.Date.format(value, "M d H:i:s");
- }
- },
- {
- header: "Node",
- dataIndex: 'node',
- width: 100
- },
- {
- header: "User",
- dataIndex: 'user',
- width: 150
- },
- {
- header: "Description",
- dataIndex: 'upid',
- flex: 1,
- renderer: PVE.Utils.render_upid
- },
- {
- header: "Status",
- dataIndex: 'status',
- width: 200,
- renderer: function(value, metaData, record) {
- if (record.data.pid) {
- metaData.css = "x-grid-row-loading";
- return "";
- }
- if (value == 'OK')
- return 'OK';
- // metaData.attr = 'style="color:red;"';
- return "ERROR: " + value;
- }
- }
- ],
- listeners: {
- itemdblclick: run_task_viewer,
- show: taskstore.startUpdate,
- hide: taskstore.stopUpdate,
- destroy: taskstore.stopUpdate
- }
- });
-
- me.callParent();
- }
-});
\ No newline at end of file
Copied: pve-manager/pve2/www/new/dc/Log.js (from rev 6045, pve-manager/pve2/www/new/cluster/Log.js)
===================================================================
--- pve-manager/pve2/www/new/dc/Log.js (rev 0)
+++ pve-manager/pve2/www/new/dc/Log.js 2011-05-30 11:54:31 UTC (rev 6046)
@@ -0,0 +1,89 @@
+Ext.define('PVE.dc.Log', {
+ extend: 'Ext.grid.GridPanel',
+
+ alias: ['widget.pveClusterLog'],
+
+ initComponent : function() {
+ var me = this;
+
+ var logstore = new PVE.data.UpdateStore({
+ storeid: 'pve-cluster-log',
+ model: 'pve-cluster-log',
+ proxy: {
+ type: 'pve',
+ url: '/api2/json/cluster/log'
+ }
+ });
+
+ var store = Ext.create('PVE.data.DiffStore', {
+ rstore: logstore,
+ appendAtStart: true
+ });
+
+ Ext.apply(me, {
+ store: store,
+ stateful: false,
+
+ viewConfig: {
+ trackOver: false,
+ stripeRows: false, // does not work with getRowClass()
+
+ getRowClass: function(record, index) {
+ var pri = record.get('pri');
+
+ if (pri && pri <= 3)
+ return "x-form-invalid-field";
+ }
+ },
+ sortableColumns: false,
+ columns: [
+ {
+ header: "Start Time",
+ dataIndex: 'time',
+ width: 100,
+ renderer: function(value) {
+ return Ext.Date.format(value, "M d H:i:s");
+ }
+ },
+ {
+ header: "Node",
+ dataIndex: 'node',
+ width: 100
+ },
+ {
+ header: "Tag",
+ dataIndex: 'tag',
+ width: 100
+ },
+ {
+ header: "PID",
+ dataIndex: 'pid',
+ width: 100,
+ },
+ {
+ header: "User",
+ dataIndex: 'user',
+ width: 150
+ },
+ {
+ header: "Severity",
+ dataIndex: 'pri',
+ renderer: PVE.Utils.render_serverity,
+ width: 100
+ },
+ {
+ header: "Message",
+ dataIndex: 'msg',
+ flex: 1
+ }
+ ],
+ listeners: {
+ show: logstore.startUpdate,
+ hide: logstore.stopUpdate,
+ destroy: logstore.stopUpdate
+ }
+ });
+
+ me.callParent();
+ }
+});
\ No newline at end of file
Copied: pve-manager/pve2/www/new/dc/Tasks.js (from rev 6045, pve-manager/pve2/www/new/cluster/Tasks.js)
===================================================================
--- pve-manager/pve2/www/new/dc/Tasks.js (rev 0)
+++ pve-manager/pve2/www/new/dc/Tasks.js 2011-05-30 11:54:31 UTC (rev 6046)
@@ -0,0 +1,120 @@
+Ext.define('PVE.dc.Tasks', {
+ extend: 'Ext.grid.GridPanel',
+
+ alias: ['widget.pveClusterTasks'],
+
+ initComponent : function() {
+ var me = this;
+
+ var taskstore = new PVE.data.UpdateStore({
+ storeid: 'pve-cluster-tasks',
+ model: 'pve-tasks',
+ proxy: {
+ type: 'pve',
+ url: '/api2/json/cluster/tasks'
+ },
+ sorters: [
+ {
+ property : 'starttime',
+ direction: 'ASC'
+ }
+ ]
+ });
+
+ var store = Ext.create('PVE.data.DiffStore', {
+ rstore: taskstore,
+ appendAtStart: true
+ });
+
+ var run_task_viewer = function() {
+ var sm = me.getSelectionModel();
+ var rec = sm.getLastSelected();
+ if (!rec)
+ return;
+
+ var win = Ext.create('PVE.window.TaskViewer', {
+ upid: rec.data.upid
+ });
+ win.show();
+ };
+
+ Ext.apply(me, {
+ store: store,
+ stateful: false,
+
+ viewConfig: {
+ trackOver: false,
+ stripeRows: false, // does not work with getRowClass()
+
+ getRowClass: function(record, index) {
+ var status = record.get('status');
+
+ if (status && status != 'OK')
+ return "x-form-invalid-field";
+ }
+ },
+ sortableColumns: false,
+ columns: [
+ {
+ header: "Start Time",
+ dataIndex: 'starttime',
+ width: 100,
+ renderer: function(value) {
+ return Ext.Date.format(value, "M d H:i:s");
+ }
+ },
+ {
+ header: "End Time",
+ dataIndex: 'endtime',
+ width: 100,
+ renderer: function(value, metaData, record) {
+ if (record.data.pid) {
+ metaData.css = "x-grid-row-loading";
+ return "";
+ }
+ return Ext.Date.format(value, "M d H:i:s");
+ }
+ },
+ {
+ header: "Node",
+ dataIndex: 'node',
+ width: 100
+ },
+ {
+ header: "User",
+ dataIndex: 'user',
+ width: 150
+ },
+ {
+ header: "Description",
+ dataIndex: 'upid',
+ flex: 1,
+ renderer: PVE.Utils.render_upid
+ },
+ {
+ header: "Status",
+ dataIndex: 'status',
+ width: 200,
+ renderer: function(value, metaData, record) {
+ if (record.data.pid) {
+ metaData.css = "x-grid-row-loading";
+ return "";
+ }
+ if (value == 'OK')
+ return 'OK';
+ // metaData.attr = 'style="color:red;"';
+ return "ERROR: " + value;
+ }
+ }
+ ],
+ listeners: {
+ itemdblclick: run_task_viewer,
+ show: taskstore.startUpdate,
+ hide: taskstore.stopUpdate,
+ destroy: taskstore.stopUpdate
+ }
+ });
+
+ me.callParent();
+ }
+});
\ No newline at end of file
Modified: pve-manager/pve2/www/new/panel/StatusPanel.js
===================================================================
--- pve-manager/pve2/www/new/panel/StatusPanel.js 2011-05-30 11:49:19 UTC (rev 6045)
+++ pve-manager/pve2/www/new/panel/StatusPanel.js 2011-05-30 11:54:31 UTC (rev 6046)
@@ -2,7 +2,8 @@
extend: 'Ext.tab.Panel',
requires: [
'Ext.state.Manager',
- 'PVE.cluster.Tasks'
+ 'PVE.dc.Log',
+ 'PVE.dc.Tasks'
],
alias: 'widget.pveStatusPanel',
More information about the pve-devel
mailing list