diff --git a/js/app/AmdaApp.js b/js/app/AmdaApp.js index b7ce230..3a156cf 100755 --- a/js/app/AmdaApp.js +++ b/js/app/AmdaApp.js @@ -590,15 +590,14 @@ Ext.define('amdaApp.AmdaApp', { if (isMigration) { // isSpecialInfo myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) { - module.createWindow(isSpecialInfo, 'Welcome on AMDA', true); - var win = myDesktopApp.getDesktop().getWindow(myDesktopApp.dynamicModules.info.id); - + module.createWindow(isSpecialInfo, 'Welcome on AMDA', true); if ( isOldWS ) { + var win = myDesktopApp.getDesktop().getWindow(myDesktopApp.dynamicModules.info.id); win.on({ show : function() { Ext.Msg.show({ title:'Welcome on new AMDA', - msg: 'It is your first visit of the new version of AMDA.
'+ + msg: 'It is your first visit on the new version of AMDA.
'+ 'Do you want to copy here your workspace from the old AMDA ?', buttons: Ext.Msg.YESNO, icon: Ext.Msg.QUESTION, @@ -611,9 +610,7 @@ Ext.define('amdaApp.AmdaApp', { loadMask.hide(); if (res.success == true) { - myDesktopApp.infoMsg('Your Wokspace has been copied

' + - 'Note :

Plot Requests have not been copied - too many modifs!
' + - 'Derived params made from Remote params have not been copied

' + res.msg); + myDesktopApp.infoMsg('Your Wokspace has been copied to new AMDA

' + res.msg); } else { myDesktopApp.errorMsg(res.error); diff --git a/php/classes/UserWsTransfer.php b/php/classes/UserWsTransfer.php index 2088d39..d31d53a 100644 --- a/php/classes/UserWsTransfer.php +++ b/php/classes/UserWsTransfer.php @@ -187,11 +187,11 @@ class UserWsTransfer { public function transferDerived() { - $msg = 'WS (Derived) Params:
'; - + $msg = '
Derived Params:

'; + $msg .= 'Note : Parameters made from Remote Base parameters are not copied

'; if (!$this->oldWs->load($this->oldWsDir.'WsParams.xml')) { error_log('cannot load WsParams.xml for '.TRANSFERUSER,1,email); - return array('success' => false, 'error' => 'Sorry, we failed to get your WsParams from old AMDA'); + return array('success' => false, 'error' => 'Sorry, we failed to get your Derived Params from old AMDA'); } if (!file_exists($this->newWsDir.'WsParams.xml')) @@ -212,7 +212,7 @@ class UserWsTransfer { } $paramXml = new DomDocument("1.0"); - $msg .= 'Not copied :
'; + $msg .= 'Not copied derived parameters :
'; foreach ($wsParamsOld as $param) { $id = $param->getAttribute('xml:id'); @@ -221,21 +221,21 @@ class UserWsTransfer { $expression = $param->getAttribute('buildchain'); if ($this->deleteParam($expression,$deleted)) { - $msg .= ''.$name.' : obsolete
'.$expression.'
'; + $msg .= '
  • '.$name.' : uses obsolete param
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $this->ws_deleted[] = $name; continue; } if ($this->deleteParam($expression,$notready)) { - $msg .= ''.$name.' : not ready yet
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses param not ready yet
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $this->ws_deleted[] = $name; continue; } if ($this->deleteParam($expression,$notreadyFunctions)) { - $msg .= ''.$name.' : function not ready yet
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses function not ready yet
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $this->ws_deleted[] = $name; continue; @@ -243,14 +243,14 @@ class UserWsTransfer { if (!empty($this->wsd_deleted)) if ($this->deleteParam($expression,$this->wsd_deleted)) { - $msg .= ''.$name.' : uses obsolete myData param
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses obsolete myData param
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $this->ws_deleted[] = $name; continue; } if ($this->deleteParam($expression,array("CDAWEB","MAPSKP","VEXGRAZ","IMPEX"))) { - $msg .= ''.$name.' : uses remote params
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses remote params
    '.$expression.'
    '; $this->ws_deleted[] = $name; continue; } @@ -281,7 +281,7 @@ class UserWsTransfer { unlink($this->newWsDir.$id.'.xml'); $paramsToRemove[] = $param; $this->ws_deleted[] = $name; - $msg .= ''.$name.' : uses obsolete / not ready ws param :
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses obsolete / not ready ws param :
    '.$expression.'
    '; } } } @@ -294,13 +294,13 @@ class UserWsTransfer { $this->newWs->save($this->newWsDir.'WsParams.xml'); $copied = $newParams->length - count($paramsToRemove); - $msg .= '
    Copied : '.$copied.' derived parameters

    '; + $msg .= '
    Copied : '.$copied.' derived parameters

    '; return array('success' => true, 'msg' => $msg); } public function transferTimeTables() { - $msg = 'Time Tables:
    '; + $msg = 'Time Tables:

    '; // get old time tab list $this->newWs->load($this->oldWsDir.'Tt.xml'); @@ -318,19 +318,19 @@ class UserWsTransfer { } $this->newWs->save($this->newWsDir.'Tt.xml'); - $msg .= 'Copied : '.$timeTabs->length.' time tables

    '; + $msg .= 'Copied : '.$timeTabs->length.' time tables

    '; return array('success' => true, 'msg' => $msg); } public function transferConditions() { - $msg = 'DataMining Requests
    '; - + $msg = 'Requests

    '; + $msg .= 'Note : Plot requests are not copied : too much difference new-old AMDA

    '; $oldRequestXml = new DomDocument("1.0"); $newRequestXml = new DomDocument("1.0"); if (!$oldRequestXml->load($this->oldWsDir.'Request.xml')){ - $msg .= ' cannot copy
    '; + $msg .= ' No Requests File
    '; return array('success' => true, 'msg' => $msg); } @@ -346,6 +346,7 @@ class UserWsTransfer { $deleted = $this->getObsolete(); $notready = $this->getNotready(); + $msg .= 'Not copied DataMining requests :
    '; foreach ($condNodes as $condNode) { $id = $condNode->getAttribute('xml:id'); @@ -355,13 +356,13 @@ class UserWsTransfer { $condObj = json_decode($cond[0]); $expression = $condObj->expression; if ($this->deleteParam($expression, $deleted)) { - $msg .= ''.$name.' : obsolete
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses obsolete param
    '.$expression.'
    '; $cond_deleted[] = $name; continue; } if ($this->deleteParam($expression,$notready)) { - $msg .= ''.$name.' : not ready yet
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses param not ready yet
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $cond_deleted[] = $name; continue; @@ -369,7 +370,7 @@ class UserWsTransfer { if (!empty($this->wsd_deleted)) if ($this->deleteParam($expression,$this->wsd_deleted)) { - $msg .= ''.$name.' : uses obsolete myData param
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses obsolete myData param
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $cond_deleted[] = $name; continue; @@ -377,14 +378,14 @@ class UserWsTransfer { if (!empty($this->ws_deleted)) if ($this->deleteParam($expression,$this->ws_deleted)) { - $msg .= ''.$name.' : uses obsolete Derived param
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses obsolete drived param
    '.$expression.'
    '; // error_log( 'For INFO : DELETED '.$expression,1,email); $cond_deleted[] = $name; continue; } if ($this->deleteParam($expression,array("CDAWEB","MAPSKP","VEXGRAZ","IMPEX"))) { - $msg .= ''.$name.' : uses remote params
    '.$expression.'
    '; + $msg .= '
  • '.$name.' : uses remote params
    '.$expression.'
    '; $cond_deleted[] = $name; continue; } @@ -396,14 +397,14 @@ class UserWsTransfer { } $newRequestXml->save($this->newWsDir.'Request.xml'); - $msg .= '
    '; return array('success' => true, 'msg' => $msg); } public function transferMyData() { - $msg = 'My Data:
    '; + $msg = 'MyData Parameters / My Files:

    '; + $msg.= 'Note : CEF format is not implemented

    '; if (!$this->oldWs->load($this->oldWsDir.'WsParams.xml')) { error_log('cannot load WsParams.xml for '.TRANSFERUSER,1,email); @@ -422,7 +423,7 @@ class UserWsTransfer { $wsdParamsOld = $this->oldWs->getElementsByTagName('mydata'); if ($wsdParamsOld->length == 0) { - return array('success' => true, 'msg' => 'No parameters'); + return array('success' => true, 'msg' => 'You have no MyData parameters'); } if (!$BaseXml->load(OLDUSERPATH.TRANSFERUSER.'/DATA/base.xml')) { @@ -435,7 +436,8 @@ class UserWsTransfer { $this->newWs->load($this->newWsDir.'WsParams.xml'); $paramDom = new DomDocument("1.0"); - + + $msg.= ' Not copied parameters :
    '; foreach ($wsdParamsOld as $wsdParamOld) { $format = $wsdParamOld->getAttribute('format'); $name = $wsdParamOld->getAttribute('name'); @@ -443,7 +445,7 @@ class UserWsTransfer { $mask = $wsdParamOld->getAttribute('mask'); if ($format == 'cef') { $deletedVi[] = $mask; - $msg .= ''.$name.' : CEF format is not implemented
    '; + $msg .= '
  • '.$name.'
    '; $this->wsd_deleted[] = 'wsd_'.$name; } else { @@ -505,11 +507,11 @@ class UserWsTransfer { if ($node) $node->parentNode->removeChild($node); } - + $msg .= 'Not copied files :
    '; foreach ($deletedFiles as $vi) { $node = $FilesXml->getElementById($vi); if ($node) { - $msg .= ''.$vi.' : CEF format is not implemented
    '; + $msg .= '
  • '.$vi.'
    '; $node->parentNode->removeChild($node); } } @@ -521,7 +523,7 @@ class UserWsTransfer { public function transferFilters() { - $msg = 'Filters:
    '; + $msg = '

    Filters:

    '; if (!curl_init($this->oldWsDir.'Filters.xml')) { return array('success' => true, 'msg' => 'No filters at old AMDA'); @@ -533,7 +535,8 @@ class UserWsTransfer { } $filterXml->save($this->newWsDir.'Filters.xml'); - return array('success' => true, 'msg' => 'Filters have been copied'); + $msg .= 'Filters have been copied
    '; + return array('success' => true, 'msg' => $msg); } } ?> \ No newline at end of file -- libgit2 0.21.2