-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
128 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import si, { Systeminformation } from "systeminformation"; | ||
import dataConfig from "../../config/data.json"; | ||
|
||
const getDockerContainers = async () => { | ||
const { | ||
dockerContainers | ||
}: { | ||
dockerContainers: Systeminformation.DockerContainerData | ||
} = await si.get({ | ||
dockerContainers: dataConfig.docker.containers.join(","), | ||
}); | ||
|
||
return dockerContainers; | ||
}; | ||
|
||
export default getDockerContainers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import si, { Systeminformation } from "systeminformation"; | ||
import dataConfig from "../../config/data.json"; | ||
|
||
const getDockerImages = async () => { | ||
const { | ||
dockerImages, | ||
}: { | ||
dockerImages: Systeminformation.DockerImageData | ||
} = await si.get({ | ||
dockerImages: dataConfig.docker.images.join(","), | ||
}); | ||
|
||
return dockerImages; | ||
}; | ||
|
||
export default getDockerImages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import si, { Systeminformation } from "systeminformation"; | ||
import dataConfig from "../../config/data.json"; | ||
|
||
const getDockerInfo = async () => { | ||
const { | ||
dockerInfo, | ||
}: { | ||
dockerInfo: Systeminformation.DockerInfoData; | ||
} = await si.get({ | ||
dockerInfo: dataConfig.docker.info.join(","), | ||
}); | ||
|
||
return dockerInfo; | ||
}; | ||
|
||
export default getDockerInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Request, Response } from "express"; | ||
import getDockerContainers from "../../../controllers/docker/containers.controller"; | ||
|
||
const ContainersRoute = async (req: Request, res: Response) => { | ||
try { | ||
const data = await getDockerContainers(); | ||
res.json(data) | ||
} catch (error) { | ||
res.status(500).send(); | ||
} | ||
} | ||
|
||
export default ContainersRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Request, Response } from "express"; | ||
import getDockerImages from "../../../controllers/docker/images.controller"; | ||
|
||
const ImagesRoute = async (req: Request, res: Response) => { | ||
try { | ||
const data = await getDockerImages(); | ||
res.json(data) | ||
} catch (error) { | ||
res.status(500).send(); | ||
} | ||
} | ||
|
||
export default ImagesRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Router } from 'express'; | ||
import InformationRoute from './information.route'; | ||
import ImagesRoute from './images.route'; | ||
import ContainersRoute from './containers.route'; | ||
|
||
const router: Router = Router(); | ||
|
||
router.get('/information', InformationRoute) | ||
router.get('/images', ImagesRoute) | ||
router.get('/containers', ContainersRoute) | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Request, Response } from "express"; | ||
import getDockerInfo from "../../../controllers/docker/information.controller"; | ||
|
||
const InformationRoute = async (req: Request, res: Response) => { | ||
try { | ||
const data = await getDockerInfo(); | ||
res.json(data) | ||
} catch (error) { | ||
res.status(500).send(); | ||
} | ||
} | ||
|
||
export default InformationRoute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters