Commit c57c57c943f28b23028fd75817bcf59190236289
1 parent
fc76cba2
Exists in
master
and in
108 other branches
info message depends on group + nettoyage
Showing
1 changed file
with
21 additions
and
44 deletions
Show diff stats
php/classes/AmdaAction.php
... | ... | @@ -225,18 +225,15 @@ class AmdaAction |
225 | 225 | { |
226 | 226 | $info = $child->getAttribute('desc'); |
227 | 227 | |
228 | - if ($child->hasAttribute('dataStart') && $child->hasAttribute('dataStop')) | |
229 | - { | |
228 | + if ($child->hasAttribute('dataStart') && $child->hasAttribute('dataStop')) { | |
230 | 229 | $info .= "<br/>Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop'); |
231 | 230 | } |
232 | 231 | |
233 | - if ($child->getAttribute('dataStart') == 'depending on mission') | |
234 | - { | |
232 | + if ($child->getAttribute('dataStart') == 'depending on mission') { | |
235 | 233 | $info .= "<br/>Time Range: ".$child->getAttribute('dataStart'); |
236 | 234 | } |
237 | 235 | |
238 | - if ($child->getAttribute('restriction') > 1) | |
239 | - { | |
236 | + if ($child->getAttribute('restriction') > 1) { | |
240 | 237 | $restricted = $child->getAttribute('restriction'); |
241 | 238 | $info .= "<br/><b>Time Restriction</b>: -$restricted days"; |
242 | 239 | } |
... | ... | @@ -248,21 +245,14 @@ class AmdaAction |
248 | 245 | { |
249 | 246 | $isParameter = true; |
250 | 247 | |
251 | - if ($child->parentNode->hasAttribute('dataStart')) | |
252 | - { | |
248 | + if ($child->parentNode->hasAttribute('dataStart')) { | |
253 | 249 | $globalStart = $child->parentNode->getAttribute('dataStart'); |
254 | 250 | $globalStop = $child->parentNode->getAttribute('dataStop'); |
255 | 251 | } |
256 | 252 | |
257 | - if ($child->parentNode->getAttribute('restriction') > 1 ) | |
258 | - { | |
253 | + if ($child->parentNode->getAttribute('restriction') > 1 ) { | |
259 | 254 | $timeRestriction = true; |
260 | - | |
261 | 255 | } |
262 | - /*------------------- to show not tested parameters ------*/ | |
263 | - if ($child->getAttribute('tbd')) | |
264 | - $info .= "<br/><b>Not tested yet</b>"; | |
265 | - /*------------------- --------------------------------------*/ | |
266 | 256 | } |
267 | 257 | |
268 | 258 | $component_info = array(); |
... | ... | @@ -270,14 +260,12 @@ class AmdaAction |
270 | 260 | { |
271 | 261 | $isParameter = true; |
272 | 262 | |
273 | - if ($child->parentNode->parentNode->hasAttribute('dataStart')) | |
274 | - { | |
263 | + if ($child->parentNode->parentNode->hasAttribute('dataStart')) { | |
275 | 264 | $globalStart = $child->parentNode->parentNode->getAttribute('dataStart'); |
276 | 265 | $globalStop = $child->parentNode->parentNode->getAttribute('dataStop'); |
277 | 266 | } |
278 | 267 | |
279 | - if ($child->parentNode->parentNode->getAttribute('restriction') > 1) | |
280 | - { | |
268 | + if ($child->parentNode->parentNode->getAttribute('restriction') > 1) { | |
281 | 269 | $timeRestriction = true; |
282 | 270 | } |
283 | 271 | |
... | ... | @@ -292,19 +280,16 @@ class AmdaAction |
292 | 280 | |
293 | 281 | if ($child->tagName == 'parameter' && $child->hasAttribute('display_type')) |
294 | 282 | { |
295 | - if ($child->getAttribute('display_type') == 'spectrogram') | |
296 | - { | |
283 | + if ($child->getAttribute('display_type') == 'spectrogram') { | |
297 | 284 | $needsArgs = true; |
298 | 285 | $isSpectra = true; |
299 | 286 | } |
300 | - elseif ($child->getAttribute('display_type') == 'stackplot') | |
301 | - { | |
287 | + elseif ($child->getAttribute('display_type') == 'stackplot') { | |
302 | 288 | $isStack = true; |
303 | 289 | } |
304 | 290 | } |
305 | 291 | |
306 | - if ($isParameter) | |
307 | - { | |
292 | + if ($isParameter) { | |
308 | 293 | $objectMgr = new AliasMgr(); |
309 | 294 | $alias = $objectMgr->getAlias($id); |
310 | 295 | |
... | ... | @@ -314,25 +299,20 @@ class AmdaAction |
314 | 299 | 'leaf' => $isLeaf, 'isParameter' => $isParameter, |
315 | 300 | 'isSpectra' => $isSpectra,'isStack' => $isStack, 'needsArgs' => $needsArgs, 'help' => $help, 'notyet' => $not_yet); |
316 | 301 | } |
317 | - else | |
318 | - { | |
319 | - if ($child->tagName == 'mission' || $child->tagName == 'observatory') | |
320 | - { | |
321 | - $disable = $child->hasAttribute('restriction'); | |
302 | + else { | |
303 | + | |
304 | + if ($child->tagName == 'mission' || $child->tagName == 'observatory') { | |
322 | 305 | $rank = $child->getAttribute('rank'); |
323 | 306 | } |
324 | - else | |
325 | - { | |
326 | - $disable = $child->hasAttribute('restriction'); | |
327 | - } | |
328 | - | |
329 | - if ($disable) | |
330 | - { | |
331 | - if ($disable == 1) { | |
332 | - $info .= "<br/><b>Sorry ! Not finished yet...</b>"; | |
333 | - } | |
307 | + | |
308 | + $disable = $child->hasAttribute('restriction'); | |
309 | + | |
310 | + if ($disable) { | |
311 | + if ($child->hasAttribute("group") && $child->getAttribute("group") !== "TBD") { | |
312 | + $info .= "<br/><b>Restricted Access</b>"; | |
313 | + } | |
334 | 314 | else { |
335 | - $disable = false; | |
315 | + $info .= "<br/><b>Sorry! Not finished yet...</b>"; | |
336 | 316 | } |
337 | 317 | } |
338 | 318 | |
... | ... | @@ -410,9 +390,6 @@ class AmdaAction |
410 | 390 | case 'THEMIS' : |
411 | 391 | $rank = 5; |
412 | 392 | break; |
413 | - case 'MAPSKP' : | |
414 | - $rank = 9; | |
415 | - break; | |
416 | 393 | default: |
417 | 394 | } |
418 | 395 | ... | ... |