| Excerpt | ||
|---|---|---|
| ||
Contents
| Table of Contents |
|---|
...
Intro
It is possible to view related documents or pictures through the document viewer. There are two options to configure this.
...
The option will be described below (XML configuration in the Explorer.xml). The second option will be described after this block.
XML configuration in Explorer.xml
To enable this feature the document viewer should be configured as an explorer task only.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
<documentViewer>
<hostCredentials>
<hostName>http://xxxx.com</hostName>
<user>dummy_username</user>
<password>dummy_password</password>
</hostCredentials>
<hostCredentials>
<hostName>http://dummy_hostname</hostName>
<user>dummy_username</user>
<password>dummy_password</password>
</hostCredentials>
</documentViewer>
|
Configuration in the TimeSeriesDisplay.xml
Why did Deltares decide to implement a new configuration option?
The downside of the approach described above is that the URL references were stored in the comments of a time series. The comments fields could therefore not be used anymore to store comments.
In the new approach which is available since Delft-FEWS 2020.01 the URL references are determined by URL templates which are configured in the TimeSeriesDisplay.xml.
How are the URL's of the images determined in the new approach?
If for a certain timestep of a time series an external image is available then this will be indicated by the value of the flag source. If the value is set to "UR" then FEWS will assume that an external image is available. By using the configured templates the correct URL will be determined to show the image in the document viewer.
How do I configure the URL templates?
The templates can be configured in the TimeSeriesDisplay.xml. It is possible to define 1 or more external image sources.
...
The URL template is used to determine the URL of the image. Both the time series filters and the URL templates will be explained in more detail below.
How do I configure a time series filter?
A time series filter can be used to configure easily to which time series the URL templates apply.
...
All the elements which are available in the well known element timeSeriesSet are also available in the time series filter.
How do I configure the URL template?
The URL template is used to build the URL of the image.
...
The baseURL is always static. The fileURL however is dynamic. It can contain location attributes and a time stamp. The location attributes and the time step are substituted with the actual values after selecting a time step in a time series.
An example!
It now time for an example. All the configuration elements are now explained. The example will be used to explain how the indivual elements are used to determine the correct URL for retrieving the correct image.
...
it is possible to configure a <timeZone> for the <fileUrl>. When not configured the date will be shown in GMT otherwise in the configred time zone.
How did I migrate to using URL templates?
Migrating to using the URL templates consists of several steps.
Step 1 Configure the URL templates
The first is to start configuring your templates in the TimeSeriesDisplay.xml. This step is explained in detail above.
Step 2 Adjust the data feed
The data feed needs to be changed. Because the URL references are now no longer stored in the comments. The data feed needs to be adjusted so that the comments no longer contain the
...
More information about pi-xml import can be found here Delft-Fews Published Interface timeseries Format (PI) Import
Step 3 Removing the old URL references in the comments
Last step is to remove the 'old' comments from the time series. This can be done in several ways.
...