summaryrefslogtreecommitdiffstats
path: root/src/pages/Dashboard.vue
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-11-26 09:28:28 +0100
committerDaniel Baumann <daniel@debian.org>2024-11-26 12:25:58 +0100
commita1882b67c41fe9901a0cd8059b5cc78a5beadec0 (patch)
tree2a24507c67aa99a15416707b2f7e645142230ed8 /src/pages/Dashboard.vue
parentInitial commit. (diff)
downloaduptime-kuma-a1882b67c41fe9901a0cd8059b5cc78a5beadec0.tar.xz
uptime-kuma-a1882b67c41fe9901a0cd8059b5cc78a5beadec0.zip
Adding upstream version 2.0.0~beta.0+dfsg.upstream/2.0.0_beta.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'src/pages/Dashboard.vue')
-rw-r--r--src/pages/Dashboard.vue42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue
new file mode 100644
index 0000000..9a65711
--- /dev/null
+++ b/src/pages/Dashboard.vue
@@ -0,0 +1,42 @@
+<template>
+ <div class="container-fluid">
+ <div class="row">
+ <div v-if="!$root.isMobile" class="col-12 col-md-5 col-xl-4">
+ <div>
+ <router-link to="/add" class="btn btn-primary mb-3"><font-awesome-icon icon="plus" /> {{ $t("Add New Monitor") }}</router-link>
+ </div>
+ <MonitorList :scrollbar="true" />
+ </div>
+
+ <div ref="container" class="col-12 col-md-7 col-xl-8 mb-3">
+ <!-- Add :key to disable vue router re-use the same component -->
+ <router-view :key="$route.fullPath" :calculatedHeight="height" />
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+
+import MonitorList from "../components/MonitorList.vue";
+
+export default {
+ components: {
+ MonitorList,
+ },
+ data() {
+ return {
+ height: 0
+ };
+ },
+ mounted() {
+ this.height = this.$refs.container.offsetHeight;
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.container-fluid {
+ width: 98%;
+}
+</style>