Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
iCity
EnergyDashboard
Commits
016f3273
Commit
016f3273
authored
Jul 12, 2021
by
Pithon Kabiro
Browse files
New function: create datastream URL
parent
0ed38717
Changes
1
Show whitespace changes
Inline
Side-by-side
public/js/appChart.js
View file @
016f3273
...
@@ -81,6 +81,12 @@ export const getDatastreamIdFromBuildingNumber = function (
...
@@ -81,6 +81,12 @@ export const getDatastreamIdFromBuildingNumber = function (
return
datastreamIdMatched
;
return
datastreamIdMatched
;
};
};
const
getDatastreamUrl
=
function
(
baseUrl
,
datastreamID
)
{
if
(
!
datastreamID
)
return
;
const
fullDatastreamURL
=
`
${
baseUrl
}
/Datastreams(
${
datastreamID
}
)`
;
return
fullDatastreamURL
;
};
/**
/**
* Create URL to fetch the Observations corresponding to a provided Datastream
* Create URL to fetch the Observations corresponding to a provided Datastream
* @param {String} baseUrl Base URL of the STA server
* @param {String} baseUrl Base URL of the STA server
...
@@ -89,8 +95,8 @@ export const getDatastreamIdFromBuildingNumber = function (
...
@@ -89,8 +95,8 @@ export const getDatastreamIdFromBuildingNumber = function (
*/
*/
export
const
getObservationsUrl
=
function
(
baseUrl
,
datastreamID
)
{
export
const
getObservationsUrl
=
function
(
baseUrl
,
datastreamID
)
{
if
(
!
datastreamID
)
return
;
if
(
!
datastreamID
)
return
;
const
full
Datastream
URL
=
`
${
baseUrl
}
/Datastreams(
${
datastreamID
}
)/Observations`
;
const
full
Observations
URL
=
`
${
baseUrl
}
/Datastreams(
${
datastreamID
}
)/Observations`
;
return
full
Datastream
URL
;
return
full
Observations
URL
;
};
};
/**
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment