Commit b2b0e9d7 authored by Ziwen Su's avatar Ziwen Su

Replaced '0' with 'null'.

parent f66e8666
......@@ -279,11 +279,6 @@ export class SearchComponent implements OnInit {
this.footprint_min = footprint_temp[1]/this.footprint_unitprefix;
this.footprint_max = footprint_temp[2]/this.footprint_unitprefix;
}
if ( searchStorage['FOOTPRINT_MIN_S'] ){
var footprint_temp = searchStorage['FOOTPRINT_MIN_S'].split(" ");
this.footprint_min = footprint_temp[1];
this.footprint_max = null;
}
if ( ( isNaN( this.footprint_min ) ) || ( this.footprint_min == 0 ) ) {
this.footprint_min = null;
}
......@@ -613,10 +608,18 @@ export class SearchComponent implements OnInit {
this.monitoringservice.addFilterItem('FOOTPRINT', this.footprint_code);
localStorage.setItem('FOOTPRINTS', this.footprint_name);
localStorage.setItem('FOOTPRINT_UNIT', this.footprint_unit);
localStorage.setItem('FOOTPRINT_UNITPREFIX', this.footprint_unitprefix.toString());
if ( this.footprint_min || this.footprint_max ){
this.monitoringservice.addFilterItem('FOOTPRINT1_S', this.footprint_code + " " + this.footprint_min*this.footprint_unitprefix +" "+ this.footprint_max*this.footprint_unitprefix);
this.footprint_min = this.footprint_min*this.footprint_unitprefix;
this.footprint_max = this.footprint_max*this.footprint_unitprefix;
if ( this.footprint_min == 0 ) {
this.footprint_min = null;
}
if ( this.footprint_max == 0 ) {
this.footprint_max = null;
}
this.monitoringservice.addFilterItem('FOOTPRINT1_S', this.footprint_code + " " + this.footprint_min +" "+ this.footprint_max);
}
localStorage.setItem('FOOTPRINT_UNITPREFIX', this.footprint_unitprefix.toString());
}
if ( this.jobstatus ){
this.monitoringservice.addFilterItem('STATUS', this.jobstatus);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment