# Setup Environment
# New method for making dashboards & goals
Previously, the only way to implement dashboards was by creating code and putting it directly on the server, which meant that in order for a user to be able to create a dashboard, they would have to understand html, css and javascript and also have access to the server directly, something that the average user would not have.
Therefore, the goal with the new method of dashboard creation is that dashboards can be created directly in recordm, simply using a definition, and the process becomes esentially "point and click". This way, any admin or developer can create dashboards with minimal difficulty.
# Server Preparation
The first step in setting up a server to be able to use this new dashboard creation method is through the cob-cli (command line interface). If we use the cob-cli customize command, more specifically cob-cli customize dash, we can install the latest version of the CoB "dash" customization, which contains the files we need for our server.
Next up, we are going to be importing some files, depending on the state of the server. First of all, if the server does not have the necessary definitons, they can be found in one of the folders that was added, "others/customize.dashboard.dash/definitions". We need to import each of these 4 files, which will create a new definition for each one:
- dashboard_v1.json
- dashboard-attention.json
- dashboard-files.json
- dashboard-solutions.json
The next step is going to the "recordm/services" directory, and editing the "com.cultofbits.web.integration.properties" file. What is necessary to do in this file is either uncommenting or creating the following lines:
- "custom-ui.items=home"
- "custom-ui.items.home.label=Home"
- "custom-ui.items.home.url=dash"
After this, we need to import the instances found in the "others/customize.dashboard.dash/instances" folder, which are:
- 1.dashboard-solutons.xlsx
- 2.dashboard_v1.xlsx
Before we can add them though, we need to edit a few fields in the excel files.
In the "DASHBOARD - SYSTEM" file, we need to edit the definition ids in the "CONFIG" section, changing them to the numbers of the definitions we imported in the first step. We must also change the "Server Name" section to the name of the server we are trying to install the dashboards to.
After these changes have been made, the excel files can be imported, each one to the definition in its name. What this means is that the "dashboard_solutions.xlsx" instance will be imported and added to the "dashboard solutions" definition that was created previously, and the "dashboard_v1" instance will be imported and added to the "Dashboard_v1" definition that was also created before.
Once all the setup is complete, check the state of the server with a "cob-cli test" or "cob-cli test -l".
Once you have verified that everything is running as expected and the changes are reflected, commit and push your changes, followed by a "cob-cli deploy" in order to reflect the changes on the server itself.
After all these steps are completed, the basic setup to begin creating dashboards is complete!
# Setting up the New Menus & Homepage
One of the new versions of the dash cob customisation added the "dashboard_solutions" file, which changes the way the navigation bar and the menus for dashboards work and are organized. On a brand new install, you will have only the CoB button, along with the names of any domains you previously had. It will look like this:
image of navbar with only cob button and domain menus
The homepage when you first open the server is also different. Now, the different areas and domains of the servers are split up using instances of the "dashboard_solutions" definition. Initially, there will only be the CoB solution, which will lead you to the "solutions main" dashboard, allowing you to easily preview and manage all aspects of the server.
image of solutions menu and CoB dashboard.
However, the purpose of this area is to allow better organization of the server aspects, so you are going to want to add some more "solutions". Here is the general process for doing this:
- Create an instance of "dashboard_solutions" image of dashboard_solutions creation
- Create a dashboard for the solution you added, or if it already exists add the solution to the dashboard. image of adding solution to dashboard
- Done! this is how it looks now image of navbar
# Domains - Adding more to menu buttons or hiding
With this new dash update, domains now have different uses - you can have them displayed on the navbar, you can add them to the menu buttons as a "domain search", or you can hide them completely. Let's look at all of these in order:
# Display on Navbar
To have your domains displayed on the navbar you can simply leave them as they are, they will all be displayed.
# Add to solutions menu buttons
In order to add the solutions to the menu buttons, you add an "@" and the acronym (short name eg: TEST) of the solution button you would like to add it to. For example, "@TEST SOLUTION" will add the domain "solution" to the button "test" on the navbar, as a domain search. This may sound a little complicated but this image should help:
image of the menu with the search of domain
# Hide completely
If you do not want to display the domain at all, simply add an "@" before the name. Now the domain does not appear in the new menus, and will only be seen if you go to the Domains & Definitions menu.