Commit 19dcd963bd61aeb784885a846e0a1a3485d383f3
1 parent
efdeca25
Exists in
master
and in
109 other branches
redmine #4903 : sampling in tooltip
Showing
2 changed files
with
22 additions
and
17 deletions
Show diff stats
php/classes/AmdaAction.php
... | ... | @@ -517,12 +517,17 @@ class AmdaAction |
517 | 517 | $specialNode = true; |
518 | 518 | $size = $child->getAttribute('size'); |
519 | 519 | $mask = $child->getAttribute('mask'); |
520 | + $sampling = null; | |
521 | + if ($child->hasAttribute('minsampling')) | |
522 | + $sampling = $child->getAttribute('minsampling'); | |
520 | 523 | $isSpectra = false; |
521 | 524 | |
522 | 525 | if ($isLeaf) |
523 | 526 | { |
524 | 527 | $isParameter = true; |
525 | 528 | $info = "Size: ".$size."<br/>".$child->getAttribute('desc')."<br/> Mask: ".$mask; |
529 | + if ($sampling) | |
530 | + $info .= "<br/> Sampling : ".$sampling; | |
526 | 531 | $isSpectra = $child->getAttribute('plottype') === 'Spectra'; |
527 | 532 | } |
528 | 533 | |
... | ... |
php/classes/DerivedParamMgr.php
... | ... | @@ -30,21 +30,21 @@ class DerivedParamMgr extends AmdaObjectMgr |
30 | 30 | $this->contentRootId = 'myDataParam-treeRootNode'; |
31 | 31 | $this->contentRootTag = 'myDataList'; |
32 | 32 | //node attributes and object XML tags |
33 | - $this->attributes = array( 'name' => '', | |
34 | - 'size' => ' ', | |
35 | - 'format' => '', | |
36 | - 'desc' => '', | |
37 | - 'mask' => '', | |
38 | - 'plottype' => ''); | |
33 | + $this->attributes = array('name' => '', | |
34 | + 'size' => ' ', | |
35 | + 'format' => '', | |
36 | + 'desc' => '', | |
37 | + 'mask' => '', | |
38 | + 'minsampling' => '', | |
39 | + 'plottype' => ''); | |
39 | 40 | $this->optionalAttributes = array('vi' => 'undefined', |
40 | - 'realvar' => '', | |
41 | - 'fillvalue' => -1.e31, | |
42 | - 'units' => 'undefined', | |
43 | - 'ytitle' => 'undefined', | |
44 | - 'file' => '', | |
45 | - 'type' => '', | |
46 | - 'size' => '', | |
47 | - 'minsampling' => ''); | |
41 | + 'realvar' => '', | |
42 | + 'fillvalue' => -1.e31, | |
43 | + 'units' => 'undefined', | |
44 | + 'ytitle' => 'undefined', | |
45 | + 'file' => '', | |
46 | + 'type' => ''); | |
47 | + | |
48 | 48 | $this->objTagName = 'mydata'; |
49 | 49 | $this->id_prefix = 'wsd_'; |
50 | 50 | $this->type = 'myDataParam'; |
... | ... | @@ -184,7 +184,7 @@ class DerivedParamMgr extends AmdaObjectMgr |
184 | 184 | $this->updateMaskMydata($oldMask, $p->mask, $p->vi, $p->desc); |
185 | 185 | } |
186 | 186 | |
187 | - $this -> createObjectDescription($p); | |
187 | + $this->createObjectDescription($p); | |
188 | 188 | |
189 | 189 | //Add table definition |
190 | 190 | if (isset($p->tableDef)) |
... | ... | @@ -218,9 +218,9 @@ class DerivedParamMgr extends AmdaObjectMgr |
218 | 218 | $this->objectDom->save($this->descFileName); |
219 | 219 | } |
220 | 220 | |
221 | - $this -> addToContent($p, $folder); | |
221 | + $this->addToContent($p, $folder); | |
222 | 222 | |
223 | - $info = "Size: ".$p->size."<br/>".$p->desc."<br/> Mask: ".$p->mask; | |
223 | + $info = "Size: ".$p->size."<br/>".$p->desc."<br/> Sampling: ".$p->minsampling."<br/> Mask: ".$p->mask; | |
224 | 224 | |
225 | 225 | if ($myFileMgr -> addMask($p->mask)){ |
226 | 226 | return array('id' => $this->id, 'size' => $p->size, 'mask' => $p->mask, 'info' => $info, 'isSpectra' => $isSpectra, 'updateMyData' => true); |
... | ... |