From 072a6c09bbee20f51aecba2bd081f0f14c5cdbb6 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Sun, 24 Sep 2023 15:22:27 -0700 Subject: [PATCH] feat: finds same name containers and shows option redirect to new containers (#2390) --- assets/components.d.ts | 2 +- assets/components/LogViewer/ContainerStat.vue | 4 +- .../LogViewer/DockerEventLogItem.vue | 35 +++++++++++++++++- assets/components/LogViewer/LogViewer.vue | 10 +++-- .../__snapshots__/LogEventSource.spec.ts.snap | 27 ++++++-------- assets/components/SideMenu.vue | 2 +- assets/components/common/Dropdown.vue | 2 +- assets/main.css | 6 +++ assets/pages/index.vue | 2 +- .../dark-homepage-1-Mobile-Chrome-linux.png | Bin 9429 -> 9497 bytes ...default-homepage-1-Mobile-Chrome-linux.png | Bin 8898 -> 8990 bytes 11 files changed, 63 insertions(+), 27 deletions(-) diff --git a/assets/components.d.ts b/assets/components.d.ts index dd59fab4..4dd821f8 100644 --- a/assets/components.d.ts +++ b/assets/components.d.ts @@ -10,6 +10,7 @@ declare module 'vue' { BarChart: typeof import('./components/BarChart.vue')['default'] 'Carbon:caretDown': typeof import('~icons/carbon/caret-down')['default'] 'Carbon:circleSolid': typeof import('~icons/carbon/circle-solid')['default'] + 'Carbon:information': typeof import('~icons/carbon/information')['default'] 'Carbon:macShift': typeof import('~icons/carbon/mac-shift')['default'] 'Carbon:star': typeof import('~icons/carbon/star')['default'] 'Carbon:starFilled': typeof import('~icons/carbon/star-filled')['default'] @@ -27,7 +28,6 @@ declare module 'vue' { DistanceTime: typeof import('./components/common/DistanceTime.vue')['default'] DockerEventLogItem: typeof import('./components/LogViewer/DockerEventLogItem.vue')['default'] Dropdown: typeof import('./components/common/Dropdown.vue')['default'] - DropdownMenu: typeof import('./components/DropdownMenu.vue')['default'] FieldList: typeof import('./components/LogViewer/FieldList.vue')['default'] FuzzySearchModal: typeof import('./components/FuzzySearchModal.vue')['default'] 'Ic:sharpFindInPage': typeof import('~icons/ic/sharp-find-in-page')['default'] diff --git a/assets/components/LogViewer/ContainerStat.vue b/assets/components/LogViewer/ContainerStat.vue index 74a37aae..1034cc98 100644 --- a/assets/components/LogViewer/ContainerStat.vue +++ b/assets/components/LogViewer/ContainerStat.vue @@ -14,8 +14,8 @@ const cpuData = computedWithControl( const history = container.value.statHistory; const points: Point[] = history.map((stat, i) => ({ x: i, - y: stat.snapshot.cpu, - value: stat.snapshot.cpu + "%", + y: Math.max(0, stat.snapshot.cpu), + value: Math.max(0, stat.snapshot.cpu) + "%", })); return points; }, diff --git a/assets/components/LogViewer/DockerEventLogItem.vue b/assets/components/LogViewer/DockerEventLogItem.vue index cca3b0a9..7a4be6df 100644 --- a/assets/components/LogViewer/DockerEventLogItem.vue +++ b/assets/components/LogViewer/DockerEventLogItem.vue @@ -1,12 +1,43 @@