]> git.proxmox.com Git - proxmox-backup.git/commitdiff
enable tape backup by default
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Apr 2021 10:31:56 +0000 (12:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Apr 2021 10:31:56 +0000 (12:31 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
docs/tape-backup.rst
src/bin/proxmox-backup-proxy.rs
src/server/config.rs
src/server/rest.rs
www/NavigationTree.js

index f905a8b1ef2340296dbdfd8e6c5065e64301db91..dd20d98f98bc81bc645e29db7aa0699396e89d09 100644 (file)
@@ -4,12 +4,7 @@ Tape Backup
 ===========
 
 .. CAUTION:: Tape Backup is a technical preview feature, not meant for
-   production use. To enable it in the GUI, you need to issue the
-   following command (as root user on the console):
-
-   .. code-block:: console
-
-     # touch /etc/proxmox-backup/tape.cfg
+   production use.
 
 Proxmox tape backup provides an easy way to store datastore content
 onto magnetic tapes. This increases data safety because you get:
index 7e026455a33d9d5f5104c5ca10d5917565531ac1..d6074c2e533d6c1d1adfab3be823c27e791c485d 100644 (file)
@@ -91,11 +91,6 @@ async fn run() -> Result<(), Error> {
         default_api_auth(),
     )?;
 
-    // Enable experimental tape UI if tape.cfg exists
-    if Path::new("/etc/proxmox-backup/tape.cfg").exists() {
-        config.enable_tape_ui = true;
-    }
-
     config.add_alias("novnc", "/usr/share/novnc-pve");
     config.add_alias("extjs", "/usr/share/javascript/extjs");
     config.add_alias("qrcodejs", "/usr/share/javascript/qrcodejs");
index ad378b0adfe31206de5eaeb5cdc0900e657989be..67c01426dcb1da441384c68b533185ef515a59c5 100644 (file)
@@ -23,7 +23,6 @@ pub struct ApiConfig {
     templates: RwLock<Handlebars<'static>>,
     template_files: RwLock<HashMap<String, (SystemTime, PathBuf)>>,
     request_log: Option<Arc<Mutex<FileLogger>>>,
-    pub enable_tape_ui: bool,
     pub api_auth: Arc<dyn ApiAuth + Send + Sync>,
 }
 
@@ -42,7 +41,6 @@ impl ApiConfig {
             templates: RwLock::new(Handlebars::new()),
             template_files: RwLock::new(HashMap::new()),
             request_log: None,
-            enable_tape_ui: false,
             api_auth,
         })
     }
index c482bab2b57b3cf04239abff5fb87d09815f0d62..7cf005327c5499b44d3c651954a402618959d25d 100644 (file)
@@ -497,7 +497,6 @@ fn get_index(
         "CSRFPreventionToken": csrf_token,
         "language": lang,
         "debug": debug,
-        "enableTapeUI": api.enable_tape_ui,
     });
 
     let (ct, index) = match api.render_template(template_file, &data) {
index 6d288f0940315c18b98e122b0ff70284e260818c..4e25379caa77586cb51e4caa3ff9f8f27b62aecb 100644 (file)
@@ -79,6 +79,14 @@ Ext.define('PBS.store.NavigationStore', {
                    },
                ],
            },
+           {
+               text: "Tape Backup",
+               iconCls: 'pbs-icon-tape',
+               id: 'tape_management',
+               path: 'pbsTapeManagement',
+               expanded: true,
+               children: [],
+           },
            {
                text: gettext('Datastore'),
                iconCls: 'fa fa-archive',
@@ -118,29 +126,15 @@ Ext.define('PBS.view.main.NavigationTree', {
            view.rstore.on('load', this.onLoad, this);
            view.on('destroy', view.rstore.stopUpdate);
 
-           if (PBS.enableTapeUI) {
-               if (view.tapestore === undefined) {
-                   view.tapestore = Ext.create('Proxmox.data.UpdateStore', {
-                       autoStart: true,
-                       interval: 60 * 1000,
-                       storeid: 'pbs-tape-drive-list',
-                       model: 'pbs-tape-drive-list',
-                   });
-                   view.tapestore.on('load', this.onTapeDriveLoad, this);
-                   view.on('destroy', view.tapestore.stopUpdate);
-               }
-
-               let root = view.getStore().getRoot();
-               if (root.findChild('id', 'tape_management', false) === null) {
-                   root.insertChild(3, {
-                       text: "Tape Backup",
-                       iconCls: 'pbs-icon-tape',
-                       id: 'tape_management',
-                       path: 'pbsTapeManagement',
-                       expanded: true,
-                       children: [],
-                   });
-               }
+           if (view.tapestore === undefined) {
+               view.tapestore = Ext.create('Proxmox.data.UpdateStore', {
+                   autoStart: true,
+                   interval: 60 * 1000,
+                   storeid: 'pbs-tape-drive-list',
+                   model: 'pbs-tape-drive-list',
+               });
+               view.tapestore.on('load', this.onTapeDriveLoad, this);
+               view.on('destroy', view.tapestore.stopUpdate);
            }
        },
 
@@ -271,16 +265,12 @@ Ext.define('PBS.view.main.NavigationTree', {
 
     reloadTapeStore: function() {
        let me = this;
-       if (!PBS.enableTapeUI) {
-           return;
-       }
-
        me.tapestore.load();
     },
 
     select: function(path, silent) {
        var me = this;
-       if (me.rstore.isLoaded() && (!PBS.enableTapeUI || me.tapestore.isLoaded())) {
+       if (me.rstore.isLoaded() && me.tapestore.isLoaded()) {
            if (silent) {
                me.suspendEvents(false);
            }