Add Location handling
This commit is contained in:
parent
26f9ac2099
commit
795609f0a0
4 changed files with 48 additions and 75 deletions
pages/api
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue