Skip to content
Snippets Groups Projects
Commit 959293b7 authored by Francois Henrotte's avatar Francois Henrotte
Browse files

frontPage

parent f9179055
No related branches found
No related tags found
No related merge requests found
......@@ -518,8 +518,10 @@ void localSolverClient::GmshMerge(std::vector<std::string> choices)
for(unsigned int i = 0; i < choices.size(); i++){
std::string fileName=getWorkingDir()+choices[i];
//checkIfPresent or make available locally
OLMsg::Info("Send merge request <%s>",fileName.c_str());
OLMsg::MergeFile(fileName);
if(checkIfPresent(fileName)){
OLMsg::Info("Send merge request <%s>",fileName.c_str());
OLMsg::MergeFile(fileName);
}
}
}
......
......@@ -23,12 +23,12 @@ static std::string localFileTag("_");
enum parseMode {REGISTER, ANALYZE, COMPUTE, EXIT};
#if defined(WIN32)
const char dirSep='\\';
static char dirSep='\\';
static std::string cmdSep(" & ");
static std::string removeCmd("del ");
static std::string lsCmd("dir ");
#else
const char dirSep='/';
static char dirSep='/';
static std::string cmdSep(" ; ");
static std::string removeCmd("rm -rf ");
static std::string lsCmd("ls ");
......
......@@ -1659,7 +1659,7 @@ void MetaModel::client_sentence(const std::string &name,
arguments.size(), action.c_str());
}
else if(!action.compare("alwaysCompute")){
if(isTodo(REGISTER) || isTodo(ANALYZE)){
if(isTodo(REGISTER)){
localSolverClient *c;
if((c=findClientByName(name))){
c->compute();
......@@ -1670,7 +1670,6 @@ void MetaModel::client_sentence(const std::string &name,
}
}
else if(!action.compare("merge")){
//if(isTodo(COMPUTE) && !OLMsg::GetErrorCount() && (OLMsg::hasGmsh)){
if( arguments.size() && isTodo(COMPUTE) && !OLMsg::GetErrorCount() && (OLMsg::hasGmsh)){
std::vector<std::string> choices;
for(unsigned int i = 0; i < arguments.size(); i++){
......@@ -1686,20 +1685,14 @@ void MetaModel::client_sentence(const std::string &name,
}
}
else if(!action.compare("frontPage")){
if( arguments.size() && OLMsg::hasGmsh ){
if( isTodo(REGISTER) && OLMsg::hasGmsh && arguments.size() && !OLMsg::GetErrorCount()){
std::vector<std::string> choices;
for(unsigned int i = 0; i < arguments.size(); i++){
choices.push_back(resolveGetVal(arguments[i]));
}
localSolverClient *c;
if((c=findClientByName(name))) {
if(isTodo(REGISTER) && !OLMsg::GetErrorCount())
if(onelab::server::instance()->getChanged(c->getName())){
//c->compute();
c->GmshMerge(choices);
//OLMsg::SetOnelabNumber("Gmsh/NeedReloadGeom",1,false);
//onelab::server::instance()->setChanged(false, c->getName());
}
c->GmshMerge(choices);
}
else
OLMsg::Error("Unknown client <%s>", name.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment