]>
Commit | Line | Data |
---|---|---|
9716d0de TL |
1 | // not realy a panel descendant, but its the best (existing) place for this |
2 | Ext.define('Proxmox.EOLNotice', { | |
3 | extend: 'Ext.Component', | |
4 | alias: 'widget.proxmoxEOLNotice', | |
5 | ||
6 | padding: '0 5', | |
7 | ||
8 | config: { | |
9 | product: '', | |
10 | version: '', | |
11 | eolDate: '', | |
12 | href: '', | |
13 | }, | |
14 | ||
15 | autoEl: { | |
16 | tag: 'div', | |
17 | 'data-qtip': gettext("You won't get any security fixes after the End-Of-Life date. Please consider upgrading."), | |
18 | }, | |
19 | ||
20 | initComponent: function() { | |
21 | let me = this; | |
22 | ||
23 | let href = me.href.startsWith('http') ? me.href : `https://${me.href}`; | |
24 | let message = Ext.String.format( | |
25 | gettext('Support for {0} {1} ends on {2}'), me.product, me.version, me.eolDate); | |
26 | ||
27 | me.html = `<i class="fa pwt-eol-icon fa-exclamation-triangle"></i> | |
28 | <a href="${href}" target="_blank">${message} <i class="fa fa-external-link"></i></a> | |
29 | `; | |
30 | ||
31 | me.callParent(); | |
32 | }, | |
33 | }); |