Resolve issue of connection during restore selection. Could go with preempt
-Add option to LIMIT the number of jobs shown in all jobs page for users with
-multiple hundreds to thousands of jobs.
-
Where and bootstrap are confused in runjobs of restore.
User preferences. With log to stdout options.
+Have settings for defaults of limits on joblist
Test restore and get anything not working, working.
partially done.
Update README describe bat.conf.example to bat.conf
-Create list of what does not work.
-From what I can tell, just the restore window on the left.
-
Add numerous are you sure dialog boxes. Like are you sure you want to
delete/purge that volume. Show a little of the documentation about what
the consequences of delete or purging are.
============================================================
DONE:
============================================================
+Create list of what does not work.
+From what I can tell, just the restore window on the left.
+
+Add option to LIMIT the number of jobs shown in all jobs page for users with
+multiple hundreds to thousands of jobs.
+
Play with includes to Make these compiles shorter.
moved includes of of includes and into files only console.h should be long
-
relabel storage=DDS3 oldvolume=ddsvol003 volume=dds3vol003 slot=3 pool=dds3_hope
in label slot spinner, limit the upper to the value of slots for that storage.
m_populated = false;
m_checkcurwidget = true;
m_closeable = false;
- setTitle();
}
Clients::~Clients()
m_populated = false;
m_checkcurwidget = true;
m_closeable = false;
- setTitle();
}
FileSet::~FileSet()
m_closeable = false;
m_checkCurrentWidget = true;
createConnections();
- setTitle();
+
+ /* Set Defaults for check and spin for limits */
+ limitCheckBox->setCheckState(Qt::Checked);
+ limitSpinBox->setValue(150);
+ daysCheckBox->setCheckState(Qt::Unchecked);
+ daysSpinBox->setValue(30);
}
/*
QString resultline;
QBrush blackBrush(Qt::black);
+ /* Can't do this in constructor because not neccesarily conected in constructor */
+ if (!m_populated) {
+ clientsComboBox->addItem("");
+ clientsComboBox->addItems(m_console->client_list);
+ int clientIndex = clientsComboBox->findText(m_clientName, Qt::MatchExactly);
+ if (clientIndex != -1)
+ clientsComboBox->setCurrentIndex(clientIndex);
+
+ /* Not m_console->volume_list will query database */
+ QString query("SELECT VolumeName AS Media FROM Media ORDER BY Media");
+ QStringList results, volumeList;
+ if (m_console->sql_cmd(query, results)) {
+ QString field;
+ QStringList fieldlist;
+ /* Iterate through the lines of results. */
+ foreach (QString resultline, results) {
+ fieldlist = resultline.split("\t");
+ volumeList.append(fieldlist[0]);
+ } /* foreach resultline */
+ } /* if results from query */
+ volumeComboBox->addItem("");
+ volumeComboBox->addItems(volumeList);
+ int volumeIndex = volumeComboBox->findText(m_mediaName, Qt::MatchExactly);
+ if (volumeIndex != -1) {
+ volumeComboBox->setCurrentIndex(volumeIndex);
+ }
+ }
+
/* Set up query QString and header QStringList */
QString query("");
query += "SELECT DISTINCT Job.Jobid AS Id, Job.Name AS JobName, Client.Name AS Client,"
" FROM Job, JobMedia, Media, Client"
" WHERE JobMedia.JobId=Job.JobId and JobMedia.MediaId=Media.MediaId"
" and Client.ClientId=Job.ClientId";
+ int volumeIndex = volumeComboBox->currentIndex();
+ if (volumeIndex != -1)
+ m_mediaName = volumeComboBox->itemText(volumeIndex);
if (m_mediaName != "") {
- query += " and Media.VolumeName='" + m_mediaName + "'";
+ query += " AND Media.VolumeName='" + m_mediaName + "'";
m_closeable=true;
}
+ int clientIndex = clientsComboBox->currentIndex();
+ if (clientIndex != -1)
+ m_clientName = clientsComboBox->itemText(clientIndex);
if (m_clientName != "") {
- query += " and Client.Name='" + m_clientName + "'";
+ query += " AND Client.Name='" + m_clientName + "'";
m_closeable=true;
}
- query += " ORDER BY Job.Starttime";
+ /* If Limit check box For limit by days is checked */
+ if (daysCheckBox->checkState() == Qt::Checked) {
+ QDateTime stamp = QDateTime::currentDateTime().addDays(-daysSpinBox->value());
+ QString since = stamp.toString(Qt::ISODate);
+ query += " AND Job.Starttime>'" + since + "'";
+ }
+ /* Descending */
+ query += " ORDER BY Job.Starttime DESC";
+ /* If Limit check box for limit records returned is checked */
+ if (limitCheckBox->checkState() == Qt::Checked) {
+ QString limit;
+ limit.setNum(limitSpinBox->value());
+ query += " LIMIT " + limit;
+ }
QStringList headerlist = (QStringList()
<< "Job Id" << "Job Name" << "Client" << "Job Starttime" << "Job Type"
<< "Job Level" << "Job Files" << "Job Bytes" << "Job Status" );
* page selector tree */
connect(actionRefreshJobList, SIGNAL(triggered()), this,
SLOT(populateTable()));
+ connect(refreshButton, SIGNAL(pressed()), this, SLOT(populateTable()));
/* for the tableItemChanged to maintain m_currentJob */
connect(mp_tableWidget, SIGNAL(
currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)),
<x>0</x>
<y>0</y>
<width>621</width>
- <height>460</height>
+ <height>500</height>
</rect>
</property>
<property name="windowTitle" >
<property name="spacing" >
<number>6</number>
</property>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="limitCheckBox" >
+ <property name="text" >
+ <string>Record Limit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="limitSpinBox" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="singleStep" >
+ <number>25</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="daysCheckBox" >
+ <property name="text" >
+ <string>Days Limit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="daysSpinBox" >
+ <property name="singleStep" >
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="clientsLabel" >
+ <property name="text" >
+ <string>Clients</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="clientsComboBox" />
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="volumeLabel" >
+ <property name="text" >
+ <string>Volume</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="volumeComboBox" />
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="refreshButton" >
+ <property name="maximumSize" >
+ <size>
+ <width>65</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Refresh</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
<item row="0" column="0" >
<widget class="QTableWidget" name="mp_tableWidget" />
</item>
</layout>
<action name="actionRefreshJobList" >
<property name="icon" >
- <iconset>:images/run.png</iconset>
+ <iconset>../../../../../../../:images/run.png</iconset>
</property>
<property name="text" >
<string>Refresh Job List</string>
</action>
<action name="actionListJobid" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>ListJobid</string>
</action>
<action name="actionListFilesOnJob" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>List Files On Job</string>
</action>
<action name="actionListJobMedia" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>ListJobMedia</string>
</action>
<action name="actionListVolumes" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>ListVolumes</string>
</action>
<action name="actionLongListJob" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>LongListJob</string>
</action>
<action name="actionDeleteJob" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>DeleteJob</string>
</action>
<action name="actionPurgeFiles" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>PurgeFiles</string>
m_populated = false;
m_checkcurwidget = true;
m_closeable = false;
- setTitle();
}
MediaList::~MediaList()
treeWidgetName(name);
item->setText(0, name);
mainWin->hashInsert(item, this);
+ setTitle();
}
/*
m_checkcurwidget = true;
m_closeable = false;
m_currentStorage = "";
- setTitle();
}
Storage::~Storage()