dhb
====================================================
-Further testing of restore with .mod
-
-User preferences. With log to stdout options.
-Have settings for defaults of limits on joblist
-
-Add fileset to joblist.
-
joblist cancel a running job.
Set default for replace in run restore job to "always"??????
+Fixes to final restore widgets.
+
Add context sensitive options for most commands
status dir on page select director item
All items with jobid= that I thought could work from joblist are done.
update slots scan
see COMMANDS file
-Option in joblist like with restore from jobid but restore populating timestamp
-of the selected job.
-
Get the 5 second bring to bottom of console to stop
-Resolve issue of connection during restore selection. Could go with preempt of
-connections. (Kern is to work on)
-
========LOW priority items:
Human readable in joblist for purged, joblevel and job type.
============================================================
DONE:
============================================================
+Option in joblist like with restore from jobid but restore populating timestamp
+of the selected job.
+
+User preferences. With log to stdout options.
+Have settings for defaults of limits on joblist
+
+Resolve issue of connection during restore selection. Could go with preempt of
+connections. Temporary resolution is in. (Kern is to work on)
+
+Further testing of restore with .mod
+ Tested a few things, not all.
+
+Add fileset to joblist.
+
Test left pane of restore with 2 windows drives in one backup job.
Yup, id didn't work, now it does.
extern MainWin *mainWin;
extern QApplication *app;
-extern bool g_commDebug;
-extern bool g_displayAll;
int bvsnprintf(char *str, int32_t size, const char *format, va_list ap);
mp_treeWidget->setColumnCount(headerlist.count());
mp_treeWidget->setHeaderLabels(headerlist);
- /* This could be a log item */
- //printf("In Clients::populateTree()\n");
foreach (QString clientName, m_console->client_list){
clientItem = new QTreeWidgetItem(topItem);
QStringList results;
/* This could be a log item */
- //printf("Clients query cmd : %s\n",query.toUtf8().data());
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Clients query cmd : %s\n",query.toUtf8().data());
+ }
if (m_console->sql_cmd(query, results)) {
int resultCount = results.count();
if (resultCount == 1){
notify(false);
write(cmd);
while ((stat = read()) > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
strip_trailing_junk(msg());
results << msg();
}
pm_strcat(cmd, "\"");
write(cmd.c_str());
while ((stat = read()) > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
strip_trailing_junk(msg());
results << msg();
}
scmd = QString(".defaults job=\"%1\"").arg(job_defs.job_name);
write(scmd);
while ((stat = read()) > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
def = strchr(msg(), '=');
if (!def) {
continue;
m_sock->msglen = pm_strcpy(m_sock->msg, msg);
m_at_prompt = false;
m_at_main_prompt = false;
- if (g_commDebug) Pmsg1(000, "send: %s\n", msg);
+ if (mainWin->m_commDebug) Pmsg1(000, "send: %s\n", msg);
return m_sock->send();
}
{
write(".\n");
while (read() > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
}
write(".\n");
while (read() > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
}
write(".\n");
while (read() > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
}
display_text("\n");
}
void Console::displayToPrompt()
{
int stat;
- if (g_commDebug) Pmsg0(000, "DisplaytoPrompt\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "DisplaytoPrompt\n");
while (!m_at_prompt) {
if ((stat=read()) > 0) {
display_text(msg());
}
}
- if (g_commDebug) Pmsg1(000, "endDisplaytoPrompt=%d\n", stat);
+ if (mainWin->m_commDebug) Pmsg1(000, "endDisplaytoPrompt=%d\n", stat);
}
void Console::discardToPrompt()
{
int stat;
- if (g_commDebug) Pmsg0(000, "discardToPrompt\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "discardToPrompt\n");
while (!m_at_prompt) {
if ((stat=read()) > 0) {
- if (g_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) display_text(msg());
}
}
- if (g_commDebug) Pmsg1(000, "endDisplayToPrompt=%d\n", stat);
+ if (mainWin->m_commDebug) Pmsg1(000, "endDisplayToPrompt=%d\n", stat);
}
m_at_prompt = false;
m_at_main_prompt = false;
}
- if (g_commDebug) Pmsg1(000, "got: %s", m_sock->msg);
+ if (mainWin->m_commDebug) Pmsg1(000, "got: %s", m_sock->msg);
}
switch (m_sock->msglen) {
case BNET_MSGS_PENDING:
- if (g_commDebug) Pmsg0(000, "MSGS PENDING\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "MSGS PENDING\n");
write_dir(".messages");
displayToPrompt();
m_messages_pending = false;
continue;
case BNET_CMD_OK:
- if (g_commDebug) Pmsg0(000, "CMD OK\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "CMD OK\n");
m_at_prompt = false;
m_at_main_prompt = false;
continue;
case BNET_CMD_BEGIN:
- if (g_commDebug) Pmsg0(000, "CMD BEGIN\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "CMD BEGIN\n");
m_at_prompt = false;
m_at_main_prompt = false;
continue;
case BNET_MAIN_PROMPT:
- if (g_commDebug) Pmsg0(000, "PROMPT\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "PROMPT\n");
m_at_prompt = true;
m_at_main_prompt = true;
mainWin->set_status(_("At prompt waiting for input ..."));
QApplication::restoreOverrideCursor();
break;
case BNET_PROMPT:
- if (g_commDebug) Pmsg0(000, "PROMPT\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "PROMPT\n");
m_at_prompt = true;
m_at_main_prompt = false;
mainWin->set_status(_("At prompt waiting for input ..."));
QApplication::restoreOverrideCursor();
break;
case BNET_CMD_FAILED:
- if (g_commDebug) Pmsg0(000, "CMD FAIL\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "CMD FAIL\n");
mainWin->set_status(_("Command failed. At prompt waiting for input ..."));
update_cursor();
QApplication::restoreOverrideCursor();
break;
/* We should not get this one */
case BNET_EOD:
- if (g_commDebug) Pmsg0(000, "EOD\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "EOD\n");
mainWin->set_status_ready();
update_cursor();
QApplication::restoreOverrideCursor();
int stat;
(void)fd;
- if (g_commDebug) Pmsg0(000, "read_dir\n");
+ if (mainWin->m_commDebug) Pmsg0(000, "read_dir\n");
while ((stat = read()) >= 0) {
display_text(msg());
}
mp_treeWidget->setColumnCount(headerlist.count());
mp_treeWidget->setHeaderLabels(headerlist);
- /* This could be a log item */
- //printf("In FileSet::populateTree()\n");
foreach(QString filesetName, m_console->fileset_list) {
filesetItem = new QTreeWidgetItem(topItem);
query += " ORDER BY FileSet";
QStringList results;
- /* This could be a log item */
- //printf("FileSet query cmd : %s\n",query.toUtf8().data());
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "FileSet query cmd : %s\n",query.toUtf8().data());
+ }
if (m_console->sql_cmd(query, results)) {
int resultCount = results.count();
if (resultCount == 1){
createConnections();
/* Set Defaults for check and spin for limits */
- limitCheckBox->setCheckState(Qt::Checked);
- limitSpinBox->setValue(150);
- daysCheckBox->setCheckState(Qt::Unchecked);
- daysSpinBox->setValue(30);
+ limitCheckBox->setCheckState(mainWin->m_recordLimitCheck ? Qt::Checked : Qt::Unchecked);
+ limitSpinBox->setValue(mainWin->m_recordLimitVal);
+ daysCheckBox->setCheckState(mainWin->m_daysLimitCheck ? Qt::Checked : Qt::Unchecked);
+ daysSpinBox->setValue(mainWin->m_daysLimitVal);
}
/*
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");
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
+ }
QStringList results, volumeList;
if (m_console->sql_cmd(query, results)) {
QString field;
fileSetComboBox->addItem("Any");
fileSetComboBox->addItems(m_console->fileset_list);
QString statusQuery("SELECT JobStatusLong FROM Status");
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
+ }
QStringList statusResults, statusLongList;
if (m_console->sql_cmd(statusQuery, statusResults)) {
QString field;
mp_tableWidget->setColumnCount(headerlist.size());
mp_tableWidget->setHorizontalHeaderLabels(headerlist);
- /* This could be a user preference debug message?? */
- printf("Query cmd : %s\n",query.toUtf8().data());
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
+ }
if (m_console->sql_cmd(query, results)) {
m_resultCount = results.count();
<item>
<widget class="QSpinBox" name="daysSpinBox" >
<property name="singleStep" >
- <number>10</number>
+ <number>7</number>
</property>
</widget>
</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>
</action>
<action name="actionRestoreFromJob" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>Restore From Job</string>
</action>
<action name="actionRestoreFromTime" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>Restore From Time</string>
</action>
<action name="actionShowLogForJob" >
<property name="icon" >
- <iconset>:images/unmark.png</iconset>
+ <iconset>../../../../../../../:images/unmark.png</iconset>
</property>
<property name="text" >
<string>Show Log for Job</string>
.arg(poolCombo->currentText())
.arg(storageCombo->currentText())
.arg(slotSpin->value());
- /* FIXME Make this a user configurable logging action and dont use printf */
- //printf("sending command : %s\n",scmd.toUtf8().data());
+ if (mainWin->m_commandDebug) {
+ Pmsg1(000, "sending command : %s\n",scmd.toUtf8().data());
+ }
m_console->write_dir(scmd.toUtf8().data());
m_console->displayToPrompt();
m_console->notify(true);
MainWin *mainWin;
QApplication *app;
-/*
- * ***FIXME*** move the following two into the MainWin class or
- * the Console class.
- */
-bool g_commDebug = false;
-bool g_displayAll = false;
-
-
/* Forward referenced functions */
void terminate_console(int sig);
static void usage();
mainWin = this;
setupUi(this); /* Setup UI defined by main.ui (designer) */
+ readPreferences();
treeWidget->clear();
treeWidget->setColumnCount(1);
treeWidget->setHeaderLabel("Select Page");
}
m_currentConsole = (Console*)getFromHash(m_firstItem);
m_currentConsole->setCurrent();
- /* FIXME
- * I'd like to turn this into a debug item
- * DIRRES* dirres = m_currentConsole->getDirRes();
- * printf("Setting initial window to %s\n", dirres->name());
- */
+ if (m_miscDebug) {
+ QString directoryResourceName;
+ m_currentConsole->getDirResName(directoryResourceName);
+ Pmsg1(000, "Setting initial window to %s\n", directoryResourceName.toUtf8().data());
+ }
}
void MainWin::createPages()
void MainWin::setPreferences()
{
prefsDialog prefs;
- prefs.commDebug->setCheckState(g_commDebug ? Qt::Checked : Qt::Unchecked);
- prefs.displayAll->setCheckState(g_displayAll ? Qt::Checked : Qt::Unchecked);
+ prefs.commDebug->setCheckState(m_commDebug ? Qt::Checked : Qt::Unchecked);
+ prefs.displayAll->setCheckState(m_displayAll ? Qt::Checked : Qt::Unchecked);
+ prefs.sqlDebug->setCheckState(m_sqlDebug ? Qt::Checked : Qt::Unchecked);
+ prefs.commandDebug->setCheckState(m_commandDebug ? Qt::Checked : Qt::Unchecked);
+ prefs.miscDebug->setCheckState(m_miscDebug ? Qt::Checked : Qt::Unchecked);
+ prefs.recordLimit->setCheckState(m_recordLimitCheck ? Qt::Checked : Qt::Unchecked);
+ prefs.recordSpinBox->setValue(m_recordLimitVal);
+ prefs.daysLimit->setCheckState(m_daysLimitCheck ? Qt::Checked : Qt::Unchecked);
+ prefs.daysSpinBox->setValue(m_daysLimitVal);
prefs.exec();
}
void prefsDialog::accept()
{
this->hide();
- g_commDebug = this->commDebug->checkState() == Qt::Checked;
- g_displayAll = this->displayAll->checkState() == Qt::Checked;
+ mainWin->m_commDebug = this->commDebug->checkState() == Qt::Checked;
+ mainWin->m_displayAll = this->displayAll->checkState() == Qt::Checked;
+ mainWin->m_sqlDebug = this->sqlDebug->checkState() == Qt::Checked;
+ mainWin->m_commandDebug = this->commandDebug->checkState() == Qt::Checked;
+ mainWin->m_miscDebug = this->miscDebug->checkState() == Qt::Checked;
+ mainWin->m_recordLimitCheck = this->recordLimit->checkState() == Qt::Checked;
+ mainWin->m_recordLimitVal = this->recordSpinBox->value();
+ mainWin->m_daysLimitCheck = this->daysLimit->checkState() == Qt::Checked;
+ mainWin->m_daysLimitVal = this->daysSpinBox->value();
+ QSettings settings("www.bacula.org", "bat");
+ settings.beginGroup("Messages");
+ settings.setValue("commDebug", mainWin->m_commDebug);
+ settings.setValue("displayAll", mainWin->m_displayAll);
+ settings.setValue("sqlDebug", mainWin->m_sqlDebug);
+ settings.setValue("commandDebug", mainWin->m_commandDebug);
+ settings.setValue("miscDebug", mainWin->m_miscDebug);
+ settings.setValue("recordLimitCheck", mainWin->m_recordLimitCheck);
+ settings.setValue("recordLimitVal", mainWin->m_recordLimitVal);
+ settings.setValue("daysLimitCheck", mainWin->m_daysLimitCheck);
+ settings.setValue("daysLimitVal", mainWin->m_daysLimitVal);
+ settings.endGroup();
}
void prefsDialog::reject()
this->hide();
mainWin->set_status("Canceled");
}
+
+/* read preferences for the prefences dialog box */
+void MainWin::readPreferences()
+{
+ QSettings settings("www.bacula.org", "bat");
+ settings.beginGroup("Messages");
+ m_commDebug = settings.value("commDebug", false).toBool();
+ m_displayAll = settings.value("displayAll", false).toBool();
+ m_sqlDebug = settings.value("sqlDebug", false).toBool();
+ m_commandDebug = settings.value("commandDebug", false).toBool();
+ m_miscDebug = settings.value("miscDebug", false).toBool();
+ m_recordLimitCheck = settings.value("recordLimitCheck", true).toBool();
+ m_recordLimitVal = settings.value("recordLimitVal", 150).toInt();
+ m_daysLimitCheck = settings.value("daysLimitCheck", false).toBool();
+ m_daysLimitVal = settings.value("daysLimitVal", 28).toInt();
+ settings.endGroup();
+}
/* This is a list of consoles */
QHash<QTreeWidgetItem*,Console*> m_consoleHash;
void createPageJobList(QString &, QString &, QTreeWidgetItem *);
+ bool m_commDebug;
+ bool m_displayAll;
+ bool m_sqlDebug;
+ bool m_commandDebug;
+ bool m_miscDebug;
+ bool m_recordLimitCheck;
+ int m_recordLimitVal;
+ bool m_daysLimitCheck;
+ int m_daysLimitVal;
+
public slots:
void input_line();
void toggleDockContextWindow();
void closePage();
void setPreferences();
+ void readPreferences();
protected:
void closeEvent(QCloseEvent *event);
query += " AND Media.MediaId='" + mediaId + "'";
query += " ORDER BY Pool.Name";
- /* FIXME Make this a user configurable logging action and dont use printf */
- //printf("MediaList query cmd : %s\n",query.toUtf8().data());
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "MediaList query cmd : %s\n",query.toUtf8().data());
+ }
QStringList results;
if (m_console->sql_cmd(query, results)) {
QString field;
docmd = true;
}
if (docmd) {
- /* FIXME Make this a user configurable logging action and dont use printf */
- //printf("sending command : %s\n",scmd.toUtf8().data());
+ if (mainWin->m_commandDebug) {
+ Pmsg1(000, "sending command : %s\n",scmd.toUtf8().data());
+ }
m_console->write_dir(scmd.toUtf8().data());
m_console->displayToPrompt();
m_console->notify(true);
query += " AND Pool.Name='" + pool_listItem + "'";
query += " ORDER BY Media";
- /* FIXME Make this a user configurable loggin action and dont use printf */
- //printf("MediaList query cmd : %s\n",query.toUtf8().data());
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "MediaList query cmd : %s\n",query.toUtf8().data());
+ }
QStringList results;
if (m_console->sql_cmd(query, results)) {
QString field;
scmd = QString("mount storage=\"%1\" slot=%2")
.arg(m_storageName)
.arg(slotSpin->value());
- /* FIXME Make this a user configurable logging action and dont use printf */
- //printf("sending command : %s\n",scmd.toUtf8().data());
+ if (mainWin->m_commandDebug) {
+ Pmsg1(000, "sending command : %s\n",scmd.toUtf8().data());
+ }
m_console->display_text("Context sensitive command :\n\n");
m_console->display_text("**** ");
<rect>
<x>0</x>
<y>0</y>
- <width>277</width>
- <height>224</height>
+ <width>384</width>
+ <height>378</height>
</rect>
</property>
<property name="sizePolicy" >
<property name="windowIcon" >
<iconset>images/bat.png</iconset>
</property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>343</y>
+ <width>366</width>
+ <height>26</height>
+ </rect>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
- <item row="1" column="0" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ <widget class="QWidget" name="layoutWidget" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>310</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>81</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string><h2>Preferences</h2></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>101</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>40</y>
+ <width>366</width>
+ <height>297</height>
+ </rect>
+ </property>
+ <property name="currentIndex" >
+ <number>1</number>
+ </property>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Messages</string>
+ </attribute>
<widget class="QGroupBox" name="groupBox" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>271</width>
+ <height>181</height>
+ </rect>
+ </property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<property name="title" >
<string>Debugging Options</string>
</property>
- <layout class="QHBoxLayout" >
+ <widget class="QWidget" name="layoutWidget" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>21</y>
+ <width>241</width>
+ <height>131</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="commDebug" >
+ <property name="text" >
+ <string>Debug comm</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="displayAll" >
+ <property name="text" >
+ <string>Display all messages in console</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QCheckBox" name="commandDebug" >
+ <property name="text" >
+ <string>Debug Commands</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="sqlDebug" >
+ <property name="text" >
+ <string>Debug Sql queries</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QCheckBox" name="miscDebug" >
+ <property name="text" >
+ <string>Debug Miscelaneous Items</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="tab_2" >
+ <attribute name="title" >
+ <string>Joblist</string>
+ </attribute>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>62</y>
+ <width>301</width>
+ <height>146</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title" >
+ <string>Jolist Limit Options</string>
+ </property>
+ <layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
- <item>
+ <item row="0" column="0" >
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
<property name="spacing" >
<number>6</number>
</property>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="displayAll" >
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="daysLimit" >
<property name="text" >
- <string>Display all messages</string>
+ <string>Days Limit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QSpinBox" name="daysSpinBox" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="singleStep" >
+ <number>7</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QSpinBox" name="recordSpinBox" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="singleStep" >
+ <number>25</number>
</property>
</widget>
</item>
<item row="0" column="0" >
- <widget class="QCheckBox" name="commDebug" >
+ <widget class="QCheckBox" name="recordLimit" >
<property name="text" >
- <string>Debug comm</string>
+ <string>Record Limit</string>
</property>
</widget>
</item>
</item>
</layout>
</widget>
- </item>
- <item row="2" column="0" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>81</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string><h2>Preferences</h2></string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>101</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
+ </widget>
+ </widget>
</widget>
<resources/>
<connections>
.arg(volumeName->text())
.arg(poolCombo->currentText())
.arg(slotSpin->value());
- /* FIXME Make this a user configurable logging action and dont use printf */
- //printf("sending command : %s\n",scmd.toUtf8().data());
+ if (mainWin->m_commandDebug) {
+ Pmsg1(000, "sending command : %s\n",scmd.toUtf8().data());
+ }
m_console->write_dir(scmd.toUtf8().data());
m_console->displayToPrompt();
m_console->notify(true);
cmd += " all done";
}
- /* ***FIXME*** */
- //printf("preRestore command \'%s\'\n", cmd.toUtf8().data());
+ if (mainWin->m_commandDebug) {
+ Pmsg1(000, "preRestore command \'%s\'\n", cmd.toUtf8().data());
+ }
consoleCommand(cmd);
/* Note, do not turn notifier back on here ... */
if (selectFilesRadio->isChecked()) {
" From Job, Client, FileSet"
" WHERE Job.FileSetId=FileSet.FileSetId AND Job.ClientId=Client.ClientId"
" AND JobId=\'" + jobId + "\'";
- //printf("query = %s\n", query.toUtf8().data());
+ if (mainWin->m_sqlDebug) { Pmsg1(000, "query = %s\n", query.toUtf8().data()); }
QStringList results;
if (m_console->sql_cmd(query, results)) {
QString field;
bool ok = true;
bool windrive = false;
- //printf("In addDirectory cwd \"%s\" newdir \"%s\"\n", m_cwd.toUtf8().data(),
- //newdir.toUtf8().data());
+ if (mainWin->m_miscDebug) {
+ QString msg = QString("In addDirectory cwd \"%1\" newdir \"%2\"\n")
+ .arg(m_cwd)
+ .arg(newdir);
+ Pmsg0(000, msg.toUtf8().data());
+ }
/* add unix '/' directory first */
if (m_dirPaths.empty() && (regex.indexIn(fullpath,0) == -1)) {
QTreeWidgetItem *item = new QTreeWidgetItem(directoryWidget);
QString text("/");
item->setText(0, text.toUtf8().data());
- //printf("Pre Inserting %s\n",text.toUtf8().data());
+ if (mainWin->m_miscDebug) {
+ Pmsg1(000, "Pre Inserting %s\n",text.toUtf8().data());
+ }
m_dirPaths.insert(text, item);
m_dirTreeItems.insert(item, text);
}
if (regex.indexIn(fullpath,0) == 0) {
/* this is a windows drive */
- //printf("Need to do windows \"letter\":/\n");
+ if (mainWin->m_miscDebug) {
+ printf("Need to do windows \"letter\":/\n");
+ }
fullpath.replace(0,1,"");
windrive = true;
}
directoryWidget->expandItem(parent);
} else {
ok = false;
- //printf("In else of if parent cwd \"%s\" newdir \"%s\"\n",
- //m_cwd.toUtf8().data() ,newdir.toUtf8().data());
+ if (mainWin->m_miscDebug) {
+ QString msg = QString("In else of if parent cwd \"%1\" newdir \"%2\"\n")
+ .arg(m_cwd)
+ .arg(newdir);
+ Pmsg0(000, msg.toUtf8().data());
+ }
}
}
/* insert into both forward and reverse hash */
if (ok) {
- //printf("Inserting %s\n",fullpath.toUtf8().data());
+ if (mainWin->m_miscDebug) {
+ Pmsg1(000, "Inserting %s\n",fullpath.toUtf8().data());
+ }
m_dirPaths.insert(fullpath, item);
m_dirTreeItems.insert(item, fullpath);
}
if (item) {
directoryWidget->setCurrentItem(item);
} else {
- /* FIXME ***** Create an error log */
- //printf("DoubleClick else of item column %i fullpath %s\n", column, fullpath.toUtf8().data());
+ QString msg = QString("DoubleClick else of item column %1 fullpath %2\n")
+ .arg(column,10)
+ .arg(fullpath);
+ Pmsg0(000, msg.toUtf8().data());
}
}
}
mp_treeWidget->setColumnCount(headerlist.count());
mp_treeWidget->setHeaderLabels(headerlist);
- /* This could be a log item */
- //printf("In Storage::populateTree()\n");
foreach(QString storageName, m_console->storage_list){
storageItem = new QTreeWidgetItem(topItem);
QStringList results;
/* This could be a log item */
- //printf("Storage query cmd : %s\n",query.toUtf8().data());
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Storage query cmd : %s\n",query.toUtf8().data());
+ }
if (m_console->sql_cmd(query, results)) {
int resultCount = results.count();
if (resultCount == 1){