2018-03-03 06:32:58 +00:00
|
|
|
<template lang='pug'>
|
2018-09-30 03:30:20 +00:00
|
|
|
v-container(fluid, grid-list-lg)
|
2018-03-03 06:32:58 +00:00
|
|
|
v-layout(row, wrap)
|
|
|
|
v-flex(xs12)
|
2018-09-30 03:30:20 +00:00
|
|
|
.admin-header
|
2019-03-17 17:39:58 +00:00
|
|
|
img.animated.fadeInUp(src='/svg/icon-tune.svg', alt='System Info', style='width: 80px;')
|
2018-09-30 03:30:20 +00:00
|
|
|
.admin-header-title
|
2019-03-17 17:39:58 +00:00
|
|
|
.headline.primary--text.animated.fadeInLeft {{ $t('admin:system.title') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
.subtitle-1.grey--text.animated.fadeInLeft.wait-p2s {{ $t('admin:system.subtitle') }}
|
2018-03-03 06:32:58 +00:00
|
|
|
v-layout.mt-3(row wrap)
|
|
|
|
v-flex(lg6 xs12)
|
2019-03-17 17:39:58 +00:00
|
|
|
v-card.animated.fadeInUp
|
2019-08-10 16:18:14 +00:00
|
|
|
v-btn.animated.fadeInLeft.wait-p2s.btn-animate-rotate(fab, absolute, :right='!$vuetify.rtl', :left='$vuetify.rtl', top, small, light, @click='refresh'): v-icon(color='grey') mdi-refresh
|
2019-08-03 04:48:55 +00:00
|
|
|
v-subheader Wiki.js
|
2018-03-03 06:32:58 +00:00
|
|
|
v-list(two-line, dense)
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue.white--text mdi-application-export
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.currentVersion') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.currentVersion }}
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue.white--text mdi-inbox-arrow-up
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.latestVersion') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.latestVersion }}
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-action
|
|
|
|
v-list-item-action-text {{ $t('admin:system.published') }} {{ info.latestVersionReleaseDate | moment('from') }}
|
2018-03-03 06:32:58 +00:00
|
|
|
|
2019-08-25 18:23:56 +00:00
|
|
|
v-card.mt-4.animated.fadeInUp.wait-p2s
|
2019-08-03 04:48:55 +00:00
|
|
|
v-subheader {{ $t('admin:system.hostInfo') }}
|
|
|
|
v-list(two-line, dense)
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2018-12-30 02:30:51 +00:00
|
|
|
v-avatar.blue-grey(size='40')
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon(color='white') {{platformLogo}}
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.os') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ (info.platform === 'docker') ? 'Docker Container (Linux)' : info.operatingSystem }}
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue-grey.white--text mdi-desktop-classic
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.hostname') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.hostname }}
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue-grey.white--text mdi-cpu-64-bit
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.cpuCores') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.cpuCores }}
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue-grey.white--text mdi-memory
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.totalRAM') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.ramTotal }}
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue-grey.white--text mdi-iframe-outline
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.workingDirectory') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.workingDirectory }}
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon.blue-grey.white--text mdi-card-bulleted-settings-outline
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ $t('admin:system.configFile') }}
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.configFile }}
|
2018-03-03 06:32:58 +00:00
|
|
|
|
|
|
|
v-flex(lg6 xs12)
|
2019-03-17 17:39:58 +00:00
|
|
|
v-card.pb-3.animated.fadeInUp.wait-p4s
|
2019-08-03 04:48:55 +00:00
|
|
|
v-subheader Node.js
|
2018-03-03 06:32:58 +00:00
|
|
|
v-list(dense)
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2018-03-03 06:32:58 +00:00
|
|
|
v-avatar.light-green(size='40')
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon(color='white') mdi-nodejs
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title {{ info.nodeVersion }}
|
2018-03-03 06:32:58 +00:00
|
|
|
|
2019-08-03 04:48:55 +00:00
|
|
|
v-divider.mt-3
|
|
|
|
v-subheader {{ info.dbType }}
|
|
|
|
v-list(dense)
|
2019-08-25 02:19:35 +00:00
|
|
|
v-list-item
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-avatar
|
2018-03-03 06:32:58 +00:00
|
|
|
v-avatar.indigo.darken-1(size='40')
|
2019-08-03 04:48:55 +00:00
|
|
|
v-icon(color='white') mdi-database
|
2019-07-29 04:50:03 +00:00
|
|
|
v-list-item-content
|
|
|
|
v-list-item-title(v-html='dbVersion')
|
2019-08-03 04:48:55 +00:00
|
|
|
v-list-item-subtitle {{ info.dbHost }}
|
2019-05-27 04:28:12 +00:00
|
|
|
|
2019-08-03 04:48:55 +00:00
|
|
|
v-alert.mt-3.mx-4(:value='isDbLimited', color='deep-orange darken-2', icon='mdi-alert', dark) {{ $t('admin:system.dbPartialSupport') }}
|
2018-03-03 06:32:58 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-09-08 19:49:36 +00:00
|
|
|
import _ from 'lodash'
|
|
|
|
|
2018-06-25 06:44:40 +00:00
|
|
|
import systemInfoQuery from 'gql/admin/system/system-query-info.gql'
|
2018-03-25 02:35:47 +00:00
|
|
|
|
2018-03-03 06:32:58 +00:00
|
|
|
export default {
|
|
|
|
data() {
|
2018-03-18 04:34:32 +00:00
|
|
|
return {
|
2018-03-25 02:35:47 +00:00
|
|
|
info: {}
|
2018-03-18 04:34:32 +00:00
|
|
|
}
|
|
|
|
},
|
2018-09-08 19:49:36 +00:00
|
|
|
computed: {
|
|
|
|
dbVersion() {
|
|
|
|
return _.get(this.info, 'dbVersion', '').replace(/(?:\r\n|\r|\n)/g, '<br />')
|
2018-12-30 02:30:51 +00:00
|
|
|
},
|
|
|
|
platformLogo() {
|
|
|
|
switch (this.info.platform) {
|
|
|
|
case 'docker':
|
2019-08-03 04:48:55 +00:00
|
|
|
return 'mdi-docker'
|
2018-12-30 02:30:51 +00:00
|
|
|
case 'darwin':
|
2019-08-03 04:48:55 +00:00
|
|
|
return 'mdi-apple'
|
2018-12-30 02:30:51 +00:00
|
|
|
case 'linux':
|
2019-08-03 04:48:55 +00:00
|
|
|
if (this.info.operatingSystem.indexOf('Ubuntu')) {
|
|
|
|
return 'mdi-ubuntu'
|
|
|
|
} else {
|
|
|
|
return 'mdi-linux'
|
|
|
|
}
|
2018-12-30 02:30:51 +00:00
|
|
|
case 'win32':
|
2019-08-03 04:48:55 +00:00
|
|
|
return 'mdi-windows'
|
2018-12-30 02:30:51 +00:00
|
|
|
default:
|
|
|
|
return ''
|
|
|
|
}
|
2019-05-27 04:28:12 +00:00
|
|
|
},
|
|
|
|
isDbLimited() {
|
|
|
|
return this.info.dbType === 'MySQL' && this.dbVersion.indexOf('5.') === 0
|
2018-09-08 19:49:36 +00:00
|
|
|
}
|
|
|
|
},
|
2018-03-18 04:34:32 +00:00
|
|
|
methods: {
|
|
|
|
async refresh() {
|
|
|
|
await this.$apollo.queries.info.refetch()
|
2018-03-25 02:35:47 +00:00
|
|
|
this.$store.commit('showNotification', {
|
2019-06-05 03:39:30 +00:00
|
|
|
message: this.$t('admin:system.refreshSuccess'),
|
2018-03-25 02:35:47 +00:00
|
|
|
style: 'success',
|
|
|
|
icon: 'cached'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
apollo: {
|
|
|
|
info: {
|
|
|
|
query: systemInfoQuery,
|
2018-06-04 04:41:29 +00:00
|
|
|
fetchPolicy: 'network-only',
|
2018-03-25 02:35:47 +00:00
|
|
|
update: (data) => data.system.info,
|
|
|
|
watchLoading (isLoading) {
|
|
|
|
this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-system-refresh')
|
|
|
|
}
|
2018-03-18 04:34:32 +00:00
|
|
|
}
|
2018-03-03 06:32:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
|
|
|
|
|
|
</style>
|