diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-25 12:16:17 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-25 12:16:17 +0300 |
commit | 0847eaf4cc4b050fc6f297940013a3e7e4c1cb81 (patch) | |
tree | d30763106339ce9f0b2c1ea3d7b594915257755a /src/components/_sila/Global | |
parent | dc974638f3ea285f8da00a1a084d08ce3ede8949 (diff) | |
download | webui-vue-0847eaf4cc4b050fc6f297940013a3e7e4c1cb81.tar.xz |
SILABMC-256: add limits for Voltage
Diffstat (limited to 'src/components/_sila/Global')
-rw-r--r-- | src/components/_sila/Global/Chart.vue | 117 |
1 files changed, 14 insertions, 103 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue index 6a3775bb..5fd2dd31 100644 --- a/src/components/_sila/Global/Chart.vue +++ b/src/components/_sila/Global/Chart.vue @@ -31,10 +31,6 @@ export default { type: Number, default: null, }, - shutdown: { - type: Number, - default: null, - }, critical: { type: Number, default: null, @@ -196,70 +192,14 @@ export default { case 'processors': case 'power': case 'memory': - plotLines.push({ - color: '#E11717', - dashStyle: 'solid', - value: this.critical, - width: 2, - label: { - text: this.$t('chart.thresholdFailure'), - align: 'right', - style: { - fontFamily: 'Inter', - fontSize: '12px', - fontStyle: 'normal', - fontWeight: '400', - lineHeight: '16px', - color: '#0C1C2999', - }, - }, - }); - break; case 'voltage-input': - plotLines.push({ - color: '#1A3E5B', - dashStyle: 'solid', - value: this.shutdown, - width: 2, - label: { - text: this.$t('chart.thresholdFailure'), - align: 'right', - style: { - fontFamily: 'Inter', - fontSize: '12px', - fontStyle: 'normal', - fontWeight: '400', - lineHeight: '16px', - color: '#0C1C2999', - }, - }, - }); - break; case 'voltage-output': - plotLines.push({ - color: '#1A3E5B', - dashStyle: 'solid', - value: this.shutdown, - width: 2, - label: { - text: this.$t('chart.thresholdFailure'), - align: 'right', - style: { - fontFamily: 'Inter', - fontSize: '12px', - fontStyle: 'normal', - fontWeight: '400', - lineHeight: '16px', - color: '#0C1C2999', - }, - }, - }); - break; case 'current': + case 'psu-power': plotLines.push({ - color: '#1A3E5B', + color: '#E11717', dashStyle: 'solid', - value: this.shutdown, + value: this.critical, width: 2, label: { text: this.$t('chart.thresholdFailure'), @@ -275,25 +215,6 @@ export default { }, }); break; - case 'psu-power': - plotLines.push({ - color: '#1A3E5B', - dashStyle: 'solid', - value: this.shutdown, - width: 2, - label: { - text: this.$t('chart.thresholdWarning'), - align: 'right', - style: { - fontFamily: 'Inter', - fontSize: '12px', - fontStyle: 'normal', - fontWeight: '400', - lineHeight: '16px', - color: '#0C1C2999', - }, - }, - }); } return plotLines; }, @@ -316,6 +237,10 @@ export default { case 'processors': case 'power': case 'fans': + case 'voltage-input': + case 'voltage-output': + case 'current': + case 'psu-power': plotBands = [ { color: '#F0AC0C1A', @@ -343,22 +268,14 @@ export default { case 'memory': case 'processors': case 'fans': - yMax = this.max; - break; - case 'power': - yMax = 100; - break; case 'voltage-input': - yMax = 250; - break; case 'voltage-output': - yMax = 100; - break; case 'current': - yMax = 10; - break; case 'psu-power': - yMax = 125; + yMax = this.max; + break; + case 'power': + yMax = 100; break; } return yMax; @@ -369,25 +286,19 @@ export default { switch (this.type) { case 'motherboard': + case 'memory': + case 'processors': categories = this.setCategories(this.setMaxWithInterval(), 'С°'); break; case 'fans': categories = this.setSpeed(this.setMaxWithInterval()); break; - case 'memory': - categories = this.setCategories(this.setMaxWithInterval(), 'С°'); - break; - case 'processors': - categories = this.setCategories(this.setMaxWithInterval(), 'С°'); - break; case 'power': categories = this.setCategories(101, 'Вт'); break; case 'voltage-input': - categories = this.setCategories(251, 'В'); - break; case 'voltage-output': - categories = this.setCategories(101, 'В'); + categories = this.setCategories(this.setMaxWithInterval(), 'В'); break; case 'current': categories = this.setCategories(11, 'A'); |