Commit 6e9bb13dd1e6ee7dde95e49471567f2751bd762c

Authored by Nathanaël Jourdane
1 parent 3945ae76

improve job tooltip plots

Showing 1 changed file with 8 additions and 12 deletions   Show diff stats
src/InputOutput/IHMImpl/Tools/IHMJobsManagerClass.php
... ... @@ -255,6 +255,12 @@ class IHMJobsManagerClass {
255 255 );
256 256 }
257 257  
  258 + private function logObj($obj) {
  259 + $f = fopen('/AMDA/AMDA_Integration/test/serialise.json', 'w') or die("Unable to open debug file!");
  260 + fwrite($f, json_encode($obj, JSON_PRETTY_PRINT));
  261 + fclose($f);
  262 + }
  263 +
258 264 /*
259 265 * @brief Add a new job
260 266 */
... ... @@ -265,10 +271,6 @@ class IHMJobsManagerClass {
265 271 if (!$res['success'])
266 272 return $res;
267 273  
268   -// $f = fopen('/AMDA/AMDA_Integration/debug/serialise.json', 'w') or die("Unable to open file!");
269   -// fwrite($f, json_encode($obj, JSON_PRETTY_PRINT));
270   -// fclose($f);
271   -
272 274 $infos = [];
273 275 switch ($obj['nodeType']) {
274 276 // Data mining
... ... @@ -360,13 +362,7 @@ class IHMJobsManagerClass {
360 362 foreach ($panel->params as $param) {
361 363 $strParams .= $param->paramid . ($param === end($panel->params) ? '' : ', ');
362 364 }
363   - $strPanels[] = $strParams;
364   - }
365   -
366   - if(count($strPanels) == 1) {
367   - $infos['Parameters'] = $strPanels[0];
368   - } else {
369   - $infos['Panels'] = '<ul><li>' . join('</li><li>', $strPanels) . '</li></ul>';
  365 + $infos['• Panel ' . $panel->id] = $strParams;
370 366 }
371 367  
372 368 continue;
... ... @@ -466,7 +462,7 @@ class IHMJobsManagerClass {
466 462 $infos['Job duration'] = $interval->format('%Hh %Im %Ss');
467 463  
468 464 $res_dir = USERWORKINGDIR . $job->getAttribute('folder') . '/';
469   - $fileSize = filesize ( glob($res_dir.'/' . $job->getAttribute('result') . '.*')[0]);
  465 + $fileSize = filesize ( glob($res_dir.'/' . $job->getAttribute('result') . '*')[0]);
470 466 if ($fileSize < 1024) {
471 467 $strSize = number_format($fileSize, 2, '.', ' ') . 'b';
472 468 } else if($fileSize < 1024*1024) {
... ...