)
{
DEBTRACE("Error state in setStringState");
- result = state;
+ result = "RefreshError";
}
if (result == "")
if (_state != BL::Job::CREATED)
{
setState(BL::Job::CREATED);
- result = "new_state";
+ result = state;
}
}
else if (state == "NOT_CREATED")
if (_state != BL::Job::NOT_CREATED)
{
setState(BL::Job::NOT_CREATED);
- result = "new_state";
+ result = state;
}
}
else if (state == "QUEUED")
if (_state != BL::Job::QUEUED)
{
setState(BL::Job::QUEUED);
- result = "new_state";
+ result = state;
}
}
else if (state == "IN_PROCESS")
if (_state != BL::Job::IN_PROCESS)
{
setState(BL::Job::IN_PROCESS);
- result = "new_state";
+ result = state;
}
}
else if (state == "RUNNING")
if (_state != BL::Job::RUNNING)
{
setState(BL::Job::RUNNING);
- result = "new_state";
+ result = state;
}
}
else if (state == "PAUSED")
if (_state != BL::Job::PAUSED)
{
setState(BL::Job::PAUSED);
- result = "new_state";
+ result = state;
}
}
else if (state == "FINISHED")
if (_state != BL::Job::FINISHED)
{
setState(BL::Job::FINISHED);
- result = "new_state";
+ result = state;
}
}
else if (state == "ERROR")
if (_state != BL::Job::ERROR)
{
setState(BL::Job::ERROR);
- result = "new_state";
+ result = state;
}
}
else if (state == "FAILED")
if (_state != BL::Job::FAILED)
{
setState(BL::Job::FAILED);
- result = "new_state";
+ result = state;
}
}
}
{
std::string result_launcher = object->_salome_services->refresh_job(job);
std::string result_job = job->setStringState(result_launcher);
- if (result_job == "new_state")
+ if (result_job == "RefreshError")
{
+ // Error using launcher...
if (object->_observer)
- object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state");
+ object->_observer->sendEvent("refresh_job", "Error", job->getName(), result_launcher);
}
else if (result_job != "")
{
- // Error using launcher...
if (object->_observer)
- object->_observer->sendEvent("refresh_job", "Error", job->getName(), result_launcher);
+ object->_observer->sendEvent("refresh_job", "Ok", job->getName(), result_job);
}
}
}
// Get current state
std::string result_job = job_return->setStringState(refresh_job(job_return));
- if (result_job == "new_state") {}
- else if (result_job != "")
+ if (result_job != "RefreshError") {}
+ else
{
// Error in getting state
DEBMSG("Error in getting state of the new job!");
// Check if the job has the same name
if (name == wizard.job_name)
{
- DEBTRACE("Job " << name << " has been changed");
+ DEBTRACE("Job " << name << " has been edited");
_main_gui->delete_job_internal();
}
{
if (event->event_name == "Ok")
{
- QString str((event->job_name).c_str());
- write_normal_text("Job " + str + " state changed\n");
+ QString name((event->job_name).c_str());
+ QString state((event->data).c_str());
+ state = state.toLower();
+ write_normal_text("Job " + name + " new state is " + state + "\n");
emit job_state_changed(QString((event->job_name).c_str()));
}
else
_protocol_line = new QComboBox(this);
_protocol_line->addItem("ssh");
_protocol_line->addItem("rsh");
+ _protocol_line->addItem("srun");
_protocol_line->setCurrentIndex(-1);
QLabel * componentList_label = new QLabel("Component List:");
_nb_proc_per_node_line->setMaximum(1000000);
_nb_proc_per_node_line->setValue(1);
- QLabel * iprotocol_label = new QLabel("Internal proctocol:");
+ QLabel * iprotocol_label = new QLabel("Internal protocol:");
_iprotocol_line = new QComboBox(this);
_iprotocol_line->addItem("ssh");
_iprotocol_line->addItem("rsh");
+ _iprotocol_line->addItem("srun");
_iprotocol_line->setCurrentIndex(-1);
QLabel * batch_label = new QLabel("Batch:");
_protocol_line->setCurrentIndex(0);
else if(protocol == "rsh")
_protocol_line->setCurrentIndex(1);
+ else if(protocol == "srun")
+ _protocol_line->setCurrentIndex(2);
else
_protocol_line->setCurrentIndex(-1);
_iprotocol_line->setCurrentIndex(0);
else if (iprotocol == "rsh")
_iprotocol_line->setCurrentIndex(1);
+ else if (iprotocol == "srun")
+ _iprotocol_line->setCurrentIndex(2);
else
_iprotocol_line->setCurrentIndex(-1);