functioning 'new volume' modal
This commit is contained in:
parent
a8bf38eedb
commit
29d630f1dd
3 changed files with 11 additions and 21 deletions
|
@ -77,12 +77,12 @@ export const Volumes = async function(req, res) {
|
|||
|
||||
}
|
||||
|
||||
export const createVolume = async function(req, res) {
|
||||
export const addVolume = async function(req, res) {
|
||||
|
||||
let name = req.body.name;
|
||||
let volume = req.body.volume;
|
||||
|
||||
docker.createVolume({
|
||||
Name: name
|
||||
Name: volume
|
||||
});
|
||||
res.redirect("/volumes");
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Apps, appSearch, InstallModal, ImportModal, LearnMore, Upload, removeTe
|
|||
import { Users } from "../controllers/users.js";
|
||||
import { Images } from "../controllers/images.js";
|
||||
import { Networks, removeNetwork } from "../controllers/networks.js";
|
||||
import { Volumes, removeVolume } from "../controllers/volumes.js";
|
||||
import { Volumes, addVolume, removeVolume } from "../controllers/volumes.js";
|
||||
import { Account } from "../controllers/account.js";
|
||||
import { Variables } from "../controllers/variables.js";
|
||||
import { Settings } from "../controllers/settings.js";
|
||||
|
@ -78,6 +78,7 @@ router.get("/images", adminOnly, Images);
|
|||
router.post("/images/:action", adminOnly, Images);
|
||||
|
||||
router.get("/volumes", adminOnly, Volumes);
|
||||
router.post("/addVolume", adminOnly, addVolume);
|
||||
router.post("/removeVolume", adminOnly, removeVolume);
|
||||
|
||||
router.get("/networks", adminOnly, Networks);
|
||||
|
|
|
@ -91,28 +91,17 @@
|
|||
</div>
|
||||
|
||||
<div class="modal-body text-center">
|
||||
<form method="post" action="/volumes/add">
|
||||
<form method="post" action="/addVolume">
|
||||
|
||||
<div class="row row-cards">
|
||||
<div class="col-sm-6 col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-2 align-items-end">
|
||||
<div class="col-7">
|
||||
<label class="form-label text-muted">Image</label>
|
||||
<input type="text" class="form-control" name="image" placeholder="lllllllillllllillll/dweebui">
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<label class="form-label text-muted">Tag</label>
|
||||
<input type="text" class="form-control" name="tag" placeholder="latest">
|
||||
<div class="col-8">
|
||||
<label class="form-label text-muted">Volume Name</label>
|
||||
<input type="text" class="form-control" name="volume">
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<button type="submit" class="btn mt-2">Pull</button>
|
||||
<button type="submit" class="btn mt-2">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue