diff --git a/refstack-ui/app/app.js b/refstack-ui/app/app.js index 5335e0c2..fc60145a 100644 --- a/refstack-ui/app/app.js +++ b/refstack-ui/app/app.js @@ -43,10 +43,10 @@ url: '/about', templateUrl: '/components/about/about.html' }). - state('capabilities', { - url: '/capabilities', - templateUrl: '/components/capabilities/capabilities.html', - controller: 'CapabilitiesController as ctrl' + state('guidelines', { + url: '/guidelines', + templateUrl: '/components/guidelines/guidelines.html', + controller: 'GuidelinesController as ctrl' }). state('communityResults', { url: '/community_results', diff --git a/refstack-ui/app/components/capabilities/capabilities.html b/refstack-ui/app/components/guidelines/guidelines.html similarity index 92% rename from refstack-ui/app/components/capabilities/capabilities.html rename to refstack-ui/app/components/guidelines/guidelines.html index aff6a8ef..ce0fe691 100644 --- a/refstack-ui/app/components/capabilities/capabilities.html +++ b/refstack-ui/app/components/guidelines/guidelines.html @@ -1,6 +1,6 @@
This cloud passes {{ctrl.requiredPassPercent | number:1}}% ({{ctrl.caps.required.passedCount}}/{{ctrl.caps.required.count}}) diff --git a/refstack-ui/app/components/results-report/resultsReportController.js b/refstack-ui/app/components/results-report/resultsReportController.js index 3f71b026..b92ab280 100644 --- a/refstack-ui/app/components/results-report/resultsReportController.js +++ b/refstack-ui/app/components/results-report/resultsReportController.js @@ -40,7 +40,7 @@ ctrl.isShared = isShared; ctrl.shareTestRun = shareTestRun; ctrl.deleteTestRun = deleteTestRun; - ctrl.updateCapabilities = updateCapabilities; + ctrl.updateGuidelines = updateGuidelines; ctrl.getTargetCapabilities = getTargetCapabilities; ctrl.buildCapabilityV1_2 = buildCapabilityV1_2; ctrl.buildCapabilityV1_3 = buildCapabilityV1_3; @@ -66,7 +66,7 @@ 'object': 'OpenStack Powered Object Storage' }; - /** The schema version of the currently selected capabilities data. */ + /** The schema version of the currently selected guideline data. */ ctrl.schemaVersion = null; /** The selected test status used for test filtering. */ @@ -77,7 +77,7 @@ 'reportDetails.html'; /** - * Retrieve an array of available capability files from the Refstack + * Retrieve an array of available guideline files from the Refstack * API server, sort this array reverse-alphabetically, and store it in * a scoped variable. The scope's selected version is initialized to * the latest (i.e. first) version here as well. After a successful API @@ -85,14 +85,14 @@ * Sample API return array: ["2015.03.json", "2015.04.json"] */ function getVersionList() { - var content_url = refstackApiUrl + '/capabilities'; + var content_url = refstackApiUrl + '/guidelines'; ctrl.versionsRequest = $http.get(content_url).success(function (data) { ctrl.versionList = data.sort().reverse(); if (!ctrl.version) { ctrl.version = ctrl.versionList[0]; } - ctrl.updateCapabilities(); + ctrl.updateGuidelines(); }).error(function (error) { ctrl.showError = true; ctrl.error = 'Error retrieving version list: ' + @@ -189,24 +189,24 @@ /** * This will contact the Refstack API server to retrieve the JSON - * content of the capability file corresponding to the selected + * content of the guideline file corresponding to the selected * version. A function to construct an object from the capability - * date will be called upon successful retrieval. + * data will be called upon successful retrieval. */ - function updateCapabilities() { - ctrl.capabilityData = null; + function updateGuidelines() { + ctrl.guidelineData = null; ctrl.showError = false; - var content_url = refstackApiUrl + '/capabilities/' + + var content_url = refstackApiUrl + '/guidelines/' + ctrl.version; ctrl.capsRequest = $http.get(content_url).success(function (data) { - ctrl.capabilityData = data; + ctrl.guidelineData = data; ctrl.schemaVersion = data.schema; ctrl.buildCapabilitiesObject(); }).error(function (error) { ctrl.showError = true; - ctrl.capabilityData = null; - ctrl.error = 'Error retrieving capabilities: ' + + ctrl.guidelineData = null; + ctrl.error = 'Error retrieving guideline date: ' + angular.toJson(error); }); } @@ -217,7 +217,7 @@ * @returns {Object} Object containing each capability and their status */ function getTargetCapabilities() { - var components = ctrl.capabilityData.components; + var components = ctrl.guidelineData.components; var targetCaps = {}; // The 'platform' target is comprised of multiple components, so @@ -225,7 +225,7 @@ // components. if (ctrl.target === 'platform') { var platform_components = - ctrl.capabilityData.platform.required; + ctrl.guidelineData.platform.required; // This will contain status priority values, where lower // values mean higher priorities. @@ -285,7 +285,7 @@ 'passedFlagged': [], 'notPassedFlagged': [] }; - var capDetails = ctrl.capabilityData.capabilities[capId]; + var capDetails = ctrl.guidelineData.capabilities[capId]; // Loop through each test belonging to the capability. angular.forEach(capDetails.tests, function (testId) { @@ -322,7 +322,7 @@ 'notPassedFlagged': [] }; // Loop through each test belonging to the capability. - angular.forEach(ctrl.capabilityData.capabilities[capId].tests, + angular.forEach(ctrl.guidelineData.capabilities[capId].tests, function (details, testId) { var passed = false; @@ -390,8 +390,8 @@ break; default: ctrl.showError = true; - ctrl.capabilityData = null; - ctrl.error = 'The schema version for the capabilities ' + + ctrl.guidelineData = null; + ctrl.error = 'The schema version for the guideline ' + 'file selected (' + ctrl.schemaVersion + ') is currently not supported.'; return; diff --git a/refstack-ui/app/components/results/resultsController.js b/refstack-ui/app/components/results/resultsController.js index 4c0bc51b..c3f14829 100644 --- a/refstack-ui/app/components/results/resultsController.js +++ b/refstack-ui/app/components/results/resultsController.js @@ -196,7 +196,7 @@ if (ctrl.versionList) { return; } - var content_url = refstackApiUrl + '/capabilities'; + var content_url = refstackApiUrl + '/guidelines'; ctrl.versionsRequest = $http.get(content_url).success(function (data) { ctrl.versionList = data.sort().reverse(); diff --git a/refstack-ui/app/index.html b/refstack-ui/app/index.html index 5b5f94c9..24f403d5 100644 --- a/refstack-ui/app/index.html +++ b/refstack-ui/app/index.html @@ -38,7 +38,7 @@ - + diff --git a/refstack-ui/app/shared/header/header.html b/refstack-ui/app/shared/header/header.html index a4cdb134..89cbc690 100644 --- a/refstack-ui/app/shared/header/header.html +++ b/refstack-ui/app/shared/header/header.html @@ -17,7 +17,7 @@ RefStack