Commit d1ac8518 authored by Frank Winkler's avatar Frank Winkler

Merge branch 'master' of gitlab.hrz.tu-chemnitz.de:pika/visualization

parents fb7a4f5a 6aed4208
......@@ -19,12 +19,12 @@
'NODENAME' => ['(NODELIST LIKE :node1 OR CPULIST LIKE :node2)', [':node1', ':node2']],
'TAGS' => ['TAGS = :tags',':tags'],
'NUM_NODES_INT' => ['NUM_NODES BETWEEN :min_nodes AND :max_nodes', [':min_nodes', ':max_nodes']],
'NUM_CORES_INT' => ['NUM_CORES BETWEEN :min_cores AND :max_cores', [':min_cores', ':max_cores']],
'WALLTIME_INT' => ['WALLTIME BETWEEN :min_walltime AND :max_walltime', [':min_walltime', ':max_walltime']],
'PENDING_INT' => ['(START-SUBMIT) BETWEEN :min_pending AND :max_pending', [':min_pending', ':max_pending']],
'DURATION_INT' => ['(END-START) BETWEEN :min_duration AND :max_duration', [':min_duration', ':max_duration']],
'CORE_DURATION_INT' => ['(NUM_CORES*(END-START)) BETWEEN :min_core_duration AND :max_core_duration', [':min_core_duration', ':max_core_duration']],
'NUM_NODES_INT' => ['NUM_NODES BETWEEN :min_nodes AND :max_nodes', 'NUM_NODES >=:min_nodes', 'NUM_NODES <=:max_nodes', [':min_nodes', ':max_nodes']],
'NUM_CORES_INT' => ['NUM_CORES BETWEEN :min_cores AND :max_cores', 'NUM_CORES >=:min_cores', 'NUM_CORES <=:max_cores', [':min_cores', ':max_cores']],
'WALLTIME_INT' => ['WALLTIME BETWEEN :min_walltime AND :max_walltime', 'WALLTIME >=:min_walltime', 'WALLTIME <=:max_walltime', [':min_walltime', ':max_walltime']],
'PENDING_INT' => ['(START-SUBMIT) BETWEEN :min_pending AND :max_pending', '(START-SUBMIT) >=:min_pending', '(START-SUBMIT) <=:max_pending', [':min_pending', ':max_pending']],
'DURATION_INT' => ['(END-START) BETWEEN :min_duration AND :max_duration', '(END-START) >=:min_duration', '(END-START) <=:max_duration', [':min_duration', ':max_duration']],
'CORE_DURATION_INT' => ['(NUM_CORES*(END-START)) BETWEEN :min_core_duration AND :max_core_duration', '(NUM_CORES*(END-START)) >=:min_core_duration', '(NUM_CORES*(END-START)) <=:max_core_duration', [':min_core_duration', ':max_core_duration']],
'IPC_MAX' => ['ipc_mean_per_core <= :ipcmax',':ipcmax'],
'FLOPS_MAX' => ['flops_any_mean_per_core <= :flopsmax',':flopsmax'],
......@@ -52,22 +52,36 @@
if ( sizeof($items) == 3 ) {
$attribute_key1 = ":fp1_".$items[0];
$attribute_key2 = ":fp2_".$items[0];
$sql .= "AND ".$column_name." BETWEEN ".$attribute_key1." AND ".$attribute_key2." ";
$attributes[$attribute_key1] = $items[1];
$attributes[$attribute_key2] = $items[2];
if ( !is_numeric($items[2]) || $items[2] == 0 ){
$sql .= "AND ".$column_name." >= ".$attribute_key1." ";
$attributes[$attribute_key1] = $items[1];
} elseif ( !is_numeric($items[1]) || $items[1] == 0 ){
$sql .= "AND ".$column_name." <= ".$attribute_key2." ";
$attributes[$attribute_key2] = $items[2];
} else{
$sql .= "AND ".$column_name." BETWEEN ".$attribute_key1." AND ".$attribute_key2." ";
$attributes[$attribute_key1] = $items[1];
$attributes[$attribute_key2] = $items[2];
}
}
}
} elseif ( $key == "NODENAME" ) {
$sql .= "AND ".$filterArray[$key][0]." ";
$attributes[$filterArray[$key][1][0]] = $value;
$attributes[$filterArray[$key][1][1]] = $value;
$attributes[$filterArray[$key][1][1]] = $value;
} elseif ( strpos($key, '_INT') !== false ) {
$sql .= "AND ".$filterArray[$key][0]." ";
//convert value string to array
$values = explode(" ", $value);
$attributes[$filterArray[$key][1][0]] = $values[0];
$attributes[$filterArray[$key][1][1]] = $values[1];
$items = explode(" ", $value);
if ( !is_numeric($items[1]) ){
$sql .= "AND ".$filterArray[$key][1]." ";
$attributes[$filterArray[$key][3][0]] = $items[0];
} elseif( !is_numeric($items[0]) ){
$sql .= "AND ".$filterArray[$key][2]." ";
$attributes[$filterArray[$key][3][1]] = $items[1];
} else{
$sql .= "AND ".$filterArray[$key][0]." ";
$attributes[$filterArray[$key][3][0]] = $items[0];
$attributes[$filterArray[$key][3][1]] = $items[1];
}
} elseif ( $filterArray[$key] ) {
$sql .= "AND ".$filterArray[$key][0]." ";
$attributes[$filterArray[$key][1]] = $value;
......
......@@ -12,6 +12,7 @@ import { PlotlyModule } from 'angular-plotly.js';
PlotlyModule.plotlyjs = PlotlyJS;
import { MessageModule } from 'primeng/message';
import { ClipboardModule } from 'ngx-clipboard';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
......@@ -55,7 +56,8 @@ const appInitializerFn = (appConfig: AppConfigService) => {
HttpClientModule,
FormsModule,
PlotlyModule,
MessageModule
MessageModule,
ClipboardModule,
],
providers: [
AppConfigService,
......
......@@ -7,17 +7,17 @@
<span *ngIf="caption_total_name!=='None'">
<span>
<!-- <input class="jobid" type="text" size="10" maxlength="9" pInputText pKeyFilter="int" [ngModel]="jobid" placeholder="Enter Job ID" (ngModelChange)="getJobIDChange($event)" (keyup)="($event.which === 13) ? search():0">
<span *ngIf="!jobid_digits">
<span *ngIf="!true">
<span class=space-left></span>
<button pButton label=Search icon="fa fa-search" (click)="search()"></button>
</span> -->
<span class="ui-inputgroup" style="display:inline-block;">
<input class="jobid" type="text" size="10" maxlength="9" pInputText pKeyFilter="int" [ngModel]="jobid" placeholder="Enter Job ID" (ngModelChange)="getJobIDChange($event)" (keyup)="($event.which === 13) ? search():0">
<button pButton type="button" icon="fa fa-search" (click)="search()"></button>
<input class="jobid" type="text" size="10" maxlength="9" pInputText pKeyFilter="int" [(ngModel)]="jobid" placeholder="Enter Job ID" (keyup)="($event.which === 13) ? searchJID():0">
<button pButton type="button" icon="fa fa-search" (click)="searchJID()"></button>
</span>
<span class=space-left></span>
<span *ngIf="jobid_digits">
<span *ngIf="true">
<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>
......@@ -51,8 +51,8 @@
</p-table>
</div>
<!-- <div *ngIf="jobid_digits" class="p-grid p-justify-center"> -->
<div *ngIf="jobid_digits">
<!-- <div *ngIf="true" class="p-grid p-justify-center"> -->
<div *ngIf="true">
<table class="search">
<tr>
......@@ -122,21 +122,29 @@
<div *ngIf="selected_search_option!='Live'" class="search-cell">
<h4>Job Tag</h4>
<div class="p-grid p-nogutter">
<div class="p-col-5">
<p-checkbox name="jobtag1" label="memory-bound" [(ngModel)]="jobtag_1" binary="true"></p-checkbox>
</div>
<div class="p-col-7">
<p-checkbox name="jobtag2" label="compute-bound" [(ngModel)]="jobtag_2" binary="true"></p-checkbox>
</div>
<div class="p-col-12" style="height:4px"></div>
<div class="p-col-5">
<p-checkbox name="jobtag3" label="io-heavy" [(ngModel)]="jobtag_4" binary="true"></p-checkbox>
</div>
<div class="p-col-7">
<p-checkbox name="jobtag4" label="network-heavy " [(ngModel)]="jobtag_8" binary="true"></p-checkbox>
</div>
</div>
<span #jobtag class="ui-inputgroup" style="display:inline-block;">
<input class="jobid" style="width:260px; min-width: 260px;" type="text" maxlength="30" pInputText placeholder="Select Job Properties" [(ngModel)]="selected_jobtags" [readonly]="true">
<button pButton type="button" icon="fa fa-bars fa" (click)="jobtags.toggle($event, jobtag)"></button>
</span>
<!-- <button pButton class="search" icon="fa fa-bars fa" label="Select Job Properties" [disabled]="false" (click)="jobtags.toggle($event)"></button> -->
<p-overlayPanel #jobtags [showCloseIcon]="true">
<div class="p-grid p-dir-col">
<div class="p-col">
<p-checkbox name="jobtag1" label="memory-bound" [(ngModel)]="jobtag_1" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag2" label="compute-bound" [(ngModel)]="jobtag_2" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag3" label="io-heavy" [(ngModel)]="jobtag_4" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag4" label="network-heavy " [(ngModel)]="jobtag_8" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
</div>
</p-overlayPanel>
</div>
<div *ngIf="selected_search_option==null" class="search-cell">
......@@ -150,9 +158,9 @@
<div *ngIf="footprint_name" class="search-cell">
<h4>{{footprint_name}}</h4>
<p-spinner [inputStyle]="{'minWidth':'110px','width':'110px'}" [(ngModel)]="footprint_min" pKeyFilter="num" [step]="0.1" [formatInput]="true" thousandSeparator="," decimalSeparator="." placeholder="Enter Min"></p-spinner>
<p-spinner [inputStyle]="{'minWidth':'110px','width':'110px'}" [(ngModel)]="footprint_min" [min]="0" pKeyFilter="pnum" [step]="0.1" [formatInput]="true" thousandSeparator="," decimalSeparator="." placeholder="Enter Min"></p-spinner>
<span style="margin-left: 20px"></span>
<p-spinner [inputStyle]="{'minWidth':'110px','width':'110px'}" [(ngModel)]="footprint_max" pKeyFilter="num" [step]="0.1" [formatInput]="true" thousandSeparator="," decimalSeparator="." placeholder="Enter Max" ></p-spinner>
<p-spinner [inputStyle]="{'minWidth':'110px','width':'110px'}" [(ngModel)]="footprint_max" [min]="0" pKeyFilter="pnum" [step]="0.1" [formatInput]="true" thousandSeparator="," decimalSeparator="." placeholder="Enter Max" ></p-spinner>
<span style="margin-left: 10px"></span>
{{footprint_unit}}
</div>
......
......@@ -28,10 +28,29 @@ const convert_time_in_seconds_dict = {
'd': 86400,
'y': 31536000
}
const convert_jobtag_dict = {
0: null,
1:"memory-bound",
2:"compute-bound",
3:"memory-bound and 1 more",
4:"io-heavy",
5:"memory-bound and 1 more",
6:"compute-bound and 1 more",
7:"memory-bound and 2 more",
8:"network-heavy",
9:"memory-bound and 1 more",
10:"compute-bound and 1 more",
11:"memory-bound and 2 more",
12:"io-heavy and 1 more",
13:"memory-bound and 2 more",
14:"compute-bound and 2 more",
15:"memory-bound and 3 more"
}
class ValueInterval {
caption: string;
storage_name: string;
filter_min: string;
min: number;
max: number;
min_value: number;
......@@ -39,9 +58,10 @@ class ValueInterval {
units: SelectItem[];
selected_unit: string;
constructor(caption: string, storage_name: string, min: number, max: number, units: string[]) {
constructor(caption: string, storage_name: string, min: number, max: number, units: string[], filter_min:string) {
this.caption = caption;
this.storage_name = storage_name;
this.filter_min = filter_min;
this.min = min;
if ( max == null )
this.max = Number.MAX_VALUE;
......@@ -64,10 +84,12 @@ class ValueInterval {
checkInterval() {
setTimeout(() => {
if ( this.min_value > this.max_value ) {
if ( this.max_value != 0 && this.max_value != null ){
this.max_value = this.min_value;
}
if ( this.min_value == null && this.max_value != null) {
this.min_value = 0;
}
else{
this.max_value = null;
}
}
}, 4000);
}
......@@ -87,7 +109,6 @@ export class SearchComponent implements OnInit {
disable_time_interval: boolean;
jobid: number;
jobid_digits: boolean;
search_option: SelectItem[];
selected_search_option: string;
......@@ -129,11 +150,12 @@ export class SearchComponent implements OnInit {
jobtag_2: boolean;
jobtag_4: boolean;
jobtag_8: boolean;
jobtag_sum: string;
jobtag_sum: number;
jobtag_str1: number;
jobtag_str2: number;
jobtag_str4: number;
jobtag_str8: number;
selected_jobtags: string;
footprints: string[];
footprint_name: string;
......@@ -191,24 +213,7 @@ export class SearchComponent implements OnInit {
{label: 'Exclusive', value: '1'},
{label: 'Shared', value: '0'}
];
this.partitions = [
'broadwell',
'gpu',
'haswell',
'hpdlf',
'ifm',
'interactive',
'ml',
'nvme',
'romeo',
'sandy',
'sl',
'smp',
'test',
'triton',
'vis',
'west'
];
this.partitions = this.monitoringservice.getPartitions();
this.footprints = [];
for (let label in convert_footprint_dict) {
......@@ -234,6 +239,8 @@ export class SearchComponent implements OnInit {
}
// check if local storage is available
if ( localStorage.getItem('JID') )
this.jobid = Number(localStorage.getItem('JID'));
if ( localStorage.getItem('search-storage') ) {
// console.log("search-storage: ", localStorage.getItem('search-storage'));
......@@ -251,9 +258,6 @@ export class SearchComponent implements OnInit {
this.selected_live_option = null;
}
if ( localStorage.getItem('JID') )
this.jobid = Number(localStorage.getItem('JID'));
this.jobid_digits= (localStorage.getItem('RJID'))==='true';
if ( searchStorage['JOB'] )
this.jobname = searchStorage['JOB'].replace(/%/g,'');;;
if ( searchStorage['PROJECT'] )
......@@ -269,17 +273,33 @@ export class SearchComponent implements OnInit {
this.footprint_code = searchStorage['FOOTPRINT'];
this.footprint_name = localStorage.getItem('FOOTPRINTS');
this.footprint_unit = localStorage.getItem('FOOTPRINT_UNIT');
this.footprint_min = Number(localStorage.getItem('FOOTPRINT_MIN'));
this.footprint_max = Number(localStorage.getItem('FOOTPRINT_MAX'));
this.footprint_unitprefix = Number(localStorage.getItem('FOOTPRINT_UNITPREFIX'));
if ( searchStorage['FOOTPRINT1_S'] ){
var footprint_temp = searchStorage['FOOTPRINT1_S'].split(" ");
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;
}
if ( ( isNaN( this.footprint_max ) ) || ( this.footprint_max == 0 ) ) {
this.footprint_max = null;
}
}
if ( searchStorage['STATUS'] )
this.jobstatus = searchStorage['STATUS'];
if ( searchStorage['TAGS'] ) {
this.jobtag_sum = searchStorage['TAGS'];
this.jobtag_sum = Number(searchStorage['TAGS']);
this.jobtag_1= (localStorage.getItem('JTAGA'))==='true';
this.jobtag_2= (localStorage.getItem('JTAGB'))==='true';
this.jobtag_4= (localStorage.getItem('JTAGC'))==='true';
this.jobtag_8= (localStorage.getItem('JTAGD'))==='true';
this.selected_jobtags = localStorage.getItem('SELECTED_JTG');
}
if ( searchStorage['EXCLUSIVE'] ){
......@@ -308,6 +328,12 @@ export class SearchComponent implements OnInit {
this.interval_array[i].min_value = values[0];
this.interval_array[i].max_value = values[1];
}
if ( isNaN( this.interval_array[i].min_value ) ) {
this.interval_array[i].min_value = null;
}
if ( isNaN( this.interval_array[i].max_value ) ) {
this.interval_array[i].max_value = null;
}
}
}
if ( this.selected_search_option == 'Live' )
......@@ -412,7 +438,6 @@ export class SearchComponent implements OnInit {
defaultValue(){
this.jobid = null;
this.jobid_digits = true;
this.selected_search_option = null;
this.selected_live_option = null;
this.selected_allocation_type = null;
......@@ -437,6 +462,7 @@ export class SearchComponent implements OnInit {
this.jobtag_str2 = null;
this.jobtag_str4 = null;
this.jobtag_str8 = null;
this.selected_jobtags = null;
this.footprint_code = null;
this.footprint_name = null;
this.footprint_min = null;
......@@ -445,12 +471,12 @@ export class SearchComponent implements OnInit {
/* set default values for third column */
this.interval_array = [];
this.interval_array.push(new ValueInterval('Number of Nodes', 'NUM_NODES_INT', 0, 2000, []));
this.interval_array.push(new ValueInterval('Number of Cores', 'NUM_CORES_INT', 0, null, []));
this.interval_array.push(new ValueInterval('Time Limit', 'WALLTIME_INT', 0, null, ['m', 'h', 'd']));
this.interval_array.push(new ValueInterval('Pending Time', 'PENDING_INT', 0, null, ['m', 'h', 'd']));
this.interval_array.push(new ValueInterval('Duration', 'DURATION_INT', 0, null, ['m', 'h', 'd']));
this.interval_array.push(new ValueInterval('Core Duration', 'CORE_DURATION_INT', 0, null, ['h', 'd', 'y']));
this.interval_array.push(new ValueInterval('Number of Nodes', 'NUM_NODES_INT', 0, 2000, [], 'NUM_NODES_MIN'));
this.interval_array.push(new ValueInterval('Number of Cores', 'NUM_CORES_INT', 0, null, [], 'NUM_CORES_MIN'));
this.interval_array.push(new ValueInterval('Time Limit', 'WALLTIME_INT', 0, null, ['m', 'h', 'd'], 'WALLTIME_MIN'));
this.interval_array.push(new ValueInterval('Pending Time', 'PENDING_INT', 0, null, ['m', 'h', 'd'], 'PENDING_MIN'));
this.interval_array.push(new ValueInterval('Duration', 'DURATION_INT', 0, null, ['m', 'h', 'd'], 'DURATION_MIN'));
this.interval_array.push(new ValueInterval('Core Duration', 'CORE_DURATION_INT', 0, null, ['h', 'd', 'y'], 'CORE_DURATION_MIN'));
}
getSearchChange(event :any){
......@@ -467,9 +493,9 @@ export class SearchComponent implements OnInit {
}
else{
if ( this.selected_search_option !='Live' ) {
this.interval_array.push(new ValueInterval('Pending Time', 'PENDING_INT', 0, null, ['m', 'h', 'd']));
this.interval_array.push(new ValueInterval('Duration', 'DURATION_INT', 0, null, ['m', 'h', 'd']));
this.interval_array.push(new ValueInterval('Core Duration', 'CORE_DURATION_INT', 0, null, ['h', 'd', 'y']));
this.interval_array.push(new ValueInterval('Pending Time', 'PENDING_INT', 0, null, ['m', 'h', 'd'], 'PENDING_MIN'));
this.interval_array.push(new ValueInterval('Duration', 'DURATION_INT', 0, null, ['m', 'h', 'd'], 'DURATION_MIN'));
this.interval_array.push(new ValueInterval('Core Duration', 'CORE_DURATION_INT', 0, null, ['h', 'd', 'y'], 'CORE_DURATION_MIN'));
}
}
}
......@@ -493,15 +519,6 @@ export class SearchComponent implements OnInit {
}
}
getJobIDChange(event: any) {
this.jobid = event;
if ( this.jobid >= 1000000 ){
this.jobid_digits = false;
}
else{
this.jobid_digits = true;
}
}
filterPartitions(event: any) {
this.filtered_partitions = [];
for(let i = 0; i < this.partitions.length; i++) {
......@@ -520,6 +537,26 @@ export class SearchComponent implements OnInit {
}
}
}
checkJobtags(){
if ( this.jobtag_1 )
this.jobtag_str1=1;
else
this.jobtag_str1=0;
if ( this.jobtag_2 )
this.jobtag_str2=2;
else
this.jobtag_str2=0;
if ( this.jobtag_4 )
this.jobtag_str4=4;
else
this.jobtag_str4=0;
if ( this.jobtag_8 )
this.jobtag_str8=8;
else
this.jobtag_str8=0;
this.jobtag_sum= this.jobtag_str1+this.jobtag_str2+this.jobtag_str4+this.jobtag_str8;
this.selected_jobtags = convert_jobtag_dict[this.jobtag_sum];
}
filterFootprint(event: any) {
this.filteredFootprint = [];
for(let i = 0; i < this.footprints.length; i++) {
......@@ -540,14 +577,23 @@ export class SearchComponent implements OnInit {
}
}
searchJID(){
this.monitoringservice.clearFilter();
sessionStorage.removeItem('_filter');
sessionStorage.clear();
this.clearFilterSession();
localStorage.removeItem('JID');
this.monitoringservice.addFilterItem('JID', this.jobid.toString());
this.monitoringservice.addFilterItem('GLOBAL_DATE_FILTER', "false");
localStorage.setItem('JID', this.jobid.toString());
this.router.navigate(['Detail', 'job-details'], {relativeTo: this.route});
}
search() {
this.monitoringservice.clearFilter();
sessionStorage.removeItem('_filter');
sessionStorage.clear();
this.clearFilterSession();
localStorage.removeItem('JID');
///////
......@@ -567,15 +613,10 @@ 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);
if ( this.footprint_min==null )
this.footprint_min = 0;
if ( this.footprint_max==null )
this.footprint_max = 0;
if ( this.footprint_min!=0 || this.footprint_max!=0){
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);
localStorage.setItem('FOOTPRINT_MIN', this.footprint_min.toString());
localStorage.setItem('FOOTPRINT_MAX', this.footprint_max.toString());
}
localStorage.setItem('FOOTPRINT_UNITPREFIX', this.footprint_unitprefix.toString());
}
if ( this.jobstatus ){
this.monitoringservice.addFilterItem('STATUS', this.jobstatus);
......@@ -586,29 +627,15 @@ export class SearchComponent implements OnInit {
}
}
if ( this.jobtag_1 )
this.jobtag_str1=1;
else
this.jobtag_str1=0;
if ( this.jobtag_2 )
this.jobtag_str2=2;
else
this.jobtag_str2=0;
if ( this.jobtag_4 )
this.jobtag_str4=4;
else
this.jobtag_str4=0;
if ( this.jobtag_8 )
this.jobtag_str8=8;
else
this.jobtag_str8=0;
this.jobtag_sum=String(this.jobtag_str1+this.jobtag_str2+this.jobtag_str4+this.jobtag_str8);
localStorage.setItem('JTAGA', this.jobtag_1.toString());
localStorage.setItem('JTAGB', this.jobtag_2.toString());
localStorage.setItem('JTAGC', this.jobtag_4.toString());
localStorage.setItem('JTAGD', this.jobtag_8.toString());
if ( this.jobtag_sum != '0' ){
this.monitoringservice.addFilterItem('TAGS', this.jobtag_sum);
if ( this.jobtag_sum && this.jobtag_sum != 0 ){
this.monitoringservice.addFilterItem('TAGS', this.jobtag_sum.toString());
}
if ( this.selected_jobtags ){
localStorage.setItem('SELECTED_JTG', this.selected_jobtags);
}
if ( this.selected_allocation_type!=null )
......@@ -635,9 +662,7 @@ export class SearchComponent implements OnInit {
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];
}
this.monitoringservice.addFilterItem(this.interval_array[i].storage_name, min_value + " " + max_value);
// store current unit in localStore
localStorage.setItem(this.interval_array[i].storage_name + '_UNIT', this.interval_array[i].selected_unit);
}
......@@ -648,16 +673,10 @@ export class SearchComponent implements OnInit {
localStorage.setItem('SEARCHBY', this.selected_search_option);
localStorage.setItem('LIVEOPTION', this.selected_live_option);
localStorage.setItem('RJID', this.jobid_digits.toString());
// search-by navigate
if ( this.jobid ){
this.monitoringservice.clearFilter();
this.monitoringservice.addFilterItem('JID', this.jobid.toString());
this.monitoringservice.addFilterItem('GLOBAL_DATE_FILTER', "false");
localStorage.setItem('JID', this.jobid.toString());
this.router.navigate(['Detail', 'job-details'], {relativeTo: this.route});
}
else if ( this.selected_search_option == 'Live' ){
if ( this.selected_search_option == 'Live' ){
if ( this.selected_live_option == 'Live-User' ){
this.router.navigate([this.selected_search_option, 'users-live'], {relativeTo: this.route});}
else if ( this.selected_live_option == 'Live-Job' ){
......
......@@ -16,6 +16,7 @@ export class MonitoringService {
global_end: any;
filterData: any;
backend_url: string;
partition_list: string[];
activeComponent: string;
lastURL: string;
show_detailed_footprints: boolean;
......@@ -46,6 +47,7 @@ export class MonitoringService {
start_date.setDate(start_date.getDate() - 7);
var end_date = new Date();
// for testing
// start_date = new Date(1575331200000);
// var end_date = new Date(1575763200000);
......@@ -339,4 +341,8 @@ export class MonitoringService {
return this.show_detailed_footprints;
}
getPartitions(){
return this.appConfig.getConfig().AppConfig.partition_list;
}
}
{
"AppConfig": {
"backend_url": "http://localhost/php/",
"footprint_url": "https://hpcmon.zih.tu-dresden.de/"
"footprint_url": "https://hpcmon.zih.tu-dresden.de/",
"partition_list":["broadwell", "gpu", "haswell", "hpdlf", "ifm", "interactive", "ml", "nvme", "romeo", "sandy", "sl", "smp", "test", "triton", "vis", "west"]
}
}
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