Add Location handling

This commit is contained in:
Neshura 2023-03-14 22:32:53 +01:00
parent 26f9ac2099
commit 795609f0a0
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
4 changed files with 48 additions and 75 deletions

View file

@ -1,6 +1,7 @@
import Docker from 'dockerode'
import ApiSecret from '../../private/portainer_api_secret.json'
import { DockerInfo } from '../../interfaces/DockerStatus';
import { ServiceLocation } from '../../interfaces/CardTypes';
export default async function ContainersAPI(req: any, res: any) {
const token = JSON.parse(JSON.stringify(ApiSecret.token));
@ -20,6 +21,7 @@ export default async function ContainersAPI(req: any, res: any) {
newEntry.name = entry.Names[0].substring(1);
newEntry.status = entry.State;
newEntry.id = entry.Id;
newEntry.location = ServiceLocation.tower_0;
list.push(newEntry);
});