You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Current »

What

WebOperatorClient.xml

Config group

SystemConfigFiles

Required

no

Description

Defines the look and feel of the Web Operator Client

schema location

https://fewsdocs.deltares.nl/schemas/version1.0/webOperatorClient.xsd

Introduction

The Web Operator Client configuration can be used to customize the look and feel of a Web OC (General Web OC Documentation). The configuration will be used by the PI REST Service: https://fewsdocs.deltares.nl/webservices/rest-api/v1/#get-/weboc/config.

general

The general section is used to configure overall web oc items like: the title, logo, help menu etc.

title

Title of Web OC shown in browser tab.

Logo shown on upper left side of Web OC. Can be specified using a fully qualified domain name or using a relative path. When using a relative path the file is expected to be in the WebResources configuration folder.

icons, favicon

Icon shown in browser tab. Can be specified using a fully qualified domain name or using a relative path. When using a relative path the file is expected to be in the WebResources configuration folder. 

defaultComponent

The component which will be shown after startup of the Web OC.

splashScreen

Splash screen for Web OC. Image file is expected to be in the WebResources configuration folder.

components

In the components section the order of components and components specifics can be configured , such as: name of components and permissions.

Example config file

<?xml version="1.0" encoding="utf-8"?>
<webOperatorClient xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/webOperatorClient.xsd">
	<general>
		<title>Delft FEWS Web Operator Client</title>
		<icons>
			<logo>logo.png</logo>
			<favicon>favicon.svg</favicon>
		</icons>
		<defaultComponent>topologyDisplay</defaultComponent>
		<splashScreen>splash.png</splashScreen>
		<helpMenu>
			<url name="Deltares">https://www.deltares.nl/</url>
			<url name="Delft-FEWS Web OC">https://github.com/Deltares/fews-web-oc</url>
			<path name="Terms and Conditions">terms-and-conditions</path>
		</helpMenu>
		<timeSettings>
			<showtimeSettings>true</showtimeSettings>
			<viewPeriodPresets>
				<relativeViewPeriod unit="day" label="last month" start="-31"/>
				<relativeViewPeriod unit="day" label="last week" start="-7"/>
				<relativeViewPeriod unit="day" label="next week" end="7"/>
				<relativeViewPeriod unit="day" label="last month & next week" start="-31" end="7"/>
			</viewPeriodPresets>
		</timeSettings>
		<agreeToTermsAndConditions enabled="true"/>
	</general>
	<components>
		<spatialDisplay enabled="false">
			<title>Spatial Display</title>
		</spatialDisplay>
		<systemMonitor enabled="false"/>
		<topologyDisplay enabled="true">
			<title>Overview</title>
			<defaultPath>
				<nodeId>node_defined_in_topology_xml</nodeId>
			</defaultPath>
			<showLeafNodesAsButtons>false</showLeafNodesAsButtons>
			<enableTaskRuns>false</enableTaskRuns>
			<showActiveThresholdCrossingsForFilters>true</showActiveThresholdCrossingsForFilters>
		</topologyDisplay>
		<schematicStatusDisplay enabled="false"/>
		<htmlDisplay enabled="true" showInNavigationMenu="false">
			<title>Terms and Conditions</title>
			<path>terms-and-conditions</path>
			<url>terms-and-conditions.html</url>
		</htmlDisplay>
	</components>
</webOperatorClient>

Using Images and static resources

For configurations where images or static files like stylesheets can be configured, either a fully qualified url can be used (https://mydomain.com/images/logo.png) or a relative URL can be used that points to the resources endpoint of PI Rest service:

See: https://fewsdocs.deltares.nl/webservices/rest-api/v1/#get-/resources/images/-id- and https://fewsdocs.deltares.nl/webservices/rest-api/v1/#get-/resources/static/-id-.

WebResourceFiles

When for example a logo is configured as:  <logo>resources/images/my-logo.png</logo>, the my-logo.png file should be in de WebResourceFiles folder of the Delft-FEWS Configuration. This also applies to non-image resources, like CSS stylesheets.

Multiple Web OC Configurations

It is possible to specify multiple webOperatorClient.xml files by using a custom FEWS WebServices Configuration File. The Config file has to match: WebOperatorClient*.xml. In this configuration file a custom webOperatorClient.xml can be configured. For example:

WebServices.xml
<webOperatorClientConfiguration>
	<configFile>WebOperatorClientCustomVersion</configFile>
</webOperatorClientConfiguration>
  • No labels