- {{ (totalStorage / (1024 * 1024 * 1024.0)).toFixed(2) }} GB Storage
- (
{{ vm.templatename }})
-
+
{{ (totalStorage / (1024 * 1024 * 1024.0)).toFixed(2) }} GB Storage
+
+
Read {{ vm.diskkbsread }} KB
Write {{ vm.diskkbswrite }} KB
Read (IO) {{ vm.diskioread }}
Write (IO) {{ vm.diskiowrite }}
-
+
-
+ {{ vm.nic.length }} NIC(s)
RX {{ vm.networkkbsread }} KB
TX {{ vm.networkkbswrite }} KB
-
-
-
-
eth{{ index }} {{ eth.ipaddress }} (
{{ eth.networkname }})
-
+
+
eth{{ index }} {{ eth.ipaddress }}
+ (
{{ eth.networkname }})
-
-
-
-
-
{{ vm.hostname }} ({{ vm.hypervisor }})
-
-
-
-
-
-
-
-
-
-
-
-
-
Notes
-
-
-
-
-
-
-
-
- Add Note
-
-
-
-
-
-
-
+
-
+
import { api } from '@/api'
+import InfoCard from '@/views/common/InfoCard'
import ListView from '@/components/widgets/ListView'
import Status from '@/components/widgets/Status'
export default {
name: 'InstanceView',
components: {
+ InfoCard,
ListView,
Status
},
@@ -277,14 +189,7 @@ export default {
totalStorage: 0,
guestOsName: '',
osLogo: 'linux',
- inputVisible: false,
- inputValue: '',
activeKey: ['1', '2', '3'],
- tags: ['os=centos', 'tag=value', 'demo=true'],
- tagInputVisible: false,
- tagInputValue: '',
- teams: [],
- teamSpinning: true,
settingsColumns: [
{
title: this.$t('name'),
@@ -311,30 +216,6 @@ export default {
}
},
methods: {
- showInput () {
- this.inputVisible = true
- this.$nextTick(function () {
- this.$refs.input.focus()
- })
- },
-
- handleInputChange (e) {
- this.inputValue = e.target.value
- },
- handleInputConfirm () {
- const inputValue = this.inputValue
- let tags = this.tags
- if (inputValue && tags.indexOf(inputValue) === -1) {
- tags = [...tags, inputValue]
- }
- console.log(tags)
- Object.assign(this, {
- tags,
- inputVisible: false,
- inputValue: ''
- })
- },
-
fetchData () {
api('listVolumes', { 'listall': true, 'virtualmachineid': this.vm.id }).then(json => {
this.volumes = json.listvolumesresponse.volume
@@ -381,86 +262,10 @@ export default {
height: 100%;
min-height: 100%;
transition: 0.3s;
- .resource-details {
- text-align: center;
- margin-bottom: 24px;
- & > .avatar {
- margin: 0 auto;
- padding-top: 20px;
- width: 104px;
- //height: 104px;
- margin-bottom: 20px;
- border-radius: 50%;
- overflow: hidden;
- img {
- height: 100%;
- width: 100%;
- }
- }
- .username {
- color: rgba(0, 0, 0, 0.85);
- font-size: 20px;
- line-height: 28px;
- font-weight: 500;
- margin-bottom: 4px;
- }
- }
- .resource-center-detail {
- &__item {
- margin-bottom: 8px;
- padding-left: 12px;
- padding-right: 12px;
- position: relative;
-
- font-awesome-icon, .svg-inline--fa {
- width: 30px;
- }
- }
- .title {
- background-position: 0 0;
- }
- .group {
- background-position: 0 -22px;
- }
- .address {
- background-position: 0 -44px;
- }
- }
- .account-center-tags {
- .ant-tag {
- margin-bottom: 8px;
- }
- }
- .account-center-team {
- .members {
- a {
- display: block;
- margin: 12px 0;
- line-height: 24px;
- height: 24px;
- .member {
- font-size: 14px;
- color: rgba(0, 0, 0, 0.65);
- line-height: 24px;
- max-width: 100px;
- vertical-align: top;
- margin-left: 12px;
- transition: all 0.3s;
- display: inline-block;
- }
- &:hover {
- span {
- color: #1890ff;
- }
- }
- }
- }
- }
- .tagsTitle,
- .teamTitle {
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- margin-bottom: 12px;
+ .vm-detail {
+ margin-bottom: 8px;
+ margin-left: 10px;
+ margin-right: 10px;
}
}