Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 The updated meta data files will not only contain the updated meta data values, two additional columns are added with information on the user that made the changes and when the changes were committed.

Add Custom Activities

The Tabular Config File Display also allows for adding additional task buttons to the toolbar. The task buttons can start executables or scripts to check configuration consistency, link to GIT or SVN or run Python or Powershell scripts.

In the example below a taskbutton is added that starts several Python scripts through Powershell. 

Code Block
languagexml
titleTask Button
<?xml version="1.0" encoding="UTF-8"?>
<tabularConfigFilesDisplay xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/tabularConfigFilesDisplay.xsd">
	<editPermission>Configuration</editPermission>
	<taskButton name="Update Config and Metadata for Public Web Products">
		<description>Update Config and Metadata for Public Web Products</description>
		<permission>Configuration</permission>
		<iconFile>update_config.svg</iconFile>
		<workDir>%REGION_HOME%\Modules\HYMM_python_scripts</workDir>
		<executable>$WINPOWERSHELL$</executable>
		<arguments>
			<argument>$PYTHON$ create_metadata.py %REGION_HOME%\Config\MapLayerFiles\Australia;</argument>
			<argument>$PYTHON$ create_maps.py %REGION_HOME% %REGION_HOME%\Modules\HYMM_python_scripts;</argument>
			<argument>$PYTHON$ create_products.py %REGION_HOME% %REGION_HOME%\Modules\HYMM_python_scripts;</argument>
		</arguments>
	</taskButton>
</tabularConfigFilesDisplay>

Global.properties
WINPOWERSHELL=C://Windows/System32/WindowsPowerShell/v1.0/powershell.exe
PYTHON=%REGION_HOME%/Modules/Python3/python.exe

The Task Buttons allow a user to update other parts of the configuration, like XML files, by using (Python) scripts that create or update Delft-FEWS XML configuration files based on the meta data.