diff --git a/ui/src/components/widgets/Status.vue b/ui/src/components/widgets/Status.vue
index 01f2ecef82e..fa032ceea6b 100644
--- a/ui/src/components/widgets/Status.vue
+++ b/ui/src/components/widgets/Status.vue
@@ -61,6 +61,7 @@ export default {
case 'Started':
case 'Download Complete':
case 'Successfully Installed':
+ case 'True':
status = 'success'
break
case 'Disabled':
@@ -69,6 +70,7 @@ export default {
case 'Stopped':
case 'Declined':
case 'Disconnected':
+ case 'False':
status = 'error'
break
case 'Migrating':
diff --git a/ui/src/config/section/infra/routers.js b/ui/src/config/section/infra/routers.js
index fbfa7f6be47..0be025d44ae 100644
--- a/ui/src/config/section/infra/routers.js
+++ b/ui/src/config/section/infra/routers.js
@@ -30,6 +30,10 @@ export default {
}, {
name: 'nics',
component: () => import('@/views/network/NicsTable.vue')
+ }, {
+ name: 'router.health.checks',
+ show: (record, route, user) => { return ['Running'].includes(record.state) && ['Admin'].includes(user.roletype) },
+ component: () => import('@views/infra/routers/RouterHealthCheck.vue')
}],
actions: [
{
@@ -81,7 +85,7 @@ export default {
icon: 'drag',
label: 'label.action.migrate.router',
dataView: true,
- show: (record) => { return record.state === 'Running' },
+ show: (record, store) => { return ['Running'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) },
args: ['virtualmachineid', 'hostid'],
mapping: {
virtualmachineid: {
@@ -94,7 +98,7 @@ export default {
icon: 'reconciliation',
label: 'label.action.run.diagnostics',
dataView: true,
- show: (record) => { return record.state === 'Running' },
+ show: (record, store) => { return ['Running'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) },
args: ['targetid', 'type', 'ipaddress', 'params'],
mapping: {
targetid: {
@@ -111,7 +115,7 @@ export default {
icon: 'download',
label: 'label.action.get.diagnostics',
dataView: true,
- show: (record) => { return record.state === 'Running' },
+ show: (record, store) => { return ['Running'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) },
args: ['targetid', 'files'],
mapping: {
targetid: {
diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json
index 30d8c19c4c1..cba528630ea 100644
--- a/ui/src/locales/en.json
+++ b/ui/src/locales/en.json
@@ -224,6 +224,7 @@
"label.action.revert.snapshot": "Revert to Snapshot",
"label.action.revert.snapshot.processing": "Reverting to Snapshot...",
"label.action.router.health.checks": "Get health checks result",
+"label.perform.fresh.checks":"Perform fresh checks",
"label.action.run.diagnostics": "Run Diagnostics",
"label.action.secure.host": "Provision Host Security Keys",
"label.action.share.template": "Update Template Permissions",
@@ -2206,6 +2207,7 @@
"message.action.restore.instance": "Please confirm that you want to restore this instance.",
"message.action.revert.snapshot": "Please confirm that you want to revert the owning volume to this snapshot.",
"message.action.router.health.checks": "Health checks result will be fetched from router.",
+"message.action.router.health.checks.disabled.warning": "Please enable router health checks.",
"message.action.secure.host": "This will restart the host agent and libvirtd process after applying new X509 certificates, please confirm?",
"message.action.settings.warning.vm.running": "Please stop the virtual machine to access settings",
"message.action.settings.warning.vm.started": "Virtual machine has been started. It needs to be stopped to access settings",
diff --git a/ui/src/views/infra/routers/RouterHealthCheck.vue b/ui/src/views/infra/routers/RouterHealthCheck.vue
new file mode 100644
index 00000000000..489fe5608a0
--- /dev/null
+++ b/ui/src/views/infra/routers/RouterHealthCheck.vue
@@ -0,0 +1,196 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+
+
+
+
+
+ {{ $t('label.action.router.health.checks') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('label.perform.fresh.checks') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+