Ext.define('PVE.Workspace', {
extend: 'Ext.container.Viewport',
- requires: [
- 'Ext.tip.*',
- 'PVE.Utils',
- 'PVE.window.LoginWindow'
- ],
title: 'Proxmox Virtual Environment',
Ext.define('PVE.ConsoleWorkspace', {
extend: 'PVE.Workspace',
- requires: [
- 'PVE.KVMConsole'
- ],
alias: ['widget.pveConsoleWorkspace'],
Ext.define('PVE.data.ResourceStore', {
extend: 'PVE.data.UpdateStore',
- requires: ['PVE.Utils'],
singleton: true,
findNextVMID: function() {
Ext.define('PVE.data.UpdateStore', {
extend: 'Ext.data.Store',
- requires: [
- 'PVE.Utils',
- 'Ext.util.*',
- 'PVE.data.UpdateQueue'
- ],
constructor: function(config) {
var me = this;
alias: ['widget.pveACLAdd'],
initComponent : function() {
+ /*jslint confusion: true */
var me = this;
me.create = true;
});
var remove_btn = new PVE.button.Button({
- text: gettext('Remove'),
+ text: gettext('Remove'),
disabled: true,
selModel: sm,
confirmMsg: function (rec) {
method = 'PUT';
}
+ var verifypw;
+ var pwfield;
+
var validate_pw = function() {
if (verifypw.getValue() !== pwfield.getValue()) {
return gettext("Passwords does not match");
return true;
};
- var verifypw = Ext.createWidget('textfield', {
+ verifypw = Ext.createWidget('textfield', {
inputType: 'password',
fieldLabel: gettext('Verify Password'),
name: 'verifypassword',
validator: validate_pw
});
- var pwfield = Ext.createWidget('textfield', {
+ pwfield = Ext.createWidget('textfield', {
inputType: 'password',
fieldLabel: gettext('Password'),
minLength: 5,
throw "no userid specified";
}
+ var verifypw;
+ var pwfield;
+
var validate_pw = function() {
if (verifypw.getValue() !== pwfield.getValue()) {
return gettext("Passwords does not match");
return true;
};
- var verifypw = Ext.createWidget('textfield', {
+ verifypw = Ext.createWidget('textfield', {
inputType: 'password',
fieldLabel: gettext('Verify Password'),
name: 'verifypassword',
validator: validate_pw
});
- var pwfield = Ext.createWidget('textfield', {
+ pwfield = Ext.createWidget('textfield', {
inputType: 'password',
fieldLabel: gettext('Password'),
minLength: 5,
{
xtype: 'hiddenfield',
name: 'userid',
- value: me.userid,
+ value: me.userid
}
]
});
Ext.define('PVE.form.BridgeSelector', {
extend: 'PVE.form.ComboGrid',
- requires: [
- 'Ext.data.Store',
- 'PVE.RestProxy'
- ],
alias: ['widget.PVE.form.BridgeSelector'],
setNodename: function(nodename) {
Ext.define('PVE.form.ComboGrid', {
extend: 'Ext.form.field.ComboBox',
- requires: [
- 'Ext.grid.Panel',
- 'PVE.Utils'
- ],
alias: ['widget.PVE.form.ComboGrid'],
computeHeight: function() {
Ext.define('PVE.form.FileSelector', {
extend: 'PVE.form.ComboGrid',
- requires: [
- 'Ext.data.Store',
- 'PVE.RestProxy'
- ],
alias: ['widget.pveFileSelector'],
setStorage: function(storage, nodename) {
fields: [ 'groupid', 'comment' ],
proxy: {
type: 'pve',
- url: "/api2/json/access/groups",
+ url: "/api2/json/access/groups"
},
idProperty: 'groupid'
});
Ext.define('PVE.form.NodeSelector', {
extend: 'PVE.form.ComboGrid',
- requires: [
- 'Ext.data.Store',
- 'PVE.RestProxy'
- ],
alias: ['widget.PVE.form.NodeSelector'],
// invalidate nodes which are offline
fields: [ 'poolid', 'comment' ],
proxy: {
type: 'pve',
- url: "/api2/json/access/pools",
+ url: "/api2/json/access/pools"
},
idProperty: 'poolid'
});
Ext.define('PVE.form.RRDTypeSelector', {
extend: 'Ext.form.field.ComboBox',
- requires: [
- 'Ext.state.Manager'
- ],
-
alias: ['widget.pveRRDTypeSelector'],
initComponent: function() {
Ext.define('PVE.form.RealmComboBox', {
extend: 'Ext.form.field.ComboBox',
- requires: ['Ext.data.Store', 'PVE.RestProxy'],
alias: ['widget.pveRealmComboBox'],
initComponent: function() {
Ext.define('PVE.form.StorageSelector', {
extend: 'PVE.form.ComboGrid',
- requires: [
- 'Ext.data.Store',
- 'PVE.RestProxy'
- ],
alias: ['widget.PVE.form.StorageSelector'],
setNodename: function(nodename) {
Ext.define('PVE.form.ViewSelector', {
extend: 'Ext.form.field.ComboBox',
- requires: ['Ext.data.Store'],
alias: ['widget.pveViewSelector'],
initComponent: function() {
Ext.define('PVE.grid.ObjectGrid', {
extend: 'Ext.grid.GridPanel',
- requires: [
- 'Ext.grid.*',
- 'PVE.data.ObjectStore'
- ],
alias: ['widget.pveObjectGrid'],
getObjectValue: function(key, defaultValue) {
extend: 'PVE.window.Edit',
initComponent : function() {
+ /*jslint confusion: true */
var me = this;
if (!me.pool) {
extend: 'PVE.window.Edit',
initComponent : function() {
+ /*jslint confusion: true */
var me = this;
if (!me.pool) {
Ext.define('PVE.grid.ResourceGrid', {
extend: 'Ext.grid.GridPanel',
- requires: [
- 'Ext.grid.*',
- 'Ext.grid.feature.Chunking',
- 'Ext.state.Manager',
- 'Ext.data.*',
- 'Ext.data.Store',
- 'Ext.util.*',
- 'PVE.Utils',
- 'PVE.data.ResourceStore'
- ],
alias: ['widget.pveResourceGrid'],
//fixme: this makes still problems with the scrollbar
$jssrc .= <<_EOJS;
-Ext.require(['*', '$workspace']);
-
// we need this (the java applet ignores the zindex)
Ext.useShims = true;
Ext.define('PVE.node.DNSEdit', {
extend: 'PVE.window.Edit',
- requires: [
- 'PVE.Utils'
- ],
-
alias: ['widget.pveNodeDNSEdit'],
initComponent : function() {
Ext.define('PVE.node.TimeEdit', {
extend: 'PVE.window.Edit',
- requires: ['PVE.data.TimezoneStore'],
alias: ['widget.pveNodeTimeEdit'],
initComponent : function() {
/*jslint confusion: true */
Ext.define('PVE.openvz.CreateWizard', {
extend: 'PVE.window.Wizard',
- requires: [
- 'Ext.form.*',
- 'PVE.data.ResourceStore'
- ],
initComponent: function() {
var me = this;
Ext.define('PVE.openvz.NetworkView', {
extend: 'Ext.grid.GridPanel',
- requires: [
- 'Ext.grid.*'
- ],
alias: ['widget.pveOpenVZNetworkView'],
dataCache: {}, // used to store result of last load
Ext.define('PVE.panel.InputPanel', {
extend: 'Ext.panel.Panel',
- requires: [
- 'PVE.Utils'
- ],
alias: ['widget.inputpanel'],
border: false,
Ext.define('PVE.panel.StatusPanel', {
extend: 'Ext.tab.Panel',
- requires: [
- 'Ext.state.Manager',
- 'PVE.dc.Log',
- 'PVE.dc.Tasks'
- ],
alias: 'widget.pveStatusPanel',
/*jslint confusion: true */
Ext.define('PVE.qemu.CreateWizard', {
extend: 'PVE.window.Wizard',
- requires: [
- 'Ext.form.*',
- 'PVE.data.ResourceStore'
- ],
initComponent: function() {
var me = this;
Ext.define('PVE.tree.ResourceTree', {
extend: 'Ext.tree.TreePanel',
- requires: ['Ext.tree.*',
- 'Ext.state.Manager',
- 'PVE.Utils',
- 'PVE.data.ResourceStore'],
alias: ['widget.pveResourceTree'],
statics: {
Ext.define('PVE.window.LoginWindow', {
extend: 'Ext.window.Window',
- requires: ['PVE.form.RealmComboBox'],
// private
onLogon: function() {
Ext.define('PVE.window.TaskViewer', {
extend: 'Ext.window.Window',
- requires: [
- 'PVE.Utils'
- ],
alias: 'widget.pveTaskViewer',
initComponent: function() {
Ext.define('PVE.window.Wizard', {
extend: 'Ext.window.Window',
- requires: [
- 'PVE.Utils'
- ],
getValues: function(dirtyOnly) {
var me = this;