Commit b87dc10effc0f09e9d9bcc91ac890a83ea5e80f0

Authored by Erdogan Furkan
1 parent 76447670
Exists in 9084

Modifications for fillValue case

js/app/models/Parameter.js
... ... @@ -24,6 +24,7 @@ Ext.define('amdaModel.Parameter', {
24 24 {name: 'buildchain', type: 'string'},
25 25 {name: 'description', type: 'string'},
26 26 {name: 'ytitle', type: 'string'},
  27 + { name: 'fill_value', type: 'string' },
27 28 {name: 'dim_1', type: 'number'},
28 29 {name: 'dim_2', type: 'number'},
29 30 {name: 'last_update', type: 'int', defaultValue: 0},
... ... @@ -48,6 +49,9 @@ Ext.define('amdaModel.Parameter', {
48 49 if (this.get('ytitle').match(/[a-z,0-9]/gi) != null) {
49 50 myValues.ytitle = this.get('ytitle');
50 51 }
  52 + if (this.get('fill_value').match(/[0-9]/gi) != null) {
  53 + myValues.fill_value = this.get('fill_value');
  54 + }
51 55 if (this.get('description').match(/[a-z,0-9]/gi) != null) {
52 56 myValues.description = this.get('description');
53 57 }
... ...
js/app/views/ParameterUI.js
... ... @@ -136,7 +136,8 @@ Ext.define('amdaUI.ParameterUI',
136 136 buildchain: this.object.get('buildchain'),
137 137 timestep: this.object.get('timestep'),
138 138 reference_param: this.object.get('reference_param'),
139   - sampling_mode: this.object.get('sampling_mode')
  139 + sampling_mode: this.object.get('sampling_mode'),
  140 + fill_value: this.object.get('fill_value')
140 141 };
141 142 loadMask.show();
142 143 AmdaAction.generateParamInfo(obj, function (result, e) {
... ... @@ -580,6 +581,15 @@ Ext.define('amdaUI.ParameterUI',
580 581 width: 150
581 582 },
582 583 {
  584 + itemId: 'formParamFillValue',
  585 + fieldLabel: 'Fill Value',
  586 + name: 'fill_value',
  587 + width: 150
  588 + },
  589 + {
  590 + xtype: 'component', width: 20
  591 + },
  592 + {
583 593 itemId: 'formParamDescription',
584 594 name: 'description',
585 595 xtype: 'textarea', fieldLabel: 'Description',
... ...
php/classes/DerivedParamMgr.php
... ... @@ -21,7 +21,7 @@ class DerivedParamMgr extends AmdaObjectMgr
21 21 //node attributes and object XML tags
22 22 $this->attributes = array('name' => '', 'buildchain' => '', 'timestep' => '', 'dim_1' => '1', 'dim_2' => '1', 'units'=>'undefined', 'sampling_mode'=>'', 'reference_param'=>'');
23 23 // + tags in object XML
24   - $this->optionalAttributes = array('description' => 'undefined', 'ytitle' => 'undefined');
  24 + $this->optionalAttributes = array('description' => 'undefined', 'ytitle' => 'undefined', 'fill_value' => '');
25 25 $this->objTagName = 'param';
26 26 $this->id_prefix = 'ws_';
27 27 }
... ...