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
b5ed37e8
Commit
b5ed37e8
authored
Jul 12, 2021
by
Pithon Kabiro
Browse files
New function: fetch datastream metadata
parent
016f3273
Changes
1
Show whitespace changes
Inline
Side-by-side
public/js/appChart.js
View file @
b5ed37e8
...
@@ -138,6 +138,19 @@ export const axiosGetRequest = function (urlObservations, urlParamObj) {
...
@@ -138,6 +138,19 @@ export const axiosGetRequest = function (urlObservations, urlParamObj) {
});
});
};
};
const
getDatastreamMetadata
=
async
function
(
urlDatastream
)
{
try
{
// Extract properties of interest
const
{
data
:
{
description
,
name
,
unitOfMeasurement
},
}
=
await
axiosGetRequest
(
urlDatastream
);
return
{
description
,
name
,
unitOfMeasurement
};
}
catch
(
err
)
{
console
.
log
(
err
);
}
};
/**
/**
* Format the response from SensorThings API to make it suitable for heatmap
* Format the response from SensorThings API to make it suitable for heatmap
* @param {Array} obsArray Response from SensorThings API as array
* @param {Array} obsArray Response from SensorThings API as array
...
...
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