Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
12.01k stars 841 forks source link

Cover JSON data in Data node control #1248

Open EYisaac opened 4 months ago

EYisaac commented 4 months ago

What would that feature address

I have some transactional data as json file representing a list of shops with various characteristics address, size, location, opening time, type, owner, contact, etc... The structure of the document is globally the same all the time, but time to time a new field appears, disappears or changes. I am using data node to keep track of the changes since it is edited by many people, and because I also have sql data nodes on the side.

I want to show the JSON data node in the data node control.

Description of the ideal solution The ideal solution would be to have the possibility to collapse and expand recursively the various sections of the document. A syntax coloration or a visual hint could give the type of the field displayed like in the following example

image

{"web-app": {
  "servlet": [   
    {
      "servlet-name": "cofaxCDS",
      "servlet-class": "org.cofax.cds.CDSServlet",
      "init-param": {
        "configGlossary:installationAt": "Philadelphia, PA",
        "configGlossary:adminEmail": "ksm@pobox.com",
        "configGlossary:poweredBy": "Cofax",
        "configGlossary:poweredByIcon": "/images/cofax.gif",
        "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver",
        "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon",
        "dataStoreInitConns": 10,
        "dataStoreMaxConns": 100,
        "dataStoreConnUsageLimit": 100,
        "dataStoreLogLevel": "debug",
        "maxUrlLength": 500}},
    {
      "servlet-name": "cofaxEmail",
      "servlet-class": "org.cofax.cds.EmailServlet",
      "init-param": {
      "mailHost": "mail1",
      "mailHostOverride": "mail2"}},
    {
      "servlet-name": "cofaxAdmin",
      "servlet-class": "org.cofax.cds.AdminServlet"},

    {
      "servlet-name": "fileServlet",
      "servlet-class": "org.cofax.cds.FileServlet"},
    {
      "servlet-name": "cofaxTools",
      "servlet-class": "org.cofax.cms.CofaxToolsServlet",
      "init-param": {
        "templatePath": "toolstemplates/",
        "log": 1,
        "logLocation": "/usr/local/tomcat/logs/CofaxTools.log",

        "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder",
        "lookInContext": 1,
        "adminGroupID": 4,
        "betaServer": true}}],
  "servlet-mapping": {
    "cofaxCDS": "/",
    "cofaxEmail": "/cofaxutil/aemail/*",
    "cofaxAdmin": "/admin/*",
    "fileServlet": "/static/*",
    "cofaxTools": "/tools/*"},

  "taglib": {
    "taglib-uri": "cofax.tld",
    "taglib-location": "/WEB-INF/tlds/cofax.tld"}}}

Acceptance Criteria

EYisaac commented 4 months ago

@vhfgosselin @dinhlongviolin1 @toan-quach ?

FlorianJacta commented 4 months ago

Thank you for the issue @EYisaac. This feature aligns with what the Data Node viewer aims to do.

You could also use the tree visual element to obtain this effect in the meantime.

@jrobinAV @FabienLelaquais what do you think about it?

EYisaac commented 4 months ago

I would prefer it to be in a data node control instead of a tree control. Especially for editing the content of the JSON file. I guess I can use the tree if there is no other way.

FlorianJacta commented 4 months ago

I agree! This is just a workaround in the meantime

jrobinAV commented 4 months ago

It is a great idea. @FabienLelaquais Let's discuss this.

jrobinAV commented 3 months ago

After discussing it, we plan to add it to the Enterprise edition.

EYisaac commented 6 days ago

Will it be in the next release?