plgd

  • Docs
  • News
  • Community
  • Try LIVE

What's on this Page

  • Installation and starting the development server
  • Building the app
  • Translations
    • Generating language files
    • Default language
TUTORIALS DASHBOARD

Dashboard

How to build and configure plgd dashboard

Configuration for the client can be found in auth_config.json.

{
  "domain": "auth.plgd.cloud",
  "clientID": "pHdCKhnpgGEtU7KAPcLYCoCAkZ4cYVZg",
  "audience": "https://try.plgd.cloud",
  "scope": "",
  "httpGatewayAddress": "https://api.try.plgd.cloud"
}

Installation and starting the development server

npm install
npm start

Application will be hosted on http://localhost:3000 by default. To change the default port, put PORT=xxxx into package.json script for starting the development server

cross-env PORT=3000 craco start

or set PORT into your environment variables.

Building the app

npm run build

Translations

In order to add a new language, open the file config.js and extend the supportedLanguages array with additional values. Use the language code 2 for the language you are about to add:

supportedLanguages: ['en', 'sk']

Once you added a new language, open the file language-switcher-i18n.js and add a new entry for the language you added. For example, for the language with code sk the entry would look like this:

sk: {
  id: 'language-switcher.slovak',
  defaultMessage: 'Slovak',
},

Generating language files

For extracting the messages from the UI components, run the following script:

npm run generate-pot

This script will generate a template.pot file, which contains all the strings from the application ready to be translated. Upload this file to your translation tool, translate the strings and after that, export the .po files for all the translations and place them into i18n folder.

For generating language files which are used by the application, run the following script:

npm run generate-language-files

Now your translations are updated and ready to be used.

Default language

The default language is set to be en. This configuration can be overridden in config.js by changing the defaultLanguage field. Change this only to a language that is supported by the application (is present in the supportedLanguages list).

After your first visit to the application from a browser, the application will remember the current language state. In order to change the defaultLanguage field and see the change, you should clear the localStorage entry language from the browser.

See Also

  • Advanced security
  • Testing
  • Branding dashboard
  • Control device remotely
  • Introduction
    • What is plgd
    • Who we are
    • Compare plgd
    • FAQ
  • Quickstart
    • Contribute
    • Create device
    • Discover & control device locally
    • Control device remotely
    • Deploy your own plgd hub
    • Create first plgd application
  • Features
    • Audit Log
    • Pending command
    • Device Provisioning
    • Device Shadow
    • Disaster Recovery
    • JetStream
  • Architecture
    • Domain Overview
    • Component Overview
    • System Overview
  • Configuration
    • CoAP Gateway
    • gRPC Gateway
    • HTTP Gateway
    • Resource Aggregate
    • Resource Directory
    • Identity Store
    • Cloud2Cloud Gateway
    • Cloud2Cloud Connector
    • Certificate Authority
    • [MOCK] OAuth Server
  • Deployment
    • plgd on K8S
  • Device Library
  • Tutorials
    • External OAuth Server with bundle
    • Share devices within user groups
    • Branding dashboard
    • Working with gRPC Client
    • Create & Delete device resources
    • Advanced security
    • Dashboard
    • Testing
    • OCF Conformance Testing
  • Device Provisioning Service
    • Overview
    • Attestation Mechanisms
    • Client Library
“Dashboard” was last updated: February 17, 2022: DPS Documentation (#42) (96ccf20)
Improve this page
plgd Logo
  • File an Issue
  • Discuss Source Code
  • Cookie settings
 

© plgd.dev 2018–2022

  • Docs
  • News
  • Community
  • Try LIVE
  • Introduction
  • Quickstart
  • Features
  • Architecture
  • Configuration
  • Deployment
  • Device Library
  • Tutorials
  • Device Provisioning Service