Reputation: 31
I'm trying to customizing in WSO2 Governance Registry 4.6.0 (G-Reg) the "Service List" table (Home > Metadata > List > Services) adding two column from "Service detail view": "Overview - Description" and "Endpoints - URL" I've edited the "Services Artifacts" (Home > Extensions > Configure > Artifact Types > Artifact Source) with the following lines:
<artifactType type="application/vnd.wso2-service+xml" shortName="service" singularLabel="Service" pluralLabel="Services" hasNamespace="false" iconSet="27">
<storagePath>/trunk/services/@{namespace}/@{name}</storagePath>
<nameAttribute>overview_name</nameAttribute>
<!--<endpoint1Attribute>endpointstext_endpoint1</endpoint1Attribute>-->
<namespaceAttribute>overview_namespace</namespaceAttribute>
<lifecycle>ServiceLifeCycle</lifecycle>
<ui>
<list>
<column name="Service Name B">
<data type="text" value="overview_name"/>
</column>
<!-- NEW Description -->
<column name="Description">
<data type="text" value="overview_description"/>
</column>
<!-- NEW Endpoints -->
<column name="Endpoints">
<!-- <data type="text" value="endpoints_endpoint1"/> -->
<!-- <data type="text" value="endpointmgt_endpointstext_endpoint1"/> -->
<data type="text" value="endpoints_endpointstext_endpoint1"/>
</column>
<column name="Service Version">
<data type="path" value="overview_version" href="@{storagePath}"/>
</column>
<column name="Service Namespace">
<data type="text" value="overview_namespace"/>
</column>
</list>
</ui>
<content>
......
</content>
</artifactType>
The column "Descrition" is filled properly, while column "Endpoints" is empty. How to value the tag value?(data type="text" value="???????"/>) ??
Upvotes: 2
Views: 92
Reputation: 17328
You can not add unbounded table values to list view. But if you really want see the endpoint value in the list create a new text filed and replicate the same value.
<list>
<column name="Service Name">
<data type="text" value="overview_name"/>
</column>
<column name="Service Version">
<data type="path" value="overview_version" href="@{storagePath}"/>
</column>
<column name="Service Namespace">
<data type="text" value="overview_namespace"/>
</column>
<column name="Endpoint">
<data type="text" value="endpoints_endpoint"/>
</column>
</list>
and update the endpoints table like below
<table name="Endpoints">
<subheading>
<heading>Environments</heading>
<heading>URL</heading>
</subheading>
<field type="option-text" maxoccurs="unbounded" url="true">
<name label="Endpoint">Endpoint</name>
<values>
<value>None</value>
<value>Unknown</value>
<value>Dev</value>
<value>Test</value>
<value>Stag</value>
<value>Prod</value>
</values>
</field>
<field type="text">
<name label="Endpoint">Endpoint</name>
</field>
</table>
Now you can see endpoint value in the list.
To create your own RXTs please find this article.
Upvotes: 0