Make UI nicer with instance IP addresses and hostname
This commit is contained in:
@@ -34,27 +34,12 @@ type SessionSetupConf struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SessionSetupInstanceConf struct {
|
type SessionSetupInstanceConf struct {
|
||||||
Image string `json:"image"`
|
Image string `json:"image"`
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname"`
|
||||||
IsSwarmManager bool `json:"is_swarm_manager"`
|
IsSwarmManager bool `json:"is_swarm_manager"`
|
||||||
IsSwarmWorker bool `json:"is_swarm_worker"`
|
IsSwarmWorker bool `json:"is_swarm_worker"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Run [][]string `json:"run"`
|
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"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *pwd) SessionNew(duration time.Duration, stack, stackName, imageName string) (*types.Session, error) {
|
func (p *pwd) SessionNew(duration time.Duration, stack, stackName, imageName string) (*types.Session, error) {
|
||||||
|
|||||||
@@ -58,16 +58,18 @@
|
|||||||
</md-toolbar>
|
</md-toolbar>
|
||||||
<md-content layout-padding>
|
<md-content layout-padding>
|
||||||
<md-button ng-click="newInstance()" ng-disabled="isInstanceBeingCreated" class="md-primary">{{newInstanceBtnText}}</md-button>
|
<md-button ng-click="newInstance()" ng-disabled="isInstanceBeingCreated" class="md-primary">{{newInstanceBtnText}}</md-button>
|
||||||
<md-list>
|
<md-list class="md-dense" flex>
|
||||||
<md-list-item ng-switch on="instance.isManager" class="md-3-line" ng-repeat="instance in instances" ng-click="showInstance(instance)" ng-class="instance.name == selectedInstance.name ? 'selected' : false">
|
<md-list-item ng-switch on="instance.isManager" class="md-2-line" ng-repeat="instance in instances | orderBy:'hostname'" ng-click="showInstance(instance)" ng-class="instance.name == selectedInstance.name ? 'selected' : false">
|
||||||
<md-icon ng-switch-when="true" style="color: blue" md-svg-icon="person"></md-icon>
|
<md-icon ng-switch-when="true" style="color: blue" md-svg-icon="person"></md-icon>
|
||||||
<md-icon ng-switch-when="false" md-svg-icon="person-outline"></md-icon>
|
<md-icon ng-switch-when="false" md-svg-icon="person-outline"></md-icon>
|
||||||
<p>{{instance.name}}</p>
|
<div class="md-list-item-text" layout="column">
|
||||||
|
<h3>{{instance.ip}}</h3>
|
||||||
|
<h4>{{instance.hostname}}</h4>
|
||||||
|
</div>
|
||||||
<md-divider ng-if="!$last"></md-divider>
|
<md-divider ng-if="!$last"></md-divider>
|
||||||
</md-list-item>
|
</md-list-item>
|
||||||
</md-list>
|
</md-list>
|
||||||
</md-content>
|
</md-content>
|
||||||
|
|
||||||
</md-sidenav>
|
</md-sidenav>
|
||||||
<md-content flex layout-padding ng-if="!instances.length">
|
<md-content flex layout-padding ng-if="!instances.length">
|
||||||
<div layout="column" layout-align="top center">
|
<div layout="column" layout-align="top center">
|
||||||
|
|||||||
Reference in New Issue
Block a user