allure2
allure2 copied to clipboard
Are we able to remove widgets from overview page?
Hello, I would like to know how to remove widgets from overview page. Like removing the trend widget from the page. I know I could add widgets into the page, but I am not sure if I could remove the existing widgets from the page, and I don't know how to do that. Need help !!! Thank you in advance.
- Allure version: 2.6.0
- Test framework: [email protected]
- Allure adaptor: [email protected]
- Generate report using: [email protected]
Just to stir the pot on this...
We store Allure output for every build we run onto an Intranet website. For builds on master/main branches, we use and keep the history to give us trends. For builds on feature branches we don't use or keep the history. This means that depending on which build you're looking at, it might have history, or it might not (with no way to know from the Allure output itself). It's a little confusing to see a box that isn't used right on the top of the overview page - to avoid the confusion (and the support questions), I'd like to remove the box if we're not using history.
@coofercat @JoviHuang since I had this need recently myself, and it still might be a suitable workaround for you: you can create a dummy plugin with just a single js file that would remove the widget from page upon opening and delete them from rendering queue so they won't appear after navigating to other pages. my working example:
window.onload = function () {
document.querySelector('div[data-id="environment"]').remove();
document.querySelector('div[data-id="executors"]').remove();
delete allure.api.widgets.widgets.environment;
delete allure.api.widgets.widgets.executors;
}
+1
+1
+1