*/
void prerestorePage::buildPage()
{
- m_dtformat = "yyyy-MM-dd HH:mm:ss";
m_name = "Restore";
setupUi(this);
pgInitialize();
m_console->notify(false);
m_closeable = true;
+ QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+ thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/restore.png")));
if (!m_console->preventInUseConnect())
return;
storageCombo->addItems(m_console->storage_list);
/* current or before . . Start out with current checked */
recentCheckBox->setCheckState(Qt::Checked);
- beforeDateTime->setDisplayFormat(m_dtformat);
+ beforeDateTime->setDisplayFormat(mainWin->m_dtformat);
beforeDateTime->setDateTime(QDateTime::currentDateTime());
beforeDateTime->setEnabled(false);
selectFilesRadio->setChecked(true);
filesetCombo->setCurrentIndex(filesetCombo->findText(fieldlist[2], Qt::MatchExactly));
clientCombo->setCurrentIndex(clientCombo->findText(fieldlist[1], Qt::MatchExactly));
jobCombo->setCurrentIndex(jobCombo->findText(fieldlist[0], Qt::MatchExactly));
- beforeDateTime->setDateTime(QDateTime::fromString(fieldlist[3], m_dtformat));
+ beforeDateTime->setDateTime(QDateTime::fromString(fieldlist[3], mainWin->m_dtformat));
}
}
job_name_change(0);
cmd += " current";
} else {
QDateTime stamp = beforeDateTime->dateTime();
- QString before = stamp.toString(m_dtformat);
+ QString before = stamp.toString(mainWin->m_dtformat);
cmd += " before=\"" + before + "\"";
}
} else {
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;