]> git.proxmox.com Git - proxmox-widget-toolkit.git/blob - src/panel/EOLNotice.js
43119d165bcaf75328579f1b1c15cbb4d48ad440
[proxmox-widget-toolkit.git] / src / panel / EOLNotice.js
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 userCls: 'eol-notice',
7 padding: '0 5',
8
9 config: {
10 product: '',
11 version: '',
12 eolDate: '',
13 href: '',
14 },
15
16 autoEl: {
17 tag: 'div',
18 'data-qtip': gettext("You won't get any security fixes after the End-Of-Life date. Please consider upgrading."),
19 },
20
21 initComponent: function() {
22 let me = this;
23
24 let href = me.href.startsWith('http') ? me.href : `https://${me.href}`;
25 let message = Ext.String.format(
26 gettext('Support for {0} {1} ends on {2}'), me.product, me.version, me.eolDate);
27
28 me.html = `<i class="fa fa-exclamation-triangle"></i>
29 <a href="${href}" target="_blank">${message} <i class="fa fa-external-link"></i></a>
30 `;
31
32 me.callParent();
33 },
34 });