Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

Documentation for webapp.json

Solved!
Pingzhi
Level 1
Documentation for webapp.json

I try to create a visualization plugin. The webapp.json file defines the layout and options to create a chart. But I can't find the full document of webapp.json that lists all attributes we can use. 

0 Kudos
1 Solution
fchataigner2
Dataiker
Dataiker

Hi,

custom webapp charts or visualization are very advanced objects, so documentation is mostly internal. They can be used to add custom views to managed folders or saved models, or to add custom charts. 

A good example of a visualization webapp can be found in the Model Error Analysis plugin (which you can install, then move to a dev plugin in the Actions button if you want to see what the definition is like). For custom charts you can install for example the Hierarchical charts plugin and move it to dev.

In the "custom views" usage, the webapp is defined mostly like a regular plugin webapp, the only specificity is the addition of the `roles` field, which is a list of places where the view should appear, each defined as an object with fields:

  • `type` : either "MANAGED_FOLDER" or "SAVED_MODEL"
  • `contentType` : optional prefix filter on the value of the "content type" in the Advanced settings of that the folder or model
  • `targetParamsKey` : name of a parameter in the `params` list where the identifier of the object being viewed is stored
  • `pathParamsKey` : name of a parameter in the `params` list where the saved model version or folder subpath of the object being viewed is stored

Custom charts are mostly defined by the presence of the `chart` field in the webapp.json. This field is an object containing the definition for the layout of the controls of the custom chart. 

  • `datasetParamName` : the name of dataset that the chart is applied to is stored under this name in the config that the plugin webapp code receives.
  • `leftBarParams` : a list of parameters, like a regular `params` field in a webapp, defining the controls displayed in the bar on the left of the chart
  • `leftBarTemplate`, `leftBarModule` and `leftBarPythonSetup` are the equivalents to paramTemplate, paramModule and paramPytonSetup described in  https://doc.dataiku.com/dss/latest/plugins/reference/other.html#custom-settings-ui
  • `leftBarLabel` is an optional section name to show at the top of the plugin params in the left bar
  • `topBar` : one of "STD_FORM" or "NONE". Use NONE if you don't want a bar of additional controls over the chart
  • if using a top bar, `topBarParams`, `topBarTemplate`, `topBarModule` and `topBarPythonSetup` are the equivalents of their left bar counterparts

 

View solution in original post

0 Kudos
2 Replies
fchataigner2
Dataiker
Dataiker

Hi,

custom webapp charts or visualization are very advanced objects, so documentation is mostly internal. They can be used to add custom views to managed folders or saved models, or to add custom charts. 

A good example of a visualization webapp can be found in the Model Error Analysis plugin (which you can install, then move to a dev plugin in the Actions button if you want to see what the definition is like). For custom charts you can install for example the Hierarchical charts plugin and move it to dev.

In the "custom views" usage, the webapp is defined mostly like a regular plugin webapp, the only specificity is the addition of the `roles` field, which is a list of places where the view should appear, each defined as an object with fields:

  • `type` : either "MANAGED_FOLDER" or "SAVED_MODEL"
  • `contentType` : optional prefix filter on the value of the "content type" in the Advanced settings of that the folder or model
  • `targetParamsKey` : name of a parameter in the `params` list where the identifier of the object being viewed is stored
  • `pathParamsKey` : name of a parameter in the `params` list where the saved model version or folder subpath of the object being viewed is stored

Custom charts are mostly defined by the presence of the `chart` field in the webapp.json. This field is an object containing the definition for the layout of the controls of the custom chart. 

  • `datasetParamName` : the name of dataset that the chart is applied to is stored under this name in the config that the plugin webapp code receives.
  • `leftBarParams` : a list of parameters, like a regular `params` field in a webapp, defining the controls displayed in the bar on the left of the chart
  • `leftBarTemplate`, `leftBarModule` and `leftBarPythonSetup` are the equivalents to paramTemplate, paramModule and paramPytonSetup described in  https://doc.dataiku.com/dss/latest/plugins/reference/other.html#custom-settings-ui
  • `leftBarLabel` is an optional section name to show at the top of the plugin params in the left bar
  • `topBar` : one of "STD_FORM" or "NONE". Use NONE if you don't want a bar of additional controls over the chart
  • if using a top bar, `topBarParams`, `topBarTemplate`, `topBarModule` and `topBarPythonSetup` are the equivalents of their left bar counterparts

 

0 Kudos
Pingzhi
Level 1
Author

Thanks for your answer. It is very helpful. I am from Power BI world where users have fully support to create custom visualization. The custom visuals in Power BI are very powerful because developers can sell it to other users. Hopefully, dataiku can support this business model in the future.

0 Kudos