From 3a5d9c3f2aeee2289c15b9362d61301e2a3cfda4 Mon Sep 17 00:00:00 2001 From: "Ziwen@miniserver" Date: Sat, 11 Jul 2020 23:43:12 +0200 Subject: [PATCH] Transferred Timeline_display data to Json. --- src/app/job-data/job-chart.component.ts | 37 ++++++++----------------- src/app/service/monitoring.service.ts | 6 ++-- src/assets/appConfig.json | 8 ++++-- 3 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/app/job-data/job-chart.component.ts b/src/app/job-data/job-chart.component.ts index c08a03c..1d06537 100644 --- a/src/app/job-data/job-chart.component.ts +++ b/src/app/job-data/job-chart.component.ts @@ -145,32 +145,19 @@ export class JobChartComponent extends JobBaseComponent { 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)); + var partition = "others"; + if ( rows[0]["PARTITION"].includes('ml') ){ + partition = "ml"; } - - 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)); + else if ( rows[0]["PARTITION"].includes('gpu') || rows[0]["PARTITION"].includes('hpdlf') ) { + partition = "gpu"; + } + else if ( rows[0]["PARTITION"].includes('west') ) { + partition = "west"; + } + var displays:string[] = this.monitoringservice.getPartitions(partition); + for(let i = 0; i < displays.length; i++) { + this.timelines.push(new TimelineChart(this.monitoringservice, i+3, displays[i], this.selectedValueType, this.rows)); } this.loading = false; this.show_timelines = true; diff --git a/src/app/service/monitoring.service.ts b/src/app/service/monitoring.service.ts index b7616bb..13dbd28 100644 --- a/src/app/service/monitoring.service.ts +++ b/src/app/service/monitoring.service.ts @@ -339,10 +339,8 @@ export class MonitoringService { getDetailedFootprints() { return this.show_detailed_footprints; } - getPartitions(key: any){ - if ( key == "list" ){ - return this.appConfig.getConfig().PartitionConfig.list; - } + getPartitions(key: string){ + return this.appConfig.getConfig().PartitionConfig[key]; } } diff --git a/src/assets/appConfig.json b/src/assets/appConfig.json index 4c13ac8..26e09bf 100644 --- a/src/assets/appConfig.json +++ b/src/assets/appConfig.json @@ -4,6 +4,10 @@ "footprint_url": "https://hpcmon.zih.tu-dresden.de/" }, "PartitionConfig":{ - "list": ["broadwell", "gpu", "haswell", "hpdlf", "ifm", "interactive", "ml", "nvme", "romeo", "sandy", "sl", "smp", "test", "triton", "vis", "west"] - } + "list": ["broadwell", "gpu", "haswell", "hpdlf", "ifm", "interactive", "ml", "nvme", "romeo", "sandy", "sl", "smp", "test", "triton", "vis", "west"], + "ml": ["local_io", "flops", "local_io_meta", "mem_bw", "infiniband_bw", "gpu_usage", "gpu_power", "gpu_mem", "gpu_temperature"], + "gpu": ["io", "flops", "io_meta", "mem_bw", "infiniband_bw", "gpu_usage", "gpu_power", "gpu_mem", "gpu_temperature", "cpu_power"], + "west": ["io", "flops", "io_meta", "mem_bw", "infiniband_bw"], + "others": ["io", "flops", "io_meta", "mem_bw", "infiniband_bw", "cpu_power"] + } } \ No newline at end of file -- GitLab