Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#526 tidied up the create jclouds form and saved more fields so they…
… are auto-populated next time
  • Loading branch information
jstrachan committed Sep 7, 2013
1 parent 2441556 commit 6733fad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
32 changes: 21 additions & 11 deletions hawtio-web/src/main/webapp/app/fabric/js/createContainer.ts
Expand Up @@ -8,20 +8,30 @@ module Fabric {
number: 1
};

// the properties stored in local storage...
// the form properties stored in local storage
// which we then default when creating a new container
var localStorageProperties = {
child: {
jmxUser: 'fabric.userName',
jmxPassword: 'fabric.password'
},
jmxUser: 'fabric.userName',
jmxPassword: 'fabric.password'
},
openshift: {
serverUrl: 'openshift.serverUrl',
login: 'openshift.login',
password: 'openshift.password',
domain: 'openshift.domain',
gearProfile: 'openshift.gearProfile'
}

serverUrl: 'openshift.serverUrl',
login: 'openshift.login',
password: 'openshift.password',
domain: 'openshift.domain',
gearProfile: 'openshift.gearProfile'
},
jclouds: {
owner: 'jclouds.owner',
credential: 'jclouds.credential',
providerName: 'jclouds.providerName',
imageId: 'jclouds.imageId',
hardwareId: 'jclouds.hardwareId',
locationId: 'jclouds.locationId',
group: 'jclouds.group',
instanceType: 'jclouds.instanceType'
}
};

$scope.providers = Fabric.registeredProviders(jolokia);
Expand Down
14 changes: 4 additions & 10 deletions hawtio-web/src/main/webapp/app/fabric/js/schemaConfigure.ts
Expand Up @@ -51,12 +51,13 @@ module Fabric {
};
break;

case 'jcloud':
case 'jclouds':
delete schema.properties['parent'];

bulkSet(schema, ['owner', 'credential'], 'required', true);
bulkSet(schema, ['owner', 'credential', 'providerName'], 'required', true);
schema['tabs'] = {
'Default': ['name', 'owner', 'credential', 'imageId', 'hardwareId', 'locationId', 'number', '*']
'Default': ['name', 'owner', 'credential', 'providerName', 'imageId', 'hardwareId', 'locationId', 'number', 'instanceType'],
'Advanced': ['*']
};
break;

Expand All @@ -80,13 +81,6 @@ module Fabric {
'Default': ['name', 'serverUrl', 'login', 'password', 'domain'],
'Advanced': ['gearProfile', 'number', 'environmentalVariables', 'systemProperties', 'jvmOpts', '*']
};

/*
// add some defaults...
// TODO this should be easier!
Core.pathSet(schema, ["properties", "serverUrl", "formTemplate"],
'<input type="text" ng-model="entity.serverUrl" value="">');
*/
break;


Expand Down

0 comments on commit 6733fad

Please sign in to comment.