Commit 5dabfbf3 authored by remy's avatar remy
Browse files

some modifications on js code to add the image name in the def file/Dockerfile

parent 75451b48
...@@ -200,6 +200,8 @@ function generate_container() { ...@@ -200,6 +200,8 @@ function generate_container() {
base = document.getElementById("selectedOS").value; base = document.getElementById("selectedOS").value;
} }
var filename = document.getElementById("imageNameInput").value;
var manager = document.getElementById("selectedInstaller").value; var manager = document.getElementById("selectedInstaller").value;
var rversion = document.getElementById("selectedR").value; var rversion = document.getElementById("selectedR").value;
...@@ -258,16 +260,28 @@ function generate_container() { ...@@ -258,16 +260,28 @@ function generate_container() {
if(isSingularity) { if(isSingularity) {
PREVIEW += "%labels\n"; PREVIEW += "%labels\n";
PREVIEW += "\tAuthor wicopa\n"; PREVIEW += "\tAuthor wicopa\n";
PREVIEW += "\tVersion v0.0.1\n"; PREVIEW += "\tVersion v0.3.1\n";
PREVIEW += "\tbuild_date " + current_date + "\n"; PREVIEW += "\tbuild_date " + current_date + "\n";
PREVIEW += "\n"; if(filename) {
nrow += 4; PREVIEW += "\tImage_name " + filename + "\n";
PREVIEW += "\n";
nrow += 6;
} else {
PREVIEW += "\n";
nrow += 5;
}
} else { } else {
PREVIEW += "LABEL Author wicopa\n"; PREVIEW += "LABEL Author wicopa\n";
PREVIEW += "LABEL Version v0.0.1\n"; PREVIEW += "LABEL Version v0.3.1\n";
PREVIEW += "LABEL build_date " + current_date + "\n"; PREVIEW += "LABEL build_date " + current_date + "\n";
PREVIEW += "\n"; if(filename) {
nrow += 4; PREVIEW += "LABEL Image_name " + filename + "\n";
PREVIEW += "\n";
nrow += 5;
} else {
PREVIEW += "\n";
nrow += 4;
}
} }
...@@ -571,4 +585,4 @@ function generate_container() { ...@@ -571,4 +585,4 @@ function generate_container() {
document.getElementById('containerPreview').focus(); document.getElementById('containerPreview').focus();
} }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment