updated app
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { useState } from 'react';
|
||||
import registerApp from '../assets/orchestration'
|
||||
|
||||
function MyForm() {
|
||||
const [inputs, setInputs] = useState({});
|
||||
@ -11,53 +12,50 @@ function MyForm() {
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<h4>DNS</h4>
|
||||
|
||||
<form>
|
||||
|
||||
<form className='card'>
|
||||
<h4>DNS</h4>
|
||||
<label>FQDN
|
||||
<input type="text" name="fqdn" value={inputs.fqdn || ""} onChange={handleChange}/>
|
||||
<input type="text" name="fqdn" value={inputs.fqdn} onChange={handleChange} placeholder='Target DNS name.' required autoFocus/>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
||||
<label>CNAME target
|
||||
<input type="text" name="cname_target" value={inputs.cname_target || "cygnus.int.jonb.io"} onChange={handleChange}/>
|
||||
<label>CNAME Target
|
||||
<input type="text" name="cname_target" value={inputs.cname_target} onChange={handleChange} placeholder='cygnus.int.jonb.io' required/>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
||||
<h4>Reverse Proxy</h4>
|
||||
<h4>Reverse Proxy</h4>
|
||||
|
||||
<label>FQDN
|
||||
<input type="text" value={inputs.fqdn} onChange={handleChange} disabled/>
|
||||
<input type="text" value={inputs.fqdn} onChange={handleChange} disabled placeholder='Automatically filled, Target DNS name'/>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
||||
<label>Target Host
|
||||
<input type="text" name="target_host" value={inputs.target_host || ""} onChange={handleChange}/>
|
||||
<input type="text" name="target_host" value={inputs.target_host} onChange={handleChange} placeholder='Network host Domain or IP' required/>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
||||
<label>Upstream Port
|
||||
<input type="number" name="upstream_port" value={inputs.upstream_port || ""} onChange={handleChange}/>
|
||||
<input type="number" name="upstream_port" value={inputs.upstream_port} onChange={handleChange} placeholder='Port the target service is listening on.' required/>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
||||
<label>Protocol
|
||||
<select name="protocol" value={inputs.protocol || ""} onChange={handleChange}>
|
||||
<option value="http" selected>http</option>
|
||||
<option value="https">https</option>
|
||||
<select name="protocol" value={inputs.protocol || "http"} onChange={handleChange}>
|
||||
<option value="http" selected>HTTP</option>
|
||||
<option value="https">HTTPS</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
<button className="button" type="submit" onChange={handleChange} onClick={() => registerApp({inputs})}>Submit</button>
|
||||
|
||||
</form>
|
||||
</>
|
||||
@ -66,7 +64,7 @@ function MyForm() {
|
||||
|
||||
|
||||
function Home() {
|
||||
return (<><h2>Home Page</h2>
|
||||
return (<><h2>Deploy New App</h2>
|
||||
<MyForm />
|
||||
</>
|
||||
)
|
||||
|
Reference in New Issue
Block a user