We recently decided to begin allowing our users to deploy
dashboards. We have enabled the dashboards feature in our development environment, and we are starting to plan for development of the capability to deploy DASH objects from DEV to TEST and PROD. As a part of this work, I have for the first time taken a look at the XML of some exported DASH objects. What I found was somewhat discouraging.
<?xml version="1.0" encoding="UTF-8"?>
<uc-export clientvers="12.3.2+build.1581365228664">
<DASH name="TEST1.DASH">
<HEADER state="1">
<Title>Test dashboard</Title>
<ArchiveKey1 />
<ArchiveKey2 />
<OH_SubType />
</HEADER>
<DASH state="1">
<DOC><![CDATA[ Base64-encoded XML ]]></DOC>
</DASH>
<DOCU_Docu state="1" type="text">
<DOC />
</DOCU_Docu>
<DOCU_Runbook- state="1" type="xml">
<DOC />
</DOCU_Runbook->
</DASH>
</uc-export>
Almost all of the content is opaque, embedded in a Base64-encoded string inside a CDATA block. When decoded, this reveals dashboard-relevant XML content, including one entry for each widget. Again, all of the content is encoded. Widget content is embedded escaped XML. Configuration content is embedded Base64-encoded JSON.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dashboard cols="3" rows="2" static="false">
<widgets>
<entry>
<widget id="com.uc4.ae.processmonitoring"> Escaped XML </widget>
<geometry height="1" width="3" x="0" y="0"/>
</entry>
</widgets>
<configurations>
<item id="analytics.dashboard.datasource"> Base64-encoded JSON </item>
</configurations>
</dashboard>
The unescaped XML of the widgent looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:ns2="http://www.automic.com/ECC/core/usersettings" xmlns:ns3="http://www.automic.com/ECC/core/usersettings/common" xmlns:ns4="http://www.automic.com/ECC/core/usersettings/textsearch" xmlns:ns5="http://www.automic.com/ECC/ae/usersettings" xmlns:ns6="http://www.automic.com/ECC/core/usersettings/optiontree" xmlns:ns7="http://www.automic.com/ECC/core/usersettings/optiongroup" xmlns:ns8="http://www.automic.com/ECC/core/usersettings/specifictaskpropertiesfilter" xmlns:ns9="http://www.automic.com/ECC/core/usersettings/optionsearch">
<refreshInterval>AUTO_MIN_1</refreshInterval>
<title />
<description />
<treeMode>true</treeMode>
<filter includeDeactivatedTasks="false" useSearchStringAsTabDescription="false">
<ns5:taskNameSearchConfiguration inverse="false">
<ns4:searchString />
</ns5:taskNameSearchConfiguration>
<ns5:taskTypeConfiguration />
<ns5:statusConfiguration>
<ns6:selectedKeys xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1800-1899</ns6:selectedKeys>
<ns6:selectedKeys xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1560-1564</ns6:selectedKeys>
<ns6:selectedKeys xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1600-1799</ns6:selectedKeys>
<ns6:selectedKeys xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1300-1599</ns6:selectedKeys>
</ns5:statusConfiguration>
<ns5:hostNameSearchConfiguration inverse="false">
<ns4:searchString />
</ns5:hostNameSearchConfiguration>
<ns5:hostTypeConfiguration />
<ns5:userNameSearchConfiguration currentUser="false" inverse="false">
<searchString />
</ns5:userNameSearchConfiguration>
<ns5:ak1NameSearchConfiguration inverse="false">
<ns4:searchString />
</ns5:ak1NameSearchConfiguration>
<ns5:ak2NameSearchConfiguration inverse="false">
<ns4:searchString />
</ns5:ak2NameSearchConfiguration>
<ns5:customAttributeConfigurations />
<ns5:queueConfiguration />
<ns5:messageNumberSearchConfiguration>
<value>0</value>
</ns5:messageNumberSearchConfiguration>
<ns5:messageTextSearchConfiguration inverse="false">
<ns4:searchString />
</ns5:messageTextSearchConfiguration>
<ns5:clientConfiguration />
<ns5:timeFrameConfiguration>
<filterOption>LAST</filterOption>
<filterUnits>DAYS</filterUnits>
<units>1</units>
<from>2020-10-26T19:08:20.103Z</from>
<to>2020-10-26T19:08:20.103Z</to>
<filterType>NO_TIME_FRAME</filterType>
</ns5:timeFrameConfiguration>
<ns5:runIdConfiguration>
<value>0</value>
</ns5:runIdConfiguration>
<ns5:topRunIdConfiguration>
<value>0</value>
</ns5:topRunIdConfiguration>
<ns5:parentRunIdConfiguration>
<value>0</value>
</ns5:parentRunIdConfiguration>
<ns5:zduVersionConfiguration />
<ns5:syncUsageConfiguration>
<selectedItemId />
</ns5:syncUsageConfiguration>
<ns5:taskAliasConfiguration inverse="false">
<ns4:searchString />
</ns5:taskAliasConfiguration>
<ns5:specificTaskPropertiesConfiguration>
<ns8:name />
<ns8:value />
</ns5:specificTaskPropertiesConfiguration>
<ns5:additionalTaskFilterConfiguration commented="false" modified="false" />
</filter>
</configuration>
The decoded JSON content of the configuration key looks like this:
{
"configuration" : {
"primary_entity" : "JOB",
"time_frame" : {
"between" : {
"start" : "2018-02-01",
"end" : "2018-02-08"
}
},
"query_tree_root" : {
"leaves" : [ ],
"branches" : [ ],
"query_tree_root_operator" : "ALL"
}
}
}
This design leaves much to be desired. We want to examine the XML of objects to ensure validity before allowing users to deploy the objects to production. When important content is encoded, or even
doubly encoded, this obscures information from the validation tool.
Is there a good reason the XML schema for dashboards is designed this way?