removed .env, because it is obsolete. Changed initial contact to registered at on agent_details.html, check if agentId can be converted to itn
This commit is contained in:
parent
7a4135351f
commit
45568013ca
7
.env
7
.env
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
export DB_HOST="172.17.0.2"
|
|
||||||
export DB_PORT=3306
|
|
||||||
export DB_USERNAME="root"
|
|
||||||
export DB_PASSWORD="root"
|
|
||||||
export DB_NAME="gomatic"
|
|
|
@ -46,7 +46,14 @@ func CreateAgent(db *sql.DB, w http.ResponseWriter, r * http.Request) (http.Resp
|
||||||
}
|
}
|
||||||
|
|
||||||
agentName := r.FormValue("agentName")
|
agentName := r.FormValue("agentName")
|
||||||
|
|
||||||
agentId := r.FormValue("agentId")
|
agentId := r.FormValue("agentId")
|
||||||
|
_, err = strconv.Atoi(agentId)
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, "AgentId is not an integer", http.StatusInternalServerError)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
agentType := r.FormValue("agentType")
|
agentType := r.FormValue("agentType")
|
||||||
IPv4Address := r.FormValue("IPv4Address")
|
IPv4Address := r.FormValue("IPv4Address")
|
||||||
addPort :=r.FormValue("addPort")
|
addPort :=r.FormValue("addPort")
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<p>Type: {{.AgentType}}</p>
|
<p>Type: {{.AgentType}}</p>
|
||||||
<p>IP Addr: {{.IPv4Address}}</p>
|
<p>IP Addr: {{.IPv4Address}}</p>
|
||||||
<p>Interactive Port: {{.AddPort}}</p>
|
<p>Interactive Port: {{.AddPort}}</p>
|
||||||
<p>Initial Contact: {{.InitialContact}}</p>
|
<p>Registered at: {{.InitialContact}}</p>
|
||||||
<p>Last Contact: {{.LastContact}}</p>
|
<!-- <p>Last Contact: {{.LastContact}}</p> -->
|
||||||
<p>Hostname: {{.HostName}}</p>
|
<p>Hostname: {{.HostName}}</p>
|
||||||
<!-- <button class="btn btn-warning" hx-get="/proxyAgent?ip={{.IPv4Address}}&port={{.AddPort}}" hx-target="#agentConnect" hx-swap="innerHTML">Proxy</button> -->
|
<!-- <button class="btn btn-warning" hx-get="/proxyAgent?ip={{.IPv4Address}}&port={{.AddPort}}" hx-target="#agentConnect" hx-swap="innerHTML">Proxy</button> -->
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
|
|
Loading…
Reference in New Issue