Ignore:
Timestamp:
02/28/14 13:53:11 (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
1b87cd2
Parents:
0130b27
Message:

Finish updating the main Life preserver GUI to reflect the new scheduling options in lpreserver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/lp-gui/LPBackend.cpp

    r0ecb8f7 r194a5d3  
    114114  //Configure inputs 
    115115  QString freq; 
     116  if(time == -60){ freq = "hourly"; } 
    116117  if(time == -30){ freq = "30min"; } 
    117118  else if(time == -10){ freq = "10min"; } 
    118119  else if(time == -5){ freq = "5min"; } 
    119120  else if(time >= 0 && time < 24){ freq = "daily@"+QString::number(time); } 
    120   else{ freq = "hourly"; } 
     121  else{ freq = "auto"; } 
    121122   
    122123  //Create the command 
    123   QString cmd = "lpreserver cronsnap "+dataset+" start "+freq+" "+QString::number(numToKeep); 
     124  QString cmd = "lpreserver cronsnap "+dataset+" start "+freq; 
     125  if(freq != "auto"){ cmd.append(" "+QString::number(numToKeep) ); } //also add the number to keep 
    124126  int ret = LPBackend::runCmd(cmd); 
    125127    
     
    147149      else if(sch=="10min"){time = -10;} 
    148150      else if(sch=="30min"){time = -30;} 
    149       else{ time = -60; } //hourly 
     151      else if(sch=="hourly"){ time = -60; } //hourly 
     152      else{ time = -999; } //auto 
    150153      //Get total snapshots 
    151154      numToKeep = out[i].section("- total:",1,1).simplified().toInt(); 
     
    191194  QString stime = "sync"; //synchronize on snapshot creation (default) 
    192195  if(time >= 0 && time < 24){ stime = QString::number(time); } //daily at a particular hour (24 hour notation) 
     196  else if(time == -60){ stime = "hour"; } 
     197  else if(time == -30){ stime = "30min"; } 
     198  else if(time == -10){ stime = "10min"; } 
    193199   
    194200   
     
    220226      QString synchro = data.section("Time:",1,1).simplified(); 
    221227        if(synchro == "sync"){ time = -1; } 
     228        else if(synchro =="hour"){ time = -60; } 
     229        else if(synchro == "30min"){ time = -30; } 
     230        else if(synchro == "10min"){ time = -10; } 
    222231        else{ time = synchro.toInt(); } 
    223232      ok = true; 
Note: See TracChangeset for help on using the changeset viewer.