How can we use <script> in component's HTML page in MANGO V4, as it was working fine in earlier Version of Mango. i.e MANGO V3
Latest posts made by himanshu
-
<script> tag not wokring inside component's HTML page.
-
maEvents and query by tags not working.
We are trying to filter the data using maEvents
in the way as below
getEvents() {
this.Events
.buildQuery()
.and()
.eq('active', true)
//.eq('eventType', 'DATA_POINT')
.eq('tags.Site', 'WC')
.limit(1000)
.query()
.then(events => {
this.eventsCount = this.mapEvents(events);
this.myAlert = this.eventsCount.information + this.eventsCount.important;
this.subscribeToEvents();
});Possibly unhandled rejection: {"data":{"cause":"ShouldNeverHappenException: No column found for: tags.Site","mangoStatusCode":-1,"mangoStatusName":null,"localizedMessage":"Internal Server Error — com.serotonin.ShouldNeverHappenException: No column found for: tags.Site"},"status":500,"config":{"method":"GET","transformRequest":[null],"jsonpCallbackParam":"callback","timeout":{},"url":"/rest/v1/events","params":{},"headers":{"Accept":"application/json, text/plain, /","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":"d0c58960-cbc6-44c3-8952-49cb6f254e2b"},"cached":false},"statusText":"Server Error","xhrStatus":"complete","mangoStatusText":"Internal Server Error — com.serotonin.ShouldNeverHappenException: No column found for: tags.Site","mangoStatusTextShort":"Internal Server Error — com.serotonin.ShouldNeverHappenException: No column found for: tags.Site","resource":[]}
Then we tried doing the below method:
rqlQuery = "eq(tags.Site,WC)&eq(name,State)";
"this.Point.query({rqlQuery}"This is working but the data is not in prescribed manner and on using with maPoints its showing the below error.
We are trying to follow the example of alarmList.js page of hvac dashboard model
https://docs-v4.mango-os.com/hvac-dashboard-development-create-alarm-list-component
-
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@craigweb
No this in not useful in my scenario as I have urn passing to one of my component and I want to use those URL parameters in component.This example only works when we created two pages from dashboard designer and then linking to each another.
But not working with page to component parsing. -
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@mattfox
Yes we are extending the userModule.
I just want to "get" the param in html / controller file . -
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@mattfox
Hey Mate,
as per you above example I am doing the same thing but my problem is...
I want to access those params in one of my controller/component file.<a ng-href="www.testurl.com/ui/testpage/?toilet=TSTE-H2&dp=Temperature&dp=State&type=shioiaq2">
This link would redirect me to my component called testpage.html in that file i am unable to access the params .
I want to access my params in my components HTML file as well as controller file. -
How can we fetch the data from URL params into another page
dashboard.html =>
<a ng-href="www.testurl.com/ui/testpage/?toilet=TSTE-H2&dp=Temperature&dp=State&type=shioiaq2"testpage.html=>
I am using <ma-state-params> where i want data to get placed on basis of URL.I want to use dashboard.html passed url values to be fetched in <ma-state-params> dynamically
How it can be achieved.?
-
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@mattfox
Thanks Mate..
But the url is coming from different page.
Like <a ng-href="www.testurl.com/ui/testpage/?toilet=TSTE-H2&dp=Temperature&dp=State&type=shioiaq2"and now on testpage.html
i am using <ma-state-params> where i want data to get placed on basis of URL. -
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@mattfox
Yes I would require your help on one more topic..I am passing the params from dashboard-designer
url:
?toilet=TSTE-H2&dp=Temperature&dp=State&type=shioiaq2and i want to dynamicaally fetch URL data in to one of html in
ma-state-params -
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@mattfox said in How we can filter the json and dynamically pass the data to create multiline chart in mango automation:
shioiaq2
Thanks alot mate.
It worked for me..Highly appreciated.
Thanks Alot. -
RE: How we can filter the json and dynamically pass the data to create multiline chart in mango automation
@mattfox
Hey Mate Can you please explain me with small snippet of code / any example please.
Values are not my concern as values are getting passed properly and even the graph is getting created.As I filtered the data like this
{{myIAQTemp=(designer.points | filter:{name:'Temperature'}:true | maFilterByTags:{'Sensor Type': 'shioiaq2'}:true | limitTo:2);""}}
its giving me the output of graph accurate as I want..."Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!"
But this error is ruining my life..it keeps on coming on page load after implementing that filter.