mirror of
https://github.com/louislam/dockge.git
synced 2024-11-23 19:34:04 +00:00
Conditionally display stacks with its respective agent
This commit is contained in:
parent
b9f135bdaa
commit
59d941f128
1 changed files with 18 additions and 2 deletions
|
@ -42,11 +42,26 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="stackList" class="stack-list" :class="{ scrollbar: scrollbar }" :style="stackListStyle">
|
||||
|
||||
<div v-if="searchText === '' && this.$root.agentCount > 1" :style="stackListStyle" ref="stackList" class="stack-list">
|
||||
<AgentStackList :agentName="agentName" v-for="[agentName, stacks] in stackListByAgent">
|
||||
<StackListItem
|
||||
v-for="(stack, index) in stacks"
|
||||
:key="index"
|
||||
:stack="stack"
|
||||
:isSelectMode="selectMode"
|
||||
:isSelected="isSelected"
|
||||
:select="select"
|
||||
:deselect="deselect"/>
|
||||
|
||||
</AgentStackList>
|
||||
</div>
|
||||
|
||||
<div v-else ref="stackList" class="stack-list" :class="{ scrollbar: scrollbar }" :style="stackListStyle">
|
||||
<div v-if="Object.keys(sortedStackList).length === 0" class="text-center mt-3">
|
||||
<router-link to="/compose">{{ $t("addFirstStackMsg") }}</router-link>
|
||||
</div>
|
||||
|
||||
|
||||
<StackListItem
|
||||
v-for="(item, index) in sortedStackList"
|
||||
:key="index"
|
||||
|
@ -68,6 +83,7 @@
|
|||
import Confirm from "../components/Confirm.vue";
|
||||
import StackListItem from "../components/StackListItem.vue";
|
||||
import { CREATED_FILE, CREATED_STACK, EXITED, RUNNING, UNKNOWN } from "../../../common/util-common";
|
||||
import AgentStackList from "./AgentStackList.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
Loading…
Reference in a new issue