mirror of
https://github.com/louislam/dockge.git
synced 2024-11-27 13:14:03 +00:00
Fix: dockge cannot be self-managed (#171)
This commit is contained in:
parent
47435d41cd
commit
45ab36db98
2 changed files with 6 additions and 9 deletions
|
@ -191,6 +191,7 @@ export class Stack {
|
||||||
let stacksDir = server.stacksDir;
|
let stacksDir = server.stacksDir;
|
||||||
let stackList : Map<string, Stack>;
|
let stackList : Map<string, Stack>;
|
||||||
|
|
||||||
|
// Use cached stack list?
|
||||||
if (useCacheForManaged && this.managedStackList.size > 0) {
|
if (useCacheForManaged && this.managedStackList.size > 0) {
|
||||||
stackList = this.managedStackList;
|
stackList = this.managedStackList;
|
||||||
} else {
|
} else {
|
||||||
|
@ -220,22 +221,19 @@ export class Stack {
|
||||||
this.managedStackList = new Map(stackList);
|
this.managedStackList = new Map(stackList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also get the list from `docker compose ls --all --format json`
|
// Get status from docker compose ls
|
||||||
let res = childProcess.execSync("docker compose ls --all --format json");
|
let res = childProcess.execSync("docker compose ls --all --format json");
|
||||||
let composeList = JSON.parse(res.toString());
|
let composeList = JSON.parse(res.toString());
|
||||||
|
|
||||||
for (let composeStack of composeList) {
|
for (let composeStack of composeList) {
|
||||||
|
|
||||||
// Skip the dockge stack
|
|
||||||
// TODO: Could be self managed?
|
|
||||||
if (composeStack.Name === "dockge") {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let stack = stackList.get(composeStack.Name);
|
let stack = stackList.get(composeStack.Name);
|
||||||
|
|
||||||
// This stack probably is not managed by Dockge, but we still want to show it
|
// This stack probably is not managed by Dockge, but we still want to show it
|
||||||
if (!stack) {
|
if (!stack) {
|
||||||
|
// Skip the dockge stack if it is not managed by Dockge
|
||||||
|
if (composeStack.Name === "dockge") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
stack = new Stack(server, composeStack.Name);
|
stack = new Stack(server, composeStack.Name);
|
||||||
stackList.set(composeStack.Name, stack);
|
stackList.set(composeStack.Name, stack);
|
||||||
}
|
}
|
||||||
|
|
1
frontend/components.d.ts
vendored
1
frontend/components.d.ts
vendored
|
@ -12,7 +12,6 @@ declare module 'vue' {
|
||||||
ArrayInput: typeof import('./src/components/ArrayInput.vue')['default']
|
ArrayInput: typeof import('./src/components/ArrayInput.vue')['default']
|
||||||
ArraySelect: typeof import('./src/components/ArraySelect.vue')['default']
|
ArraySelect: typeof import('./src/components/ArraySelect.vue')['default']
|
||||||
BDropdown: typeof import('bootstrap-vue-next')['BDropdown']
|
BDropdown: typeof import('bootstrap-vue-next')['BDropdown']
|
||||||
BDropdownDivider: typeof import('bootstrap-vue-next')['BDropdownDivider']
|
|
||||||
BDropdownItem: typeof import('bootstrap-vue-next')['BDropdownItem']
|
BDropdownItem: typeof import('bootstrap-vue-next')['BDropdownItem']
|
||||||
BModal: typeof import('bootstrap-vue-next')['BModal']
|
BModal: typeof import('bootstrap-vue-next')['BModal']
|
||||||
Confirm: typeof import('./src/components/Confirm.vue')['default']
|
Confirm: typeof import('./src/components/Confirm.vue')['default']
|
||||||
|
|
Loading…
Reference in a new issue