Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function getValuesThenPlotChartsAndTabulateData() {
- let queryUrl = generateQueryUrl();
- console.log(queryUrl);
- const options = { headers: { 'Authorization': `Bearer ${ API.access_token }` } };
- let response = await fetch(queryUrl, options);
- let historianData = await response.json();
- let timeStampsAndValues = historianData['Data'][0].Samples;
- // display error message in case of Historian Error code 7: "Service call to central buffer server fail."
- if (historianData['Data'] === undefined) {
- errorMessage.style.display = 'block';
- }
- console.log(timeStampsAndValues);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement