From ac7bcee6c24d903509e7251c44a2d913202a3c0b Mon Sep 17 00:00:00 2001
From: mabasian <54101509+mabasian@users.noreply.github.com>
Date: Thu, 29 Aug 2024 10:26:17 +0200
Subject: [PATCH 1/3] FIX: Correct alarm filtering logic in alert boxes (#2017)
* FIX: update alarm filter in node page
* FIX: update alarm filter in control page
---
launcher/public/output.css | 14 +++++
.../components/UI/node-page/NodeScreen.vue | 63 ++++---------------
.../node-page/components/alert/NodeAlert.vue | 35 ++++++-----
.../components/alert/NodeTutorial.vue | 4 +-
.../UI/the-control/ControlAlert.vue | 24 +++----
5 files changed, 61 insertions(+), 79 deletions(-)
diff --git a/launcher/public/output.css b/launcher/public/output.css
index 6ad9d34d79..913994ac7e 100755
--- a/launcher/public/output.css
+++ b/launcher/public/output.css
@@ -1800,6 +1800,10 @@ video {
height: 50px;
}
+.h-\[53px\]{
+ height: 53px;
+}
+
.h-\[554px\]{
height: 554px;
}
@@ -5013,6 +5017,11 @@ video {
--tw-shadow: var(--tw-shadow-colored);
}
+.shadow-zinc-700{
+ --tw-shadow-color: #3f3f46;
+ --tw-shadow: var(--tw-shadow-colored);
+}
+
.shadow-zinc-800{
--tw-shadow-color: #27272a;
--tw-shadow: var(--tw-shadow-colored);
@@ -5617,6 +5626,11 @@ html body {
background-color: rgb(43 48 52 / var(--tw-bg-opacity));
}
+.hover\:bg-\[\#2f5a50\]:hover{
+ --tw-bg-opacity: 1;
+ background-color: rgb(47 90 80 / var(--tw-bg-opacity));
+}
+
.hover\:bg-\[\#325e5a\]:hover{
--tw-bg-opacity: 1;
background-color: rgb(50 94 90 / var(--tw-bg-opacity));
diff --git a/launcher/src/components/UI/node-page/NodeScreen.vue b/launcher/src/components/UI/node-page/NodeScreen.vue
index a649eb9670..1549846808 100755
--- a/launcher/src/components/UI/node-page/NodeScreen.vue
+++ b/launcher/src/components/UI/node-page/NodeScreen.vue
@@ -6,22 +6,16 @@
-
+
@@ -47,11 +37,7 @@
@export-all-log="updateAndExportAllLogs"
@export-customized-logs="updateAndExportAllLogs"
/>
-
+
@@ -150,8 +136,6 @@ onUnmounted(() => {
//************* Methods *************
-
-
//get all configs and services
const nodeSetupsPrepration = () => {
setupStore.allSetups.forEach((s) => (s.isActive = false));
@@ -192,10 +176,7 @@ const checkForListingKeys = async () => {
serviceStore.installedServices &&
serviceStore.installedServices.length > 0 &&
serviceStore.installedServices.some(
- (s) =>
- s.category === "validator" &&
- s.state === "running" &&
- (!s.config.keys || !s.config.keys.length > 0)
+ (s) => s.category === "validator" && s.state === "running" && (!s.config.keys || !s.config.keys.length > 0)
)
) {
clearInterval(pollingListingKeys);
@@ -209,11 +190,7 @@ const updateConnectionStats = async () => {
controlStore.ipAddress = stats.ipAddress;
};
const updateServiceLogs = async () => {
- if (
- serviceStore.installedServices &&
- serviceStore.installedServices.length > 0 &&
- headerStore.refresh
- ) {
+ if (serviceStore.installedServices && serviceStore.installedServices.length > 0 && headerStore.refresh) {
const data = await ControlService.getServiceLogs({ logs_tail: 150 });
nodeStore.serviceLogs = data;
}
@@ -228,13 +205,9 @@ const updateAndExportAllLogs = async (client) => {
until: nodeStore.untilDateParsDays,
});
- const fileName = `${client.name}_${
- nodeStore.isExportCustomizedDateLoading ? "customized" : "all"
- }_logs.txt`;
+ const fileName = `${client.name}_${nodeStore.isExportCustomizedDateLoading ? "customized" : "all"}_logs.txt`;
const data = [...nodeStore.allLogsForExp.logs].reverse();
- const lineByLine = data
- .map((line, index) => `#${data.length - index}: ${line}`)
- .join("\n\n");
+ const lineByLine = data.map((line, index) => `#${data.length - index}: ${line}`).join("\n\n");
const blob = new Blob([lineByLine], { type: "text/plain;charset=utf-8" });
saveAs(blob, fileName);
@@ -246,11 +219,7 @@ const updateAndExportAllLogs = async (client) => {
const updateServerVitals = async () => {
try {
- if (
- serviceStore.installedServices &&
- serviceStore.installedServices.length > 0 &&
- headerStore.refresh
- ) {
+ if (serviceStore.installedServices && serviceStore.installedServices.length > 0 && headerStore.refresh) {
const data = await ControlService.getServerVitals();
controlStore.cpu = data.cpu;
controlStore.availDisk = data.availDisk;
@@ -286,18 +255,12 @@ const exportLogs = async (client) => {
(service) => service.config?.serviceID === client.config?.serviceID
);
- const fileName = nodeStore.exportLogs
- ? `${client.name}_150_logs.txt`
- : `${client.name}_all_logs.txt`;
+ const fileName = nodeStore.exportLogs ? `${client.name}_150_logs.txt` : `${client.name}_all_logs.txt`;
// Select the data based on the condition
- const data = nodeStore.exportLogs
- ? currentService.logs.slice(-150).reverse()
- : currentService.logs.reverse();
+ const data = nodeStore.exportLogs ? currentService.logs.slice(-150).reverse() : currentService.logs.reverse();
- const lineByLine = data
- .map((line, index) => `#${data.length - index}: ${line}`)
- .join("\n\n");
+ const lineByLine = data.map((line, index) => `#${data.length - index}: ${line}`).join("\n\n");
const blob = new Blob([lineByLine], { type: "text/plain;charset=utf-8" });
saveAs(blob, fileName);
};
diff --git a/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue b/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue
index 03a87ce3fe..ce4ac9b741 100755
--- a/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue
+++ b/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue
@@ -6,26 +6,27 @@
>
-->