From 016dbaf46365eeb86694bcaccfd65d4faf982acf Mon Sep 17 00:00:00 2001 From: Abdhesh Nayak Date: Thu, 8 Feb 2024 15:58:33 +0530 Subject: [PATCH] Improve/design logs n metrics (#83) * :art: Improved design for logs component improved design for logs and disabled network_io and disk_io for apps * :bookmark: Updated build --- .github/workflows/build-container.yaml | 15 +++----- .../components/charts/charts-client.tsx | 8 +++- src/apps/console/components/logger.tsx | 38 +++++++++++++++++-- 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-container.yaml b/.github/workflows/build-container.yaml index bd840bc37..83f030dff 100644 --- a/.github/workflows/build-container.yaml +++ b/.github/workflows/build-container.yaml @@ -75,6 +75,12 @@ jobs: echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV echo "OVERRIDE_PUSHED_IMAGE=false" >> $GITHUB_ENV + - name: Build + if: "!startsWith(github.ref, 'refs/heads/release-') && !startsWith(github.ref, 'refs/tags/')" + run: | + image_name="ghcr.io/${{ github.repository }}/${{matrix.app}}" + docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:test" + - name: Build & Push Image if: startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/') run: | @@ -92,12 +98,3 @@ jobs: docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t "$image_name:$IMAGE_TAG" --push - -# - name: Build & Push Image -# if: startsWith(github.ref, 'refs/heads/release') -# run: | -# branch_name=${GITHUB_REF#refs/heads/} -# version_string="v${branch_name#release-}-nightly" -# -# docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t ghcr.io/kloudlite/web/${{matrix.app}}:$version_string --push -# docker build --build-arg APP=${{matrix.app}} -f ${{matrix.dockerFile}} . -t ghcr.io/kloudlite/web/${{matrix.app}}:commit-${GITHUB_SHA} --push \ No newline at end of file diff --git a/src/apps/console/components/charts/charts-client.tsx b/src/apps/console/components/charts/charts-client.tsx index 3c8666603..1d4844001 100644 --- a/src/apps/console/components/charts/charts-client.tsx +++ b/src/apps/console/components/charts/charts-client.tsx @@ -18,7 +18,7 @@ const Chart = ( className?: string; } ) => { - const { height, width, className, title } = props; + const { height, width, className, title, disabled } = props; return (
+ {disabled && ( +
+ Not Available +
+ )} +
diff --git a/src/apps/console/components/logger.tsx b/src/apps/console/components/logger.tsx index e695c99ba..a7b7c1aa9 100644 --- a/src/apps/console/components/logger.tsx +++ b/src/apps/console/components/logger.tsx @@ -845,11 +845,41 @@ const LogComp = ({ }} > {subscribed && logs.length === 0 && ( -
-
- Connected to logs stream, and waiting for the logs to be generated. + +
+
+
+
Logs
+ +
+
+
+ +
+
+ + + +
+ + 00 matches + +
+
+
+
+
+ No logs produced in the last 3 hours. +
+
+
-
+ )} {!subscribed && logs.length === 0 && }