- 
    Type:Task 
- 
    Resolution: Fixed
- 
    Priority:L3 - Default 
- 
    Affects Version/s: None
- 
    Component/s: backend
- 
    None
Create a new "instant-preview" dashboard whenever a process definition is imported. Characteristics of this dashboard:
- Must have a predictable URL based on the process definition key
- The dashboard template is a JSON file with a fixed name (location and name TBD). Depending on the query parameter values, a new template can be used. Like this we can have several templates
- The Backend will parse the Json file (which will be a file generated from Optimize using the export API (see below). Since the exported file will have concrete IDs (for Dashboards/Reports/XML Diagrams, etc), the backend needs to parse this file and replace the concrete data by placeholders, so that the dashboard can be used as a template for other processes. This makes it easier for the product manager to define and export a new dashboard template
GET /api/export/dashboard/json/{dashboardId}/{fileName}
- Make sure that access to this dashboard is only granted to users with proper permission: Will be handled in- OPT-6701
- The request to the back end has the form:
GET /api/dashboard/instant/<PROC_DEF_KEY>/?template=<JSON_FILE_NAME>
- The response of this request is still to be defined, but it will be analogous to
GET /api/dashboard/:id
- Generation and update of the instant preview dashboards will be handled in OPT-6675
Testing notes
Can only be tested in conjunction with OPT-6675, so testing notes will be written there
This is the controller panel for Smart Panels app
- depends on
- 
                    OPT-6675 Re-generate instant preview dashboards for a new or updated dashboard template -         
- Done
 
-         
- is depended on by
- 
                    OPT-6671 Create instant preview dashboard upon importing a process definition (frontend) -         
- Done
 
-         
- 
                    OPT-6672 Document the usage of the instant preview in camunda docs -         
- Done
 
-         
- 
                    OPT-6673 Make the usage data of the instant preview dashboard accessable in Mixpanel -         
- Done
 
-         
- 
                    OPT-6701 Implement permission concept for instant preview dashboard -         
- Done
 
-