diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-08 12:23:04 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-08 12:23:04 +0300 |
commit | fec3022f369f7b61637fb6f97d4957d81b8a3d50 (patch) | |
tree | 6e6fd1782a15a1b966f10f6c6018f765402d8e3e /src/components | |
parent | 7e74f9412c80e5462798b2d9b62a12f570aa9c95 (diff) | |
parent | bf78f95baa9f6a1c190d1bc0907acbcb2c76c00b (diff) | |
download | webui-vue-fec3022f369f7b61637fb6f97d4957d81b8a3d50.tar.xz |
Merge branch 'sila' of git.sila.ru:pub/openbmc/webui-vue into sila
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/_sila/Global/Chart.vue | 75 | ||||
-rw-r--r-- | src/components/_sila/Global/Collapse.vue | 6 |
2 files changed, 79 insertions, 2 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue index 4da58798..0b639252 100644 --- a/src/components/_sila/Global/Chart.vue +++ b/src/components/_sila/Global/Chart.vue @@ -42,6 +42,10 @@ export default { type: Number, default: null, }, + float: { + type: Boolean, + default: false, + }, }, data() { return { @@ -90,7 +94,7 @@ export default { return { ...metric, Timestamp: time, - Value: Math.round(metric.Value), + Value: this.float ? metric.Value : Math.round(metric.Value), }; }); @@ -290,6 +294,75 @@ export default { }, }); break; + case 'voltage-input': + this.categories = this.setCategories(251, 'В'); + this.yMax = 250; + this.minTickInterval = 25; + this.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': + this.categories = this.setCategories(101, 'В'); + this.yMax = 100; + this.minTickInterval = 25; + this.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': + this.categories = this.setCategories(11, 'A'); + this.yMax = 10; + this.minTickInterval = 2; + this.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; } }, setCategories(count, desc) { diff --git a/src/components/_sila/Global/Collapse.vue b/src/components/_sila/Global/Collapse.vue index f004c955..da2b74c8 100644 --- a/src/components/_sila/Global/Collapse.vue +++ b/src/components/_sila/Global/Collapse.vue @@ -10,7 +10,7 @@ {{ title }} <component :is="iconChevronUp" class="icon-expand" /> </b-button> - <b-collapse :id="id"> + <b-collapse :id="id" :visible="defaultOpen"> <slot></slot> </b-collapse> </div> @@ -29,6 +29,10 @@ export default { type: String, default: null, }, + defaultOpen: { + type: Boolean, + default: false, + }, }, data() { return { |