From: Eric Bollengier Date: Tue, 23 Dec 2008 13:19:51 +0000 (+0000) Subject: ebl update bresto X-Git-Tag: Release-3.0.0~414 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ecb849a849f814a2c7e6f4a385e9573ecd82c0bc;p=bacula%2Fbacula ebl update bresto git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8234 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/html/bresto.js b/gui/bweb/html/bresto.js index 3cd49c8519..40ef7e8a9b 100644 --- a/gui/bweb/html/bresto.js +++ b/gui/bweb/html/bresto.js @@ -143,8 +143,9 @@ Ext.onReady(function(){ tree.on('click', click_cb); - tree.on('beforeload', function(e) { - file_store.removeAll(); + tree.on('beforeload', function(e,b) { +// console.info(b); +// file_store.removeAll(); return true; }); tree.on('load', function(n,e) { @@ -301,7 +302,7 @@ Ext.onReady(function(){ header: "Date", dataIndex: 'mtime', // renderer: Ext.util.Format.dateRenderer('Y-m-d h:i'), - width: 100 + width: 120 },{ header: 'PathId', dataIndex: 'pathid', @@ -474,6 +475,24 @@ Ext.onReady(function(){ width:135 }); + var replace_store = new Ext.data.SimpleStore({ + fields: ['value', 'text'], + data : [['never', 'Never'],['always', 'Always']] + }); + + var replace_combo = new Ext.form.ComboBox({ + fieldLabel: 'Replace', + store: replace_store, + displayField:'text', + typeAhead: true, + mode: 'local', + triggerAction: 'all', + emptyText:'Replace mode...', + selectOnFocus:true, + forceSelection: true, + width:135 + }); + client_combo.on('valid', function(e) { Ext.brestore.client = e.getValue(); Ext.brestore.jobid=0; @@ -822,34 +841,39 @@ Ext.onReady(function(){ } }); - var use_filerelocation_fieldset = new Ext.form.FieldSet({ - checkboxToggle : true, - title : 'Use file relocation', - autoHeight : true, - defaults : {width: 210}, - defaultType : 'textfield', - checkboxName : 'use_filerelocation', - collapsed : true, - anchor : '100%', - items :[ stripprefix_text, addsuffix_text, addprefix_text, - useregexp_bp, rwhere_text ] - }); - - use_filerelocation_fieldset.on('collapse', function(bp) { - Ext.brestore.use_filerelocation=false; - where_text.enable(); - addsuffix_text.disable(); - addprefix_text.disable(); - stripprefix_text.disable(); - useregexp_bp.disable(); - rwhere_text.disable(); + var usefilerelocation_bp = new Ext.form.Checkbox({ + fieldLabel: 'Use file relocation', + name: 'use_relocation', + checked: 0 }); + + usefilerelocation_bp.on('check', function(bp,state) { + if (state) { + where_text.disable(); + useregexp_bp.enable(); + if (useregexp_bp.getValue()) { + addsuffix_text.disable(); + addprefix_text.disable(); + stripprefix_text.disable(); + rwhere_text.enable(); + } else { + addsuffix_text.enable(); + addprefix_text.enable(); + stripprefix_text.enable(); + rwhere_text.disable(); + } + } else { + where_text.enable(); + addsuffix_text.disable(); + addprefix_text.disable(); + stripprefix_text.disable(); + useregexp_bp.disable(); + rwhere_text.disable(); + } + }); - use_filerelocation_fieldset.on('expand', function(bp) { - Ext.brestore.use_filerelocation=true; - where_text.disable(); - useregexp_bp.enable(); - if (useregexp_bp.getValue()) { + useregexp_bp.on('check', function(bp,state) { + if (state) { addsuffix_text.disable(); addprefix_text.disable(); stripprefix_text.disable(); @@ -860,7 +884,7 @@ Ext.onReady(function(){ stripprefix_text.enable(); rwhere_text.disable(); } - }); + }); var media_store = Ext.brestore.media_store = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ @@ -905,29 +929,72 @@ Ext.onReady(function(){ var form_panel = new Ext.FormPanel({ labelWidth : 75, // label settings here cascade unless overridden - url : 'save-form.php', frame : true, bodyStyle : 'padding:5px 5px 0', width : 250, -// autoHeight : true, +// autoHeight : true, items: [{ - xtype : 'fieldset', - title : 'Media needed', - autoHeight : true, - defaults : {width: 210}, - defaultType : 'textfield', - items :[ media_grid, {xtype: 'button', id: 'reload_media', - text: 'Compute with directories', - tooltip: 'Can take long time...', - handler:reload_media_store}] - }, { - xtype : 'fieldset', - title : 'Restore options', - autoHeight : true, - defaults : {width: 210}, - defaultType : 'textfield', - items :[ rclient_combo, where_text ] - }, use_filerelocation_fieldset], + xtype : 'tabpanel', + autoTabs : true, + activeTab : 0, + border : false, + bodyStyle : 'padding:5px 5px 0', + deferredRender : false, + items: [{ + xtype : 'panel', + title : 'Restore details', + items : [{ + xtype : 'fieldset', + title : 'Restore options', + autoHeight : true, + defaults : {width: 210}, + bodyStyle : 'padding:5px 5px 0', + items :[ rclient_combo, where_text, replace_combo ] + }, { + xtype : 'fieldset', + title : 'Media needed', + autoHeight : true, + defaults : {width: 210}, + bodyStyle : 'padding:5px 5px 0', + items :[ media_grid, + {xtype: 'button', id: 'reload_media', + text: 'Compute with directories', + tooltip: 'Can take long time...', + handler:reload_media_store}] + }], + }, { + xtype : 'panel', + title : 'Advanced', + items : [{ + xtype : 'fieldset', + title : 'File relocation', + autoHeight : true, + defaults : {width: 210}, + bodyStyle : 'padding:5px 5px 0', + items :[ usefilerelocation_bp, stripprefix_text, + addsuffix_text, addprefix_text, + useregexp_bp, rwhere_text ] + },{ + xtype : 'fieldset', + title : 'Other options', + autoHeight : true, + defaults : {width: 210}, + bodyStyle : 'padding:5px 5px 0', + defaultType : 'textfield', + items :[{ + name: 'when_text', + fieldLabel: 'When', + disabled: true, + tooltip: 'YYY-MM-DD HH:MM' + }, { + name: 'prio_text', + fieldLabel: 'Priority', + disabled: true, + tooltip: '1-100' + }] + }] + }] + }], buttons: [{ text: 'Run', diff --git a/gui/bweb/technotes-3.0 b/gui/bweb/technotes-3.0 index 2fd467e9bb..448022afbe 100644 --- a/gui/bweb/technotes-3.0 +++ b/gui/bweb/technotes-3.0 @@ -1,3 +1,5 @@ +23Dec08 +ebl Update final restore options box with tabpanel 18Dec08 ebl Rewrite bresto (bweb restore interface) to work with ExtJS 2.2 Fix lots of bug @@ -40,7 +42,6 @@ ebl - Add new configuration variable to modify default age general.tpl - Add hyperlink to failed job count - TODO: add C.png (with something like zzZZzzz) 25Aug08 ebl Fix #1132 about typo in directory creation in install_bweb