From: Dirk H Bartley Date: Wed, 30 May 2007 02:19:55 +0000 (+0000) Subject: Added Release in context of storage. X-Git-Tag: Release-7.0.0~6209 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d74e21b1c14380ef48139d785d71b588bdc7c407;p=bacula%2Fbacula Added Release in context of storage. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4936 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/COMMANDS b/bacula/src/qt-console/COMMANDS index 6082078d1d..0dd14a58fc 100644 --- a/bacula/src/qt-console/COMMANDS +++ b/bacula/src/qt-console/COMMANDS @@ -18,12 +18,6 @@ list list nextvol job= list nextvol job= days=nnn -release storage= -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= | job= ] 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= storage= 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= (of all jobs) relabel +release storage= +Would need to explain what this does in bat with a dialog + run reload diff --git a/bacula/src/qt-console/storage/storage.cpp b/bacula/src/qt-console/storage/storage.cpp index b2f8ac6492..7eafaf9ffd 100644 --- a/bacula/src/qt-console/storage/storage.cpp +++ b/bacula/src/qt-console/storage/storage.cpp @@ -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); +} diff --git a/bacula/src/qt-console/storage/storage.h b/bacula/src/qt-console/storage/storage.h index fb9d13e0ae..bfc3af6617 100644 --- a/bacula/src/qt-console/storage/storage.h +++ b/bacula/src/qt-console/storage/storage.h @@ -59,6 +59,7 @@ private slots: void consoleUnMountStorage(); void consoleUpdateSlots(); void consoleUpdateSlotsScan(); + void consoleRelease(); private: void createContextMenu(); diff --git a/bacula/src/qt-console/storage/storage.ui b/bacula/src/qt-console/storage/storage.ui index 7ec0c643ac..8acac961c8 100644 --- a/bacula/src/qt-console/storage/storage.ui +++ b/bacula/src/qt-console/storage/storage.ui @@ -5,8 +5,8 @@ 0 0 - 468 - 311 + 431 + 296 @@ -100,6 +100,14 @@ Update Slots Scan + + + :/images/cartridge.svg + + + Release + +