From 88698f7fc57eecde964a7ce2435b385c130b0508 Mon Sep 17 00:00:00 2001 From: HynoR <20227709+HynoR@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:42:26 +0800 Subject: [PATCH 1/3] feat: Add copy button for raw JSON in container and network detail views --- .../src/views/container/container/inspect/index.vue | 10 ++++++++++ frontend/src/views/container/network/detail/index.vue | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/frontend/src/views/container/container/inspect/index.vue b/frontend/src/views/container/container/inspect/index.vue index 902e4b5b2329..9640136a6747 100644 --- a/frontend/src/views/container/container/inspect/index.vue +++ b/frontend/src/views/container/container/inspect/index.vue @@ -149,6 +149,11 @@ +
+ + {{ $t('commons.button.copy') }} + +
@@ -165,6 +170,7 @@ import { ref } from 'vue'; import CodemirrorPro from '@/components/codemirror-pro/index.vue'; import { routerToFileWithPath } from '@/utils/router'; +import { copyText } from '@/utils/util'; import i18n from '@/lang'; const visible = ref(false); @@ -263,6 +269,10 @@ const handleJumpToFile = (path: string) => { } }; +const handleCopyRawJson = () => { + copyText(rawJson.value); +}; + defineExpose({ acceptParams, }); diff --git a/frontend/src/views/container/network/detail/index.vue b/frontend/src/views/container/network/detail/index.vue index 7d3df1c1bb2b..8950c46d6900 100644 --- a/frontend/src/views/container/network/detail/index.vue +++ b/frontend/src/views/container/network/detail/index.vue @@ -93,6 +93,11 @@ +
+ + {{ $t('commons.button.copy') }} + +
@@ -108,6 +113,7 @@