From 6b2930ab8d52c70cf6a1dd8bb85fcd5d86b17233 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 10 Jun 2023 23:30:44 -0700
Subject: [PATCH] Revert "Added optional boxed styling for information widgets
and refactored information widgets"
---
src/components/widgets/datetime/datetime.jsx | 21 +-
src/components/widgets/glances/glances.jsx | 262 ++++++++++++------
src/components/widgets/greeting/greeting.jsx | 11 +-
.../widgets/kubernetes/kubernetes.jsx | 38 ++-
src/components/widgets/kubernetes/node.jsx | 11 +-
.../widgets/kubernetes/usage-bar.jsx | 12 +
src/components/widgets/logo/logo.jsx | 11 +-
src/components/widgets/longhorn/longhorn.jsx | 32 ++-
src/components/widgets/longhorn/node.jsx | 38 ++-
.../widgets/openmeteo/openmeteo.jsx | 103 ++++---
.../widgets/openweathermap/weather.jsx | 99 +++++--
src/components/widgets/resources/cpu.jsx | 82 ++++--
src/components/widgets/resources/cputemp.jsx | 90 ++++--
src/components/widgets/resources/disk.jsx | 67 +++--
src/components/widgets/resources/memory.jsx | 75 +++--
.../widgets/resources/resources.jsx | 11 +-
src/components/widgets/resources/uptime.jsx | 44 ++-
src/components/widgets/search/search.jsx | 162 ++++++-----
.../widgets/unifi_console/unifi_console.jsx | 45 +--
src/components/widgets/weather/weather.jsx | 104 ++++---
src/components/widgets/widget.jsx | 4 +-
src/components/widgets/widget/container.jsx | 42 ---
.../widgets/widget/container_button.jsx | 10 -
.../widgets/widget/container_form.jsx | 10 -
.../widgets/widget/container_link.jsx | 10 -
src/components/widgets/widget/error.jsx | 15 -
.../widgets/widget/primary_text.jsx | 5 -
src/components/widgets/widget/raw.jsx | 7 -
src/components/widgets/widget/resource.jsx | 22 --
src/components/widgets/widget/resources.jsx | 15 -
.../widgets/widget/secondary_text.jsx | 5 -
src/components/widgets/widget/widget_icon.jsx | 18 --
.../widgets/widget/widget_label.jsx | 3 -
src/pages/api/widgets/longhorn.js | 2 +-
src/pages/index.jsx | 10 +-
35 files changed, 854 insertions(+), 642 deletions(-)
create mode 100644 src/components/widgets/kubernetes/usage-bar.jsx
delete mode 100644 src/components/widgets/widget/container.jsx
delete mode 100644 src/components/widgets/widget/container_button.jsx
delete mode 100644 src/components/widgets/widget/container_form.jsx
delete mode 100644 src/components/widgets/widget/container_link.jsx
delete mode 100644 src/components/widgets/widget/error.jsx
delete mode 100644 src/components/widgets/widget/primary_text.jsx
delete mode 100644 src/components/widgets/widget/raw.jsx
delete mode 100644 src/components/widgets/widget/resource.jsx
delete mode 100644 src/components/widgets/widget/resources.jsx
delete mode 100644 src/components/widgets/widget/secondary_text.jsx
delete mode 100644 src/components/widgets/widget/widget_icon.jsx
delete mode 100644 src/components/widgets/widget/widget_label.jsx
diff --git a/src/components/widgets/datetime/datetime.jsx b/src/components/widgets/datetime/datetime.jsx
index 454d004dc..869834736 100644
--- a/src/components/widgets/datetime/datetime.jsx
+++ b/src/components/widgets/datetime/datetime.jsx
@@ -1,9 +1,6 @@
import { useState, useEffect } from "react";
import { useTranslation } from "next-i18next";
-import Container from "../widget/container";
-import Raw from "../widget/raw";
-
const textSizes = {
"4xl": "text-4xl",
"3xl": "text-3xl",
@@ -20,7 +17,7 @@ export default function DateTime({ options }) {
const { i18n } = useTranslation();
const [date, setDate] = useState("");
const dateLocale = locale ?? i18n.language;
-
+
useEffect(() => {
const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format });
const interval = setInterval(() => {
@@ -30,14 +27,12 @@ export default function DateTime({ options }) {
}, [date, setDate, dateLocale, format]);
return (
-