diff --git a/assets/auto-imports.d.ts b/assets/auto-imports.d.ts index 36811692452..3c620a21f03 100644 --- a/assets/auto-imports.d.ts +++ b/assets/auto-imports.d.ts @@ -395,7 +395,6 @@ declare module 'vue' { readonly computedInject: UnwrapRef readonly computedWithControl: UnwrapRef readonly config: UnwrapRef - readonly containerContext: UnwrapRef readonly controlledComputed: UnwrapRef readonly controlledRef: UnwrapRef readonly createApp: UnwrapRef @@ -473,7 +472,6 @@ declare module 'vue' { readonly persistentVisibleKeysForContainer: UnwrapRef readonly pinnedContainers: UnwrapRef readonly provide: UnwrapRef - readonly provideContainerContext: UnwrapRef readonly provideLocal: UnwrapRef readonly provideLoggingContext: UnwrapRef readonly reactify: UnwrapRef @@ -558,7 +556,6 @@ declare module 'vue' { readonly useColorMode: UnwrapRef readonly useConfirmDialog: UnwrapRef readonly useContainerActions: UnwrapRef - readonly useContainerContext: UnwrapRef readonly useContainerStore: UnwrapRef readonly useContainerStream: UnwrapRef readonly useCounter: UnwrapRef @@ -756,7 +753,6 @@ declare module '@vue/runtime-core' { readonly computedInject: UnwrapRef readonly computedWithControl: UnwrapRef readonly config: UnwrapRef - readonly containerContext: UnwrapRef readonly controlledComputed: UnwrapRef readonly controlledRef: UnwrapRef readonly createApp: UnwrapRef @@ -834,7 +830,6 @@ declare module '@vue/runtime-core' { readonly persistentVisibleKeysForContainer: UnwrapRef readonly pinnedContainers: UnwrapRef readonly provide: UnwrapRef - readonly provideContainerContext: UnwrapRef readonly provideLocal: UnwrapRef readonly provideLoggingContext: UnwrapRef readonly reactify: UnwrapRef @@ -919,7 +914,6 @@ declare module '@vue/runtime-core' { readonly useColorMode: UnwrapRef readonly useConfirmDialog: UnwrapRef readonly useContainerActions: UnwrapRef - readonly useContainerContext: UnwrapRef readonly useContainerStore: UnwrapRef readonly useContainerStream: UnwrapRef readonly useCounter: UnwrapRef diff --git a/assets/components/ContainerViewer/ContainerLog.vue b/assets/components/ContainerViewer/ContainerLog.vue index 367452e64af..0a1dfd6e25a 100644 --- a/assets/components/ContainerViewer/ContainerLog.vue +++ b/assets/components/ContainerViewer/ContainerLog.vue @@ -48,7 +48,5 @@ const visibleKeys = persistentVisibleKeysForContainer(container); const viewer = ref>(); -provideContainerContext(container); // TODO remove - provideLoggingContext(toRef(() => [container.value])); diff --git a/assets/components/LogViewer/ContainerName.vue b/assets/components/LogViewer/ContainerName.vue index 77ee7d0a9aa..d6c95c5ccaf 100644 --- a/assets/components/LogViewer/ContainerName.vue +++ b/assets/components/LogViewer/ContainerName.vue @@ -12,26 +12,30 @@ const { id } = defineProps<{ id: string; }>(); +const { containers } = useLoggingContext(); + const colors = [ - "#FF0000", + "#4B0082", + "#FF00FF", "#FF7F00", "#FFFF00", "#00FF00", "#00FFFF", + "#FF0000", "#0000FF", - "#FF00FF", "#FF007F", "#32CD32", "#40E0D0", + "#E6E6FA", "#800080", "#FFD700", "#FF4040", - "#4B0082", - "#008080", - "#E6E6FA", -]; +] as const; -const color = computed(() => colors[Math.abs(hashCode(id)) % colors.length]); +const color = computed(() => { + const index = containers.value.findIndex((container) => container.id === id); + return colors[index % colors.length]; +});