]> git.sur5r.net Git - bacula/bacula/commitdiff
Added Release in context of storage.
authorDirk H Bartley <dbartley@schupan.com>
Wed, 30 May 2007 02:19:55 +0000 (02:19 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Wed, 30 May 2007 02:19:55 +0000 (02:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4936 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/COMMANDS
bacula/src/qt-console/storage/storage.cpp
bacula/src/qt-console/storage/storage.h
bacula/src/qt-console/storage/storage.ui

index 6082078d1d81cf7535ce1f904c70e90fd27a8f68..0dd14a58fcb2a14b201c0bd95e9fb7317865fea1 100644 (file)
@@ -18,12 +18,6 @@ list
    list nextvol job=<job-name>
    list nextvol job=<job-name> days=nnn
 
-release storage=<storage-name>
-Would need to explain what this does in bat with a dialog
-
-setdebug
-I'd say we could choose not to implement this in bat
-
 unmount [ jobid=<id> | job=<job-name> ]
 Mmmmm
 
@@ -31,25 +25,6 @@ update
   /* Attempted, having problems */
   Volume from Pool All Volumes from Pool
 
-use
-still need to make decisions about how to handle multiple catalogs
-
-var
-Mmmmmm
-
-version
-could be done in console as long as it is explicite about that it is the version
-of the director
-
-quit
-I'd like to have a disconnect graphical option.
-
-exit
-Not really needed
-
-wait
-Mmmmmmm
-
 CONFIG FILE
 ===========================
 add [pool=<pool-name> storage=<storage>  jobid=<JobId>]
@@ -68,6 +43,28 @@ could be done in the context of the console
 python
 not needed from bat??
 
+setdebug
+I'd say we could choose not to implement this in bat
+
+quit
+I'd like to have a disconnect graphical option.
+
+exit
+Not really needed
+
+use
+still need to make decisions about how to handle multiple catalogs
+
+version
+could be done in console as long as it is explicite about that it is the version
+of the director
+
+var
+Mmmmmm
+
+wait
+Mmmmmmm
+
 DONE
 ===========================
 automount on/off
@@ -114,6 +111,9 @@ purge jobs client=<client-name> (of all jobs)
 
 relabel
 
+release storage=<storage-name>
+Would need to explain what this does in bat with a dialog
+
 run
 
 reload
index b2f8ac64927ada06e513abdae444eb11d0cb734e..7eafaf9ffd90b2dc26e4c3c8e9c29793c14d8470 100644 (file)
@@ -167,6 +167,7 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
             mp_treeWidget->removeAction(actionUnMountStorage);
             mp_treeWidget->removeAction(actionUpdateSlots);
             mp_treeWidget->removeAction(actionUpdateSlotsScan);
+            mp_treeWidget->removeAction(actionRelease);
          }
       }
 
@@ -180,6 +181,7 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
          mp_treeWidget->addAction(actionLabelStorage);
          mp_treeWidget->addAction(actionMountStorage);
          mp_treeWidget->addAction(actionUnMountStorage);
+         mp_treeWidget->addAction(actionRelease);
          QString text;
          text = "Status Storage \"" + m_currentStorage + "\"";
          actionStatusStorageInConsole->setText(text);
@@ -189,6 +191,8 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
          actionMountStorage->setText(text);
          text = "\"UN\" Mount media in Storage \"" + m_currentStorage + "\"";
          actionUnMountStorage->setText(text);
+         text = "Release media in Storage \"" + m_currentStorage + "\"";
+         actionRelease->setText(text);
          if (m_currentAutoChanger != 0) {
             mp_treeWidget->addAction(actionUpdateSlots);
             mp_treeWidget->addAction(actionUpdateSlotsScan);
@@ -228,6 +232,8 @@ void Storage::createContextMenu()
                 SLOT(consoleUpdateSlots()));
    connect(actionUpdateSlotsScan, SIGNAL(triggered()), this,
                 SLOT(consoleUpdateSlotsScan()));
+   connect(actionRelease, SIGNAL(triggered()), this,
+                SLOT(consoleRelease()));
 }
 
 /*
@@ -298,3 +304,11 @@ void Storage::consoleUpdateSlotsScan()
    cmd += m_currentStorage;
    consoleCommand(cmd);
 }
+
+/* Release a tape in the drive */
+void Storage::consoleRelease()
+{
+   QString cmd("release storage=");
+   cmd += m_currentStorage;
+   consoleCommand(cmd);
+}
index fb9d13e0ae6a3f71e6a24f3a87cfb177da4197cc..bfc3af6617368cc6a2941c686211e80bdf8e6f23 100644 (file)
@@ -59,6 +59,7 @@ private slots:
    void consoleUnMountStorage();
    void consoleUpdateSlots();
    void consoleUpdateSlotsScan();
+   void consoleRelease();
 
 private:
    void createContextMenu();
index 7ec0c643ac98b26910b7bb4b6d70cb74333a58b3..8acac961c8cd5d8dcd56ec32ca182f68c23eb9d7 100644 (file)
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>468</width>
-    <height>311</height>
+    <width>431</width>
+    <height>296</height>
    </rect>
   </property>
   <property name="windowTitle" >
     <string>Update Slots Scan</string>
    </property>
   </action>
+  <action name="actionRelease" >
+   <property name="icon" >
+    <iconset resource="../main.qrc" >:/images/cartridge.svg</iconset>
+   </property>
+   <property name="text" >
+    <string>Release</string>
+   </property>
+  </action>
  </widget>
  <resources>
   <include location="../main.qrc" />