From fb0dedc896a602d210a0ae88216b2a7b7675c426 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 11 Aug 2021 19:53:08 +0530 Subject: [PATCH 1/2] ui: fix display host hypervisorversion (#5301) --- ui/src/views/infra/HostInfo.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ui/src/views/infra/HostInfo.vue b/ui/src/views/infra/HostInfo.vue index e867956ca60..4ab73b51a20 100644 --- a/ui/src/views/infra/HostInfo.vue +++ b/ui/src/views/infra/HostInfo.vue @@ -18,7 +18,7 @@ + + item.path === '/').children + }, + '$store.getters.darkMode' (darkMode) { + if (darkMode) { + document.body.classList.add('dark-mode') + } else { + document.body.classList.remove('dark-mode') + } + } + }, + provide: function () { + return { + parentToggleSetting: this.toggleSetting } }, created () { @@ -136,6 +164,9 @@ export default { this.collapsed = !this.sidebarOpened }, mounted () { + if (this.$store.getters.darkMode) { + document.body.classList.add('dark-mode') + } const userAgent = navigator.userAgent if (userAgent.indexOf('Edge') > -1) { this.$nextTick(() => { @@ -146,6 +177,9 @@ export default { }) } }, + beforeDestroy () { + document.body.classList.remove('dark') + }, methods: { ...mapActions(['setSidebar']), toggle () { @@ -166,6 +200,9 @@ export default { if (!this.isDesktop()) { this.collapsed = false } + }, + toggleSetting (showSetting) { + this.showSetting = showSetting } } } diff --git a/ui/src/components/view/DetailSettings.vue b/ui/src/components/view/DetailSettings.vue index 2571bed9e65..b4aaf68772f 100644 --- a/ui/src/components/view/DetailSettings.vue +++ b/ui/src/components/view/DetailSettings.vue @@ -44,7 +44,11 @@ :dataSource="Object.keys(detailOptions)" :placeholder="$t('label.name')" @change="e => onAddInputChange(e, 'newKey')" /> - + - + - + {{ $t('label.new.tag') }} diff --git a/ui/src/components/view/ListView.vue b/ui/src/components/view/ListView.vue index 708b037cba4..89dd6dcb505 100644 --- a/ui/src/components/view/ListView.vue +++ b/ui/src/components/view/ListView.vue @@ -598,14 +598,6 @@ export default { /deep/ .ant-table-small > .ant-table-content > .ant-table-body { margin: 0; } - -/deep/ .light-row { - background-color: #fff; -} - -/deep/ .dark-row { - background-color: #f9f9f9; -} diff --git a/ui/src/components/view/SettingItem.vue b/ui/src/components/view/SettingItem.vue new file mode 100644 index 00000000000..fa458d62d4e --- /dev/null +++ b/ui/src/components/view/SettingItem.vue @@ -0,0 +1,185 @@ +// 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. + + + + + + diff --git a/ui/src/components/view/TreeView.vue b/ui/src/components/view/TreeView.vue index 832f5b3e354..feb0ad6392b 100644 --- a/ui/src/components/view/TreeView.vue +++ b/ui/src/components/view/TreeView.vue @@ -594,8 +594,6 @@ export default { } /deep/.ant-tree-icon__customize { - color: rgba(0, 0, 0, 0.45); - background: #fff; padding-right: 5px; } diff --git a/ui/src/components/widgets/Drawer.vue b/ui/src/components/widgets/Drawer.vue new file mode 100644 index 00000000000..8cfd59da8ce --- /dev/null +++ b/ui/src/components/widgets/Drawer.vue @@ -0,0 +1,170 @@ +// 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. + + + + + + diff --git a/ui/src/components/widgets/OsLogo.vue b/ui/src/components/widgets/OsLogo.vue index edbb3a4b343..a1de108c7a7 100644 --- a/ui/src/components/widgets/OsLogo.vue +++ b/ui/src/components/widgets/OsLogo.vue @@ -20,8 +20,19 @@ - - + + diff --git a/ui/src/layouts/UserLayout.vue b/ui/src/layouts/UserLayout.vue index f5bb5a482c9..e25bab4c8cb 100644 --- a/ui/src/layouts/UserLayout.vue +++ b/ui/src/layouts/UserLayout.vue @@ -35,8 +35,10 @@ @@ -57,7 +73,6 @@ export default { diff --git a/ui/src/views/iam/AddUser.vue b/ui/src/views/iam/AddUser.vue index e9ac516073e..f9eded89abe 100644 --- a/ui/src/views/iam/AddUser.vue +++ b/ui/src/views/iam/AddUser.vue @@ -23,7 +23,7 @@ {{ $t('label.username') }} - + {{ $t('label.password') }} - + {{ $t('label.confirmpassword') }} - + {{ $t('label.email') }} - + {{ $t('label.firstname') }} - + {{ $t('label.lastname') }} - + {{ $t('label.domain') }} - + {{ $t('label.account') }} - + {{ $t('label.timezone') }} - + {{ $t('label.samlentity') }} - + {{ $t('label.currentpassword') }} - + {{ $t('label.new.password') }} - + {{ $t('label.confirmpassword') }} - + {{ $t('label.name') }} - + {{ $t('label.description') }} - + {{ $t('label.based.on') }} - + {{ $t('label.type') }} - + {{ $t('label.role') }} - + {{ $t('label.' + field.name) }} - + diff --git a/ui/src/views/iam/EditUser.vue b/ui/src/views/iam/EditUser.vue index 3a3bbf2e5c9..567a8690305 100644 --- a/ui/src/views/iam/EditUser.vue +++ b/ui/src/views/iam/EditUser.vue @@ -23,7 +23,7 @@ {{ $t('label.username') }} - + {{ $t('label.email') }} - + {{ $t('label.firstname') }} - + {{ $t('label.lastname') }} - + {{ $t('label.timezone') }} - + {{ $t('label.rules.file') }} - + {{ $t('label.name') }} - + {{ $t('label.description') }} - + {{ $t('label.type') }} - + {{ $t('label.forced') }} - + {{ $t('label.semanticversion') }} - + {{ $t('label.name') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.url') }} - + {{ $t('label.checksum') }} - + {{ $t('label.mincpunumber') }} - + {{ $t('label.minmemory') }} - + {{ $t('label.scope') }} - + {{ $t('label.hypervisor') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.podid') }} - + {{ $t('label.clusterid') }} - + {{ $t('label.name') }} - + @@ -122,7 +122,7 @@ {{ $t('label.protocol') }} - + {{ $t('label.server') }} - + @@ -151,7 +151,7 @@ {{ $t('label.path') }} - + @@ -181,7 +181,7 @@ {{ $t('label.vcenterdatacenter') }} - + @@ -190,7 +190,7 @@ {{ $t('label.vcenterdatastore') }} - + @@ -200,7 +200,7 @@ {{ $t('label.providername') }} - + {{ $t('label.ismanaged') }} - + @@ -227,7 +227,7 @@ {{ $t('label.capacitybytes') }} - + @@ -236,7 +236,7 @@ {{ $t('label.capacityiops') }} - + @@ -245,7 +245,7 @@ {{ $t('label.url') }} - + @@ -278,7 +278,7 @@ {{ $t('label.storagetags') }} - + {{ $t('label.root.certificate') }} - + {{ $t('label.intermediate.certificate') + ` ${index + 1} ` }} - + {{ $t('label.server.certificate') }} - + {{ $t('label.pkcs.private.certificate') }} - + {{ $t('label.domain.suffix') }} - + {{ $t('label.traffictype') }} - + {{ $t('label.kvmnetworklabel') }} - + {{ $t('label.vmwarenetworklabel') }} - + {{ $t('label.xennetworklabel') }} - + {{ $t('label.hypervnetworklabel') }} - + {{ $t('label.ovm3networklabel') }} - + {{ $t('label.perform.fresh.checks') }} - + diff --git a/ui/src/views/network/CreateIsolatedNetworkForm.vue b/ui/src/views/network/CreateIsolatedNetworkForm.vue index 8bda05378c3..f29c766bf28 100644 --- a/ui/src/views/network/CreateIsolatedNetworkForm.vue +++ b/ui/src/views/network/CreateIsolatedNetworkForm.vue @@ -27,7 +27,7 @@ {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.domain') }} - + {{ $t('label.networkofferingid') }} - + {{ $t('label.vlan') }} - + {{ $t('label.vpcid') }} - + {{ $t('label.externalid') }} - + {{ $t('label.gateway') }} - + {{ $t('label.netmask') }} - + {{ $t('label.networkdomain') }} - + {{ $t('label.account') }} - + {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.domain') }} - + {{ $t('label.networkofferingid') }} - + {{ $t('label.vlan') }} - + {{ $t('label.bypassvlanoverlapcheck') }} - + @@ -156,7 +156,7 @@ {{ $t('label.isolatedpvlantype') }} - + {{ $t('label.isolatedpvlanid') }} - + {{ $t('label.account') }} - + {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.physicalnetworkid') }} - + {{ $t('label.vlan') }} - + {{ $t('label.bypassvlanoverlapcheck') }} - + @@ -127,7 +127,7 @@ {{ $t('label.isolatedpvlantype') }} - + {{ $t('label.isolatedpvlanid') }} - + {{ $t('label.domain') }} - + {{ $t('label.subdomainaccess') }} - + @@ -224,7 +224,7 @@ {{ $t('label.account') }} - + {{ $t('label.projectid') }} - + {{ $t('label.networkofferingid') }} - + {{ $t('label.ip4gateway') }} - + {{ $t('label.ip4netmask') }} - + {{ $t('label.startipv4') }} - + {{ $t('label.endipv4') }} - + {{ $t('label.ip6gateway') }} - + {{ $t('label.ip6cidr') }} - + {{ $t('label.startipv6') }} - + {{ $t('label.endipv6') }} - + {{ $t('label.networkdomain') }} - + {{ $t('label.hideipaddressusage') }} - + @@ -869,7 +869,6 @@ export default { .tagsTitle { font-weight: 500; - color: rgba(0, 0, 0, 0.85); margin-bottom: 12px; } diff --git a/ui/src/views/network/CreateVlanIpRange.vue b/ui/src/views/network/CreateVlanIpRange.vue index 99c0edc37b2..a5c2c187563 100644 --- a/ui/src/views/network/CreateVlanIpRange.vue +++ b/ui/src/views/network/CreateVlanIpRange.vue @@ -38,7 +38,7 @@ {{ $t('label.gateway') }} - + {{ $t('label.netmask') }} - + {{ $t('label.startipv4') }} - + {{ $t('label.endipv4') }} - + {{ $t('label.ip6cidr') }} - + {{ $t('label.ip6gateway') }} - + {{ $t('label.startipv6') }} - + {{ $t('label.endipv6') }} - + {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.cidr') }} - + {{ $t('label.networkdomain') }} - + {{ $t('label.vpcofferingid') }} - + {{ $t('label.start') }} - + diff --git a/ui/src/views/network/CreateVpnCustomerGateway.vue b/ui/src/views/network/CreateVpnCustomerGateway.vue index ff1662e8014..3c6f4706714 100644 --- a/ui/src/views/network/CreateVpnCustomerGateway.vue +++ b/ui/src/views/network/CreateVpnCustomerGateway.vue @@ -21,7 +21,7 @@ {{ $t('label.name') }} - + {{ $t('label.gateway') }} - + {{ $t('label.cidrlist') }} - + {{ $t('label.ipsecpsk') }} - + {{ $t('label.ikeversion') }} - + {{ $t('label.ikelifetime') }} - + {{ $t('label.esplifetime') }} - + {{ $t('label.dpd') }} - + {{ $t('label.splitconnections') }} - + {{ $t('label.forceencap') }} - + {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.systemvmtype') }} - + {{ $t('label.storagetype') }} - + {{ $t('label.provisioningtype') }} - + {{ $t('label.cachemode') }} - + {{ $t('label.cpunumber') }} - + {{ $t('label.cpuspeed') }} - + {{ $t('label.mincpunumber') }} - + {{ $t('label.maxcpunumber') }} - + {{ $t('label.memory.mb') }} - + {{ $t('label.minmemory') }} - + {{ $t('label.maxmemory') }} - + {{ $t('label.networkrate') }} - + {{ $t('label.root.disk.size') }} - + {{ $t('label.diskbytesreadrate') }} - + {{ $t('label.diskbyteswriterate') }} - + {{ $t('label.diskiopsreadrate') }} - + {{ $t('label.diskiopswriterate') }} - + {{ $t('label.iscustomizeddiskiops') }} - + @@ -467,7 +467,7 @@ {{ $t('label.diskiopsmin') }} - + {{ $t('label.diskiopsmax') }} - + {{ $t('label.hypervisorsnapshotreserve') }} - + {{ $t('label.offerha') }} - + @@ -536,7 +536,7 @@ {{ $t('label.hosttags') }} - + {{ $t('label.storagetags') }} - + {{ $t('label.limitcpuuse') }} - + @@ -579,7 +579,7 @@ {{ $t('label.isvolatile') }} - + @@ -588,7 +588,7 @@ {{ $t('label.deploymentplanner') }} - + {{ $t('label.domain') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.vmware.storage.policy') }} - + {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.storagetype') }} - + {{ $t('label.provisioningtype') }} - + {{ $t('label.customdisksize') }} - + @@ -107,7 +107,7 @@ {{ $t('label.disksize') }} - + {{ $t('label.diskbytesreadrate') }} - + {{ $t('label.diskbyteswriterate') }} - + {{ $t('label.diskiopsreadrate') }} - + {{ $t('label.diskiopswriterate') }} - + {{ $t('label.iscustomizeddiskiops') }} - + @@ -237,7 +237,7 @@ {{ $t('label.diskiopsmin') }} - + {{ $t('label.diskiopsmax') }} - + {{ $t('label.hypervisorsnapshotreserve') }} - + {{ $t('label.writecachetype') }} - + {{ $t('label.storagetags') }} - + {{ $t('label.domainid') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.vmware.storage.policy') }} - + {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.networkrate') }} - + {{ $t('label.guestiptype') }} - + {{ $t('label.ispersistent') }} - + @@ -106,7 +106,7 @@ {{ $t('label.specifyvlan') }} - + @@ -115,7 +115,7 @@ {{ $t('label.vpc') }} - + @@ -195,7 +195,7 @@ {{ $t('label.supportedservices') }} - +
@@ -217,7 +217,7 @@ {{ $t('label.serviceofferingid') }} - + {{ $t('label.conservemode') }} - + @@ -335,7 +335,7 @@ {{ $t('label.tags') }} - + {{ $t('label.availability') }} - + {{ $t('label.egressdefaultpolicy') }} - + {{ $t('label.domainid') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.enable.network.offering') }} - + diff --git a/ui/src/views/offering/AddVpcOffering.vue b/ui/src/views/offering/AddVpcOffering.vue index 9b3f10e49f0..810dbf36eaa 100644 --- a/ui/src/views/offering/AddVpcOffering.vue +++ b/ui/src/views/offering/AddVpcOffering.vue @@ -26,7 +26,7 @@ {{ $t('label.name') }} - + {{ $t('label.displaytext') }} - + {{ $t('label.supportedservices') }} - +
@@ -87,7 +87,7 @@ {{ $t('label.domainid') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.enable.vpc.offering') }} - + diff --git a/ui/src/views/offering/ImportBackupOffering.vue b/ui/src/views/offering/ImportBackupOffering.vue index 1127c56651d..6851bb9d6ef 100644 --- a/ui/src/views/offering/ImportBackupOffering.vue +++ b/ui/src/views/offering/ImportBackupOffering.vue @@ -25,7 +25,7 @@ {{ $t('label.name') }} - + {{ $t('label.description') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.externalid') }} - + {{ $t('label.allowuserdrivenbackups') }} - + {{ $t('label.account') }} - + {{ $t('label.email') }} - + {{ $t('label.project.role') }} - + {{ $t('label.roletype') }} - + {{ $t('label.user') }} - + {{ $t('label.email') }} - + {{ $t('label.project.role') }} - + {{ $t('label.roletype') }} - + {{ $t('label.name') }} - + {{ $t('label.zoneid') }} - + {{ $t('label.diskoffering') }} - + {{ $t('label.sizegb') }} - + - +
- + {{ $t('label.new.tag') }}
@@ -422,7 +426,6 @@ export default { .tagsTitle { font-weight: 500; - color: rgba(0, 0, 0, 0.85); margin-bottom: 12px; } diff --git a/ui/src/views/storage/TakeSnapshot.vue b/ui/src/views/storage/TakeSnapshot.vue index f8d49b6b5e1..410a676a9a6 100644 --- a/ui/src/views/storage/TakeSnapshot.vue +++ b/ui/src/views/storage/TakeSnapshot.vue @@ -62,13 +62,17 @@ @keyup.enter="handleInputConfirm" compact> - + - + {{ $t('label.new.tag') }} @@ -251,7 +255,6 @@ export default { .tagsTitle { font-weight: 500; - color: rgba(0, 0, 0, 0.85); margin-bottom: 12px; } diff --git a/ui/src/views/storage/UploadLocalVolume.vue b/ui/src/views/storage/UploadLocalVolume.vue index 49961e86f68..06ff390655f 100644 --- a/ui/src/views/storage/UploadLocalVolume.vue +++ b/ui/src/views/storage/UploadLocalVolume.vue @@ -48,7 +48,7 @@ {{ $t('label.name') }} - + {{ $t('label.zone') }} - + {{ $t('label.format') }} - + {{ $t('label.volumechecksum') }} - +