DevTool: How to develop Dashboards locally?
EN | ES
This tool allows you to develop existing dashboards in a local environment without an Internet connection.
Requirements
npm 6.13.4 or higher
node v12.14.0 or higher
Code editor like Visual Studio Code
Google Chrome Navigator
With these requirements, you need to download the GitHub project https://github.com/onesaitplatform/onesait-cloud-platform-dashboard-devtools and do “npm install”
First of all, you need to download an existing dashboard model to prepare the workspace for developing it.
Steps to prepare the workspace
You need to download the dashboard model with the button or REST API for it, and move it to the "/models/downloaded" folder.
Run "preparews” (“prepare workspace") with it (this prepares your workspace in the src folder for local development):
npm run preparews {dashboardname}
For example:
npm run preparews VisualFlight
That's it, now you can run the dashboard engine development server go to the index page and select your dashboard at http://localhost:3000
node run server
Steps to deploy the workspace
Get a new final version of your code working in the local environment.
Run the build model from the workspace:
For example:
Update the dashboard on the platform with the one generated in the "/models/dist" folder.
At the moment, the developer tools only allow you to build existing templates. You can't build a gadget without a template, and you can't move or resize it with the UI. You can modify the generated JSON file, but we recommend against it.