From 31e1da9ee180481ca5b5f2c7818761d6b25a30a0 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Wed, 17 Mar 2021 09:06:08 +0100 Subject: [PATCH] add https:// scheme to result and model files in start action, closes #301 --- src/ic/ic-action.js | 6 +++--- src/ic/ic-store.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ic/ic-action.js b/src/ic/ic-action.js index df4c17f..a33f73f 100644 --- a/src/ic/ic-action.js +++ b/src/ic/ic-action.js @@ -74,14 +74,14 @@ class ICAction extends React.Component { * see: https://villas.fein-aachen.org/doc/controller-protocol.html */ - if (newAction.action == "create" || newAction.action === "delete") { + if (newAction.action === "create" || newAction.action === "delete") { // prepare parameters for delete incl. correct IC id newAction["parameters"] = {}; - if (newAction.action == "delete") { + if (newAction.action === "delete") { newAction.parameters["uuid"] = ic.uuid; } - else if (newAction.action == "create") { + else if (newAction.action === "create") { newAction.parameters = ic.statusupdateraw.properties; } diff --git a/src/ic/ic-store.js b/src/ic/ic-store.js index d892c7d..bc9aa18 100644 --- a/src/ic/ic-store.js +++ b/src/ic/ic-store.js @@ -88,14 +88,14 @@ class InfrastructureComponentStore extends ArrayStore { // adapt URL for newly created result ID a.results.url = a.results.url.replace("RESULTID", action.data.result.id); a.results.url = ICsDataManager.makeURL(a.results.url); - a.results.url = window.location.host + a.results.url; + a.results.url = 'https://' + window.location.host + a.results.url; } if (a.model !== undefined && a.model != null && JSON.stringify(a.model) !== JSON.stringify({})) { // adapt URL(s) for model file let modelURLs = [] for (let url of a.model.url){ let modifiedURL = ICsDataManager.makeURL(url); - modifiedURL = window.location.host + modifiedURL; + modifiedURL = 'https://' + window.location.host + modifiedURL; modelURLs.push(modifiedURL) } a.model.url = modelURLs