• D
    Desmond

    Bingo! The mystery finally revealed! It was my own mistake to set JRE instead of JDK unintentionally after upgrading to jdk 1.8.0_221.

    Thank you @phildunlap for your detail information and update. This is really a valuable lesson for me.

    Thank you@cwangv for your sharing. You made me feel eager to head over to this forum whenever I need help or support to create solution together.

    posted in How-To read more
  • D
    Desmond

    @cwangv
    Thank you for your suggestion.

    I am not sure whether you are refer to the bulk data point edit in MangoUI where you can download/upload csv to create/update the datapoints.

    However i want to import point values from files via the data file data source. Usually I got the file from the third party system and require to load it into the mango so that I can do more work on it.

    In fact I did try to look into the new MangoUI but I think not all the data source types are supported yet. That is the reason I continue to use the old MangoUI.

    posted in How-To read more
  • D
    Desmond

    Hi all,
    I am kicking off the data file data source using the sample multiColumnCsv.csv and multiColumnCsvImporter.java provided by Mango.

    Somehow I am unable to save this data source as the template is empty(left hand side of the below pic). I can see both csv and java files are displayed on the compile template view(right hand side of the below pic), It seem confusing to me as it states the compiler is not found but yet the java file is shown. Without the java file may have caused the empty template.
    0_1568473098532_TemplateRequiredValue.jpg

    So I did tried to upload the multiColumnCsvImporter.java file manually but no success. This is road block for me to move forward. It should be a simple step but I cant see my own mistake.

    Any help is appreciated and thank you in advanced.
    Mango core: 3.6.4
    dataFile: 3.6.1
    google chrome version 76

    posted in How-To read more
  • D
    Desmond

    @phildunlap
    Thank you for your prompt reply. It works like a breeze.

    In my opinion, this is a powerful tool that open up the doors to communicate with internet of things / web content. In addition it provide flexibility to integrate your creativity into application.

    "Logic will get you from A to B. Imagination will take you everywhere".

    posted in Scripting general Discussion read more
  • D
    Desmond

    Hi all,

    This is my first attempt to make a REST call to retrieve a point values array via Mango scripting source.

    Via Swagger:
    url:
    http://localhost:8080/rest/v2/point-values/multiple-arrays/latest/DP_422050,CDP_614346?limit=3&useCache=NONE

    result:

    {
      "DP_422050": [
        {
          "timestamp": 1567738483443,
          "value": 175.51602162739323
        },
        {
          "timestamp": 1567738423443,
          "value": 175.16915149128016
        },
        {
          "timestamp": 1567738363443,
          "value": 174.31921651479684
        }
      ],
      "DP_614346": [
        {
          "timestamp": 1567738483443,
          "value": 211795
        },
        {
          "timestamp": 1567738423443,
          "value": 211790
        },
        {
          "timestamp": 1567738363443,
          "value": 211785
        }
      ]
    }
    

    Via Mango scripting data source:

    print(HttpBuilder.request({
        path: "http://localhost:8080/rest/v2/point-values/multiple-arrays/latest/DP_422050,DP_614346",
        method: "GET",
        headers : {
         "Cookie": "XSRF-TOKEN=6ac16488-db6d-4e64-8353-2faea1433e0f",
         "X-XSRF-TOKEN": "6ac16488-db6d-4e64-8353-2faea1433e0f",
         "Content-Type":"application/json;charset=UTF-8",
         "Host": "localhost:8080",
         "Accept": "application/json, text/plain"
         
      },
        parameters: {
        "limit" : 3,
        "useCache" : "None",
     },
        //content: "GETs don't have content!",
        err: function(status, headers, content) { //errorCallback for linguistic completion
            throw "Request got bad response: " + status;
        },
        resp: function(status, headers, content) { //responseCallback
            //try to retrieve the HttpBuilder object but no success
            //var result = JSON.parse(headers);
            //print(result);
            
            print(content);
            return true; //will print in wrapping print()
        },
        excp: function(exception) { //exceptionCallback
            throw exception.getMessage();
        }
    }));
    
    

    result:
    null

    I also tried to retrieve the headers for a check test but no success. After some thought, I realize this might due to the "GETs don't have content". If this is the situation, how then can I access the point values array from return HttpBuilder object?

    Likelihood I am unable to grasp the concept of HttpBuilder correctly and hopefully someone can help me out on the silly mistake I may have overlooked.

    Thanks and Best Regards

    posted in Scripting general Discussion read more
  • D
    Desmond

    If at every point you encounter a surprise or frustration, your response is to add it to the blacklist. Furthermore it is common to feel intimidate to journey down that bumpy "road less travel" and easily get burned by incomplete understanding.

    Mango is awesome. It's easy to learn partially, and much harder to learn completely. Inspiring a strong appreciation for all that Mango is and can do will help in shorten the learning curve and eventually more projects are built on the Mango platform.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • D
    Desmond

    Hi @jf89 ,

    @jf89 said in Adaptive layout of examples -- Red scratches on objects:

    I don’t ask you to give me an example , but I would like to know where I can learn myself ?
    What is the best way to do myself a complete flex page with side bar and one or two windows ?
    If I can pick up pieces of code an put it into the edit markup , it’s OK.
    Even with tutorials , If I have to learn html, css , javascript and Angular , it will be too much difficult for me.

    Just my five cent thought,

    1.There is no best way to do a web page

    2.Copy and paste pieces of code without understanding will make your learning disable.

    3.The web technologies is a prerequisite, at least know the fundamentals,
    3.1. HTML to define the content of web pages
    3.2. CSS to specify the layout of web pages
    3.3. JavaScript to program the behavior of web pages

    4.The learning speed is your choice.Everything is up to you.If you are struggling, take a break, or search google for the material

    5.Explore the example page provided by Mango. Examples are often easier to understand than explanations. Try it out yourself. In my opinion, this is one of the best playground for anyone who want to learn and understand Mango.

    Hope it will helps in your learning journey.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • D
    Desmond

    Today I restart my mango in my laptop and do a fresh confirmation test. In addition I also cleared all the browsing data for chrome.

    Whoray! My Test1 & Test2 passed. It works like a breeze.

    Wonderful! It is so exciting to see Mango has done a tremendous improvement for rest api over the years. This functionality provide more flexibility and powerful to design or integrate our application.

    @phildunlap, My apology for causing the false alarm. Due to limited knowledge and experience, I fail to do a comprehensive test. Luckily you pick it up and help me to be a better debugger. Thank you for your support and have a nice weekend.

    posted in User help read more
  • D
    Desmond

    @phildunlap
    It always see both XIDs for request size limit 1.
    Out of curiosity I tried up to limit 3000. It works like a breeze. However the break point is when I performed test1 and test2.

    posted in User help read more
  • D
    Desmond

    @phildunlap,
    Thank for your guidance to direct me to dive deeper into this issue.

    Here are my findings: get /point-values/multiple-arrays/latest/{xids}

    Test1: request size limit 5000, default is TIMESTAMP,VALUE
    It's very likely to miss the key for the second XID after all the values in the series for the first

    Test2: no request size limit, default is TIMESTAMP,VALUE
    It's very likely to miss the key for the second XID after all the values in the series for the first if the metadata is very large

    Conclusion:
    It seems to me that there is a limitation on the maximum length of character for serialized to JSON or the payload body. It is always necessary to include a reasonable size limit to avoid missing point values.

    Hope that it gives some values to whoever reading this post.

    Thank you one more time for your attention.

    posted in User help read more