||
Skip to end of metadata
Go to start of metadata

WSO2 Governance Registry auto generates the text and color of the artifact icons based on the name of the resource. However, you can override the text and color of these icons using the Enterprise Store extension model as described below.

Overriding text and colors of thumbnail icons in the Publisher

For an example, the default thumbnail icon of SOAP service type assets in the Publisher is as shown below.

old Publisher icon

To generate your own color/text for the thumbnail icons of SOAP service type assets, copy the following setUIMetaData method before the combineWithRxt method in the <G-REG_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/wsdl/asset.js file, and override the values of the modAsset.nameToChar and modAsset.uniqueColor properties in it as shown below.

setUIMetaData: function(asset){
	var modAsset = this._super.setUIMetaData.call(this, asset);
        modAsset.nameToChar = "AA";
		modAsset.uniqueColor = "#333333";
          return modAsset;
       },

Once you restart the WSO2 G-Reg server, you view the thumbnail icon in the Publisher for SOAP service type assets as shown below.

new publisher thumbnail icon

You can enable this for all the asset types you find in the <G-REG_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/assets/ directory, by editing the corresponding asset.js file inside the respective directory of each of them as described in the above example.

Overriding text and colors of thumbnail  icons in the Store

For an example, the default thumbnail icon of SOAP service type assets is as shown below.

old Store icon

To generate your own color/text for the icons of SOAP service type assets, copy the following setUIMetaData method before the get: function(id) method in the <G-REG_HOME>/repository/deployment/server/jaggeryapps/store/extensions/assets/wsdl/asset.js file, and override the values of the modAsset.nameToChar and modAsset.uniqueColor properties in it as shown below.

setUIMetaData: function(asset){
	var modAsset = this._super.setUIMetaData.call(this, asset);
        modAsset.nameToChar = "BB";
		modAsset.uniqueColor = "#008000";
          return modAsset;
       },

Once you restart the WSO2 G-Reg server, you view the thumbnail icon in the Publisher for SOAP service type assets as shown below.

new Store icon

You can enable this for all the asset types you find in the <G-REG_HOME>/repository/deployment/server/jaggeryapps/store/extensions/assets/ directory, by editing the corresponding asset.js file inside the respective directory of each of them as described in the above example.

  • No labels