fleet/website/assets/js/pages/software-management.page.js
Eric 8658e4f1ec
Website: Software management landing page (#23961)
Closes: #23890

Changes:
- Updated the styles, layout and content of the
/vulnerability-management page to match the latest wireframes
- Renamed the /vulnerability-management page to /software-management
- Added a redirect for the /vulnerability-management page that takes
users to the /software-management page with all query parameters.
2024-11-20 18:54:36 +09:00

42 lines
1.6 KiB
JavaScript
Vendored

parasails.registerPage('software-management-page', {
// ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗
// ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣
// ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝
data: {
modal: undefined,
visibleFeature: 'mitigate-cves-automatically',
},
// ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗
// ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣
// ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝
beforeMount: function() {
//…
},
mounted: async function() {
$('#heroCarousel').carousel({
interval: 5000,
});
$('#heroCarousel').on('slide.bs.carousel', (e)=>{
let toIndicatorElement = $('ol[purpose="carousel-indicators"] li')[e.to];
let fromIndicatorElement = $('ol[purpose="carousel-indicators"] li')[e.from];
$(toIndicatorElement).addClass('active');
$(fromIndicatorElement).removeClass('active');
});
},
// ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ║║║║ ║ ║╣ ╠╦╝╠═╣║ ║ ║║ ║║║║╚═╗
// ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝
methods: {
clickSwitchFeature: function(feature) {
this.visibleFeature = feature;
},
clickOpenVideoModal: function(modalName) {
this.modal = modalName;
},
closeModal: function() {
this.modal = undefined;
}
}
});