@@ -13,7 +28,7 @@ const props = defineProps({
-
+
All Systems Operational
diff --git a/components/Status.vue b/components/Status.vue
index 3edb82e952..315517733a 100644
--- a/components/Status.vue
+++ b/components/Status.vue
@@ -1,20 +1,12 @@
diff --git a/components/StatusGrid.vue b/components/StatusGrid.vue
index 6e2f4d02bc..a57a227c2e 100644
--- a/components/StatusGrid.vue
+++ b/components/StatusGrid.vue
@@ -1,5 +1,6 @@
+
+
+
+
+
+
+
+
+
diff --git a/utils/function.ts b/utils/function.ts
index 2a4251c24c..d90ca6a4ff 100644
--- a/utils/function.ts
+++ b/utils/function.ts
@@ -1,3 +1,33 @@
export const formatUptime = (data: number) => {
return ((data ?? 0) * 100).toFixed(2) + "%"
}
+
+export const isSameDate = (a: string | Date, b: string | Date) => {
+ let adt = new Date(a)
+ let bdt = new Date(b)
+ return adt.getDate() === bdt.getDate() && adt.getMonth() === bdt.getMonth() && adt.getFullYear() === bdt.getFullYear()
+}
+
+export const statusColor = (uptime: number, type = "bg") => {
+ if (uptime >= 0.75) {
+ return `${type}-purple-500`
+ } else if (uptime >= 0.5) {
+ return `${type}-yellow-400`
+ } else if (uptime >= 0) {
+ return `${type}-red-400`
+ } else {
+ return `${type}-gray-200`
+ }
+}
+
+export const statusString = (uptime: number, type = "bg") => {
+ if (uptime >= 0.75) {
+ return "success"
+ } else if (uptime >= 0.5) {
+ return "warning"
+ } else if (uptime >= 0) {
+ return "danger"
+ } else {
+ return "unknown"
+ }
+}
diff --git a/windi.config.ts b/windi.config.ts
index d9aad844f6..bffdf5cc63 100644
--- a/windi.config.ts
+++ b/windi.config.ts
@@ -2,5 +2,14 @@ import { defineConfig } from "windicss/helpers"
export default defineConfig({
plugins: [require("windicss/plugin/typography")],
- safelist: ["bg-purple-500", "bg-yellow-300", "bg-red-400", "bg-gray-200"],
+ safelist: [
+ "bg-purple-500",
+ "bg-yellow-400",
+ "bg-red-400",
+ "bg-gray-200",
+ "text-purple-500",
+ "text-yellow-400",
+ "text-red-400",
+ "text-gray-200",
+ ],
})