more work on generator

This commit is contained in:
kjeld Schouten-Lebbing
2021-08-15 13:21:52 +02:00
parent f02b4785ac
commit d2b7a8dcef
2 changed files with 40 additions and 33 deletions
+17 -17
View File
@@ -6,7 +6,7 @@
} }
.form-form { .form {
background-color: #15172b; background-color: #15172b;
border-radius: 20px; border-radius: 20px;
box-sizing: border-box; box-sizing: border-box;
@@ -23,7 +23,7 @@
margin-top: 30px; margin-top: 30px;
} }
.form-form-subtitle { .subtitle {
color: #eee; color: #eee;
font-family: sans-serif; font-family: sans-serif;
font-size: 16px; font-size: 16px;
@@ -31,21 +31,21 @@
margin-top: 10px; margin-top: 10px;
} }
.form-form-input-container { .input-container {
height: 50px; height: 50px;
position: relative; position: relative;
width: 100%; width: 100%;
} }
.form-ic1 { .ic1 {
margin-top: 40px; margin-top: 40px;
} }
.form-ic2 { .ic2 {
margin-top: 30px; margin-top: 30px;
} }
.form-input { .input {
background-color: #303245; background-color: #303245;
border-radius: 12px; border-radius: 12px;
border: 0; border: 0;
@@ -58,7 +58,7 @@
width: 100%; width: 100%;
} }
.form-cut { .cut {
background-color: #15172b; background-color: #15172b;
border-radius: 10px; border-radius: 10px;
height: 20px; height: 20px;
@@ -70,16 +70,16 @@
width: 76px; width: 76px;
} }
.form-cut-short { .cut-short {
width: 50px; width: 50px;
} }
.form-input:focus ~ .cut, .input:focus ~ .cut,
.form-input:not(:placeholder-shown) ~ .cut { .input:not(:placeholder-shown) ~ .cut {
transform: translateY(8px); transform: translateY(8px);
} }
.form-placeholder { .placeholder {
color: #65657b; color: #65657b;
font-family: sans-serif; font-family: sans-serif;
left: 20px; left: 20px;
@@ -91,20 +91,20 @@
top: 20px; top: 20px;
} }
.form-input:focus ~ .placeholder, .input:focus ~ .placeholder,
.form-input:not(:placeholder-shown) ~ .placeholder { .input:not(:placeholder-shown) ~ .placeholder {
transform: translateY(-30px) translateX(10px) scale(0.75); transform: translateY(-30px) translateX(10px) scale(0.75);
} }
.form-input:not(:placeholder-shown) ~ .placeholder { .input:not(:placeholder-shown) ~ .placeholder {
color: #808097; color: #808097;
} }
.form-input:focus ~ .placeholder { .input:focus ~ .placeholder {
color: #dc2f55; color: #dc2f55;
} }
.form-submit { .submit {
background-color: #08d; background-color: #08d;
border-radius: 12px; border-radius: 12px;
border: 0; border: 0;
@@ -119,6 +119,6 @@
width: 100%; width: 100%;
} }
.form-submit:active { .submit:active {
background-color: #06b; background-color: #06b;
} }
@@ -42,7 +42,14 @@ function process (form) {
function generatesvc(name, app, service) { function generatesvc(name, app, service) {
if (name == app) {
let svcname = name ;
} else {
let svcname = name + "-" + app ; let svcname = name + "-" + app ;
}
if (service) {
let svcname = svcname + "-" + service ;
}
let svcdns = svcname + "." + "ix-" + name + ".svc.cluster.local" ; let svcdns = svcname + "." + "ix-" + name + ".svc.cluster.local" ;
return svcdns; return svcdns;
}; };
@@ -50,24 +57,24 @@ function generatesvc(name, app, service) {
</SCRIPT> </SCRIPT>
<FORM NAME="frameform" ACTION="" METHOD="GET"><BR> <FORM NAME="frameform" ACTION="" METHOD="GET"><BR>
<div class="form-form"> <div class="form">
<div class="form-subtitle">Generate Internal DNS Name:</div> <div class="subtitle">Generate Internal DNS Name:</div>
<div class="form-input-container ic1"> <div class="input-container ic1">
<input id="name" class="form-input" type="text" placeholder=" " /> <input id="name" class="input" type="text" placeholder=" " />
<div class="form-cut"></div> <div class="cut"></div>
<label for="name" class="form-placeholder">Name:</label> <label for="name" class="placeholder">Name:</label>
</div> </div>
<div class="form-input-container ic2"> <div class="input-container ic2">
<input id="app" class="form-input" type="text" placeholder=" " /> <input id="app" class="input" type="text" placeholder=" " />
<div class="form-cut"></div> <div class="cut"></div>
<label for="app" class="form-placeholder">App</label> <label for="app" class="placeholder">App</label>
</div> </div>
<div class="form-input-container ic2"> <div class="input-container ic2">
<input id="service" class="form-input" type="text" placeholder=" " /> <input id="service" class="input" type="text" placeholder=" " />
<div class="form-cut cut-short"></div> <div class="cut cut-short"></div>
<label for="service" class="form-placeholder">Service</> <label for="service" class="placeholder">Service</>
</div> </div>
<INPUT TYPE="button" class="form-submit" NAME="button" Value="Generate" onClick="process(this.form)"> <INPUT TYPE="button" class="submit" NAME="button" Value="Generate" onClick="process(this.form)">
</div> </div>
</FORM> </FORM>