mirror of
https://github.com/louislam/dockge.git
synced 2024-11-23 19:34:04 +00:00
Fix linter errors
This commit is contained in:
parent
59d941f128
commit
2674226ce3
2 changed files with 15 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="group-header">
|
<div class="group-header">
|
||||||
{{ agentName ?? this.$t("currentEndpoint") }}
|
{{ agentName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
interface AgentStackListProps {
|
interface AgentStackListProps {
|
||||||
agentName?: string;
|
agentName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<AgentStackListProps>();
|
defineProps<AgentStackListProps>();
|
||||||
|
@ -21,7 +21,6 @@ defineProps<AgentStackListProps>();
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "../styles/vars.scss";
|
@import "../styles/vars.scss";
|
||||||
|
|
||||||
|
|
||||||
.group-header {
|
.group-header {
|
||||||
border-bottom: 1px solid #dee2e6;
|
border-bottom: 1px solid #dee2e6;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="searchText === '' && this.$root.agentCount > 1" :style="stackListStyle" ref="stackList" class="stack-list">
|
<div v-if="searchText === '' && $root.agentCount > 1" ref="stackList" :style="stackListStyle" class="stack-list">
|
||||||
<AgentStackList :agentName="agentName" v-for="[agentName, stacks] in stackListByAgent">
|
<AgentStackList v-for="[agentName, stacks] in stackListByAgent" :agentName="agentName" :key="agentName">
|
||||||
<StackListItem
|
<StackListItem
|
||||||
v-for="(stack, index) in stacks"
|
v-for="(stack, index) in stacks"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
:isSelectMode="selectMode"
|
:isSelectMode="selectMode"
|
||||||
:isSelected="isSelected"
|
:isSelected="isSelected"
|
||||||
:select="select"
|
:select="select"
|
||||||
:deselect="deselect"/>
|
:deselect="deselect"
|
||||||
|
/>
|
||||||
</AgentStackList>
|
</AgentStackList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -83,7 +83,6 @@
|
||||||
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: {
|
||||||
|
@ -215,15 +214,15 @@ export default {
|
||||||
|
|
||||||
for (const key of Object.keys(stacks)) {
|
for (const key of Object.keys(stacks)) {
|
||||||
// Handle stacks with no suffix (from the current endpoint)
|
// Handle stacks with no suffix (from the current endpoint)
|
||||||
let [stackName, agent] = key.split("_");
|
let [ stackName, agent ] = key.split("_");
|
||||||
const stackHasEndpoint = agent !== "";
|
const stackHasEndpoint = agent !== "";
|
||||||
agent = stackHasEndpoint ? agent: this.$t("currentEndpoint");
|
agent = stackHasEndpoint ? agent : this.$t("currentEndpoint");
|
||||||
|
|
||||||
if (!stacksByAgent.has(agent)) {
|
if (!stacksByAgent.has(agent)) {
|
||||||
stacksByAgent.set(agent, []);
|
stacksByAgent.set(agent, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
const stack = stacks[!stackHasEndpoint ? `${stackName}_` : `${stackName}_${agent}`]
|
const stack = stacks[!stackHasEndpoint ? `${stackName}_` : `${stackName}_${agent}`];
|
||||||
stacksByAgent.get(agent).push(stack);
|
stacksByAgent.get(agent).push(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue