]>
git.proxmox.com Git - proxmox-backup.git/blob - www/Utils.js
4 console
.log("Starting Backup Server GUI");
6 Ext
.define('PBS.Utils', {
9 updateLoginData: function(data
) {
10 Proxmox
.CSRFPreventionToken
= data
.CSRFPreventionToken
;
11 Proxmox
.UserName
= data
.username
;
12 //console.log(data.ticket);
13 // fixme: use secure flag once we have TLS
14 //Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, true );
15 Ext
.util
.Cookies
.set('PBSAuthCookie', data
.ticket
, null, '/', null, false);
18 dataStorePrefix
: 'DataStore-',
20 getDataStoreFromPath: function(path
) {
21 return path
.slice(PBS
.Utils
.dataStorePrefix
.length
);
24 isDataStorePath: function(path
) {
25 return path
.indexOf(PBS
.Utils
.dataStorePrefix
) === 0;
28 constructor: function() {
31 // do whatever you want here
32 Proxmox
.Utils
.override_task_descriptions({
33 garbage_collection
: ['Datastore', gettext('Garbage collect') ],
34 backup
: [ '', gettext('Backup') ],
35 reader
: [ '', gettext('Read datastore objects') ], // FIXME: better one