Skip to content

Commit

Permalink
Fix #834
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Dec 12, 2013
1 parent b1ae314 commit bb3cb1c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
28 changes: 7 additions & 21 deletions hawtio-web/src/main/webapp/app/fabric/html/createContainer.html
Expand Up @@ -38,6 +38,13 @@ <h2 class="inline-block">Create New Container</h2>
</div>

<div class="span3">
<h4 ng-show="!forms.create_container.$valid">Required Fields</h4>
<ol>
<li ng-repeat="field in forms.create_container.$error.required">
<strong class="red" >{{massage(field.$name) | humanize}}</strong>
</li>
</ol>
<p>{{getRequiredFields(forms.create_container)}}</p>
<h4>Selected Profiles</h4>
<p class="alert" ng-hide="selectedProfiles.length > 0">
No profiles selected
Expand All @@ -50,25 +57,4 @@ <h4>Selected Profiles</h4>
</div>
</div>


<div modal="showAddProfileDialog">
<form name="addProfile" class="form-horizontal no-bottom-margin" ng-submit="addProfile()">
<div class="modal-header"><h4>Add profiles to container: {{row.id}}</h4></div>
<div class="modal-body">
<div class="control-group">

<label>Select one or more profiles to add to this container: </label>

<div class="controls">

</div>
</div>
<div class="modal-footer">
<input class="btn btn-success" type="submit" value="Add">
<input class="btn btn-primary" ng-click="showAddProfileDialog = false" value="Cancel">
</div>
</div>
</form>
</div>

</div>
7 changes: 7 additions & 0 deletions hawtio-web/src/main/webapp/app/fabric/js/createContainer.ts
Expand Up @@ -234,6 +234,13 @@ module Fabric {
$location.search('profileIds', $scope.selectedProfileIds);
});

$scope.massage = (str) => {
if (str === 'name') {
return 'containerName';
}
return str;
}


$scope.rootContainers = () => {
return Fabric.getRootContainers(jolokia);
Expand Down
10 changes: 5 additions & 5 deletions hawtio-web/src/main/webapp/app/fabric/js/schemaConfigure.ts
Expand Up @@ -54,7 +54,7 @@ module Fabric {

bulkSet(schema, ["jmxUser", "jmxPassword", "parent"], 'required', true);
schema['tabs'] = {
'Default': ['name', 'parent', 'jmxUser', 'jmxPassword', 'saveJmxCredentials', 'number'],
'Common': ['name', 'parent', 'jmxUser', 'jmxPassword', 'saveJmxCredentials', 'number'],
'Advanced': ['*']
};
break;
Expand All @@ -66,15 +66,15 @@ module Fabric {
Core.pathSet(schema.properties, ['password', 'type'], 'password');

schema['tabs'] = {
'Default': ['name', 'host', 'port', 'username', 'password', 'privateKeyFile', 'passPhrase'],
'Common': ['name', 'host', 'port', 'username', 'password', 'privateKeyFile', 'passPhrase'],
'Advanced': ['*']
};
break;

case 'jclouds':
delete schema.properties['parent'];
schema['tabs'] = {
'Default': ['name', 'owner', 'credential', 'providerName', 'imageId', 'hardwareId', 'locationId', 'number', 'instanceType'],
'Common': ['name', 'owner', 'credential', 'providerName', 'imageId', 'hardwareId', 'locationId', 'number', 'instanceType'],
'Advanced': ['*']
};
break;
Expand Down Expand Up @@ -145,7 +145,7 @@ module Fabric {

bulkSet(schema, ['serverUrl', 'login', 'password', 'domain'], 'required', true);
schema['tabs'] = {
'Default': ['name', 'serverUrl', 'login', 'password', 'tryLogin', 'domain', 'gearProfile', 'number'],
'Common': ['name', 'serverUrl', 'login', 'password', 'tryLogin', 'domain', 'gearProfile', 'number'],
'Advanced': ['environmentalVariables', 'systemProperties', 'jvmOpts', '*']
};
break;
Expand All @@ -169,7 +169,7 @@ module Fabric {
delete schema['properties']['users'];

schema['tabs'] = {
'Basic': ['username', 'password', 'role', 'zookeeperPassword', 'zooKeeperServerPort', 'globalResolver', 'resolver', 'manualIp'],
'Common': ['username', 'password', 'role', 'zookeeperPassword', 'zooKeeperServerPort', 'globalResolver', 'resolver', 'manualIp'],
'Advanced': ['*']
};

Expand Down

0 comments on commit bb3cb1c

Please sign in to comment.