Dashboard Customization

This document describes the configuration system for the WinCC OA Dashboard application.

Overview

The dashboard supports runtime configuration through JSON files and CSS customization:

File Purpose Format Location
appconfig.json Branding, titles, logos JSON /data/dashboard-wc/
menuconfig.json Menu structure, permissions JSON /data/dashboard-wc/
customstyles.css Theme overrides CSS /data/dashboard-wc/

App Configuration (appconfig.json)

Controls application branding and titles.

Schema

interface AppConfig {
  headerLogo: string; // Logo in application header
  login: {
    backgroundLogo: string; // Background image
    formLogo: string; // Logo on login form
  };
  appTitle: MultiLangString | string; // App title in header
  documentTitle: MultiLangString | string; // Browser tab title
}

MultiLangString Format

Titles can be specified as:

  1. Translation key (recommended for i18n):

    "appTitle": "WUI_General.App.Title"
  2. Multilang object (direct text per locale):

    "appTitle": {
      "en_US.utf8": "My Dashboard",
      "de_DE.utf8": "Mein Dashboard"
    }

Example

{
  "headerLogo": "/data/dashboard-wc/assets/my-logo.png",
  "login": {
    "backgroundLogo": "/data/dashboard-wc/assets/loginscreen.svg",
    "formLogo": "/data/dashboard-wc/assets/logo.png"
  },
  "appTitle": {
    "en_US.utf8": "My Application",
    "de_DE.utf8": "Meine Anwendung"
  },
  "documentTitle": {
    "en_US.utf8": "My Application",
    "de_DE.utf8": "Meine Anwendung"
  }
}

Custom CSS (customstyles.css)

Located at public/customstyles.css, loaded dynamically after IX theme initialization.

Selector Pattern

Use :root[data-ix-theme='classic'] to match IX theme selectors. The file is loaded with a small delay to ensure it applies after IX styles, even in Vite dev mode.

Important: You must specify the theme name (e.g., 'classic') to match IX's selectors.

Available Customizations

/* Theme overrides (both light and dark modes) */
:root[data-ix-theme='classic'] {
  /* Brand colors */
  --theme-color-primary: #00a550;
  --theme-color-secondary: #0066b3;

  /* Siemens IX color tokens */
  --theme-color-success: #00c853;
  --theme-color-warning: #ff9800;
  --theme-color-alarm: #f44336;
}

/* Light theme specific overrides */
:root[data-ix-theme='classic'][data-ix-color-schema='light'] {
  --theme-color-primary: #00a550;
}

/* Dark theme specific overrides */
:root[data-ix-theme='classic'][data-ix-color-schema='dark'] {
  --theme-color-primary: #00c853;
}

See the Siemens IX documentation for the full list of CSS custom properties.

Graceful Fallback

If configuration files are missing or invalid:

  • Missing appconfig.json: Uses default logo paths and title "WinCC OA Dashboard"

  • Missing menuconfig.json: Shows only the login menu item

  • Missing customstyles.css: No custom styling (404 is ignored by browser)

Build Process

  1. JSONC files in config/ are processed during Vite build

  2. Comments are stripped and files are output as .json

  3. public/customstyles.css is copied to the output directory

  4. Config files are included in service worker cache

Service Worker Cache

config: ['/data/dashboard-wc/manifest.webmanifest', '/data/dashboard-wc/appconfig.json', '/data/dashboard-wc/menuconfig.json'];