{{ $t("No Monitors, please") }} {{ $t("add one") }}
@@ -163,56 +163,6 @@ export default {
max-width: 15em;
}
-.list {
- &.scrollbar {
- min-height: calc(100vh - 240px);
- max-height: calc(100vh - 30px);
- overflow-y: auto;
- position: sticky;
- top: 10px;
- }
-
- .item {
- display: block;
- text-decoration: none;
- padding: 13px 15px 10px 15px;
- border-radius: 10px;
- transition: all ease-in-out 0.15s;
-
- &.disabled {
- opacity: 0.3;
- }
-
- .info {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- &:hover {
- background-color: $highlight-white;
- }
-
- &.active {
- background-color: #cdf8f4;
- }
- }
-}
-
-.dark {
- .list {
- .item {
- &:hover {
- background-color: $dark-bg2;
- }
-
- &.active {
- background-color: $dark-bg2;
- }
- }
- }
-}
-
.monitorItem {
width: 100%;
}
diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue
new file mode 100644
index 00000000..23d19e6c
--- /dev/null
+++ b/src/components/PublicGroupList.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("No Monitors") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ monitor.element.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/i18n.js b/src/i18n.js
index fe2612fb..6ef82006 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -43,6 +43,6 @@ export const i18n = createI18n({
locale: localStorage.locale || "en",
fallbackLocale: "en",
silentFallbackWarn: true,
- silentTranslationWarn: false,
+ silentTranslationWarn: true,
messages: languageList,
});
diff --git a/src/icon.js b/src/icon.js
index c824210b..67eb2a76 100644
--- a/src/icon.js
+++ b/src/icon.js
@@ -1,4 +1,8 @@
import { library } from "@fortawesome/fontawesome-svg-core";
+import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
+
+// Add Free Font Awesome Icons
+// https://fontawesome.com/v5.15/icons?d=gallery&p=2&s=solid&m=free
import {
faArrowAltCircleUp,
faCog,
@@ -12,13 +16,19 @@ import {
faSearch,
faTachometerAlt,
faTimes,
- faTrash
+ faTimesCircle,
+ faTrash,
+ faCheckCircle,
+ faStream,
+ faSave,
+ faExclamationCircle,
+ faBullhorn,
+ faArrowsAltV,
+ faUnlink,
+ faQuestionCircle,
+ faImages, faUpload,
} from "@fortawesome/free-solid-svg-icons";
-//import { fa } from '@fortawesome/free-regular-svg-icons'
-import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
-// Add Free Font Awesome Icons here
-// https://fontawesome.com/v5.15/icons?d=gallery&p=2&s=solid&m=free
library.add(
faArrowAltCircleUp,
faCog,
@@ -32,7 +42,18 @@ library.add(
faSearch,
faTachometerAlt,
faTimes,
+ faTimesCircle,
faTrash,
+ faCheckCircle,
+ faStream,
+ faSave,
+ faExclamationCircle,
+ faBullhorn,
+ faArrowsAltV,
+ faUnlink,
+ faQuestionCircle,
+ faImages,
+ faUpload,
);
export { FontAwesomeIcon };
diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue
index 467ae53a..2342ed1a 100644
--- a/src/layouts/Layout.vue
+++ b/src/layouts/Layout.vue
@@ -18,6 +18,11 @@
+ -
+
+ {{ $t("Status Page") }}
+
+
-
{{ $t("Dashboard") }}
@@ -81,7 +86,7 @@ export default {
},
data() {
- return {}
+ return {};
},
computed: {
@@ -105,29 +110,29 @@ export default {
},
watch: {
- $route(to, from) {
- this.init();
- },
+
},
mounted() {
- this.init();
+
},
methods: {
- init() {
- if (this.$route.name === "root") {
- this.$router.push("/dashboard")
- }
- },
+
},
-}
+};
diff --git a/src/router.js b/src/router.js
index 66d1bc93..8fc53395 100644
--- a/src/router.js
+++ b/src/router.js
@@ -8,20 +8,25 @@ import EditMonitor from "./pages/EditMonitor.vue";
import List from "./pages/List.vue";
import Settings from "./pages/Settings.vue";
import Setup from "./pages/Setup.vue";
+import StatusPage from "./pages/StatusPage.vue";
+import Entry from "./pages/Entry.vue";
const routes = [
{
path: "/",
+ component: Entry,
+ },
+ {
+ path: "/dashboard",
component: Layout,
children: [
{
- name: "root",
path: "",
component: Dashboard,
children: [
{
name: "DashboardHome",
- path: "/dashboard",
+ path: "",
component: DashboardHome,
children: [
{
@@ -54,15 +59,17 @@ const routes = [
},
],
},
-
],
-
},
{
path: "/setup",
component: Setup,
},
-]
+ {
+ path: "/status-page",
+ component: StatusPage,
+ },
+];
export const router = createRouter({
linkActiveClass: "active",
diff --git a/src/util-frontend.js b/src/util-frontend.js
index 333a12fb..412ec920 100644
--- a/src/util-frontend.js
+++ b/src/util-frontend.js
@@ -3,8 +3,8 @@ import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
import timezones from "timezones-list";
-dayjs.extend(utc)
-dayjs.extend(timezone)
+dayjs.extend(utc);
+dayjs.extend(timezone);
function getTimezoneOffset(timeZone) {
const now = new Date();
@@ -28,7 +28,7 @@ export function timezoneList() {
name: `(UTC${display}) ${timezone.tzCode}`,
value: timezone.tzCode,
time: getTimezoneOffset(timezone.tzCode),
- })
+ });
} catch (e) {
console.log("Skip Timezone: " + timezone.tzCode);
}
@@ -44,7 +44,7 @@ export function timezoneList() {
}
return 0;
- })
+ });
return result;
}
diff --git a/src/util.js b/src/util.js
index d68c20e5..7e60b312 100644
--- a/src/util.js
+++ b/src/util.js
@@ -1,98 +1,104 @@
-"use strict";
-// Common Util for frontend and backend
-// Backend uses the compiled file util.js
-// Frontend uses util.ts
-// Need to run "tsc" to compile if there are any changes.
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
-const _dayjs = require("dayjs");
-const dayjs = _dayjs;
-exports.isDev = process.env.NODE_ENV === "development";
-exports.appName = "Uptime Kuma";
-exports.DOWN = 0;
-exports.UP = 1;
-exports.PENDING = 2;
-function flipStatus(s) {
- if (s === exports.UP) {
- return exports.DOWN;
- }
- if (s === exports.DOWN) {
- return exports.UP;
- }
- return s;
-}
-exports.flipStatus = flipStatus;
-function sleep(ms) {
- return new Promise(resolve => setTimeout(resolve, ms));
-}
-exports.sleep = sleep;
-/**
- * PHP's ucfirst
- * @param str
- */
-function ucfirst(str) {
- if (!str) {
- return str;
- }
- const firstLetter = str.substr(0, 1);
- return firstLetter.toUpperCase() + str.substr(1);
-}
-exports.ucfirst = ucfirst;
-function debug(msg) {
- if (exports.isDev) {
- console.log(msg);
- }
-}
-exports.debug = debug;
-function polyfill() {
- /**
- * String.prototype.replaceAll() polyfill
- * https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/
- * @author Chris Ferdinandi
- * @license MIT
- */
- if (!String.prototype.replaceAll) {
- String.prototype.replaceAll = function (str, newStr) {
- // If a regex pattern
- if (Object.prototype.toString.call(str).toLowerCase() === "[object regexp]") {
- return this.replace(str, newStr);
- }
- // If a string
- return this.replace(new RegExp(str, "g"), newStr);
- };
- }
-}
-exports.polyfill = polyfill;
-class TimeLogger {
- constructor() {
- this.startTime = dayjs().valueOf();
- }
- print(name) {
- if (exports.isDev) {
- console.log(name + ": " + (dayjs().valueOf() - this.startTime) + "ms");
- }
- }
-}
-exports.TimeLogger = TimeLogger;
-/**
- * Returns a random number between min (inclusive) and max (exclusive)
- */
-function getRandomArbitrary(min, max) {
- return Math.random() * (max - min) + min;
-}
-exports.getRandomArbitrary = getRandomArbitrary;
-/**
- * From: https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range
- *
- * Returns a random integer between min (inclusive) and max (inclusive).
- * The value is no lower than min (or the next integer greater than min
- * if min isn't an integer) and no greater than max (or the next integer
- * lower than max if max isn't an integer).
- * Using Math.round() will give you a non-uniform distribution!
- */
-function getRandomInt(min, max) {
- min = Math.ceil(min);
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min + 1)) + min;
-}
-exports.getRandomInt = getRandomInt;
+"use strict";
+// Common Util for frontend and backend
+//
+// DOT NOT MODIFY util.js!
+// Need to run "tsc" to compile if there are any changes.
+//
+// Backend uses the compiled file util.js
+// Frontend uses util.ts
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.STATUS_PAGE_PARTIAL_DOWN = exports.STATUS_PAGE_ALL_UP = exports.STATUS_PAGE_ALL_DOWN = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
+const _dayjs = require("dayjs");
+const dayjs = _dayjs;
+exports.isDev = process.env.NODE_ENV === "development";
+exports.appName = "Uptime Kuma";
+exports.DOWN = 0;
+exports.UP = 1;
+exports.PENDING = 2;
+exports.STATUS_PAGE_ALL_DOWN = 0;
+exports.STATUS_PAGE_ALL_UP = 1;
+exports.STATUS_PAGE_PARTIAL_DOWN = 2;
+function flipStatus(s) {
+ if (s === exports.UP) {
+ return exports.DOWN;
+ }
+ if (s === exports.DOWN) {
+ return exports.UP;
+ }
+ return s;
+}
+exports.flipStatus = flipStatus;
+function sleep(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+}
+exports.sleep = sleep;
+/**
+ * PHP's ucfirst
+ * @param str
+ */
+function ucfirst(str) {
+ if (!str) {
+ return str;
+ }
+ const firstLetter = str.substr(0, 1);
+ return firstLetter.toUpperCase() + str.substr(1);
+}
+exports.ucfirst = ucfirst;
+function debug(msg) {
+ if (exports.isDev) {
+ console.log(msg);
+ }
+}
+exports.debug = debug;
+function polyfill() {
+ /**
+ * String.prototype.replaceAll() polyfill
+ * https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/
+ * @author Chris Ferdinandi
+ * @license MIT
+ */
+ if (!String.prototype.replaceAll) {
+ String.prototype.replaceAll = function (str, newStr) {
+ // If a regex pattern
+ if (Object.prototype.toString.call(str).toLowerCase() === "[object regexp]") {
+ return this.replace(str, newStr);
+ }
+ // If a string
+ return this.replace(new RegExp(str, "g"), newStr);
+ };
+ }
+}
+exports.polyfill = polyfill;
+class TimeLogger {
+ constructor() {
+ this.startTime = dayjs().valueOf();
+ }
+ print(name) {
+ if (exports.isDev) {
+ console.log(name + ": " + (dayjs().valueOf() - this.startTime) + "ms");
+ }
+ }
+}
+exports.TimeLogger = TimeLogger;
+/**
+ * Returns a random number between min (inclusive) and max (exclusive)
+ */
+function getRandomArbitrary(min, max) {
+ return Math.random() * (max - min) + min;
+}
+exports.getRandomArbitrary = getRandomArbitrary;
+/**
+ * From: https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range
+ *
+ * Returns a random integer between min (inclusive) and max (inclusive).
+ * The value is no lower than min (or the next integer greater than min
+ * if min isn't an integer) and no greater than max (or the next integer
+ * lower than max if max isn't an integer).
+ * Using Math.round() will give you a non-uniform distribution!
+ */
+function getRandomInt(min, max) {
+ min = Math.ceil(min);
+ max = Math.floor(max);
+ return Math.floor(Math.random() * (max - min + 1)) + min;
+}
+exports.getRandomInt = getRandomInt;
diff --git a/src/util.ts b/src/util.ts
index dafa7d3f..4d68ab4e 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1,7 +1,10 @@
// Common Util for frontend and backend
+//
+// DOT NOT MODIFY util.js!
+// Need to run "tsc" to compile if there are any changes.
+//
// Backend uses the compiled file util.js
// Frontend uses util.ts
-// Need to run "tsc" to compile if there are any changes.
import * as _dayjs from "dayjs";
const dayjs = _dayjs;
@@ -12,6 +15,11 @@ export const DOWN = 0;
export const UP = 1;
export const PENDING = 2;
+export const STATUS_PAGE_ALL_DOWN = 0;
+export const STATUS_PAGE_ALL_UP = 1;
+export const STATUS_PAGE_PARTIAL_DOWN = 2;
+
+
export function flipStatus(s: number) {
if (s === UP) {
return DOWN;