unmount [ jobid=<id> | job=<job-name> ]
Mmmmm
-update media, volume, pool, slots
-media/volume still has more work, they are the same after all
+update
+ /* Attempted, having problems */
+ Volume from Pool All Volumes from Pool
use
still need to make decisions about how to handle multiple catalogs
status
unmount storage=<storage-name> [ drive=\lt{}num\gt{} ]
+
+update volume (via mediaedit)
+ "update slots" "update slots scan" (context of storage)
<file>images/new.png</file>
<file>images/next.png</file>
<file>images/open.png</file>
- <file>images/package-x-generic.svg</file>
+ <file>images/package-x-generic.png</file>
<file>images/paste.png</file>
<file>images/print.png</file>
<file>images/restore.png</file>
if (m_checkcurwidget) {
/* The Previous item */
if (previouswidgetitem) { /* avoid a segfault if first time */
- int treedepth = previouswidgetitem->data(0, Qt::UserRole).toInt();
- if (treedepth == 2){
- mp_treeWidget->removeAction(actionEditVolume);
- mp_treeWidget->removeAction(actionListJobsOnVolume);
- mp_treeWidget->removeAction(actionDeleteVolume);
- mp_treeWidget->removeAction(actionPruneVolume);
- mp_treeWidget->removeAction(actionPurgeVolume);
- mp_treeWidget->removeAction(actionRelabelVolume);
- }
+ mp_treeWidget->removeAction(actionEditVolume);
+ mp_treeWidget->removeAction(actionListJobsOnVolume);
+ mp_treeWidget->removeAction(actionDeleteVolume);
+ mp_treeWidget->removeAction(actionPruneVolume);
+ mp_treeWidget->removeAction(actionPurgeVolume);
+ mp_treeWidget->removeAction(actionRelabelVolume);
+ mp_treeWidget->removeAction(actionAllVolumesFromPool);
}
int treedepth = currentwidgetitem->data(0, Qt::UserRole).toInt();
+ m_currentVolumeName=currentwidgetitem->text(0);
if (treedepth == 2){
- m_currentVolumeName=currentwidgetitem->text(0);
m_currentVolumeId=currentwidgetitem->text(1);
mp_treeWidget->addAction(actionEditVolume);
mp_treeWidget->addAction(actionListJobsOnVolume);
mp_treeWidget->addAction(actionPruneVolume);
mp_treeWidget->addAction(actionPurgeVolume);
mp_treeWidget->addAction(actionRelabelVolume);
+ } else if (treedepth == 1) {
+/* *******FIXME******
+ * I can't seem to get "All volumes from pool" or "Volume from pool" to work
+ * in one sentence command. Works when you do it one step at a time vi console
+ mp_treeWidget->addAction(actionAllVolumesFromPool);
+*/
}
}
}
/* connect to the action specific to this pages class */
connect(actionRefreshMediaList, SIGNAL(triggered()), this,
SLOT(populateTree()));
+ connect(actionAllVolumesFromPool, SIGNAL(triggered()), this, SLOT(allVolumesFromPool()));
}
/*
setConsoleCurrent();
new relabelDialog(m_console, m_currentVolumeName);
}
+
+/*
+ * Called from the signal of the context sensitive menu to purge!
+ */
+void MediaList::allVolumesFromPool()
+{
+ QString cmd("update pool=");
+ cmd += m_currentVolumeName + " All Volumes From Pool";
+ consoleCommand(cmd);
+ populateTree();
+}
void purgeVolume();
void pruneVolume();
void relabelVolume();
+ void allVolumesFromPool();
private:
void createContextMenu();
<rect>
<x>0</x>
<y>0</y>
- <width>636</width>
- <height>357</height>
+ <width>490</width>
+ <height>303</height>
</rect>
</property>
<property name="windowTitle" >
<string>Relabel Volume</string>
</property>
</action>
+ <action name="actionAllVolumesFromPool" >
+ <property name="icon" >
+ <iconset resource="../main.qrc" >:/images/cartridge-edit.svg</iconset>
+ </property>
+ <property name="text" >
+ <string>Update all Volumes From Pool</string>
+ </property>
+ <property name="iconText" >
+ <string>Update all Volumes From Pool</string>
+ </property>
+ <property name="toolTip" >
+ <string>Update all Volumes From Pool</string>
+ </property>
+ <property name="statusTip" >
+ <string>Update all Volumes From Pool</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="../main.qrc" />
m_name = "Storage";
pgInitialize();
QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
- thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/package-x-generic.svg")));
+ thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/package-x-generic.png")));
/* mp_treeWidget, Storage Tree Tree Widget inherited from ui_storage.h */
m_populated = false;
mp_treeWidget->removeAction(actionLabelStorage);
mp_treeWidget->removeAction(actionMountStorage);
mp_treeWidget->removeAction(actionUnMountStorage);
+ mp_treeWidget->removeAction(actionUpdateSlots);
+ mp_treeWidget->removeAction(actionUpdateSlotsScan);
}
}
mp_treeWidget->addAction(actionMountStorage);
mp_treeWidget->addAction(actionUnMountStorage);
QString text;
- text = "Status Storage " + m_currentStorage;
+ text = "Status Storage \"" + m_currentStorage + "\"";
actionStatusStorageInConsole->setText(text);
- text = "Label media in Storage " + m_currentStorage;
+ text = "Label media in Storage \"" + m_currentStorage + "\"";
actionLabelStorage->setText(text);
- text = "Mount media in Storage " + m_currentStorage;
+ text = "Mount media in Storage \"" + m_currentStorage + "\"";
actionMountStorage->setText(text);
- text = "\"UN\" Mount media in Storage " + m_currentStorage;
+ text = "\"UN\" Mount media in Storage \"" + m_currentStorage + "\"";
actionUnMountStorage->setText(text);
+ if (m_currentAutoChanger != 0) {
+ mp_treeWidget->addAction(actionUpdateSlots);
+ mp_treeWidget->addAction(actionUpdateSlotsScan);
+ text = "Barcode Scan media in Storage \"" + m_currentStorage + "\"";
+ actionUpdateSlots->setText(text);
+ text = "Mount and read scan media in Storage \"" + m_currentStorage + "\"";
+ actionUpdateSlotsScan->setText(text);
+ }
}
}
}
SLOT(consoleMountStorage()));
connect(actionUnMountStorage, SIGNAL(triggered()), this,
SLOT(consoleUnMountStorage()));
+ connect(actionUpdateSlots, SIGNAL(triggered()), this,
+ SLOT(consoleUpdateSlots()));
+ connect(actionUpdateSlotsScan, SIGNAL(triggered()), this,
+ SLOT(consoleUpdateSlotsScan()));
}
/*
cmd += m_currentStorage;
consoleCommand(cmd);
}
+
+/* Update Slots */
+void Storage::consoleUpdateSlots()
+{
+ QString cmd("update slots storage=");
+ cmd += m_currentStorage;
+ consoleCommand(cmd);
+}
+
+/* Update Slots Scan*/
+void Storage::consoleUpdateSlotsScan()
+{
+ QString cmd("update slots scan storage=");
+ cmd += m_currentStorage;
+ consoleCommand(cmd);
+}
private slots:
void populateTree();
-// void showJobs();
void consoleStatusStorage();
void consoleLabelStorage();
void consoleMountStorage();
void consoleUnMountStorage();
+ void consoleUpdateSlots();
+ void consoleUpdateSlotsScan();
private:
void createContextMenu();
<rect>
<x>0</x>
<y>0</y>
- <width>791</width>
- <height>644</height>
+ <width>468</width>
+ <height>311</height>
</rect>
</property>
<property name="windowTitle" >
<property name="text" >
<string>Status Storage In Console</string>
</property>
+ <property name="statusTip" >
+ <string>Status Storage In Console</string>
+ </property>
</action>
<action name="actionLabelStorage" >
<property name="icon" >
<property name="text" >
<string>Label Storage</string>
</property>
+ <property name="statusTip" >
+ <string>Label Storage</string>
+ </property>
</action>
<action name="actionMountStorage" >
<property name="icon" >
<property name="text" >
<string>MountStorage</string>
</property>
+ <property name="statusTip" >
+ <string>MountStorage</string>
+ </property>
</action>
<action name="actionUnMountStorage" >
<property name="icon" >
<property name="text" >
<string>UnMount Storage</string>
</property>
+ <property name="statusTip" >
+ <string>UnMount Storage</string>
+ </property>
+ </action>
+ <action name="actionUpdateSlots" >
+ <property name="icon" >
+ <iconset resource="../main.qrc" >:/images/package-x-generic.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Update Slots</string>
+ </property>
+ <property name="statusTip" >
+ <string>Update Slots</string>
+ </property>
+ </action>
+ <action name="actionUpdateSlotsScan" >
+ <property name="icon" >
+ <iconset resource="../main.qrc" >:/images/package-x-generic.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Update Slots Scan</string>
+ </property>
+ <property name="statusTip" >
+ <string>Update Slots Scan</string>
+ </property>
</action>
</widget>
<resources>