Commit 44d2cf25e9affdb6c545e6f877530244405be640
Exists in
master
and in
111 other branches
Merge branch 'tooltips_jobs' into 'master'
Tooltips jobs Improve tooltips in jobs tab in Workspace explorer. Issue: https://projects.irap.omp.eu/issues/4861 See merge request !13
Showing
2 changed files
with
17 additions
and
14 deletions
Show diff stats
js/app/controllers/JobsMgr.js
... | ... | @@ -72,6 +72,7 @@ Ext.define('amdaDesktop.JobsMgr', { |
72 | 72 | * @returns {void} |
73 | 73 | */ |
74 | 74 | function (res, error) { |
75 | + console.log('JobsMgr: getJob', res); | |
75 | 76 | // TODO Errors processing |
76 | 77 | var message, strDate, type |
77 | 78 | if (error.status && res.success && res.jobsFinished) { |
... | ... | @@ -187,6 +188,7 @@ Ext.define('amdaDesktop.JobsMgr', { |
187 | 188 | // AKKA - use processid to find job |
188 | 189 | nodeToMove = jobRootNode.findChild('id', job.id, false) |
189 | 190 | nodeToMove.set('status', job.status) |
191 | + nodeToMove.set('info', job.info) | |
190 | 192 | |
191 | 193 | // TODO check if really job.status |
192 | 194 | |
... | ... |
php/classes/AmdaAction.php
... | ... | @@ -58,7 +58,6 @@ class AmdaAction |
58 | 58 | * $obj = { id: node.id, nodeType: node.nodeType } |
59 | 59 | */ |
60 | 60 | public function getTree($obj) { |
61 | - | |
62 | 61 | $node = $obj->node; |
63 | 62 | |
64 | 63 | $nodeType = $obj->nodeType; |
... | ... | @@ -102,6 +101,7 @@ class AmdaAction |
102 | 101 | $xmlName = SHAREDPATH.'/SharedObjectTree.xml'; |
103 | 102 | break; |
104 | 103 | case 'bkgWorks': |
104 | + // data/<user>/JOBS/jobs.xml | |
105 | 105 | $xmlName = USERJOBDIR.$this->xmlFiles[$nodeType]; |
106 | 106 | break; |
107 | 107 | case 'source': |
... | ... | @@ -144,8 +144,6 @@ class AmdaAction |
144 | 144 | $id = $child->getAttribute('xml:id'); |
145 | 145 | $name = $child->getAttribute('name'); |
146 | 146 | $help = $child->getAttribute('att'); |
147 | - if ($child->hasAttribute('dataStart')) $dataStart = $child->getAttribute('dataStart'); | |
148 | - if ($child->hasAttribute('dataStop')) $dataStop = $child->getAttribute('dataStop'); | |
149 | 147 | |
150 | 148 | $specialNode = false; |
151 | 149 | $isParameter = false; |
... | ... | @@ -158,12 +156,17 @@ class AmdaAction |
158 | 156 | { |
159 | 157 | case 'bkgWorks': |
160 | 158 | $specialNode = true; |
161 | - $status = $child->getAttribute('status'); | |
162 | - // if ($status == 'done') continue; | |
163 | - $childrenToReturn[] = array('text' => $name, 'id' => $id,'nodeType' => $nodeType, 'leaf' => $isLeaf, | |
164 | - 'pid' => $child->getAttribute('pid'), 'status' => $status, | |
165 | - 'jobType' => $child->getAttribute('jobType'), 'info' => $child->getAttribute('info')); | |
166 | - break; | |
159 | + $childrenToReturn[] = [ | |
160 | + 'text' => $name, | |
161 | + 'id' => $id, | |
162 | + 'nodeType' => $nodeType, | |
163 | + 'leaf' => $isLeaf, | |
164 | + 'pid' => $child->getAttribute('pid'), | |
165 | + 'status' => $child->getAttribute('status'), | |
166 | + 'jobType' => $child->getAttribute('jobType'), | |
167 | + 'info' => $child->getAttribute('info') | |
168 | + ]; | |
169 | + break; | |
167 | 170 | |
168 | 171 | case 'condition': |
169 | 172 | $objectMgr = new RequestMgr(); |
... | ... | @@ -175,9 +178,8 @@ class AmdaAction |
175 | 178 | $objplot = $objectMgr->getObject($id); |
176 | 179 | for ($i=0; $i < count($objplot->children); $i++) |
177 | 180 | { |
178 | - for ($j=0; $j < count($objplot->children[$i]->children); $j++) | |
179 | - { | |
180 | - $info = $info.' '.$objplot->children[$i]->children[$j]->name; | |
181 | + for ($j=0; $j < count($objplot->children[$i]->children); $j++) { | |
182 | + $info = $info.' . '.$objplot->children[$i]->children[$j]->name; | |
181 | 183 | } |
182 | 184 | } |
183 | 185 | break; |
... | ... | @@ -846,7 +848,7 @@ class AmdaAction |
846 | 848 | */ |
847 | 849 | public function getJobs() |
848 | 850 | { |
849 | - $obj = (object) array(); | |
851 | + $obj = (object) array(); | |
850 | 852 | return $this->executeRequest($obj, FunctionTypeEnumClass::PROCESSRUNNINGINFO); |
851 | 853 | } |
852 | 854 | |
... | ... | @@ -910,7 +912,6 @@ class AmdaAction |
910 | 912 | } catch (Exception $e) { |
911 | 913 | return array('success' => false, 'message' => 'Exception detected : '.$e->getMessage()); |
912 | 914 | } |
913 | - | |
914 | 915 | return $res; |
915 | 916 | } |
916 | 917 | |
... | ... |