diff --git a/ui/src/components/CloudMonkey/Resource.vue b/ui/src/components/CloudMonkey/Resource.vue
index 05af44a2b7c..3211d1bf6b5 100644
--- a/ui/src/components/CloudMonkey/Resource.vue
+++ b/ui/src/components/CloudMonkey/Resource.vue
@@ -131,30 +131,30 @@
-
-
- {{ `Selected ${selectedRowKeys.length} items` }}
-
-
-
-
+
+
+
+ {{ `Selected ${selectedRowKeys.length} items` }}
+
+
+
{{ text }}
@@ -164,6 +164,15 @@
{{ text }}
+
+
+
+ {{ text }}
+
+
+
+
+
{{ text }}
@@ -268,15 +277,17 @@ export default {
if (!this.columnKeys.includes('name')) {
this.columnKeys = ['name', ...this.columnKeys]
}
+ var counter = 0
for (const key of this.columnKeys) {
this.columns.push({
title: key,
dataIndex: key,
- key: key,
+ key: counter++,
scopedSlots: { customRender: key },
sorter: (a, b) => a[key].length - b[key].length
})
}
+
this.loading = true
if (this.$route.params && this.$route.params.id) {
params['id'] = this.$route.params.id
@@ -423,6 +434,35 @@ export default {
}
})
},
+ getRowClassName(record, index) {
+ if (index % 2 !== 0) {
+ return 'light-row'
+ }
+ return 'dark-row'
+ },
+ getBadgeStatus(state) {
+ var status = "default"
+ switch (state) {
+ case "Running":
+ case "Ready":
+ case "Up":
+ case "BackedUp":
+ status = "success"
+ break
+ case "Stopped":
+ status = "error"
+ break
+ case "Migrating":
+ case "Starting":
+ status = "processing"
+ break
+ case "Alert":
+ case "Allocated":
+ status = "warning"
+ break
+ }
+ return status
+ },
start () {
this.loading = true
this.fetchData()
@@ -439,6 +479,19 @@ export default {
}
-
diff --git a/ui/src/components/menu/SideMenu.vue b/ui/src/components/menu/SideMenu.vue
index f10121f82f4..b4aed5024bf 100644
--- a/ui/src/components/menu/SideMenu.vue
+++ b/ui/src/components/menu/SideMenu.vue
@@ -86,7 +86,6 @@ export default {
.ant-menu-light {
border-right-color: transparent;
- padding: 24px 0;
}
}
}