Comments Bastien

pull/888/merge
Marco Kreeft 2025-04-05 15:17:45 +02:00 committed by Bastien Wirtz
parent 042e4a0529
commit 1de57d9423
3 changed files with 6 additions and 18 deletions

View File

@ -116,7 +116,6 @@ It calls the API of DOcker Socket Proxy
- name: Docker
type: "DockerSocketProxy"
endpoint: "http://192.168.0.151:2375"
```
## Docuseal

View File

@ -12,7 +12,7 @@
{{ errors }}
</strong>
<strong v-if="serverError" class="notif errors" title="Connection error to Docker Socket Proxy API">
?
Unavailable
</strong>
</div>
</template>
@ -21,12 +21,8 @@
<script>
import service from "@/mixins/service.js";
import Generic from "./Generic.vue";
export default {
name: "DockerSocketProxy",
components: {
Generic,
},
mixins: [service],
props: {
item: Object,
@ -54,8 +50,7 @@ export default {
};
// Fetch all containers (including stopped) from Docker Socket Proxy
fetch(`${this.endpoint}/containers/json?all=true`) // Docker endpoint for container statuses
.then((response) => response.json())
this.fetch('/containers/json?all=true') // Docker endpoint for container statuses
.then((containers) => {
this.running = containers.filter(container => container.State === "running").length;
this.stopped = containers.filter(container => container.State === "exited").length;

View File

@ -27,12 +27,8 @@
<script>
import service from "@/mixins/service.js";
import Generic from "./Generic.vue";
export default {
name: "Plex",
components: {
Generic,
},
mixins: [service],
props: {
item: Object,
@ -61,8 +57,7 @@ export default {
this.serverError = true;
};
fetch(`${this.endpoint}/status/sessions?X-Plex-Token=${this.item.token}`)
.then((response) => response.text())
this.fetch(`/status/sessions?X-Plex-Token=${this.item.token}`, {}, false)
.then((str) => {
const parser = new DOMParser();
const xml = parser.parseFromString(str, "application/xml");
@ -71,14 +66,13 @@ export default {
})
.catch(handleError);
fetch(`${this.endpoint}/library/sections?X-Plex-Token=${this.item.token}`)
.then((response) => response.text())
this.fetch(`/library/sections?X-Plex-Token=${this.item.token}`, {}, false)
.then((str) => {
const parser = new DOMParser();
const xml = parser.parseFromString(str, "application/xml");
const directories = xml.getElementsByTagName("Directory");
let seriesDirIds = [];
let movieDirIds = [];
const seriesDirIds = [];
const movieDirIds = [];
for (let dir of directories) {
if (dir.getAttribute("type") === "show") {