clientCombo->addItems(m_console->client_list);
poolCombo->addItems(m_console->pool_list);
storageCombo->addItems(m_console->storage_list);
+ dateTimeEdit->setDisplayFormat(mainWin->m_dtformat);
dateTimeEdit->setDateTime(dt.currentDateTime());
+ /*printf("listing messages resources"); ***FIME ***
+ foreach(QString mes, m_console->messages_list) {
+ printf("%s\n", mes.toUtf8().data());
+ }*/
+ messagesCombo->addItems(m_console->messages_list);
job_name_change(0);
connect(jobCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(job_name_change(int)));
connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
void runPage::okButtonPushed()
{
- char cmd[1000];
-
this->hide();
-
- // ***FIXME** add date/time from dateTimeEdit.
- bsnprintf(cmd, sizeof(cmd),
- "run job=\"%s\" fileset=\"%s\" level=%s client=\"%s\" pool=\"%s\" "
- "storage=\"%s\" priority=\"%d\" yes\n",
- jobCombo->currentText().toUtf8().data(),
- filesetCombo->currentText().toUtf8().data(),
- levelCombo->currentText().toUtf8().data(),
- clientCombo->currentText().toUtf8().data(),
- poolCombo->currentText().toUtf8().data(),
- storageCombo->currentText().toUtf8().data(),
- prioritySpin->value());
-
- m_console->write_dir(cmd);
+ QString cmd;
+ QTextStream(&cmd) << "run" <<
+ " job=\"" << jobCombo->currentText() << "\"" <<
+ " fileset=\"" << filesetCombo->currentText() << "\"" <<
+ " level=\"" << levelCombo->currentText() << "\"" <<
+ " client=\"" << clientCombo->currentText() << "\"" <<
+ " pool=\"" << poolCombo->currentText() << "\"" <<
+ " storage=\"" << storageCombo->currentText() << "\"" <<
+ " priority=\"" << prioritySpin->value() << "\""
+ " when=\"" << dateTimeEdit->dateTime().toString(mainWin->m_dtformat) << "\"";
+ if (bootstrap->text() != "") {
+ cmd += " bootstrap=\"" + bootstrap->text() + "\"";
+ }
+ cmd += " yes";
+// messagesCombo->currentText().toUtf8().data(); FIXME messages not working
+
+ if (mainWin->m_commandDebug) {
+ Pmsg1(000, "command : %s\n", cmd.toUtf8().data());
+ }
+
+ m_console->write_dir(cmd.toUtf8().data());
m_console->display_text(cmd);
m_console->displayToPrompt();
m_console->notify(true);
clientCombo->setCurrentIndex(clientCombo->findText(job_defs.client_name, Qt::MatchExactly));
poolCombo->setCurrentIndex(poolCombo->findText(job_defs.pool_name, Qt::MatchExactly));
storageCombo->setCurrentIndex(storageCombo->findText(job_defs.store_name, Qt::MatchExactly));
- typeCombo->clear();
- typeCombo->addItem(job_defs.type);
+ messagesCombo->setCurrentIndex(messagesCombo->findText(job_defs.messages_name, Qt::MatchExactly));
}
}
<rect>
<x>0</x>
<y>0</y>
- <width>777</width>
- <height>429</height>
+ <width>734</width>
+ <height>483</height>
</rect>
</property>
<property name="windowTitle" >
<property name="spacing" >
<number>6</number>
</property>
- <item row="1" column="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="1" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>351</width>
- <height>16</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="1" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>351</width>
- <height>16</height>
- </size>
- </property>
- </spacer>
- </item>
<item row="1" column="1" >
<layout class="QGridLayout" >
<property name="margin" >
<property name="spacing" >
<number>6</number>
</property>
- <item row="0" column="0" >
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_11" >
+ <property name="text" >
+ <string>Level:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>levelCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" >
+ <widget class="QComboBox" name="poolCombo" />
+ </item>
+ <item row="9" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Bootstrap:</string>
+ </property>
+ <property name="openExternalLinks" >
+ <bool>true</bool>
+ </property>
+ <property name="buddy" >
+ <cstring>bootstrap</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" >
+ <widget class="QComboBox" name="filesetCombo" />
+ </item>
+ <item row="9" column="1" >
+ <widget class="QLineEdit" name="bootstrap" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="readOnly" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1" >
+ <widget class="QComboBox" name="storageCombo" />
+ </item>
+ <item row="8" column="1" >
+ <widget class="QDateTimeEdit" name="dateTimeEdit" >
+ <property name="dateTime" >
+ <datetime>
+ <hour>0</hour>
+ <minute>2</minute>
+ <second>0</second>
+ <year>2000</year>
+ <month>1</month>
+ <day>1</day>
+ </datetime>
+ </property>
+ <property name="displayFormat" >
+ <string>yyyy-mm-dd hh:mm:ss</string>
+ </property>
+ <property name="calendarPopup" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Job:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>jobCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item rowspan="6" row="3" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>56</width>
+ <height>151</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Pool:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>poolCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="typeLabel" >
+ <property name="text" >
+ <string><h3>Backup<h3/></string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>FileSet:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>filesetCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Messages:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>messagesCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="4" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</item>
</layout>
</item>
- <item row="1" column="0" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="jobCombo" />
+ </item>
+ <item row="2" column="2" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Priority:</string>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="buddy" >
+ <cstring>prioritySpin</cstring>
</property>
- <item row="0" column="2" >
- <widget class="QLabel" name="label_7" >
- <property name="text" >
- <string>Type:</string>
- </property>
- <property name="buddy" >
- <cstring>typeCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="6" column="0" >
- <widget class="QLabel" name="label_10" >
- <property name="text" >
- <string>Messages:</string>
- </property>
- <property name="buddy" >
- <cstring>messagesCombo</cstring>
- </property>
- </widget>
- </item>
- <item rowspan="6" row="2" column="3" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>171</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="5" column="1" >
- <widget class="QComboBox" name="storageCombo" />
- </item>
- <item row="4" column="1" >
- <widget class="QComboBox" name="poolCombo" />
- </item>
- <item row="7" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>When:</string>
- </property>
- <property name="buddy" >
- <cstring>dateTimeEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label_9" >
- <property name="text" >
- <string>FileSet:</string>
- </property>
- <property name="buddy" >
- <cstring>filesetCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="8" column="1" >
- <widget class="QLineEdit" name="bootstrap" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="minimumSize" >
- <size>
- <width>200</width>
- <height>0</height>
- </size>
- </property>
- <property name="readOnly" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="7" column="1" >
- <widget class="QDateTimeEdit" name="dateTimeEdit" >
- <property name="dateTime" >
- <datetime>
- <hour>0</hour>
- <minute>2</minute>
- <second>0</second>
- <year>2000</year>
- <month>1</month>
- <day>1</day>
- </datetime>
- </property>
- <property name="displayFormat" >
- <string>yyyy-mm-dd hh:mm:ss</string>
- </property>
- <property name="calendarPopup" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="3" >
- <widget class="QSpinBox" name="prioritySpin" >
- <property name="maximum" >
- <number>10000</number>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- <property name="value" >
- <number>10</number>
- </property>
- </widget>
- </item>
- <item row="6" column="1" >
- <widget class="QComboBox" name="messagesCombo" />
- </item>
- <item row="2" column="1" >
- <widget class="QComboBox" name="levelCombo" />
- </item>
- <item row="3" column="1" >
- <widget class="QComboBox" name="filesetCombo" />
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Pool:</string>
- </property>
- <property name="buddy" >
- <cstring>poolCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="8" column="0" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>Bootstrap:</string>
- </property>
- <property name="openExternalLinks" >
- <bool>true</bool>
- </property>
- <property name="buddy" >
- <cstring>bootstrap</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="3" >
- <widget class="QComboBox" name="typeCombo" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_8" >
- <property name="text" >
- <string>Client:</string>
- </property>
- <property name="buddy" >
- <cstring>clientCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="label_6" >
- <property name="text" >
- <string>Job:</string>
- </property>
- <property name="buddy" >
- <cstring>jobCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Storage:</string>
- </property>
- <property name="buddy" >
- <cstring>storageCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_11" >
- <property name="text" >
- <string>Level:</string>
- </property>
- <property name="buddy" >
- <cstring>levelCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="2" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Priority:</string>
- </property>
- <property name="buddy" >
- <cstring>prioritySpin</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QComboBox" name="clientCombo" />
- </item>
- <item row="0" column="1" >
- <widget class="QComboBox" name="jobCombo" />
- </item>
- </layout>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="levelCombo" />
</item>
<item row="2" column="0" >
+ <widget class="QLabel" name="label_8" >
+ <property name="text" >
+ <string>Client:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>clientCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="0" colspan="4" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</item>
</layout>
</item>
+ <item row="2" column="3" >
+ <widget class="QSpinBox" name="prioritySpin" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="value" >
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QComboBox" name="clientCombo" />
+ </item>
+ <item row="6" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Storage:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>storageCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1" >
+ <widget class="QComboBox" name="messagesCombo" />
+ </item>
+ <item row="8" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>When:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>dateTimeEdit</cstring>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
+ <item row="1" column="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item row="1" column="0" >
<spacer>
<property name="orientation" >
</property>
</spacer>
</item>
+ <item row="2" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>351</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>351</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<resources/>