diff --git a/webui/module/Restore/view/restore/restore/index.phtml b/webui/module/Restore/view/restore/restore/index.phtml index 1716d53f2ab..5531045717a 100644 --- a/webui/module/Restore/view/restore/restore/index.phtml +++ b/webui/module/Restore/view/restore/restore/index.phtml @@ -179,15 +179,13 @@ $this->headTitle($title);
Error: " + e.error + "
" + - "Plugin: " + e.plugin + "
" + - "Reason: " + e.reason + "
" + - "Data:
" + - "" + e.data + "
"
- );
- displayBvfsCacheUpdateInfo();
- },
- 'data' :{
- 'url' : 'basePath() . "/restore/filebrowser?jobid=" . $this->restore_params['jobid'] . "&client=" . $this->restore_params['client'] . "&mergefilesets=" . $this->restore_params['mergefilesets'] . "&mergejobs=" . $this->restore_params['mergejobs'] . "&limit=" . $this->restore_params['limit']; ?>',
- 'dataType' : 'json',
- 'data' : function (node) {
- return { 'id' : node.id };
- },
- timeout: ,
- },
- },
- 'state' : {
- 'key': 'restore'
- },
- 'grid' : {
- width: '100%',
- height: '60vh',
- fixedHeader: true,
- resizable: false,
- columns: [
- {
- width: '100%',
- height: '100%',
- header: 'translate("Name"); ?>',
- headerClass: 'jsTreeGridHeader',
- title: "_DATA_"
- },
- {
- width: 100,
- header: 'translate("Mode"); ?>',
- headerClass: 'jsTreeGridHeader',
- value: function(node) {
- return formatJSTreeGridModeItem(node.data.stat.mode);
- }
+ function showFileTree() {
+ $('#filebrowser').jstree({
+ 'plugins' : [ "grid", "checkbox", "state", "sort", "search", "types" ],
+ 'core' : {
+ 'animation': false,
+ 'force_text': true,
+ 'error': function (e) {
+ $('#filebrowser').html(
+ "Error: " + e.error + "
" + + "Plugin: " + e.plugin + "
" + + "Reason: " + e.reason + "
" + + "Data:
" + + "" + e.data + "
"
+ );
+ displayBvfsCacheUpdateInfo();
},
- {
- width: 120,
- header: 'translate("User"); ?>',
- headerClass: 'jsTreeGridHeader',
- value: function(node) {
- return formatJSTreeGridUserItem(node);
- }
- },
- {
- width: 120,
- header: 'translate("Group"); ?>',
- headerClass: 'jsTreeGridHeader',
- value: function(node) {
- return formatJSTreeGridGroupItem(node);
- }
- },
- {
- width: 120,
- header: 'translate("Size"); ?>',
- headerClass: 'jsTreeGridHeader',
- value: function(node) {
- return formatJSTreeGridSizeItem(node);
- }
+ 'data' :{
+ 'url' : 'basePath() . "/restore/filebrowser?jobid=" . $this->restore_params['jobid'] . "&client=" . $this->restore_params['client'] . "&mergefilesets=" . $this->restore_params['mergefilesets'] . "&mergejobs=" . $this->restore_params['mergejobs'] . "&limit=" . $this->restore_params['limit']; ?>',
+ 'dataType' : 'json',
+ 'data' : function (node) {
+ return { 'id' : node.id };
+ },
+ timeout: ,
},
- {
- width: 150,
- header: 'translate("Last modification"); ?>',
- headerClass: 'jsTreeGridHeader',
- value: function(node) {
- return formatJSTreeGridLastModItem(node.data.stat.mtime);
+ },
+ 'state' : {
+ 'key': 'restore'
+ },
+ 'grid' : {
+ width: '100%',
+ height: '60vh',
+ fixedHeader: true,
+ resizable: false,
+ columns: [
+ {
+ width: '100%',
+ height: '100%',
+ header: 'translate("Name"); ?>',
+ headerClass: 'jsTreeGridHeader',
+ title: "_DATA_"
+ },
+ {
+ width: 100,
+ header: 'translate("Mode"); ?>',
+ headerClass: 'jsTreeGridHeader',
+ value: function(node) {
+ if(node.data === null) return null;
+ return formatJSTreeGridModeItem(node.data.stat.mode);
+ }
+ },
+ {
+ width: 120,
+ header: 'translate("User"); ?>',
+ headerClass: 'jsTreeGridHeader',
+ value: function(node) {
+ if(node.data === null) return null;
+ return formatJSTreeGridUserItem(node);
+ }
+ },
+ {
+ width: 120,
+ header: 'translate("Group"); ?>',
+ headerClass: 'jsTreeGridHeader',
+ value: function(node) {
+ if(node.data === null) return null;
+ return formatJSTreeGridGroupItem(node);
+ }
+ },
+ {
+ width: 120,
+ header: 'translate("Size"); ?>',
+ headerClass: 'jsTreeGridHeader',
+ value: function(node) {
+ if(node.data === null) return null;
+ return formatJSTreeGridSizeItem(node);
+ }
+ },
+ {
+ width: 150,
+ header: 'translate("Last modification"); ?>',
+ headerClass: 'jsTreeGridHeader',
+ value: function(node) {
+ if(node.data === null) return null;
+ return formatJSTreeGridLastModItem(node.data.stat.mtime);
+ }
}
- }
- ],
- },
- 'search' : {
- "case_sensitive" : false,
- "show_only_matches" : false
- }
- });
+ ],
+ },
+ 'search' : {
+ "case_sensitive" : false,
+ "show_only_matches" : false
+ }
+ });
+ }
$('#jobid').change(function(event) {
window.location.href = window.location.pathname + '?' + updateRestoreParams('jobid', this.value);
@@ -486,6 +491,10 @@ $this->headTitle($title);
var errors = 'errors); ?>';
+ if($('#client').val() !== "") {
+ showFileTree();
+ }
+
if(errors.length > 0) {
$("#modal-001").modal();
}