• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. cbyrne
    3. Posts

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Profile
    • Following 0
    • Followers 0
    • Topics 43
    • Posts 93
    • Best 7
    • Controversial 1
    • Groups 0

    Posts made by cbyrne

    • RE: Filter behaviour and ma-data-point-selector

      @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.

      posted in User help
      cbyrneC
      cbyrne
    • 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!

      posted in User help
      cbyrneC
      cbyrne
    • RE: Overriding system logo for specific users

      @CraigWeb Thanks Craig, that's what I'm currently doing.

      posted in User help
      cbyrneC
      cbyrne
    • 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.
      19820512-236e-449f-aaea-59d88d3eefc8-image.png

      Currently dealing with a Mango v3 instance but I can see the issue arising for v4 also.

      Thanks!

      posted in User help
      cbyrneC
      cbyrne
    • 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-blob

      A comparison of the hexdumps: (working file on left, file from original code snippet above on right)

      91190d97-56ea-486c-8d0d-f08e3c3de08c-image.png

      From the hexdump I can see that the first ~49 bytes are are correct but then the encoding changes

      posted in User help
      cbyrneC
      cbyrne
    • 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.

      posted in Mango feedback
      cbyrneC
      cbyrne
    • 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.

      de10e1c3-f4b1-444b-a2ad-e4c525c61971-image.png

      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.

      posted in How-To
      cbyrneC
      cbyrne
    • RE: DataSourceXID_SUCCESS already exists on Scripting Data Source validation

      @terrypacker Thanks for the clarification Terry, is this intended behavior or a bug?

      posted in User help
      cbyrneC
      cbyrne
    • 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!

      posted in User help
      cbyrneC
      cbyrne
    • 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:

      1. Create new scripting data source with empty script and no external points. Set to polling and save.
      2. Create a new data point called test with variable name test
      3. Add an external data point with variable name point and enable updates context.
      4. 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)
      
      1. Save
      2. Turn off polling
      3. 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.

      posted in User help
      cbyrneC
      cbyrne
    • Scripting data source UI - 'Key' column in external context points

      2d9ea704-db08-49f9-80dd-67d659c02475-image.png

      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

      posted in User help
      cbyrneC
      cbyrne
    • 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.

      posted in User help
      cbyrneC
      cbyrne
    • 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.

      posted in User help
      cbyrneC
      cbyrne
    • 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>
      
      posted in User help
      cbyrneC
      cbyrne
    • RE: Data Source Permissions after import?

      @dan Well at lease we know what it is! What's your proxy server?

      posted in User help
      cbyrneC
      cbyrne
    • 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.

      posted in User help
      cbyrneC
      cbyrne
    • RE: Data Source Permissions after import?

      @dan Any chance it might actually be a websocket proxy issue? It can cause similar results from experience.

      posted in User help
      cbyrneC
      cbyrne
    • 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.

      5676ece7-f628-4c7e-b9ee-d472903c75a1-image.png

      posted in User help
      cbyrneC
      cbyrne
    • 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 with

      mango.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 to ls.

      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 using chcon.

      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.

      posted in Mango feedback
      cbyrneC
      cbyrne
    • Broken link in documentation

      From: https://docs-v4.mango-os.com/linux-installation

      cc83dd5f-a526-4958-98c6-c069ab105b9f-image.png

      The installation configuration page hyperlink points to https://help.infiniteautomation.com/installation-configuration which no longer works.

      posted in Mango feedback
      cbyrneC
      cbyrne