Commit 015ec0df authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

Create a configuration module file

... that conatains information about the SensorThings API server url
and Cesium access token
parent cc1a36ef
# Our custom config file
config.mjs
# Logs
logs
*.log
......
"use strict";
Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyODgxYzJlNi1kNDZiLTQ3ZmQtYmUxYy0yMWI0OGM3NDA5MzAiLCJpZCI6NDczOSwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU0MTUyMzU0MX0.shj2hM3pvsvcmE_wMb2aBDuk_cKWmFmbolltInGImwU";
import { CESIUM_ION_ACCESS_TOKEN } from "./config.mjs";
Cesium.Ion.defaultAccessToken = CESIUM_ION_ACCESS_TOKEN;
// Flag to determine models that will be loaded
// Set to `true` or `false`
......
"use strict";
import {
BASE_URL,
QUERY_PARAMS_COMBINED,
} from "./src_modules/baseUrlPlusQueryParams.mjs";
import { SENSORTHINGS_API_BASE_URL } from "./config.mjs";
import { QUERY_PARAMS_COMBINED } from "./src_modules/baseUrlPlusQueryParams.mjs";
import { calculateVorlaufMinusRuecklaufTemperature } from "./src_modules/calculateTemperatureDiff.mjs";
......@@ -146,7 +145,7 @@ const drawChartUsingSelectedOptions = async function () {
selectedBuildingsDataPointsSamplingRateAbbrevRawObsArr.length === 0
? [[], []]
: await getMetadataPlusObservationsFromSingleOrMultipleDatastreams(
BASE_URL,
SENSORTHINGS_API_BASE_URL,
QUERY_PARAMS_COMBINED,
selectedBuildingsDataPointsSamplingRateAbbrevRawObsArr
);
......@@ -156,7 +155,7 @@ const drawChartUsingSelectedOptions = async function () {
selectedBuildingsDataPointsSamplingRateAbbrevTempDiffArr.length === 0
? [[], []]
: await calculateVorlaufMinusRuecklaufTemperature(
BASE_URL,
SENSORTHINGS_API_BASE_URL,
QUERY_PARAMS_COMBINED,
extractBuildingPlusSamplingRate(
selectedBuildingsDataPointsSamplingRateAbbrevTempDiffArr
......
"use strict";
const BASE_URL = "http://193.196.39.91:8080/frost-icity-tp31/v1.1";
/**
* Create a temporal filter string for the fetched Observations
* @param {String} dateStart Start date in YYYY-MM-DD format
......@@ -33,9 +31,7 @@ const createUrlParametersForGetRequest = function (dateStart, dateStop) {
};
};
const QUERY_PARAMS_COMBINED = createUrlParametersForGetRequest(
export const QUERY_PARAMS_COMBINED = createUrlParametersForGetRequest(
"2020-01-01",
"2021-01-01"
);
export { BASE_URL, QUERY_PARAMS_COMBINED };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment