mirror of
https://github.com/louislam/dockge.git
synced 2024-11-24 03:44:03 +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,7 +42,22 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div v-if="Object.keys(sortedStackList).length === 0" class="text-center mt-3">
|
||||||
<router-link to="/compose">{{ $t("addFirstStackMsg") }}</router-link>
|
<router-link to="/compose">{{ $t("addFirstStackMsg") }}</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,6 +83,7 @@
|
||||||
import Confirm from "../components/Confirm.vue";
|
import Confirm from "../components/Confirm.vue";
|
||||||
import StackListItem from "../components/StackListItem.vue";
|
import StackListItem from "../components/StackListItem.vue";
|
||||||
import { CREATED_FILE, CREATED_STACK, EXITED, RUNNING, UNKNOWN } from "../../../common/util-common";
|
import { CREATED_FILE, CREATED_STACK, EXITED, RUNNING, UNKNOWN } from "../../../common/util-common";
|
||||||
|
import AgentStackList from "./AgentStackList.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in a new issue