@CraigWeb Hi Craig, thanks for the info! My only issue with the filtering point list is that I want to allow the user to select multiple points. I would still suggest that the same filter from Data Sources > Data Points list is applied to all instances of data-point-selector. It might sound silly, but the concepts of wildcards and case sensitivity is a bit much for our end users.
Posts made by cbyrne
-
RE: Filter behaviour and ma-data-point-selector
-
Filter behaviour and ma-data-point-selector
The filter behaviour in the Data Sources > Data Points list is excellent. Primarily, it is case insensitive and has an implied glob. I would like to suggest that it is applied to the data point details page's data point selector also.
I would also like to add this filter behaviour to my own pages that use ma-data-point-selector, any advice on how to go about this would be appreciated.
ma-data-point-selector is an great component and I really like using it in my own pages, could we please get some documentation? Up to now I've gone off guesses and page inspections.
Thanks!
-
RE: Overriding system logo for specific users
@CraigWeb Thanks Craig, that's what I'm currently doing.
-
Overriding system logo for specific users
We're trying to provide a white label service for a client, so we would like to be able to replace our logo with the clients site-wide, but only for that client's users.
The logo in question is what's set by logo source in the UI settings.
i.e.
Currently dealing with a Mango v3 instance but I can see the issue arising for v4 also.
Thanks!
-
Saving Excel Report returned from API call
I'm trying to save an excel report returned after calling
/rest/latest/excel-reports/download/{XID}
My first attempt doubles the file size so it looks like I'm saving bytes as chars.
saveExcelFile(data, report_filename) { let link = document.createElement("a"); let blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}) link.href = URL.createObjectURL(blob); link.download = report_filename; link.click(); URL.revokeObjectURL(link.href) link.remove(); }
The response payload looks to be base64 encoded but calling atob fails.
I've also played around with a string to array buffer function to convert the data which gives me the correct filesize but still not a completely correct conversion.
https://stackoverflow.com/questions/34993292/how-to-save-xlsx-data-to-file-as-a-blobA comparison of the hexdumps: (working file on left, file from original code snippet above on right)
From the hexdump I can see that the first ~49 bytes are are correct but then the encoding changes
-
Tag columns visible in Data Sources > Data Points View
When viewing the data points for a data source, the default view seems to be all tags as columns. Tags are proving very useful but this behavior is quite unwieldy as you end up with a very wide container you need to horizontally scroll through by default.
Similarly, when tags are unchecked, this isn't remembered on page update, i.e. refresh or point edit.
-
Remove Permissions from User Profile View
When I log in as a normal user and go to my user profile, the permissions section is still visible even though the user does not have permission to edit their own profile.
The user can't actually make any changes as it throws a permissions error on save but I don't think it should be visible to them at all.
-
RE: DataSourceXID_SUCCESS already exists on Scripting Data Source validation
@terrypacker Thanks for the clarification Terry, is this intended behavior or a bug?
-
RE: DataSourceXID_SUCCESS already exists on Scripting Data Source validation
@aaron-asbra Thanks for your help, I managed to get through things ok without it being too much of a hassle.
On another note, meta points with scripting points as their external points don't seem to get triggered by context updates.
I have my data coming in via a polling data file source. On import, this triggers some scripting points to transform the data. I then added a meta point to sum up some of the scripting points. A simple
return (x.value + y.value + z.value)
with 'x' set to update context. This generates history just fine but no new values are ever created. I attached a log and some debug prints to see if it was actually getting triggered and it seems not.
This isn't a huge issue as I've just used more scripting points instead of meta points, but I just wanted to report it.
Thanks!
-
DataSourceXID_SUCCESS already exists on Scripting Data Source validation
When creating a scripting data source, I am getting the following error when trying to validate my script. The solution currently is to restart mango.
Mango 4.3.5
Steps to reproduce:
- Create new scripting data source with empty script and no external points. Set to polling and save.
- Create a new data point called test with variable name test
- Add an external data point with variable name point and enable updates context.
- Write a simple script to copy over the last point value as an example such as:
var x = point.lastValue(0,false); test.set(x.value, x.time)
- Save
- Turn off polling
- Attempt to validate script and get the following:
com.serotonin.m2m2.rt.dataSource.PollingDataSource_DS_c535dc5a-9bfc-4598-a0cc-b646f839b0c6_SUCCESS already exists
I think it also happens after a script error when validating.
-
Scripting data source UI - 'Key' column in external context points
As can be seen, when selected points have tags, the key input box is shrunk down to an almost unusable size. Mango 3.7.12
-
Email BCC and mass email
Is it currently possible to designate email addresses in mailing lists that should be BCC'd?
On a slightly related note, is it possible to send an email to all users? This would definitely need to be BCC'd.
-
RE: Data Source Permissions after import?
@dan don't mention it! Happy to help. I actually omitted one or two things from that config for brevity. I'll edit it now, just some logging you might want to add.
-
RE: Data Source Permissions after import?
@dan Here's my apache config, hopefully you can get yours working from it
<VirtualHost *:80> ProxyRequests Off ProxyPreserveHost On Redirect permanent / https://your.domain/ </VirtualHost> <VirtualHost *:443> ServerName your.domain ServerAlias your.domain ErrorLog "/var/log/your.domain_error.log" # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog "/var/log/your.domain_access.log" combined SSLEngine On SSLProxyEngine On ProxyRequests Off ProxyPreserveHost On # allow for upgrading to websockets RewriteEngine on RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteRule /(.*) ws://127.0.0.1:8080/$1 [P,L] RequestHeader set Origin "http://your.domain" Header edit Location ^http://your.domain https://your.domain <Location /> ProxyPass http://127.0.0.1:8080/ ProxyPassReverse / </Location> SSLCertificateFile "/etc/httpd/conf.d/ssl/your.domain.crt" SSLCertificateKeyFile "/etc/httpd/conf.d/ssl/your.domain-pkey.pem" </VirtualHost>
-
RE: Data Source Permissions after import?
@dan Well at lease we know what it is! What's your proxy server?
-
RE: Data Source Permissions after import?
@dan Quick way to check is your browser's dev tools. In Firefox, if you right click and select inspect and then go to the console tab you'll see error messages along the lines of "couldn't connect to ws://your.domain". I presume it's similar in chrome dev tools.
-
RE: Data Source Permissions after import?
@dan Any chance it might actually be a websocket proxy issue? It can cause similar results from experience.
-
Large amount of event detector work items
For some reason I have a large amount of work items for two event detectors.
They're both no update detectors with a duration of 24 hours.You can see that there's actually a third one with a count of 96 but the other two are over 1000.
-
SElinux modification required for mango bin/ scripts
Just something I noticed while doing a new test install of v4.
If SElinux is enabled, the bash scripts in the mango bin directory need a small modification to their type otherwise
mango.service
will fail withmango.service: Failed at step EXEC spawning /opt/mango/bin/start-mango.sh: Permission denied
To check a file's SElinux type, pass the
-Z
flag tols
.ls -Z /opt/mango/bin/ unconfined_u:object_r:user_home_t:s0 certbot-deploy.sh* unconfined_u:object_r:user_home_t:s0 mango.cmd unconfined_u:object_r:user_home_t:s0 start-options.sh* unconfined_u:object_r:user_home_t:s0 genkey.sh* unconfined_u:object_r:user_home_t:s0 mango.service unconfined_u:object_r:user_home_t:s0 stop-mango.sh* unconfined_u:object_r:user_home_t:s0 getenv.sh* unconfined_u:object_r:user_home_t:s0 mango.xml unconfined_u:object_r:user_home_t:s0 install-mango.sh* unconfined_u:object_r:user_home_t:s0 start-mango.sh*
In order to be run from a systemd service, the scripts need to be of type
bin_t
. Their type can be changed usingchcon
.sudo chcon -t bin_t /opt/mango/bin/*.sh
Now the files are of the correct SElinux type and
mango.service
will run as expected.ls -Z /opt/mango/bin/ unconfined_u:object_r:bin_t:s0 certbot-deploy.sh* unconfined_u:object_r:user_home_t:s0 mango.cmd unconfined_u:object_r:bin_t:s0 start-options.sh* unconfined_u:object_r:bin_t:s0 genkey.sh* unconfined_u:object_r:user_home_t:s0 mango.service unconfined_u:object_r:bin_t:s0 stop-mango.sh* unconfined_u:object_r:bin_t:s0 getenv.sh* unconfined_u:object_r:user_home_t:s0 mango.xml unconfined_u:object_r:bin_t:s0 install-mango.sh* unconfined_u:object_r:bin_t:s0 start-mango.sh*
Might be helpful info to add to the linux documentation.
-
Broken link in documentation
From: https://docs-v4.mango-os.com/linux-installation
The installation configuration page hyperlink points to https://help.infiniteautomation.com/installation-configuration which no longer works.