]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/dc/Support.js
1 Ext
. define ( 'PVE.dc.Support' , {
2 extend
: 'Ext.panel.Panel' ,
3 alias
: 'widget.pveDcSupport' ,
4 pveGuidePath
: '/pve-docs/index.html' ,
5 onlineHelp
: 'getting_help' ,
7 invalidHtml
: '<h1>No valid subscription</h1>' + PVE
. Utils
. noSubKeyHtml
,
9 communityHtml
: 'Please use the public community <a target="_blank" href="https://forum.proxmox.com">forum</a> for any questions.' ,
11 activeHtml
: 'Please use our <a target="_blank" href="https://my.proxmox.com">support portal</a> for any questions. You can also use the public community <a target="_blank" href="https://forum.proxmox.com">forum</a> to get additional information.' ,
13 bugzillaHtml
: '<h1>Bug Tracking</h1>Our bug tracking system is available <a target="_blank" href="https://bugzilla.proxmox.com">here</a>.' ,
15 docuHtml : function () {
17 var guideUrl
= window
. location
. origin
+ me
. pveGuidePath
;
18 var text
= Ext
. String
. format ( '<h1>Documentation</h1>'
19 + 'The official Proxmox VE Administration Guide'
20 + ' is included with this installation and can be browsed at '
21 + '<a target="_blank" href="{0}">{0}</a>' , guideUrl
);
25 updateActive : function ( data
) {
28 var html
= '<h1>' + data
. productname
+ '</h1>' + me
. activeHtml
;
29 html
+= '<br><br>' + me
. docuHtml ();
30 html
+= '<br><br>' + me
. bugzillaHtml
;
35 updateCommunity : function ( data
) {
38 var html
= '<h1>' + data
. productname
+ '</h1>' + me
. communityHtml
;
39 html
+= '<br><br>' + me
. docuHtml ();
40 html
+= '<br><br>' + me
. bugzillaHtml
;
45 updateInactive : function ( data
) {
47 me
. update ( me
. invalidHtml
);
50 initComponent : function () {
53 let reload = function () {
54 Proxmox
. Utils
. API2Request ({
55 url
: '/nodes/localhost/subscription' ,
58 failure : function ( response
, opts
) {
59 Ext
. Msg
. alert ( gettext ( 'Error' ), response
. htmlStatus
);
60 me
. update ( ` ${gettext('Unable to load subscription status')} : ${response.htmlStatus} ` );
62 success : function ( response
, opts
) {
63 let data
= response
. result
. data
;
64 if ( data
?. status
. toLowerCase () === 'active' ) {
65 if ( data
. level
=== 'c' ) {
66 me
. updateCommunity ( data
);
68 me
. updateActive ( data
);
71 me
. updateInactive ( data
);
79 bodyStyle
: 'padding:10px' ,