• ThomasEinasto

    As I have not used this yet but seeing your pictures I suggest you adding original xid and xid for each point.

    XIDs are required as they are the unique IDs of the points.

    On your third picture the error also indicates that property xid must not be null i.e it should have value.

    posted in Mango Automation read more
  • ThomasEinasto

    Old UI topic

    Older users of Mango were using Legacy UI before Angular was introduced in Mango. But Mango legacy pages did not have so much flexibility / easy configuration to create your own system like you want which is probably why IAS took the direction for the Mango 3.x UI.

    Most simply said in Mango 3.x user is in a web-application developed in Angular which uses Mango (and other) API's/ libraries to configure Mango settings. The same way like in the old UI.

    You can go to legacy (old-UI) by going to lets say /data_sources.shtm to see how old Mango looked like. There on top left corner you can also see your overrides logo if I am not mistaken.

    File topic

    And you are correct. The uploaded file should stay in that folder if you update Mango. The file is actually put in $ROOT/filestore/public/ folder which is not modified by updates.

    Have a nice weekend!
    Thomas

    posted in User help read more
  • ThomasEinasto

    Hi @fleh

    It depends on what are you actually trying to do. In new UI it is simple. Go to Administration => UI settings and change logo source and it will be changed after you save your UI settings. Note that it should be in public folder because mango might restrict access to other parts of the system for not logged in users.

    If you want to change via overrides then you are mostly doing changes to the old UI and Mango system itself.

    posted in User help read more
  • ThomasEinasto

    I think @Jonas is having trouble that if user navigates to some other page besides the tabbed page then variable "selectedtab" is lost because it is only available at that current scope. i.e @Jonas wants to navigate from other page to this tabbed page with automatically specific tab opened, taken into account where user navigated from.

    I have solved this easily by using a virtual datapoint in mango to keep the variable "remembered" even if user goes away from that page.

    Logic:

    Create a virtual datapoint

    Bring this point to your pages

    Set it to specific number before navigating i.e ng-click = virtualpoint.set(7). Then use @CraigWeb suggestion md-selected="virtualpoint.value" so that page automatically opens the virtual point value tab.

    posted in Mango Automation general Discussion read more
  • ThomasEinasto

    It would be more helpful if you open console in the browser to see what errors you are having.

    Something like this:

    0_1559649793677_6c1a50f2-c978-4f2f-8e12-4d01faa5e742-image.png

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • ThomasEinasto

    Craig,

    Depending on the version it might not work. I have one instance here which is not beta and it issues out rejection to the POST made by $save().

    I think IAS staff might comment on this subject more.

    Thomas

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • ThomasEinasto

    Ideally one could use ma-data-source-query to get desired datasource and then toggle .enabled property and issue $save() on the queried datasource.

    i.e using Jared's last example

    <ma-data-source-query data-sources="dataSourcesArray" query="{name: 'meter'}" limit="1"></ma-data-source-query>
    
    <!-- Assuming first datasource in the query is desired datasource -->
    <md-button id="dc9944e5-bd98-48ff-aa2c-c99db8416012" class="md-raised md-primary" style="position: absolute; left: 170px; top: 208px;" ng-click="dataSourcesArray[0].enabled = true" ng-disabled="dataSourcesArray[0].enabled">
            <span>Enable</span>
        </md-button>
        <md-button id="cdba29de-31a5-473d-bf07-025effa6b55b" class="md-raised md-warn" style="position: absolute; left: 274px; top: 208px;" ng-click="dataSourcesArray[0].enabled = false" ng-disabled="!dataSourcesArray[0].enabled">
            <span>Disable</span>
        </md-button>
    
        <md-button id="276622a1-9238-4e0d-891e-589adb856b9f" class="md-raised" style="position: absolute; left: 378px; top: 208px;" ng-click="dataSourcesArray[0].enabled = !dataSourcesArray[0].enabled">
            <span>Toggle</span>
        </md-button>
    
        <md-button id="cdba29de-31a5-473d-bf07-025effa6b55b" class="md-raised md-warn" style="position: absolute; left: 274px; top: 208px;" ng-click="dataSourcesArray[0].$save()" >
            <span>Save</span>
        </md-button>
    

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • ThomasEinasto

    Dear Mango community,

    I have updated MangoES yesterday to version 3.6.0-beta.3. This version I am failing to create a JSON store entry. So a general test on the ma-json-store is done by going to examples -> Utilities -> JSON Store.

    After opening the example I get a not-found error which is fine and should work as expected.

    Failed to load resource: the server responded with a status of 404 (Not Found) /rest/v1/json-data/test:1
    

    But after trying to save this example to JSON store ( not dashboard page but a random entry of objects ) I get an error which did not occur on previous version.

    mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78 POST http://192.168.0.119/rest/v1/json-data/test?editPermission=user&name=&publicData=false&readPermission=user 422 (Unprocessable Entity)
    
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    $digest @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    $apply @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78
    dispatch @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:39
    O.handle @ mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:39
    mangoUi~ngMango~ngMangoServices.js?v=2c18dd48ed559cc129bd:78 
    
    Possibly unhandled rejection: {"data":{"xid":"test","name":"","modelType":"JSON_DATA","validationMessages":[{"level":"ERROR","message":"Required value","property":"name"}],"publicData":false,"jsonData":{"name":"Hello","phone":"5536","address":"Random address"},"readPermission":"user","editPermission":"user","id":-1},"status":422,"config":{"method":"POST","transformResponse":[null],"jsonpCallbackParam":"callback","data":{"name":"","readPermission":"user","editPermission":"user","publicData":false,"jsonData":{"name":"Hello","phone":"5536","address":"Random address"},"dataPath":null,"xid":"test"},"url":"/rest/v1/json-data/test","params":{"name":"","readPermission":"user","editPermission":"user","publicData":false},"headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;charset=utf-8","X-XSRF-TOKEN":"7b9794fd-1330-47be-9265-e0d433554619"},"cached":false,"timeout":30000},"statusText":"Unprocessable Entity","xhrStatus":"complete","mangoStatusText":"Validation error, property ''name'' — Required value","mangoStatusTextShort":"Validation error","mangoStatusTextFirstValidationMsg":"Required value","resource":{"name":"","readPermission":"user","editPermission":"user","publicData":false,"jsonData":"...","dataPath":null,"xid":"test"}}
    

    Logged in as superadmin and using the latest Mango version.

    Can somebody comment on why I get (Unprocessable Entity) error while trying to create a JSON store entry?

    When navigated to JSON store page and trying to create a new entry there, I am successful in creating an entry there.

    Thanks,
    Thomas

    posted in User help read more
  • ThomasEinasto

    Thanks @phildunlap with your fast support once again.

    posted in User help read more