Add a new dashboard page.
This commit is contained in:
parent
89150e1164
commit
fd24b1898e
133 changed files with 17303 additions and 11112 deletions
|
@ -1,94 +1,23 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="/dashboard">
|
||||
<img
|
||||
src="./assets/images/traefik_logo@3x.svg"
|
||||
alt="Traefik Webui"
|
||||
width="112"
|
||||
height="28"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<a
|
||||
:class="{ 'is-active': isActive }"
|
||||
role="button"
|
||||
class="navbar-burger burger"
|
||||
aria-label="menu"
|
||||
aria-expanded="false"
|
||||
data-target="navbarBasicExample"
|
||||
@click="toggle"
|
||||
>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div
|
||||
:class="{ 'is-active': isActive }"
|
||||
class="navbar-menu"
|
||||
v-if="version.Version"
|
||||
>
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item" :href="documentationUrl">
|
||||
Documentation
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item">Version: {{ version.Version }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="q-app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { APP } from './_helpers/APP'
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
data: () => ({
|
||||
version: {},
|
||||
isActive: false
|
||||
}),
|
||||
computed: {
|
||||
parsedVersion() {
|
||||
if (this.version.Version === "dev") {
|
||||
return "master";
|
||||
} else {
|
||||
const matches = this.version.Version.match(/^(v?\d+\.\d+)/);
|
||||
return matches ? matches[1] : "master";
|
||||
}
|
||||
},
|
||||
documentationUrl() {
|
||||
return `https://docs.traefik.io/${this.parsedVersion}`;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchVersion();
|
||||
},
|
||||
methods: {
|
||||
fetchVersion() {
|
||||
return fetch("/api/version")
|
||||
.then(response => response.json())
|
||||
.then(response => (this.version = response));
|
||||
},
|
||||
toggle() {
|
||||
this.isActive = !this.isActive;
|
||||
}
|
||||
name: 'App',
|
||||
beforeCreate () {
|
||||
// Set vue instance
|
||||
APP.vue = () => this.$root
|
||||
|
||||
// debug
|
||||
console.log('Quasar -> ', this.$q.version)
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass">
|
||||
|
||||
@import 'styles/typography'
|
||||
@import 'styles/colors'
|
||||
|
||||
html
|
||||
font-family: $open-sans
|
||||
height: 100%
|
||||
background: $background
|
||||
<style>
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue