...
 
Commits (22)
......@@ -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]) ){
$sql .= "AND ".$column_name." >= ".$attribute_key1." ";
$attributes[$attribute_key1] = $items[1];
} elseif ( !is_numeric($items[1]) ){
$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;
......
......@@ -594,8 +594,4 @@
// $result = get_dummy_timeline($metric);
echo json_encode($result, JSON_UNESCAPED_UNICODE);
?>
?>
\ No newline at end of file
......@@ -55,7 +55,7 @@ const appInitializerFn = (appConfig: AppConfigService) => {
HttpClientModule,
FormsModule,
PlotlyModule,
MessageModule
MessageModule,
],
providers: [
AppConfigService,
......
......@@ -136,41 +136,28 @@ export class JobChartComponent extends JobBaseComponent {
this.rows = rows;
this.timelines = [];
this.timelines.push(new TimelineChart(this.monitoringservice, 0, 'cpu_usage', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 1, 'mem_used', this.selectedValueType, this.rows));
// default partition
var partition = "haswell";
// get current partition name
var list:string[] = this.monitoringservice.getPartitions();
for(let i = 0; i < list.length; i++){
if ( rows[0]["PARTITION"].includes(list[i]) ){
partition = list[i];
}
}
// get display names for the current partition
var displays:string[] = this.monitoringservice.getDisplays(partition);
/* we replaced cpi with ipc on Wednesday, July 17 2019 at 2pm */
var metric = 'ipc';
if ( Number(this.job_start) < 1563364800 )
metric = 'cpi';
this.timelines.push(new TimelineChart(this.monitoringservice, 2, metric, this.selectedValueType, this.rows));
if ( rows[0]["PARTITION"].includes('ml') )
this.timelines.push(new TimelineChart(this.monitoringservice, 3, 'local_io', this.selectedValueType, this.rows));
else
this.timelines.push(new TimelineChart(this.monitoringservice, 3, 'io', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 4, 'flops', this.selectedValueType, this.rows));
if ( rows[0]["PARTITION"].includes('ml') )
this.timelines.push(new TimelineChart(this.monitoringservice, 5, 'local_io_meta', this.selectedValueType, this.rows));
else
this.timelines.push(new TimelineChart(this.monitoringservice, 5, 'io_meta', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 6, 'mem_bw', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 7, 'infiniband_bw', this.selectedValueType, this.rows));
if ( rows[0]["PARTITION"].includes('gpu') ||
rows[0]["PARTITION"].includes('ml') ||
rows[0]["PARTITION"].includes('hpdlf') ) {
this.timelines.push(new TimelineChart(this.monitoringservice, 8, 'gpu_usage', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 9, 'gpu_power', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 10, 'gpu_mem', this.selectedValueType, this.rows));
this.timelines.push(new TimelineChart(this.monitoringservice, 11, 'gpu_temperature', this.selectedValueType, this.rows));
if ( Number(this.job_start) < 1563364800 ){
displays[2] = "cpi";
}
if ( !rows[0]["PARTITION"].includes('ml') && !rows[0]["PARTITION"].includes('west') ) {
this.timelines.push(new TimelineChart(this.monitoringservice, 12, 'cpu_power', this.selectedValueType, this.rows));
// create timelines
for(let i = 0; i < displays.length; i++) {
this.timelines.push(new TimelineChart(this.monitoringservice, i, displays[i], this.selectedValueType, this.rows));
}
this.loading = false;
this.show_timelines = true;
......
......@@ -15,9 +15,9 @@ const captions = {
'mem_bw': ['Main Memory Bandwidth ','(% across sockets)','Sockets'],
'infiniband_bw': ['Infiniband Bandwidth ','(% across nodes)','Nodes'],
'gpu_usage': ['GPU Usage ','(% across devices)','Devices'],
'gpu_power': ['GPU Power ','(% across devices)','Devises'],
'gpu_mem': ['GPU Memory Utilization ','(% across devices)','Devises'],
'gpu_temperature': ['GPU Temperature ','(% across devices)','Devises'],
'gpu_power': ['GPU Power ','(% across devices)','Devices'],
'gpu_mem': ['GPU Memory Utilization ','(% across devices)','Devices'],
'gpu_temperature': ['GPU Temperature ','(% across devices)','Devices'],
'cpu_power': ['CPU Power ','(% across sockets)','Sockets'],
}
......
......@@ -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,32 @@
<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_bool[0]" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag2" label="compute-bound" [(ngModel)]="jobtag_bool[1]" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag5" label="gpu-bound" [(ngModel)]="jobtag_bool[4]" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag3" label="io-heavy" [(ngModel)]="jobtag_bool[2]" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
<div class="p-col">
<p-checkbox name="jobtag4" label="network-heavy" [(ngModel)]="jobtag_bool[3]" binary="true" (onChange)="checkJobtags()"></p-checkbox>
</div>
</div>
</p-overlayPanel>
</div>
<div *ngIf="selected_search_option==null" class="search-cell">
......@@ -150,9 +161,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>
......
......@@ -32,6 +32,7 @@ const convert_time_in_seconds_dict = {
class ValueInterval {
caption: string;
storage_name: string;
filter_min: string;
min: number;
max: number;
min_value: number;
......@@ -39,9 +40,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 +66,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 +91,6 @@ export class SearchComponent implements OnInit {
disable_time_interval: boolean;
jobid: number;
jobid_digits: boolean;
search_option: SelectItem[];
selected_search_option: string;
......@@ -125,15 +128,9 @@ export class SearchComponent implements OnInit {
nodename: string;
jobtag_1: boolean;
jobtag_2: boolean;
jobtag_4: boolean;
jobtag_8: boolean;
jobtag_sum: string;
jobtag_str1: number;
jobtag_str2: number;
jobtag_str4: number;
jobtag_str8: number;
jobtag_bool: boolean[];
jobtag_sum: number;
selected_jobtags: string;
footprints: string[];
footprint_name: string;
......@@ -191,24 +188,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 +214,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 +233,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 +248,29 @@ 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 ( ( 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_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.jobtag_sum = Number(searchStorage['TAGS']);
this.jobtag_bool[0] = (localStorage.getItem('JTAG_1'))==='true';
this.jobtag_bool[1] = (localStorage.getItem('JTAG_2'))==='true';
this.jobtag_bool[2] = (localStorage.getItem('JTAG_4'))==='true';
this.jobtag_bool[3] = (localStorage.getItem('JTAG_8'))==='true';
this.jobtag_bool[4] = (localStorage.getItem('JTAG_16'))==='true';
this.selected_jobtags = localStorage.getItem('SELECTED_JTG');
}
if ( searchStorage['EXCLUSIVE'] ){
......@@ -308,6 +299,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 +409,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;
......@@ -428,15 +424,9 @@ export class SearchComponent implements OnInit {
this.jobname = null;
this.nodename = null;
this.jobtag_1 = false;
this.jobtag_2 = false;
this.jobtag_4 = false;
this.jobtag_8 = false;
this.jobtag_bool = [false, false, false, false, false];
this.jobtag_sum = null;
this.jobtag_str1 = null;
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 +435,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 +457,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 +483,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 +501,30 @@ export class SearchComponent implements OnInit {
}
}
}
checkJobtags(){
this.jobtag_sum= Number(this.jobtag_bool[0]) + Number(this.jobtag_bool[1])*2 + Number(this.jobtag_bool[2])*4 + Number(this.jobtag_bool[3])*8 + Number(this.jobtag_bool[4])*16;
var jobtag_display;
if ( this.jobtag_bool[0] ){
jobtag_display = "memory-bound";
} else if ( this.jobtag_bool[1] ){
jobtag_display = "compute-bound";
} else if ( this.jobtag_bool[4] ){
jobtag_display = "gpu-bound";
} else if ( this.jobtag_bool[2] ){
jobtag_display = "io-heavy";
} else if ( this.jobtag_bool[3] ){
jobtag_display = "network-heavy";
}
var jobtag_num;
jobtag_num = Number(this.jobtag_bool[0]) + Number(this.jobtag_bool[1]) + Number(this.jobtag_bool[2]) + Number(this.jobtag_bool[3]) + Number(this.jobtag_bool[4]);
if ( jobtag_num == 0 ){
this.selected_jobtags = null;
} else if ( jobtag_num == 1 ){
this.selected_jobtags = jobtag_display;
} else {
this.selected_jobtags = `${jobtag_display} and ${jobtag_num-1} more`;
}
}
filterFootprint(event: any) {
this.filteredFootprint = [];
for(let i = 0; i < this.footprints.length; i++) {
......@@ -540,14 +545,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,14 +581,17 @@ 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){
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.footprint_min || this.footprint_max ){
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);
}
}
if ( this.jobstatus ){
......@@ -586,29 +603,16 @@ 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);
localStorage.setItem('JTAG_1', this.jobtag_bool[0].toString());
localStorage.setItem('JTAG_2', this.jobtag_bool[1].toString());
localStorage.setItem('JTAG_4', this.jobtag_bool[2].toString());
localStorage.setItem('JTAG_8', this.jobtag_bool[3].toString());
localStorage.setItem('JTAG_16', this.jobtag_bool[4].toString());
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 +639,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 +650,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;
PartitionConfig: string[];
activeComponent: string;
lastURL: string;
show_detailed_footprints: boolean;
......@@ -338,5 +339,27 @@ export class MonitoringService {
getDetailedFootprints() {
return this.show_detailed_footprints;
}
getPartitions() {
return Object.keys(this.appConfig.getConfig().PartitionConfig);
}
getDisplays(partition: string) {
var displays = this.appConfig.getConfig().PartitionConfig[partition]["displays"];
if ( displays.length > 1 ) {
var displays_top: string[] = this.appConfig.getConfig().DefaultTimelinesTop;
// remove first item from displays
displays.shift();
// combine default displays and additional displays
displays = displays_top.concat(displays);
} else {
displays = this.appConfig.getConfig().DefaultTimelinesTop;
}
// temporary workaround
if ( partition == "ml" ) {
displays[3] = "local_io";
displays[5] = "local_io_meta";
}
return displays;
}
}
......@@ -2,5 +2,63 @@
"AppConfig": {
"backend_url": "http://localhost/php/",
"footprint_url": "https://hpcmon.zih.tu-dresden.de/"
},
"DefaultTimelinesTop": [
"cpu_usage", "mem_used",
"ipc", "io",
"flops", "io_meta",
"mem_bw", "infiniband_bw"
],
"PartitionConfig":{
"broadwell":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"gpu":{
"displays":["DefaultTimelinesTop", "gpu_usage", "gpu_power", "gpu_mem", "gpu_temperature", "cpu_power"]
},
"haswell":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"hpdlf":{
"displays":["DefaultTimelinesTop", "gpu_usage", "gpu_power", "gpu_mem", "gpu_temperature", "cpu_power"]
},
"ifm":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"interactive":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"ml":{
"displays":["DefaultTimelinesTop", "gpu_usage", "gpu_power", "gpu_mem", "gpu_temperature"]
},
"nvme":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"romeo":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"sandy":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"sl":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"smp":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"test":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"triton":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"vis":{
"displays":["DefaultTimelinesTop", "cpu_power"]
},
"west":{
"displays":["DefaultTimelinesTop"]
}
}
}
}
\ No newline at end of file