From ec4a8a954721063205251483aeb4945a448c47c7 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Fri, 5 Mar 2021 19:15:25 +0000 Subject: [PATCH] Add shared-file-system guideline Refstack backend was missing shared-file-system in the mapping which resulted in backend not being able to parse the Shared File System guideline download from the interop repo. The refstack-ui needs to be edited as well so that it can properly render the Shared File System guideline on the website. Change-Id: I017a331ab010f94b223add22a2b55a02b6996db5 --- .../app/components/guidelines/guidelines.html | 1 + .../components/guidelines/guidelinesController.js | 12 ++++++++++-- refstack-ui/app/components/home/home.html | 1 + .../components/products/partials/testsTable.html | 1 + .../app/components/products/productController.js | 3 ++- .../results-report/partials/editTestModal.html | 1 + .../components/results-report/resultsReport.html | 1 + .../results-report/resultsReportController.js | 13 ++++++++++--- refstack-ui/app/components/results/results.html | 1 + .../app/components/results/resultsController.js | 8 ++++++-- refstack/api/guidelines.py | 11 ++++++++--- 11 files changed, 42 insertions(+), 11 deletions(-) diff --git a/refstack-ui/app/components/guidelines/guidelines.html b/refstack-ui/app/components/guidelines/guidelines.html index d04a2185..752de475 100644 --- a/refstack-ui/app/components/guidelines/guidelines.html +++ b/refstack-ui/app/components/guidelines/guidelines.html @@ -20,6 +20,7 @@ + diff --git a/refstack-ui/app/components/guidelines/guidelinesController.js b/refstack-ui/app/components/guidelines/guidelinesController.js index 1bcda20d..90415dc3 100644 --- a/refstack-ui/app/components/guidelines/guidelinesController.js +++ b/refstack-ui/app/components/guidelines/guidelinesController.js @@ -140,7 +140,10 @@ var targetComponents = null; var old_type = ctrl.gl_type; - if (ctrl.target === 'dns' || ctrl.target === 'orchestration') { + if (ctrl.target === 'dns' || + ctrl.target === 'orchestration' || + ctrl.target === 'shared-file-system' + ) { ctrl.gl_type = ctrl.target; } else { ctrl.gl_type = 'powered'; @@ -157,7 +160,12 @@ // components. if (ctrl.target === 'platform' || ctrl.schema >= '2.0') { if ('add-ons' in ctrl.guidelines) { - targetComponents = ['os_powered_' + ctrl.target]; + // replace dashes by underscores in case the filename of + // a specific add-on contains dashes however the component + // name is written with underscores, f.e. like in case of + // shared-file-system.2020.11.json add-on + var target = ctrl.target.replace('-', '_'); + targetComponents = ['os_powered_' + target]; } else if (ctrl.schema >= '2.0') { var platformsMap = { 'platform': 'OpenStack Powered Platform', diff --git a/refstack-ui/app/components/home/home.html b/refstack-ui/app/components/home/home.html index f4c16fda..7a732758 100644 --- a/refstack-ui/app/components/home/home.html +++ b/refstack-ui/app/components/home/home.html @@ -30,6 +30,7 @@
  • OpenStack Powered Object Storage
  • OpenStack with DNS
  • OpenStack with Orchestration
  • +
  • OpenStack with Shared File System
  • diff --git a/refstack-ui/app/components/products/partials/testsTable.html b/refstack-ui/app/components/products/partials/testsTable.html index 346efb34..c360ac67 100644 --- a/refstack-ui/app/components/products/partials/testsTable.html +++ b/refstack-ui/app/components/products/partials/testsTable.html @@ -94,6 +94,7 @@ + OpenStack Powered Object Storage +
    Associated Product: diff --git a/refstack-ui/app/components/results-report/resultsReport.html b/refstack-ui/app/components/results-report/resultsReport.html index 7d022647..49c6ebf8 100644 --- a/refstack-ui/app/components/results-report/resultsReport.html +++ b/refstack-ui/app/components/results-report/resultsReport.html @@ -87,6 +87,7 @@ + diff --git a/refstack-ui/app/components/results-report/resultsReportController.js b/refstack-ui/app/components/results-report/resultsReportController.js index e97d4600..d071e9e4 100644 --- a/refstack-ui/app/components/results-report/resultsReportController.js +++ b/refstack-ui/app/components/results-report/resultsReportController.js @@ -68,7 +68,8 @@ 'compute': 'OpenStack Powered Compute', 'object': 'OpenStack Powered Object Storage', 'dns': 'OpenStack with DNS', - 'orchestration': 'OpenStack with orchestration' + 'orchestration': 'OpenStack with orchestration', + 'shared-file-system': 'OpenStack with Shared File System' }; /** The schema version of the currently selected guideline data. */ @@ -90,7 +91,10 @@ * Sample API return array: ["2015.03.json", "2015.04.json"] */ function getVersionList() { - if (ctrl.target === 'dns' || ctrl.target === 'orchestration') { + if (ctrl.target === 'dns' || + ctrl.target === 'orchestration' || + ctrl.target === 'shared-file-system' + ) { ctrl.gl_type = ctrl.target; } else { @@ -279,7 +283,10 @@ var targetCaps = {}; var targetComponents = null; var old_type = ctrl.gl_type; - if (ctrl.target === 'dns' || ctrl.target === 'orchestration') { + if (ctrl.target === 'dns' || + ctrl.target === 'orchestration' || + ctrl.target === 'shared-file-system' + ) { ctrl.gl_type = ctrl.target; } else { ctrl.gl_type = 'powered'; diff --git a/refstack-ui/app/components/results/results.html b/refstack-ui/app/components/results/results.html index d627a1fc..c4d83e88 100644 --- a/refstack-ui/app/components/results/results.html +++ b/refstack-ui/app/components/results/results.html @@ -157,6 +157,7 @@ +