- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Re: Plugin and Badge
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 01:06 AM
01-25-2024 01:06 AM
Plugin and Badge
Hi All,
I’ve written an instance tab plugin that pulls some data from a restapi but I would like to be able to display a badge alongside the performance badges, Health, Last Backup, Availability etc, that is green or red depending on the data in the custom tab.
Is this possible at the moment?
Thanks
- Tags:
- instances
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 01:34 AM
01-25-2024 01:34 AM
Re: Plugin and Badge
If you get this working please share your script with the community, it is an interesting idea and use case.
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 01:53 AM
01-25-2024 01:53 AM
Re: Plugin and Badge
ChatGPT will take you most of the way.
<script>
document.addEventListener("DOMContentLoaded", function() {
// Function to add a div with class "stats-container" and text "your content here"
function addStatsContainer() {
// Find the div with class "incident-stats"
var incidentStatsDiv = document.querySelector('.incident-stats');
// Check if the div is found
if (incidentStatsDiv) {
// Create a new div element
var statsContainerDiv = document.createElement('div');
// Add class "stats-container" to the new div
statsContainerDiv.className = 'stats-container';
// Set the text content of the new div
statsContainerDiv.textContent = 'your content here';
// Insert the new div as the third child of the "incident-stats" div
incidentStatsDiv.insertBefore(statsContainerDiv, incidentStatsDiv.children[2]);
}
}
// Call the function to add the div when the page is fully loaded
addStatsContainer();
});
</script>
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 01:33 AM
01-25-2024 01:33 AM
Re: Plugin and Badge
I’d try do this with javascript. I think it would be possible.
You would need to test, but as that is a tab, the HTML that makes it up is rendered on page load to the browser regardless of the display status.
So a piece of javascript that runs on page load could potentially add another div with your content to the incident stats div (see below)
You’d add that script in your view (*.hbs file).
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]