2018-05-27 23:37:03 +01:00
|
|
|
<template>
|
2018-06-03 07:36:20 +01:00
|
|
|
<div>
|
|
|
|
<navigation></navigation>
|
2018-07-19 06:48:19 +01:00
|
|
|
<div v-if="loadingServerData">
|
|
|
|
<div class="mt-6 h-16">
|
|
|
|
<div class="spinner spinner-xl spinner-thick blue"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="m-6 flex flex-no-shrink rounded animate fadein" v-else>
|
2018-06-03 17:31:43 +01:00
|
|
|
<div class="sidebar border-grey-lighter flex-no-shrink w-1/3 max-w-xs">
|
2018-07-16 03:47:31 +01:00
|
|
|
<div class="mr-6">
|
|
|
|
<div class="p-6 text-center bg-white border rounded">
|
2018-07-19 06:48:19 +01:00
|
|
|
<h3 class="mb-2 text-blue font-medium">{{server.name}}</h3>
|
|
|
|
<span class="text-grey-dark text-sm">{{server.node}}</span>
|
2018-07-16 03:47:31 +01:00
|
|
|
</div>
|
|
|
|
<div class="mt-6 p-4 text-center bg-white border rounded">
|
|
|
|
<button class="btn btn-red uppercase text-xs px-4 py-2">Stop</button>
|
|
|
|
<button class="btn btn-secondary uppercase text-xs px-4 py-2">Restart</button>
|
|
|
|
<button class="btn btn-secondary uppercase text-xs px-4 py-2">Kill</button>
|
2018-05-27 23:37:03 +01:00
|
|
|
</div>
|
2018-07-16 03:47:31 +01:00
|
|
|
<div class="mt-6 p-4 bg-white border rounded">
|
|
|
|
<progress-bar title="Memory" percent="33"></progress-bar>
|
|
|
|
<progress-bar title="CPU" percent="80" class="mt-4"></progress-bar>
|
|
|
|
<progress-bar title="Disk" percent="97" class="mt-4"></progress-bar>
|
2018-06-03 07:36:20 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="sidenav">
|
2018-07-21 06:34:30 +01:00
|
|
|
<router-link :to="{ name: '', params: { id: this.$route.params.id } }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<terminal-icon style="height: 1em;"></terminal-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Console
|
|
|
|
</router-link>
|
|
|
|
<router-link :to="{ name: 'server-files' }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<folder-icon style="height: 1em;"></folder-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Files
|
|
|
|
</router-link>
|
|
|
|
<router-link :to="{ name: 'server-subusers' }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<users-icon style="height: 1em;"></users-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Subusers
|
|
|
|
</router-link>
|
|
|
|
<router-link :to="{ name: 'server-schedules' }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<calendar-icon style="height: 1em;"></calendar-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Schedules
|
|
|
|
</router-link>
|
|
|
|
<router-link :to="{ name: 'server-databases' }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<database-icon style="height: 1em;"></database-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Databases
|
|
|
|
</router-link>
|
|
|
|
<router-link :to="{ name: 'server-allocations' }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<globe-icon style="height: 1em;"></globe-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Allocations
|
|
|
|
</router-link>
|
|
|
|
<router-link :to="{ name: 'server-settings' }">
|
2018-06-11 20:06:12 +01:00
|
|
|
<settings-icon style="height: 1em;"></settings-icon>
|
2018-06-03 17:31:43 +01:00
|
|
|
Settings
|
|
|
|
</router-link>
|
2018-05-27 23:37:03 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-19 06:48:19 +01:00
|
|
|
<div class="main bg-white p-6 rounded border border-grey-lighter flex-grow">
|
|
|
|
<router-view></router-view>
|
2018-05-27 23:37:03 +01:00
|
|
|
</div>
|
2018-07-19 06:48:19 +01:00
|
|
|
</div>
|
2018-05-27 23:37:03 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-07-19 06:48:19 +01:00
|
|
|
import { TerminalIcon, FolderIcon, UsersIcon, CalendarIcon, DatabaseIcon, GlobeIcon, SettingsIcon } from 'vue-feather-icons'
|
2018-06-03 07:36:20 +01:00
|
|
|
import Navigation from '../core/Navigation';
|
2018-07-16 03:47:31 +01:00
|
|
|
import ProgressBar from './components/ProgressBar';
|
2018-07-19 06:48:19 +01:00
|
|
|
import {mapState} from 'vuex';
|
2018-07-21 06:34:30 +01:00
|
|
|
import { ConsolePage } from './subpages/ConsolePage';
|
2018-06-03 17:31:43 +01:00
|
|
|
|
2018-05-27 23:37:03 +01:00
|
|
|
export default {
|
2018-06-11 20:06:12 +01:00
|
|
|
components: {
|
2018-07-21 06:34:30 +01:00
|
|
|
ProgressBar, Navigation, ConsolePage, TerminalIcon, FolderIcon, UsersIcon,
|
2018-06-11 20:06:12 +01:00
|
|
|
CalendarIcon, DatabaseIcon, GlobeIcon, SettingsIcon
|
2018-07-19 06:48:19 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
...mapState('server', ['server']),
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted: function () {
|
|
|
|
this.loadServer();
|
|
|
|
},
|
|
|
|
|
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
loadingServerData: true,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
loadServer: function () {
|
|
|
|
this.$store.dispatch('server/getServer', {server: this.$route.params.id})
|
|
|
|
.then(() => {
|
|
|
|
this.loadingServerData = false;
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
console.error(err);
|
|
|
|
});
|
|
|
|
},
|
2018-06-11 20:06:12 +01:00
|
|
|
}
|
2018-05-27 23:37:03 +01:00
|
|
|
}
|
|
|
|
</script>
|