-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: supports swarm mode with stacks and services on remote hosts 🙌🏼 (…
- Loading branch information
Showing
89 changed files
with
1,928 additions
and
997 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<ScrollableView :scrollable="scrollable" v-if="container"> | ||
<template #header v-if="showTitle"> | ||
<div class="mx-2 flex items-center gap-2 md:ml-4"> | ||
<ContainerTitle :container="container" /> | ||
<MultiContainerStat class="ml-auto" :containers="[container]" /> | ||
|
||
<ContainerActionsToolbar @clear="viewer?.clear()" class="mobile-hidden" :container="container" /> | ||
<a class="btn btn-circle btn-xs" @click="close()" v-if="closable"> | ||
<mdi:close /> | ||
</a> | ||
</div> | ||
</template> | ||
<template #default="{ setLoading }"> | ||
<ViewerWithSource | ||
ref="viewer" | ||
@loading-more="setLoading($event)" | ||
:stream-source="useContainerStream" | ||
:entity="container" | ||
:visible-keys="visibleKeys" | ||
:show-container-name="false" | ||
/> | ||
</template> | ||
</ScrollableView> | ||
</template> | ||
<script lang="ts" setup> | ||
import ViewerWithSource from "@/components/LogViewer/ViewerWithSource.vue"; | ||
import { ComponentExposed } from "vue-component-type-helpers"; | ||
const { | ||
id, | ||
showTitle = false, | ||
scrollable = false, | ||
closable = false, | ||
} = defineProps<{ | ||
id: string; | ||
showTitle?: boolean; | ||
scrollable?: boolean; | ||
closable?: boolean; | ||
}>(); | ||
const close = defineEmit(); | ||
const store = useContainerStore(); | ||
const container = store.currentContainer($$(id)); | ||
const visibleKeys = persistentVisibleKeysForContainer(container); | ||
const viewer = ref<ComponentExposed<typeof ViewerWithSource>>(); | ||
provideContainerContext(container); // TODO remove | ||
provideLoggingContext(toRef(() => [container.value])); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<template> | ||
<ScrollableView :scrollable="scrollable" v-if="group.containers.length && ready"> | ||
<template #header> | ||
<div class="mx-2 flex items-center gap-2 md:ml-4"> | ||
<div class="flex flex-1 gap-1.5 truncate @container md:gap-2"> | ||
<div class="inline-flex font-mono text-sm"> | ||
<div class="font-semibold">{{ group.containers.length }} containers</div> | ||
</div> | ||
</div> | ||
<MultiContainerStat class="ml-auto" :containers="group.containers" /> | ||
</div> | ||
</template> | ||
<template #default="{ setLoading }"> | ||
<ViewerWithSource | ||
ref="viewer" | ||
@loading-more="setLoading($event)" | ||
:stream-source="useGroupedStream" | ||
:entity="group" | ||
:visible-keys="visibleKeys" | ||
:show-container-name="true" | ||
/> | ||
</template> | ||
</ScrollableView> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import ViewerWithSource from "@/components/LogViewer/ViewerWithSource.vue"; | ||
import { GroupedContainers } from "@/models/Container"; | ||
const { name, scrollable = false } = defineProps<{ | ||
name: string; | ||
scrollable?: boolean; | ||
}>(); | ||
const containerStore = useContainerStore(); | ||
const { ready } = storeToRefs(containerStore); | ||
const swarmStore = useSwarmStore(); | ||
const { customGroups } = storeToRefs(swarmStore); | ||
const group = computed(() => customGroups.value.find((g) => g.name === name) ?? new GroupedContainers("", [])); | ||
const visibleKeys = ref<string[][]>([]); | ||
provideLoggingContext(toRef(() => group.value.containers)); | ||
</script> |
Oops, something went wrong.