| How To Setup The Collect! Dashboard Portal
   The  Dashboard Portal is web-based interface that allows Managers, Operators, and  Clients access to
  run  reports. The configuration is divided into Client-Side Configuration, which can be updated
  while the system is in use without restarting any services, and Server-Side Configuration, which
  requires the PM2 service to be restarted after each change.
   The Dashboard module is add-on module that is available for purchase.
   This module is dependent on the Collect! REST API, which must be installed first.
  Please refer to the Help topic  How to Install the REST API and  How to Install and Setup Apache.
 Apache Configuration  Apache is used to proxy the domain requests. This allows you to communicate on HTTPS for all
  requests, without having to open extra ports to the internet.
   Please refer to the Help document  How to Install and Setup Apache linked above for the instructions to
  install Apache. This section will go over the vhost configuration for the Dashboard Portal.
    C:\wamp64\bin\Apache\Apache2.4.#\conf\httpd.conf  Add defines for the domains.
 Define DOMAIN_NAME_DASHBOARD dashboard.yourdomain.com
   C:\wamp64\bin\Apache\Apache2.4.#\conf\extras\httpd-vhosts.conf  Copy and paste the below into the bottom of the file.
 <VirtualHost *:80>
  ServerName ${DOMAIN_NAME_DASHBOARD}
  ServerAlias ${DOMAIN_NAME_DASHBOARD}
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
  <Directory "${INSTALL_DIR}/www/.well-known/">
    Require all granted
  </Directory>
  RewriteEngine on
  RewriteCond %{REQUEST_URI} '!/.well-known/acme-challenge/'
  RewriteCond %{HTTP:Upgrade} !=websocket [NC]
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=301]
</VirtualHost>
   C:\wamp64\bin\Apache\Apache2.4.#\conf\extras\httpd-ssl.conf  Copy and paste the below into the bottom of the file.
 <VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "${INSTALL_DIR}/www"
ServerName ${DOMAIN_NAME_DASHBOARD}:443
ServerAdmin ${ADMIN_EMAIL}
ErrorLog "${SRVROOT}/logs/error.log"
TransferLog "${SRVROOT}/logs/access.log"
Header set X-Frame-Options sameorigin
Header set X-Content-Type-Options "nosniff"
Header set X-Permitted-Cross-Domain-Policies "none"
Header set Referrer-Policy "no-referrer"
Header set Cross-Origin-Resource-Policy "same-origin"
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
# Server Certificate:
SSLCertificateFile "${SSL_FILE_PATH}/${DOMAIN_NAME_DASHBOARD}-crt.pem"
# Server Private Key:
SSLCertificateKeyFile "${SSL_FILE_PATH}/${DOMAIN_NAME_DASHBOARD}-key.pem"
# Server Certificate Chain:
SSLCertificateChainFile "${SSL_FILE_PATH}/${DOMAIN_NAME_DASHBOARD}-chain.pem"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
  SSLOptions +StdEnvVars
</FilesMatch>
<Directory "${SRVROOT}/cgi-bin">
  SSLOptions +StdEnvVars
</Directory>
# SSL Protocol Adjustments:
BrowserMatch "MSIE [2-5]" \
      nokeepalive ssl-unclean-shutdown \
      downgrade-1.0 force-response-1.0
# Per-Server Logging:
CustomLog "${SRVROOT}/logs/ssl_request.log" \
        "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
ProxyPreserveHost On
ProxyPass / http://localhost:3003/
ProxyPassReverse / http://localhost:3003/
</VirtualHost>
   Final Steps   
    If Apache is already configured and running, then you need to comment out
        "Include conf/extra/httpd-ssl.conf" line in the httpd.conf file.Restart the Apache service.Setup SSL Certificates.Uncomment "Include conf/extra/httpd-ssl.conf" in the httpd.conf file.Restart Apache.  
 Client-Side Configuration  The Client-Side elements affect the User Interface. You will need to  contact us to obtain the latest
  installation package.
    
    Unpack the installation package into the {Collect}\bin\companion\ folder. This should result
        in {Collect}\bin\companion\dashboard-portal.Navigate to the Dashboard Client folder in PowerShell Admin mode.cd {Collect}\bin\companion\dashboard-portal
Run the Setup Script../setup.ps1
Open the {Collect}\bin\companion\dashboard-client\runtime-config.js file with a text editor.Update the applicable values. See table below for more information.pm2 restart all
   
    
      | Key | Description |  
      | apiUrl | This value must be updated to point at the URL for the Collect! API Server. Enter the
          applicable value.           Example:
 apiUrl: 'https://api.yourdomain.com',
 |  
      | databases | By default, only the DEFAULT_DATABASE is accessible. If you have multiple databases, then
          you can enter an array to create a drop-down list on the  login form.           Example:
 databases:[
  {label: 'Primary Database', value: 'cv_masterdb'},
  {label: 'Demonstration Database', value: 'cv_demodb'},
  {label: 'Sandbox Database', value: 'cv_sandboxdb'}
],
 |   
 Server-Side Configuration  The Server-Side elements affect some functionality.
    
    Open the {Collect}\bin\companion\cli\config\config.env file with a text editor.Add or Update the applicable values. See table below for more information.Restart the PM2 Service.pm2 restart all
   
    
      | Key | Description |  
      | PROXY_DASHBOARD_API_HOST | Set to the Application Server's Name or IP.           Example:
 PROXY_DASHBOARD_API_HOST=127.0.0.1
 |  
      | PROXY_DASHBOARD_API_PORT | Set to an unused port value for the Dashboard to run on. Should be the same value set in
          httpd-ssl.conf above for the Dashboard Virtual Host.           Example:
 PROXY_DASHBOARD_API_PORT=3003
 |  
      | PROXY_DASHBOARD_API_SECURE | Set whether your SQL Server connection requires an encrypted connection.           Example:
 PROXY_DASHBOARD_API_SECURE=false
 |   
 | 
Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.
Please click this link to send us your comments: helpinfo@collect.org