summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-07-25 10:36:05 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-07-25 10:36:05 +0300
commit5367ddb90fef12f6fc1258aaf56dc978168ec07b (patch)
treedb5465de71a6657f5a257d69a6016c0b9c8a429d /src/components
parenta9a840960d97d161429ddf37a6431f42a9ecb7a5 (diff)
downloadwebui-vue-5367ddb90fef12f6fc1258aaf56dc978168ec07b.tar.xz
add tables for dynamic
Diffstat (limited to 'src/components')
-rw-r--r--src/components/_sila/Global/Chart.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue
index a74c5425..d24aad72 100644
--- a/src/components/_sila/Global/Chart.vue
+++ b/src/components/_sila/Global/Chart.vue
@@ -14,6 +14,10 @@ export default {
type: Array,
default: () => [],
},
+ colors: {
+ type: Array,
+ default: () => [],
+ },
type: {
type: String,
default: '',
@@ -70,7 +74,7 @@ export default {
return rv;
}, {});
- let metricArr = Object.keys(group).map((key) => {
+ let metricArr = Object.keys(group).map((key, index) => {
let groupTime = group[key].reduce(function (rv, x) {
(rv[x['Timestamp']] = rv[x['Timestamp']] || []).push(x);
return rv;
@@ -91,6 +95,7 @@ export default {
return {
name: key,
data: arr.slice(-60),
+ color: this.colors[index],
};
});