From 712772eff4608ed1d7bd7a0402ae09754206309d Mon Sep 17 00:00:00 2001 From: "Jonathan Leibiusky @xetorthio" Date: Tue, 12 Sep 2017 11:53:26 -0300 Subject: [PATCH] Make UI nicer with instance IP addresses and hostname --- pwd/session.go | 27 ++++++--------------------- www/index.html | 10 ++++++---- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/pwd/session.go b/pwd/session.go index b8e4218..f853d51 100644 --- a/pwd/session.go +++ b/pwd/session.go @@ -34,27 +34,12 @@ type SessionSetupConf struct { } type SessionSetupInstanceConf struct { - Image string `json:"image"` - Hostname string `json:"hostname"` - IsSwarmManager bool `json:"is_swarm_manager"` - IsSwarmWorker bool `json:"is_swarm_worker"` - Type string `json:"type"` - Run [][]string `json:"run"` - Expose []ExposedApp `json:"expose"` -} - -type ExposedApp struct { - Name string `json:"name"` - Description string `json:"description"` - Icon string `json:"icon"` - Url ExposedAppURL `json:"url"` -} - -type ExposedAppURL struct { - Port int `json:"port"` - Path string `json:"path"` - Query string `json:"query"` - Scheme string `json:"scheme"` + Image string `json:"image"` + Hostname string `json:"hostname"` + IsSwarmManager bool `json:"is_swarm_manager"` + IsSwarmWorker bool `json:"is_swarm_worker"` + Type string `json:"type"` + Run [][]string `json:"run"` } func (p *pwd) SessionNew(duration time.Duration, stack, stackName, imageName string) (*types.Session, error) { diff --git a/www/index.html b/www/index.html index 7be4ac9..d080b45 100644 --- a/www/index.html +++ b/www/index.html @@ -58,16 +58,18 @@ {{newInstanceBtnText}} - - + + -

{{instance.name}}

+
+

{{instance.ip}}

+

{{instance.hostname}}

+
-