Hello everyone,
Bitbucket Server has this neat little feature of highlighting entries in the Administration overview if something is not configured:
I tried to reproduce this for one of our plugins. My idea was to use a ContextProvider, which determines the content for the label and the styleClass. Here is the coresponding definition of the web-item from the plugin.xml:
<web-item name="Secure Login Admin Config Web Item" key="secureloginAdminConfigWebItem" section="atl.admin/secureloginAdminWebSection">
<label>Secure Login Config</label>
<link>/plugins/servlet/twofactor/admin</link>
<tooltip>$message</tooltip>
<context-provider class="de.syracom.bitbucket.plugins.securelogin.admin.AdminConfigContextProvider" />
<styleClass>$styleClass</styleClass>
</web-item>
In result the description (or tooltip in case of Bitbucket) get filled with the value the ContextProvider puts into the context map. But this does not seem to work in case of the styleClass attribute. As you can see from the generated html code, the $styleClass variable does not get replaced:
<li>
<a href="/bitbucket/plugins/servlet/twofactor/admin" class="$styleClass" title="Active configuration for the Secure Login plugin." data-web-item-key="de.syracom.bitbucket.plugins.securelogin:secureloginAdminConfigWebItem">Secure Login Config</a>
<span class="description">Active configuration for the Secure Login plugin.</span>
</li>
Does anyone know, if there is a way to fill the styleClass Attribute over the context or another way to archive the desired effect to change the style of the description based on state of the plugin?
Cheers,
Alexander