m_jobId = jobId;
getFont();
- populateText();
- populateForm();
- populateVolumes();
+
+ connect(pbRefresh, SIGNAL(clicked()), this, SLOT(populateAll()));
+ connect(pbDelete, SIGNAL(clicked()), this, SLOT(deleteJob()));
+
+ populateAll();
dockPage();
setCurrent();
}
+void Job::deleteJob()
+{
+ if (QMessageBox::warning(this, "Bat",
+ tr("Are you sure you want to delete?? !!!.\n"
+"This delete command is used to delete a Job record and all associated catalog"
+" records that were created. This command operates only on the Catalog"
+" database and has no effect on the actual data written to a Volume. This"
+" command can be dangerous and we strongly recommend that you do not use"
+" it unless you know what you are doing. The Job and all its associated"
+" records (File and JobMedia) will be deleted from the catalog."
+ "Press OK to proceed with delete operation.?"),
+ QMessageBox::Ok | QMessageBox::Cancel)
+ == QMessageBox::Cancel) { return; }
+
+ QString cmd("delete job jobid=");
+ cmd += m_jobId;
+ consoleCommand(cmd, false);
+ closeStackPage();
+}
+
void Job::getFont()
{
QFont font = textJobLog->font();
textJobLog->setFont(font);
}
+void Job::populateAll()
+{
+ Pmsg0(0, "populateAll()\n");
+ populateText();
+ populateForm();
+ populateVolumes();
+}
+
/*
* Populate the text in the window
*/
void Job::populateText()
{
+ textJobLog->clear();
QString query;
query = "SELECT Time, LogText FROM Log WHERE JobId='" + m_jobId + "' order by Time";
<rect>
<x>0</x>
<y>0</y>
- <width>855</width>
+ <width>857</width>
<height>757</height>
</rect>
</property>
<rect>
<x>10</x>
<y>20</y>
- <width>231</width>
+ <width>247</width>
<height>151</height>
</rect>
</property>
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;">
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
+</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p></body></html></string>
</property>
</widget>
</item>
</layout>
- <zorder>textJobLog</zorder>
</widget>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>10</y>
- <width>661</width>
+ <width>776</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="QPushButton" name="pushButton" >
+ <widget class="QPushButton" name="pbDelete" >
<property name="text" >
<string>Delete</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_8" >
+ <widget class="QPushButton" name="pbErrors" >
<property name="toolTip" >
<string>View errors for this Job</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_3" >
+ <widget class="QPushButton" name="pbMedia" >
<property name="text" >
<string>Media</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_5" >
+ <widget class="QPushButton" name="pbHistory" >
<property name="text" >
<string>History</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_2" >
+ <widget class="QPushButton" name="pbRun" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_6" >
+ <widget class="QPushButton" name="pbDoc" >
<property name="text" >
<string>Read doc</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_7" >
+ <widget class="QPushButton" name="pbFileSet" >
<property name="text" >
<string>FileSet</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_4" >
+ <widget class="QPushButton" name="pbStats" >
<property name="text" >
<string>Stats</string>
</property>
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="pbRefresh" >
+ <property name="text" >
+ <string>Refresh</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../main.qrc" >
+ <normaloff>:/images/view-refresh.png</normaloff>:/images/view-refresh.png</iconset>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>