Skip to content

Commit

Permalink
Fix #430
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Jul 29, 2013
1 parent d50f671 commit 9911595
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
28 changes: 14 additions & 14 deletions hawtio-web/src/main/webapp/app/fabric/html/container.html
@@ -1,4 +1,5 @@
<div ng-controller="Fabric.ContainerController">
<div class="ng-cloak" ng-controller="Fabric.ContainerController">

<div class="row-fluid">
<div class="span4">
<h1>{{row.id}}</h1>
Expand Down Expand Up @@ -79,7 +80,7 @@ <h1>{{row.id}}</h1>
</dl>
</div>

<div class="span4">
<div class="span4 container-settings">
<dl class="dl-horizontal">
<dt>Version:</dt>
<dd>{{row.versionId}}</dd>
Expand All @@ -90,40 +91,39 @@ <h1>{{row.id}}</h1>
<editable-property ng-model="row" property="location" on-save="updateContainerProperty('location', row)"></editable-property>
</dd>
</dl>
<dl class="dl-horizontal">
<dl class="dl-horizontal" title="Advertise services using the local IP address">
<dt>Local IP:</dt>
<dd>
<editable-property ng-model="row" property="localIp" on-save="updateContainerProperty('localIp', row)"></editable-property>
<input class="pull-right" type="radio" name="resolver" ng-model="row.resolver" value="localip">
</dd>
</dl>
<dl class="dl-horizontal">
<dl class="dl-horizontal" title="Advertise services using the local hostname">
<dt>Local Hostname:</dt>
<dd>
<editable-property ng-model="row" property="localHostname" on-save="updateContainerProperty('localHostname', row)"></editable-property>
<input class="pull-right" type="radio" name="resolver" ng-model="row.resolver" value="localhostname">
</dd>
</dl>
<dl class="dl-horizontal">
<dl class="dl-horizontal" title="Advertise services using the public IP address">
<dt>Public IP:</dt>
<dd>
<editable-property ng-model="row" property="publicIp" on-save="updateContainerProperty('publicIp', row)"></editable-property>
<input class="pull-right" type="radio" name="resolver" ng-model="row.resolver" value="publicip">
</dd>
</dl>
<dl class="dl-horizontal">
<dl class="dl-horizontal" title="Advertise services using the public hostname">
<dt>Public Hostname:</dt>
<dd>
<editable-property ng-model="row" property="publicHostname" on-save="updateContainerProperty('publicHostname', row)"></editable-property>
<input class="pull-right" type="radio" name="resolver" ng-model="row.resolver" value="publichostname">
</dd>
</dl>
<dl class="dl-horizontal">
<dl class="dl-horizontal" title="Advertise services using a custom IP address or hostname">
<dt>Manual IP:</dt>
<dd>
<editable-property ng-model="row" property="manualIp" on-save="updateContainerProperty('manualIp', row)"></editable-property>
</dd>
</dl>
<dl class="dl-horizontal">
<dt>Resolver:</dt>
<dd>
{{row.resolver}}
<input class="pull-right" type="radio" name="resolver" ng-model="row.resolver" value="manualip">
</dd>
</dl>
<dl class="dl-horizontal">
Expand Down Expand Up @@ -173,7 +173,7 @@ <h1>{{row.id}}</h1>
<div class="row-fluid">
<div class="span8">
<dl>
<dt>Provision List:
<dt>Provision List:
<input type="text" class="search-query" placeholder="Filter..." ng-model="provisionListFilter">
</dt>
<dd>
Expand Down
9 changes: 9 additions & 0 deletions hawtio-web/src/main/webapp/app/fabric/js/container.ts
Expand Up @@ -120,6 +120,15 @@ module Fabric {
$scope.row = response.value;
if ($scope.row) {
$scope.services = getServiceList($scope.row);
if (angular.isDefined($scope.resolverWatch) && angular.isFunction($scope.resolverWatch)) {
$scope.resolverWatch();
}
$scope.resolverWatch = $scope.$watch('row.resolver', (newValue, oldValue) => {
if (newValue !== oldValue) {
$scope.updateContainerProperty('resolver', $scope.row);
}
});
Core.$apply($scope);
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions hawtio-web/src/main/webapp/css/site-base.less
Expand Up @@ -1655,4 +1655,15 @@ input[type="checkbox"].ng-invalid {
box-shadow: 0 0 12px #e5e971;
}

.container-settings {
border-right: 1px solid @control-border;
padding-right: 30px;
}

.container-settings dd .ep {
display: inline-block;
}

.container-settings dd input[type=radio] {
display: inline-block;
}

0 comments on commit 9911595

Please sign in to comment.