Commit f29c5e6631213e08a09ff88f2a1c99b242663e16
1 parent
df396235
Exists in
master
and in
108 other branches
plot only option
Showing
4 changed files
with
58 additions
and
36 deletions
Show diff stats
js/app/models/InteractiveNode.js
... | ... | @@ -21,6 +21,7 @@ Ext.define('amdaModel.InteractiveNode', { |
21 | 21 | {name: 'object', type: 'object', persist: false}, |
22 | 22 | {name: 'moduleId', type: 'string', persist: false}, |
23 | 23 | {name: 'filtered', type: 'boolean', defaultValue: false, persist: false}, |
24 | + {name: 'needsArgs', type:'boolean', defaultValue: false}, | |
24 | 25 | {name: 'disable', type: 'boolean', defaultValue: false, persist: false} |
25 | 26 | ], |
26 | 27 | |
... | ... | @@ -459,14 +460,7 @@ Ext.define('amdaModel.InteractiveNode', { |
459 | 460 | }, |
460 | 461 | |
461 | 462 | createDownload: function(node) |
462 | - { | |
463 | - if (node.get('disable')) return; | |
464 | - | |
465 | - if (node.get('notyet')) { | |
466 | - myDesktopApp.warningMsg('Sorry! access to this parameter is restricted.'); | |
467 | - return; | |
468 | - } | |
469 | - | |
463 | + { | |
470 | 464 | myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.download.id, true, function (module) { |
471 | 465 | if (!myDesktopApp.desktop.getWindow(myDesktopApp.dynamicModules.download.id)) { |
472 | 466 | var request = Ext.create(amdaModel.Download.$className); |
... | ... |
js/app/models/LocalParamNode.js
... | ... | @@ -22,7 +22,6 @@ Ext.define('amdaModel.LocalParamNode', |
22 | 22 | {name: 'alias', type:'string', persist: false}, |
23 | 23 | {name: 'isParameter', type: 'boolean', persist: false}, |
24 | 24 | {name: 'notyet', type: 'boolean', defaultValue: false, persist: false}, |
25 | - {name: 'needsArgs', type: 'boolean', persist: false}, | |
26 | 25 | {name: 'isSpectra', type: 'boolean', defaultValue: false, persist: false}, |
27 | 26 | {name: 'isStack', type: 'boolean', defaultValue: true, persist: false}, |
28 | 27 | {name: 'globalStart', type: 'string', persist: false}, |
... | ... | @@ -151,19 +150,34 @@ Ext.define('amdaModel.LocalParamNode', |
151 | 150 | break; |
152 | 151 | case 'leaf-downParam': |
153 | 152 | case 'para-downParam': |
154 | - this.createDownload(this); | |
153 | + if (!this.get('disable')) { | |
154 | + if (this.get('notyet')) { | |
155 | + myDesktopApp.warningMsg("Sorry! this parameter is PlotOnly"); | |
156 | + } | |
157 | + else { | |
158 | + this.createDownload(this); | |
159 | + } | |
160 | + } | |
155 | 161 | break; |
156 | 162 | case 'leaf-createDerivedParam': |
157 | - if (!this.get('disable')) | |
158 | - this.createLeaf(this); | |
159 | -// else | |
160 | -// myDesktopApp.warningMsg("Sorry! access to this parameter is restricted"); | |
163 | + if (!this.get('disable')) { | |
164 | + if (this.get('notyet')) { | |
165 | + myDesktopApp.warningMsg("Sorry! this parameter is PlotOnly"); | |
166 | + } | |
167 | + else { | |
168 | + this.createLeaf(this); | |
169 | + } | |
170 | + } | |
161 | 171 | break; |
162 | 172 | case 'leaf-createAlias': |
163 | - if (!this.get('disable')) | |
164 | - this.createAlias(this); | |
165 | -// else | |
166 | -// myDesktopApp.warningMsg("Sorry! access to this parameter is restricted"); | |
173 | + if (!this.get('disable')) { | |
174 | + if (this.get('notyet')) { | |
175 | + myDesktopApp.warningMsg("Sorry! this parameter is PlotOnly"); | |
176 | + } | |
177 | + else { | |
178 | + this.createAlias(this); | |
179 | + } | |
180 | + } | |
167 | 181 | break; |
168 | 182 | case 'miss-epnTap': |
169 | 183 | this.displayEpnTap(); |
... | ... |
php/classes/AmdaAction.php
... | ... | @@ -233,26 +233,30 @@ class AmdaAction |
233 | 233 | $info .= "<br/>Time Range: ".$child->getAttribute('dataStart'); |
234 | 234 | } |
235 | 235 | |
236 | - if ($child->getAttribute('restriction') > 1) { | |
237 | - $restricted = $child->getAttribute('restriction'); | |
238 | - $info .= "<br/><b>Time Restriction</b>: -$restricted days"; | |
239 | - } | |
236 | +// if ($child->getAttribute('restriction') > 1) { | |
237 | +// $restricted = $child->getAttribute('restriction'); | |
238 | +// $info .= "<br/><b>Time Restriction</b>: -$restricted days"; | |
239 | +// } | |
240 | 240 | } |
241 | 241 | |
242 | 242 | if ($child->hasAttribute('units')) $info = $child->getAttribute('units'); |
243 | 243 | |
244 | - if ($child->tagName == 'parameter') | |
245 | - { | |
244 | + if ($child->tagName == 'parameter') { | |
246 | 245 | $isParameter = true; |
247 | 246 | |
248 | 247 | if ($child->parentNode->hasAttribute('dataStart')) { |
249 | 248 | $globalStart = $child->parentNode->getAttribute('dataStart'); |
250 | 249 | $globalStop = $child->parentNode->getAttribute('dataStop'); |
251 | 250 | } |
252 | - | |
253 | - if ($child->parentNode->getAttribute('restriction') > 1 ) { | |
254 | - $timeRestriction = true; | |
251 | + | |
252 | + if ($child->parentNode->hasAttribute('restriction')) { | |
253 | + if ($child->parentNode->getAttribute('restriction') == "plotOnly") { | |
254 | + $not_yet = true; | |
255 | + } | |
255 | 256 | } |
257 | +// if ($child->parentNode->getAttribute('restriction') > 1 ) { | |
258 | +// $timeRestriction = true; | |
259 | +// } | |
256 | 260 | } |
257 | 261 | |
258 | 262 | $component_info = array(); |
... | ... | @@ -264,10 +268,15 @@ class AmdaAction |
264 | 268 | $globalStart = $child->parentNode->parentNode->getAttribute('dataStart'); |
265 | 269 | $globalStop = $child->parentNode->parentNode->getAttribute('dataStop'); |
266 | 270 | } |
267 | - | |
268 | - if ($child->parentNode->parentNode->getAttribute('restriction') > 1) { | |
269 | - $timeRestriction = true; | |
271 | + | |
272 | + if ($child->parentNode->parentNode->hasAttribute('restriction')) { | |
273 | + if ($child->parentNode->parentNode->getAttribute('restriction') == "plotOnly") { | |
274 | + $not_yet = true; | |
275 | + } | |
270 | 276 | } |
277 | +// if ($child->parentNode->parentNode->getAttribute('restriction') > 1) { | |
278 | +// $timeRestriction = true; | |
279 | +// } | |
271 | 280 | |
272 | 281 | if ($child->hasAttribute("index1")) |
273 | 282 | $component_info["index1"] = $child->getAttribute('index1'); |
... | ... | @@ -277,9 +286,7 @@ class AmdaAction |
277 | 286 | $component_info["parentId"] = $child->parentNode->getAttribute('xml:id'); |
278 | 287 | } |
279 | 288 | |
280 | - | |
281 | - if ($child->tagName == 'parameter' && $child->hasAttribute('display_type')) | |
282 | - { | |
289 | + if ($child->tagName == 'parameter' && $child->hasAttribute('display_type')){ | |
283 | 290 | if ($child->getAttribute('display_type') == 'spectrogram') { |
284 | 291 | $needsArgs = true; |
285 | 292 | $isSpectra = true; |
... | ... | @@ -300,12 +307,16 @@ class AmdaAction |
300 | 307 | 'isSpectra' => $isSpectra,'isStack' => $isStack, 'needsArgs' => $needsArgs, 'help' => $help, 'notyet' => $not_yet); |
301 | 308 | } |
302 | 309 | else { |
303 | - | |
304 | 310 | if ($child->tagName == 'mission' || $child->tagName == 'observatory') { |
305 | 311 | $rank = $child->getAttribute('rank'); |
306 | 312 | } |
307 | 313 | |
308 | - $disable = $child->hasAttribute('restriction'); | |
314 | + if ($child->hasAttribute('restriction')) { | |
315 | + $disable = $child->getAttribute('restriction') !== 'plotOnly'; | |
316 | + if (!$disable) { | |
317 | + $info .= "<br/><b>Plot Only!!!</b>"; | |
318 | + } | |
319 | + } | |
309 | 320 | |
310 | 321 | if ($disable) { |
311 | 322 | if ($child->hasAttribute("group") && $child->getAttribute("group") !== "TBD") { |
... | ... |
php/classes/UserMgr.php
... | ... | @@ -653,8 +653,11 @@ class UserMgr |
653 | 653 | if ($nodes->length > 0) |
654 | 654 | foreach ($nodes as $node) { |
655 | 655 | $node->removeAttribute('group'); |
656 | - if ($node->hasAttribute('restriction')) | |
656 | + if ($node->hasAttribute('restriction')) { | |
657 | + if ($node->getAttribute('restriction') != "plotOnly") { | |
657 | 658 | $node->removeAttribute('restriction'); |
659 | + } | |
660 | + } | |
658 | 661 | } |
659 | 662 | } |
660 | 663 | |
... | ... |