Commit 85829881 authored by Ziwen Su's avatar Ziwen Su

Merge fork branch into 'dev' (only search-component).

parent 7c4575cd
......@@ -17,7 +17,7 @@
</span>
<span class=space-left></span>
<span *ngIf="true">
<span>
<p-dropdown [options]="search_option" [(ngModel)]="selected_search_option" placeholder="Select Search Option" (ngModelChange)="getSearchChange($event)" [showClear]="true" [style]="{'minWidth':'180px','width':'180px'}"></p-dropdown>
<span class=space-left></span>
<p-dropdown *ngIf="selected_search_option=='Live'" [options]="live_option" [(ngModel)]="selected_live_option" placeholder="Select Live Option" [showClear]="true" [style]="{'minWidth':'160px','width':'160px'}"></p-dropdown>
......@@ -52,7 +52,7 @@
</div>
<!-- <div *ngIf="true" class="p-grid p-justify-center"> -->
<div *ngIf="true">
<div>
<table class="search">
<tr>
......
......@@ -136,33 +136,26 @@ export class SearchComponent implements OnInit {
footprint_name: string;
footprint_code: string;
filteredFootprint: any[];
/* middle column end ****************************************************************/
/* right column begin ***************************************************************/
interval_array: ValueInterval[];
footprint_min: number;
footprint_max: number;
footprint_unit: string;
footprint_unitprefix: number;
/* middle column end ****************************************************************/
/* right column begin ***************************************************************/
interval_array: ValueInterval[];
/* right column end *****************************************************************/
login_user: string;
stateKey: string;
// msm1: string;
// msmtext1: string;
// msm2: string;
// msmtext2: string;
noProject: string = "No matching projects found";
noUser: string = "No matching users found";
noJobstatus: string = "Please select a correct status";
noPartition: string = "No matching partition found";
noFootprint: string = "No matching footprint found";
/////////////////
constructor(private monitoringservice: MonitoringService, private route: ActivatedRoute, private router: Router, private eventManager:EventManager, private confirmationService: ConfirmationService)
{
......@@ -636,8 +629,12 @@ export class SearchComponent implements OnInit {
// check if filter contains units
if ( this.interval_array[i].selected_unit ) {
// convert values into seconds
min_value *= convert_time_in_seconds_dict[this.interval_array[i].selected_unit];
max_value *= convert_time_in_seconds_dict[this.interval_array[i].selected_unit];
if ( min_value ) {
min_value *= convert_time_in_seconds_dict[this.interval_array[i].selected_unit];
}
if ( max_value ) {
max_value *= convert_time_in_seconds_dict[this.interval_array[i].selected_unit];
}
}
this.monitoringservice.addFilterItem(this.interval_array[i].storage_name, min_value + " " + max_value);
// store current unit in localStore
......
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