Skip to content
GitLab
Menu
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
Hide whitespace changes
Inline
Side-by-side
public/js/appChart.js
View file @
016f3273
...
...
@@ -81,6 +81,12 @@ export const getDatastreamIdFromBuildingNumber = function (
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
* @param {String} baseUrl Base URL of the STA server
...
...
@@ -89,8 +95,8 @@ export const getDatastreamIdFromBuildingNumber = function (
*/
export
const
getObservationsUrl
=
function
(
baseUrl
,
datastreamID
)
{
if
(
!
datastreamID
)
return
;
const
full
Datastream
URL
=
`
${
baseUrl
}
/Datastreams(
${
datastreamID
}
)/Observations`
;
return
full
Datastream
URL
;
const
full
Observations
URL
=
`
${
baseUrl
}
/Datastreams(
${
datastreamID
}
)/Observations`
;
return
full
Observations
URL
;
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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