feat: Host Information on System Info page

This commit is contained in:
NGPixel
2017-07-02 14:03:49 -04:00
committed by Nicolas Giard
parent fc42fd21e5
commit 3752e95b92
4 changed files with 52 additions and 25 deletions

View File

@@ -9,30 +9,39 @@ block adminContent
.form-sections
section
img(src='/images/logo.png', style={width:'200px', float:'right'})
label.label= t('admin:settings.systemversion')
label.label= t('admin:system.systemversion')
.section-block
p #{t('admin:settings.currentversion')}: #[strong= sysversion.current]
p #{t('admin:system.currentversion')}: #[strong= sysversion.current]
if sysversion.latest
p #{t('admin:settings.latestversion')}: #[strong= sysversion.latest] #[em (Published #{moment(sysversion.latestPublishedAt).fromNow()})]
p #{t('admin:system.latestversion')}: #[strong= sysversion.latest] #[em (Published #{moment(sysversion.latestPublishedAt).fromNow()})]
p
if sysversion.current !== sysversion.latest
button.button.is-deep-orange(@click='$store.dispatch("modalUpgradeSystem/open", { mode: "upgrade"})')= t('admin:settings.upgrade')
button.button.is-deep-orange(@click='$store.dispatch("modalUpgradeSystem/open", { mode: "upgrade"})')= t('admin:system.upgrade')
else
button.button.is-disabled= t('admin:settings.upgrade')
button.button.is-deep-orange.is-outlined(@click='$store.dispatch("modalUpgradeSystem/open", { mode: "reinstall"})')= t('admin:settings.reinstall')
button.button.is-disabled= t('admin:system.upgrade')
button.button.is-deep-orange.is-outlined(@click='$store.dispatch("modalUpgradeSystem/open", { mode: "reinstall"})')= t('admin:system.reinstall')
else
p: em= t('admin:settings.versioncheckfailed')
p: em= t('admin:system.versioncheckfailed')
section
label.label= t('admin:settings.administrativetools')
label.label= t('admin:system.hostinfo')
.section-block
h6 #{t('admin:settings.flushcache')}:
p.is-small= t('admin:settings.flushcachetext')
p: button.button.is-teal.is-outlined(v-on:click='flushcache')= t('admin:settings.flushcachebtn')
h6 #{t('admin:settings.resetaccounts')}:
p.is-small= t('admin:settings.resetaccountstext')
p: button.button.is-teal.is-outlined(v-on:click='resetaccounts')= t('admin:settings.resetaccountsbtn')
h6 #{t('admin:settings.flushsessions')}:
p.is-small= t('admin:settings.flushsessionstext')
p: button.button.is-teal.is-outlined(v-on:click='flushsessions')= t('admin:settings.flushsessionsbtn')
p #{t('admin:system.os')}: #[strong= hostInfo.os]
p #{t('admin:system.nodeversion')}: #[strong= hostInfo.nodeversion]
p #{t('admin:system.hostname')}: #[strong= hostInfo.hostname]
p #{t('admin:system.cores')}: #[strong= hostInfo.cpus.length]
p #{t('admin:system.totalmem')}: #[strong= hostInfo.totalmem]
p #{t('admin:system.cwd')}: #[strong= hostInfo.cwd]
section
label.label= t('admin:system.administrativetools')
.section-block
h6 #{t('admin:system.flushcache')}:
p.is-small= t('admin:system.flushcachetext')
p: button.button.is-teal.is-outlined(v-on:click='flushcache')= t('admin:system.flushcachebtn')
h6 #{t('admin:system.resetaccounts')}:
p.is-small= t('admin:system.resetaccountstext')
p: button.button.is-teal.is-outlined(v-on:click='resetaccounts')= t('admin:system.resetaccountsbtn')
h6 #{t('admin:system.flushsessions')}:
p.is-small= t('admin:system.flushsessionstext')
p: button.button.is-teal.is-outlined(v-on:click='flushsessions')= t('admin:system.flushsessionsbtn')
modal-upgrade-system