Changeset 14e4d7e


Ignore:
Timestamp:
08/22/13 13:03:08 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
4e117af
Parents:
33a568a (diff), af7bd01 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • src-sh/lpreserver/backend/functions.sh

    raac00e0 raf7bd01  
    237237  # We have a replication task for this dataset, lets check if we need to do it now 
    238238  LDATA="$1" 
    239   TIME=`echo $repLine | cut -d ':' -f 2` 
     239  REPTIME=`echo $repLine | cut -d ':' -f 2` 
    240240 
    241241  # Export the replication variables we will be using 
     
    255255 
    256256  # If we are checking for a sync task, and the rep isn't marked as sync we can return 
    257   if [ "$2" = "sync" -a "$TIME" != "sync" ] ; then return 0; fi 
     257  if [ "$2" = "sync" -a "$REPTIME" != "sync" ] ; then return 0; fi 
    258258 
    259259  # Is this a sync-task we do at the time of a snapshot? 
    260   if [ "$2" = "sync" -a "$TIME" = "sync" ] ; then 
     260  if [ "$2" = "sync" -a "$REPTIME" = "sync" ] ; then 
    261261     export DIDREP=1 
    262262     echo_log "Starting replication SYNC task on ${DATASET}: ${REPLOGSEND}" 
  • src-qt4/life-preserver/LPBackend.cpp

    refffa15 r9a67431  
    204204//    Snapshop Management 
    205205// ================== 
    206 bool LPBackend::newSnapshot(QString dataset){ 
    207   QString cmd = "lpreserver mksnap "+dataset; 
     206bool LPBackend::newSnapshot(QString dataset, QString snapshotname){ 
     207  QString cmd = "lpreserver mksnap --replicate "+dataset+" "+snapshotname; 
    208208  int ret = system(cmd.toUtf8()); 
    209209    
  • src-qt4/life-preserver/LPBackend.h

    r96c5e841 r9a67431  
    2525        static bool datasetInfo(QString dataset, int& time, int& numToKeep); //get current settings for a dataset 
    2626        //Snapshop Management 
    27         static bool newSnapshot(QString dataset); 
     27        static bool newSnapshot(QString dataset, QString snapshotname); 
    2828        static bool removeSnapshot(QString dataset, QString snapshot); 
    2929        static bool revertSnapshot(QString dataset, QString snapshot); //revert to given snapshot 
  • src-qt4/life-preserver/lPreserve.qrc

    r96c5e841 r9a67431  
    11<RCC> 
    22  <qresource> 
     3    <file>images/camera_add.png</file> 
    34    <file>images/upload.png</file> 
    45    <file>images/key.png</file> 
  • src-qt4/life-preserver/mainUI.cpp

    r4a54eef r33a568a  
    158158    ui->tool_remove->setVisible(false); 
    159159    ui->tool_config->setVisible(false); 
    160  
     160    ui->tool_newsnapshot->setVisible(false); 
    161161  }else{ 
    162162    ui->tool_remove->setVisible(true); 
    163163    ui->tool_config->setVisible(true);     
     164    ui->tool_newsnapshot->setVisible(true); 
    164165  } 
    165166  //Enabled/disable the SSH key management 
     
    276277} 
    277278 
     279void mainUI::on_tool_newsnapshot_clicked(){ 
     280  QString ds = getSelectedDS(); 
     281  if(ds.isEmpty()){return; } 
     282  //Get the new snapshot name from the user 
     283  bool ok; 
     284  QString name = QInputDialog::getText(this,tr("New Snapshot Name"), tr("Snapshot Name:"), QLineEdit::Normal, tr("Name"), &ok, 0, Qt::ImhUppercaseOnly | Qt::ImhLowercaseOnly | Qt::ImhDigitsOnly ); 
     285  if(!ok || name.isEmpty()){ return; } //cancelled 
     286  qDebug() << "Creating a new snapshot:" << ds << name; 
     287  //Now create the new snapshot 
     288  ok = LPBackend::newSnapshot(ds,name); 
     289  if( ok ){ 
     290    QMessageBox::information(this,tr("Success"), tr("The new snapshot has been created")); 
     291  }else{ 
     292    QMessageBox::warning(this,tr("Failure"), tr("The new snapshot could not be created")); 
     293  } 
     294  setupUI(); 
     295} 
    278296 
    279297// --- Menu Items Clicked 
  • src-qt4/life-preserver/mainUI.h

    r96c5e841 r9a67431  
    5757        void on_tool_config_clicked(); 
    5858        void on_tool_remove_clicked(); 
     59        void on_tool_newsnapshot_clicked(); 
    5960 
    6061        void slotRevertToSnapshot(QAction*); 
  • src-qt4/life-preserver/mainUI.ui

    r96c5e841 r9a67431  
    144144       </item> 
    145145       <item> 
     146        <widget class="QToolButton" name="tool_newsnapshot"> 
     147         <property name="statusTip"> 
     148          <string>Make a new snapshot immediately</string> 
     149         </property> 
     150         <property name="text"> 
     151          <string>...</string> 
     152         </property> 
     153         <property name="icon"> 
     154          <iconset resource="lPreserve.qrc"> 
     155           <normaloff>:/images/camera_add.png</normaloff>:/images/camera_add.png</iconset> 
     156         </property> 
     157        </widget> 
     158       </item> 
     159       <item> 
    146160        <widget class="QToolButton" name="tool_browse"> 
    147161         <property name="statusTip"> 
Note: See TracChangeset for help on using the changeset viewer.