diff --git a/v2/assets/css/style.css b/v2/assets/css/style.css index f18eae9..ecc19e8 100644 --- a/v2/assets/css/style.css +++ b/v2/assets/css/style.css @@ -13,9 +13,6 @@ body { font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif !important; color: rgba(83, 83, 83, 1) !important; } -.main-container { - position: relative; -} body, .main-content { background: #fff; /* right: 0px; @@ -98,14 +95,16 @@ body, .main-content { display: inline-block; font-size: 13px; font-weight: normal; - margin-bottom: 3px; + margin-bottom: 3px !important; margin-right: 3px; padding: 4px 22px 5px 9px; position: relative; + text-transform: capitalize; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15); transition: all 0.2s ease 0s; vertical-align: baseline; white-space: nowrap; + overflow: hidden; } .no-border-search { padding-left: 10px; @@ -235,6 +234,9 @@ button[disabled] { pointer-events: auto !important; cursor: not-allowed !important; } +.wizard-steps li .title { + white-space: nowrap; +} .wizard-steps li.active .step { transform: scale(1.2, 1.2); -webkit-transform: scale(1.2, 1.2); @@ -445,6 +447,9 @@ a:active { .label:first-letter { text-transform: uppercase !important; } +.label-red { + background-color: #e2755f !important; +} .capitalize { text-transform: capitalize; } @@ -626,8 +631,9 @@ div.center-align { .network-draggable { position: relative; - width: 132px !important; + width: 155px !important; border-radius: 7px; + cursor: move; } .external-event { float: left !important; @@ -985,24 +991,27 @@ circle[depth='4'] { margin-left: -4px; } .table-col { - width: 87%; + width: 75%; } .role-col { - width: 10%; + width: 24%; } .role-panel { z-index: 10; + margin-left: 10px; + margin-right: -25px; } .role-panel.stick { position: fixed; z-index: 10000; top: 0px; + width: 24%; } .role-assign-drag { border: 1px solid rgba(190, 210, 219, 0.5) !important; border-radius: 4px; min-height: 120px; - width: 122px; + width: 90%; } .role-assign-drop { min-height: 30px; @@ -1012,8 +1021,8 @@ circle[depth='4'] { margin-left: 7px; margin-top: 7px; display: block !important; - width: 105px !important; border-radius: 4px !important; + cursor: move; } .drag-enter-role { background: none repeat scroll 0 0 #F0F9FF; diff --git a/v2/assets/img/security.png b/v2/assets/img/package_config.png similarity index 100% rename from v2/assets/img/security.png rename to v2/assets/img/package_config.png diff --git a/v2/data/config.json b/v2/data/config.json index ea207ef..3901df8 100644 --- a/v2/data/config.json +++ b/v2/data/config.json @@ -1,131 +1,334 @@ { - "cluster": { - "id": 1, - "name": "demo", - "adapter_id": 1, - "os_id": 1 - }, - "partition": { - "/var": { - "percentage": 30, - "max_size": "10G" + "openstack": { + "cluster": { + "id": 1, + "name": "demo", + "adapter_id": 1, + "os_id": 1 }, - "/home": { - "percentage": 30, - "max_size": "20G" - } - }, - "interface": { - "eth0": { - "subnet_id": 1, - "is_mgmt": true, - "is_promiscuous": false + "partition": { + "/var": { + "percentage": 30, + "max_size": "10G" + }, + "/usr": { + "percentage": 30, + "max_size": "20G" + } }, - "eth1": { - "subnet_id": 2, - "is_mgmt": false, - "is_promiscuous": true + "interface": { + "eth0": { + "subnet_id": 1, + "is_mgmt": true, + "is_promiscuous": false + }, + "eth1": { + "subnet_id": 2, + "is_mgmt": false, + "is_promiscuous": true + }, + "eth2": { + "subnet_id": 1, + "is_mgmt": false, + "is_promiscuous": false + }, + "eth3": { + "subnet_id": 2, + "is_mgmt": false, + "is_promiscuous": false + } }, - "eth2": { - "subnet_id": 1, - "is_mgmt": false, - "is_promiscuous": false + "general": { + "timezone": "America/Los_Angeles", + "language": "en", + "http_proxy": "", + "https_proxy": "", + "no_proxy": [""], + "ntp_server": "", + "dns_servers": [""], + "search_path": ["ods.com"], + "domain": "ods.com", + "default_gateway": "10.145.88.1", + "local_repo": "" }, - "eth3": { - "subnet_id": 2, - "is_mgmt": false, - "is_promiscuous": false - } - }, - "general": { - "timezone": "America/Los_Angeles", - "language": "en", - "http_proxy": "", - "https_proxy": "", - "no_proxy": [""], - "ntp_server": "", - "dns_servers": [""], - "search_path": ["ods.com"], - "domain": "ods.com", - "default_gateway": "10.145.88.1", - "local_repo": "" - }, - "server_credentials": { - "username": "root", - "password": "huawei" - }, - "service_credentials": { - "rabbitmq": { - "username": "guest", - "password": "guest" - }, - "compute": { - "username": "nova", - "password": "nova" - }, - "dashboard": { - "username": "dashboard", - "password": "dashboard" - }, - "identity": { - "username": "keystone", - "password": "keystone" - }, - "image": { - "username": "glance", - "password": "glance" - }, - "metering": { - "username": "ceilometer", - "password": "ceilometer" - }, - "mysql": { + "server_credentials": { "username": "root", - "password": "root" + "password": "huawei" }, - "volume": { - "username": "cinder", - "password": "cinder" + "service_credentials": { + "rabbitmq": { + "username": "guest", + "password": "guest" + }, + "compute": { + "username": "nova", + "password": "nova" + }, + "dashboard": { + "username": "dashboard", + "password": "dashboard" + }, + "identity": { + "username": "keystone", + "password": "keystone" + }, + "image": { + "username": "glance", + "password": "glance" + }, + "metering": { + "username": "ceilometer", + "password": "ceilometer" + }, + "mysql": { + "username": "root", + "password": "root" + }, + "volume": { + "username": "cinder", + "password": "cinder" + } + }, + "console_credentials": { + "admin": { + "username": "admin", + "password": "admin" + }, + "compute": { + "username": "nova", + "password": "nova" + }, + "dashboard": { + "username": "dashboard", + "password": "dashboard" + }, + "image": { + "username": "glance", + "password": "glance" + }, + "metering": { + "username": "ceilometer", + "password": "ceilometer" + }, + "network": { + "username": "quantum", + "password": "quantum" + }, + "object-store": { + "username": "swift", + "password": "swift" + }, + "volume": { + "username": "cinder", + "password": "cinder" + } + }, + "network_mapping": { + "management": "", + "tenant": "", + "storage": "", + "external": "" } }, - "console_credentials": { - "admin": { - "username": "admin", - "password": "admin" + "openstack_ceph": { + "cluster": { + "id": 1, + "name": "demo", + "adapter_id": 1, + "os_id": 1 }, - "compute": { - "username": "nova", - "password": "nova" + "partition": { + "/var": { + "percentage": 30, + "max_size": "10G" + }, + "/usr": { + "percentage": 30, + "max_size": "20G" + } }, - "dashboard": { - "username": "dashboard", - "password": "dashboard" + "interface": { + "eth0": { + "subnet_id": 1, + "is_mgmt": true, + "is_promiscuous": false + }, + "eth1": { + "subnet_id": 2, + "is_mgmt": false, + "is_promiscuous": true + }, + "eth2": { + "subnet_id": 1, + "is_mgmt": false, + "is_promiscuous": false + }, + "eth3": { + "subnet_id": 2, + "is_mgmt": false, + "is_promiscuous": false + } }, - "image": { - "username": "glance", - "password": "glance" + "general": { + "timezone": "America/Los_Angeles", + "language": "en", + "http_proxy": "", + "https_proxy": "", + "no_proxy": [""], + "ntp_server": "", + "dns_servers": [""], + "search_path": ["ods.com"], + "domain": "ods.com", + "default_gateway": "10.145.88.1", + "local_repo": "" }, - "metering": { - "username": "ceilometer", - "password": "ceilometer" + "server_credentials": { + "username": "root", + "password": "huawei" }, - "network": { - "username": "quantum", - "password": "quantum" + "service_credentials": { + "rabbitmq": { + "username": "guest", + "password": "guest" + }, + "compute": { + "username": "nova", + "password": "nova" + }, + "dashboard": { + "username": "dashboard", + "password": "dashboard" + }, + "identity": { + "username": "keystone", + "password": "keystone" + }, + "image": { + "username": "glance", + "password": "glance" + }, + "metering": { + "username": "ceilometer", + "password": "ceilometer" + }, + "mysql": { + "username": "root", + "password": "root" + }, + "volume": { + "username": "cinder", + "password": "cinder" + } }, - "object-store": { - "username": "swift", - "password": "swift" + "console_credentials": { + "admin": { + "username": "admin", + "password": "admin" + }, + "compute": { + "username": "nova", + "password": "nova" + }, + "dashboard": { + "username": "dashboard", + "password": "dashboard" + }, + "image": { + "username": "glance", + "password": "glance" + }, + "metering": { + "username": "ceilometer", + "password": "ceilometer" + }, + "network": { + "username": "quantum", + "password": "quantum" + }, + "object-store": { + "username": "swift", + "password": "swift" + }, + "volume": { + "username": "cinder", + "password": "cinder" + } }, - "volume": { - "username": "cinder", - "password": "cinder" + "network_mapping": { + "management": "", + "tenant": "", + "storage": "", + "external": "", + "public_network": "", + "cluster_network": "" + }, + "ceph_config": { + "global_config": { + "osd_pool_pg_num": "1024", + "osd_pool_pgp_num": "1024", + "osd_pool_size": "3" + }, + "osd_config": { + "journal_size": "10000", + "op_threads": 10 + } } }, - "network_mapping": { - "management": "", - "tenant": "", - "storage": "", - "public": "" + "os_only": { + "cluster": { + "id": 1, + "name": "demo", + "adapter_id": 1, + "os_id": 1 + }, + "partition": { + "/var": { + "percentage": 30, + "max_size": "10G" + }, + "/usr": { + "percentage": 30, + "max_size": "20G" + } + }, + "interface": { + "eth0": { + "subnet_id": 1, + "is_mgmt": true, + "is_promiscuous": false + }, + "eth1": { + "subnet_id": 2, + "is_mgmt": false, + "is_promiscuous": true + }, + "eth2": { + "subnet_id": 1, + "is_mgmt": false, + "is_promiscuous": false + }, + "eth3": { + "subnet_id": 2, + "is_mgmt": false, + "is_promiscuous": false + } + }, + "general": { + "timezone": "America/Los_Angeles", + "language": "en", + "http_proxy": "", + "https_proxy": "", + "no_proxy": [""], + "ntp_server": "", + "dns_servers": [""], + "search_path": ["ods.com"], + "domain": "ods.com", + "default_gateway": "10.145.88.1", + "local_repo": "" + }, + "server_credentials": { + "username": "root", + "password": "huawei" + } } -} +} \ No newline at end of file diff --git a/v2/data/wizard_steps.json b/v2/data/wizard_steps.json index aed8549..fb9c92d 100644 --- a/v2/data/wizard_steps.json +++ b/v2/data/wizard_steps.json @@ -5,7 +5,7 @@ "title": "Server Selection", "state": "active", "template": "src/app/wizard/server_selection.tpl.html", - "description": "Select the servers you want to use for OpenStack" + "description": "Select the servers you want to use for your target system(s)" }, { "id": 2, "name": "os_global", @@ -29,10 +29,10 @@ "description": "" }, { "id": 5, - "name": "security", - "title": "Security", + "name": "package_config", + "title": "Target System Config", "state": "", - "template": "src/app/wizard/security.tpl.html", + "template": "src/app/wizard/package_config.tpl.html", "description": "" }, { "id": 6, @@ -58,39 +58,39 @@ }], "os": [{ "id": 1, + "name": "sv_selection", "title": "Server Selection", "state": "active", - "template": "templates/server_selection.html" + "template": "src/app/wizard/server_selection.tpl.html", + "description": "Select the servers you want to use for your targer system(s)" }, { "id": 2, - "title": "Timezone & Language", + "name": "os_global", + "title": "OS Global Config", "state": "", - "template": "templates/timezone_language.html" + "template": "src/app/wizard/global.tpl.html", + "description": "" }, { "id": 3, - "title": "Partition", - "state": "", - "template": "templates/partition.html" - }, { - "id": 4, + "name": "network", "title": "Network", "state": "", - "template": "templates/network.html" + "template": "src/app/wizard/network.tpl.html", + "description": "" + }, { + "id": 4, + "name": "partition", + "title": "Partition", + "state": "", + "template": "src/app/wizard/partition.tpl.html", + "description": "" }, { "id": 5, - "title": "Host Configuration", - "state": "", - "template": "templates/host_config.html" - }, { - "id": 6, - "title": "Security", - "state": "", - "template": "templates/security.html" - }, { - "id": 7, + "name": "review", "title": "Review", "state": "", - "template": "templates/review.html" + "template": "src/app/wizard/review.tpl.html", + "description": "Click a section title to navigate back to that page." }], "ts": [{ "id": 1, diff --git a/v2/src/app/appDev.js b/v2/src/app/appDev.js index 9e466ef..fc38b3e 100644 --- a/v2/src/app/appDev.js +++ b/v2/src/app/appDev.js @@ -20,78 +20,91 @@ compassAppDev.run(function($httpBackend, settings, $http) { $httpBackend.whenGET(settings.apiUrlBase + '/adapters').respond(function(method, url, data) { console.log(method, url); var adapters = [{ - "id": 1, - "display_name": "openstack", - "display": "OpenStack", - "os_installer": "cobbler", - "package_installer": "chef", - "supported_oses": [{ - "name": "CentOs", - "id": 1 - }, { - "name": "Ubuntu", + "flavors": [], + "display_name": "os_only", + "name": "os_only", + "roles": [], + "supported_oses": [{ + "os_id": 3, + "id": 3, + "name": "CentOS-6.5-x86_64" + }, { + "os_id": 4, + "id": 4, + "name": "Ubuntu-12.04-x86_64" + }], "id": 2 - }], - "flavors": [{ - "display_name": "allinone", - "id": 1, - "name": "allinone", - "roles": [{ - "display_name": "Compute", - "name": "os-compute-worker" - }, { - "display_name": "Controller", - "name": "os-controller" - }, { - "display_name": "Network", - "name": "os-network" - }, { - "display_name": "Storage", - "name": "os-block-storage-worker" - }] }, { - "display_name": "multiroles", - "id": 2, - "name": "multiroles", - "roles": [{ - "display_name": "Compute", - "name": "os-compute-worker" + "flavors": [], + "name": "ceph(chef)", + "roles": [], + "distributed_system_id": 2, + "supported_oses": [{ + "os_id": 3, + "id": 3, + "name": "CentOS-6.5-x86_64" }, { - "display_name": "Controller", - "name": "os-controller" + "os_id": 4, + "id": 4, + "name": "Ubuntu-12.04-x86_64" + }], + "distributed_system_name": "ceph", + "display_name": "ceph(chef)", + "id": 4 + }, { + "flavors": [{ + "roles": [{ + "display_name": "all in one compute", + "description": "all in one compute", + "name": "allinone-compute" + }], + "display_name": "All-In-One", + "id": 1, + "template": "allinone.tmpl", + "name": "allinone" }, { - "display_name": "Network", - "name": "os-network" + "roles": [], + "display_name": "Single Controller, Multi-compute", + "id": 2, + "name": "single-contoller-multi-compute" }, { - "display_name": "Storage", - "name": "os-block-storage-worker" - }] - }] - }, { - "id": 2, - "display_name": "hadoop", - "display": "Hadoop", - "os_installer": "cobbler", - "package_installer": "chef", - "roles": [{ - "display_name": "Compute", - "name": "os-compute-worker" + "roles": [], + "display_name": "Multi-node Cluster", + "id": 3, + "template": "multinodes.tmpl", + "name": "multinodes" + }], + "name": "openstack_icehouse", + "distributed_system_id": 1, + "supported_oses": [{ + "os_id": 3, + "id": 3, + "name": "CentOS-6.5-x86_64" + }, { + "os_id": 4, + "id": 4, + "name": "Ubuntu-12.04-x86_64" + }], + "distributed_system_name": "openstack", + "display_name": "OpenStack Icehouse", + "id": 5 }, { - "display_name": "Controller", - "name": "os-controller" - }, { - "display_name": "Network", - "name": "os-network" - }], - "supported_oses": [{ - "name": "CentOs", - "id": 1 - }, { - "name": "Ubuntu", - "id": 2 - }], - "flavors": [] - }]; + "id": 6, + "name": "ceph_openstack_icehouse", + "display_name": "OpenStack and Ceph", + "supported_oses": [{ + "os_id": 3, + "id": 3, + "name": "CentOS-6.5-x86_64" + }, { + "os_id": 4, + "id": 4, + "name": "Ubuntu-12.04-x86_64" + }], + "flavors": [] + + }]; + return [200, adapters, {}]; }); @@ -649,9 +662,9 @@ compassAppDev.run(function($httpBackend, settings, $http) { var index = url.indexOf("clusters/"); var id = url.substring(index).split("/")[1]; var cluster = { - "id": id, + "id": parseInt(id), "name": "Cluster" + id, - "adapter_id": 1, + "adapter_id": 6, "os_id": 1, "editable": true, "create_by": "user@someemail.com", @@ -674,7 +687,7 @@ compassAppDev.run(function($httpBackend, settings, $http) { "display_name": "Network", "name": "os-network" }, { - "display_name": "database", + "display_name": "Database", "name": "os-db" }] }, @@ -702,7 +715,7 @@ compassAppDev.run(function($httpBackend, settings, $http) { "percentage": 30, "max_size": "10G" }, - "/home": { + "/usr": { "percentage": 30, "max_size": "10G" } @@ -783,7 +796,9 @@ compassAppDev.run(function($httpBackend, settings, $http) { "management": "eth0", "tenant": "eth0", "storage": "eth0", - "public": "eth1" + "external": "eth1", + "cluster_config": "", + "public_config": "" } } }; @@ -957,7 +972,7 @@ compassAppDev.run(function($httpBackend, settings, $http) { "display_name": "Message Queue", "name": "os-mq" }, { - "display_name": "database", + "display_name": "Database", "name": "os-db" }]; diff --git a/v2/src/app/services.js b/v2/src/app/services.js index 07a288e..13be717 100644 --- a/v2/src/app/services.js +++ b/v2/src/app/services.js @@ -1,7 +1,7 @@ define(['angular'], function() { var servicesModule = angular.module('compass.services', []); // stateService is used for dynamically add/edit state -/* .service('stateService', ['$state', + /* .service('stateService', ['$state', function($state) { this.addStates = function(pendingStates) { var existingStates = $state.get(); // get all the current existing states @@ -341,6 +341,7 @@ define(['angular'], function() { wizard.service_credentials = {}; wizard.console_credentials = {}; wizard.network_mapping = {}; + wizard.ceph_config = {}; }; wizard.init(); @@ -354,6 +355,9 @@ define(['angular'], function() { wizard.setServiceCredentials(config.service_credentials); wizard.setConsoleCredentials(config.console_credentials); wizard.setNetworkMapping(config.network_mapping); + if (config.ceph_config) { + wizard.setCephConfig(config.ceph_config); + } }; wizard.setClusterInfo = function(cluster) { @@ -396,14 +400,14 @@ define(['angular'], function() { return angular.copy(wizard.servers); }; /* - wizard.setAdapter = function(adapter) { //// - wizard.adapter = adapter; - }; + wizard.setAdapter = function(adapter) { //// + wizard.adapter = adapter; + }; - wizard.getAdapter = function() { ///// - return angular.copy(wizard.adapter); - }; -*/ + wizard.getAdapter = function() { ///// + return angular.copy(wizard.adapter); + }; + */ wizard.setGeneralConfig = function(config) { wizard.generalConfig = config; }; @@ -422,14 +426,14 @@ define(['angular'], function() { // keey routing table for later use /* - wizard.setRoutingTable = function(routingTb) { - wizard.routingtable = routingTb; - }; + wizard.setRoutingTable = function(routingTb) { + wizard.routingtable = routingTb; + }; - wizard.getRoutingTable = function() { - return wizard.routingtable; - }; - */ + wizard.getRoutingTable = function() { + return wizard.routingtable; + }; + */ wizard.setInterfaces = function(interfaces) { wizard.interfaces = interfaces; @@ -478,6 +482,14 @@ define(['angular'], function() { return angular.copy(wizard.network_mapping); }; + wizard.setCephConfig = function(cephConfig) { + wizard.ceph_config = cephConfig; + }; + + wizard.getCephConfig = function() { + return angular.copy(wizard.ceph_config); + }; + return wizard; } ]) diff --git a/v2/src/app/wizard/global.tpl.html b/v2/src/app/wizard/global.tpl.html index 6f0e2db..980be91 100644 --- a/v2/src/app/wizard/global.tpl.html +++ b/v2/src/app/wizard/global.tpl.html @@ -174,6 +174,40 @@ +