-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hpq
committed
Sep 4, 2018
1 parent
f8ba34b
commit 10d0778
Showing
6 changed files
with
123 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<v-toolbar app fixed clipped-left color="teal lighten-1" dark> | ||
<v-toolbar-side-icon id="side-btn" @click.stop="drawer = !drawer"></v-toolbar-side-icon> | ||
<v-spacer></v-spacer> | ||
<v-toolbar-title class="hdr-text" @click="aboutDialog = true" :class="{uif: updateInfoFailed}">{{activeServer}}</v-toolbar-title> | ||
<v-toolbar-title class="hdr-text" @click="serverDialog = true" :class="{uif: updateInfoFailed}">{{ hostname || activeServer}}</v-toolbar-title> | ||
|
||
<v-spacer></v-spacer> | ||
|
||
|
@@ -28,34 +28,43 @@ | |
<div>© [email protected]</div> | ||
</v-footer> --> | ||
|
||
<about v-model="aboutDialog" /> | ||
<!--<about v-model="aboutDialog" />--> | ||
<v-dialog v-model="serverDialog" width='400px'> | ||
<v-card> | ||
<server-info :hostname="hostname" :server="activeServer"></server-info> | ||
<v-card-actions><confirm-btns noLeft rightPrimary @clickRight="serverDialog = false"></confirm-btns></v-card-actions> | ||
</v-card> | ||
</v-dialog> | ||
</v-app> | ||
</template> | ||
|
||
<script> | ||
import cm from '../js/common' | ||
import DrawerLeft from '@/components/DrawerLeft' | ||
import more from '@/components/more' | ||
import about from '@/components/common/about' | ||
import serverInfo from '@/components/header/serverInfo' | ||
import confirmBtns from '@/components/common/confirmBtns' | ||
export default { | ||
name: 'Layout', | ||
components: { | ||
DrawerLeft, | ||
more, | ||
about, | ||
serverInfo, | ||
confirmBtns, | ||
}, | ||
data () { | ||
return { | ||
drawer: false, | ||
infoAll: null, | ||
aboutDialog: false, | ||
serverDialog: false, | ||
activeServer: cm.sapi.getActiveServer(), | ||
hostname: null, | ||
updateInfoFailed: false, | ||
} | ||
}, | ||
beforeCreate () { | ||
cm.sapi.getActiveHostname(this); | ||
}, | ||
created () { | ||
cm.bus.$on('changeContent', this.changeContentHandler); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div> | ||
<v-card-title class="headline"> {{ hostname || server }}</v-card-title> | ||
<v-card-text> {{ server }} </v-card-text> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'serverInfo', | ||
props: ['hostname', 'server'], | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
const ver = "v1" | ||
|
||
let path = { | ||
infoAll: "/" + ver + "/info/all", | ||
infoDisk: "/" + ver + "/info/disk", | ||
|
||
processAll: "/" + ver + "/process/all", | ||
processDetails: "/" + ver + "/process/details", | ||
|
||
sysInfoAll: "/" + ver + "/sysInfo/all", | ||
sysInfoHostname: "/" + ver + "/sysInfo/hostname", | ||
} | ||
|
||
var activeServer = localStorage.getItem("activeServer") | ||
if(!activeServer) { | ||
activeServer = "" | ||
} | ||
|
||
const infoAll = activeServer + "/" + ver + "/info/all" | ||
const infoDisk = activeServer + "/" + ver + "/info/disk" | ||
const infoAll = activeServer + path.infoAll; | ||
const infoDisk = activeServer + path.infoDisk; | ||
|
||
const processAll = activeServer + "/" + ver + "/process/all" | ||
const processDetails = activeServer + "/" + ver + "/process/details" | ||
const processAll = activeServer + path.processAll; | ||
const processDetails = activeServer + path.processDetails; | ||
|
||
const sysInfoAll = activeServer + "/" + ver + "/sysInfo/all" | ||
const sysInfoAll = activeServer + path.sysInfoAll; | ||
const sysInfoHostname = activeServer + path.sysInfoHostname; | ||
|
||
exports.path = path; | ||
|
||
exports.infoAll = infoAll; | ||
exports.infoDisk = infoDisk; | ||
|
||
exports.processAll = processAll; | ||
exports.processDetails = processDetails; | ||
|
||
exports.sysInfoAll = sysInfoAll; | ||
exports.sysInfoAll = sysInfoAll; | ||
exports.sysInfoHostname = sysInfoHostname; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters