[% USE Api2; USE Master; USE CPBranding; USE Apache; USE VarCache; USE Content_Includes; SET CPANEL.CPVAR.indexpage = "1"; SET homeDir = CPANEL.homedir, isReseller = ExpVar.expand('$isresellerlogin'), domain = CPANEL.CPDATA.DNS, user_theme = CPANEL.CPDATA.RS, user = CPANEL.user; SET embeded_styles_list = ["tools/dashboard.css"]; SET page_styles_list = []; IF !CPANEL.ua_is_mobile; embeded_styles_list.push("css/angular-chosen-spinner.css"); page_styles_list.push("libraries/chosen/1.5.1/chosen.min.css"); END; SET applist = ["tls_status"]; SET apps = {}; FOREACH applist_item IN applist; apps.$applist_item = CPBranding.get_application_from_available_applications(varcache.available_applications, applist_item); END; SET upgradeUrl = CPANEL.CPVAR.dprefix _ CPBranding.get_implementer_from_available_applications( varcache.available_applications, 'upgrade', ).url; SET wpToolkitUrl = CPANEL.CPVAR.dprefix _ CPBranding.get_application_from_available_applications( varcache.available_applications, 'wp-toolkit', ).url; # Set NGINX variables. SET nginx_caching_enabled = 0; # hard coded default SET nginx_is_installed = !file_test("e", "/etc/nginx/ea-nginx/enable.standalone") && file_test("e", "/etc/nginx/ea-nginx/cache.json"); IF nginx_is_installed; SET nginx_caching_userconf_path = "/var/cpanel/userdata/" _ user _ "/nginx-cache.json"; SET nginx_caching_global = JSON.loadfile("/etc/nginx/ea-nginx/cache.json"); IF nginx_caching_global.exists("enabled"); nginx_caching_enabled = nginx_caching_global.item("enabled"); END; IF file_test("e", nginx_caching_userconf_path); SET nginx_caching_user = JSON.loadfile(nginx_caching_userconf_path); IF nginx_caching_user.exists("enabled"); nginx_caching_enabled = nginx_caching_user.item("enabled"); END; END; END; SET display_welcome_panel = varcache.display_welcome_panel; %] [% js_code_first = PROCESS js_block_first %] [% js_page_first = PROCESS register_nvdata %] [% WRAPPER '_assets/master.html.tt' page_title = locale.maketext("Tools") page_js_top = js_code_first page_js = js_page_first include_legacy_stylesheets = 0 include_legacy_scripts = 0 include_cjt = 0 embed_stylesheets = embeded_styles_list page_stylesheets = page_styles_list hide_page_heading = 0 app_key = "tools" use_master_bootstrap = 0 focus_feature_search = 1 -%]
[% PROCESS tools/views/applicationList.html.tt %]
[% Content_Includes.render("cpanel_jupiter_tools_general_information_before.html.tt") %]
[% locale.maketext("General Information") %]
[% IF apps.tls_status %] [% ELSE %] [% END %] [% IF nginx_is_installed %] [% END %]
[% IF isReseller %] [% IF !CPANEL.ua_is_mobile %] [% ELSE %] [% END %] [% ELSE %] [% user %] [% END %]
[%# Loading StatsBar has significant overhead so ExpVar.expand is used here %] [% IF ExpVar.expand('$hasdedicatedip') %] [% ELSE %] [% END %] [% ExpVar.expand('$ip') %]
[% homeDir %]
[% execute( 'LastLogin', 'get_last_or_current_logged_in_ip' ).data %]
[% IF CPANEL.feature("theme-switch") %] [% IF !CPANEL.ua_is_mobile %] [% ELSE %] [% END %] [% ELSE %] [% user_theme %] [% END %]
[% IF CPANEL.feature("toggle_nginx_caching") %] [% ELSE %] [% IF nginx_caching_enabled; locale.maketext("Active"); ELSE; locale.maketext('Inactive'); END; %] [% END %]
[% locale.maketext("Server Information") %]
[% Content_Includes.render("cpanel_jupiter_tools_stats_before.html.tt") %]
[% locale.maketext("Statistics") %]
{{::app.description}}
{{::app.formattedPercent}}%
{{::app.formattedUsage}} / {{::app.formattedMaximum}} ({{::app.formattedPercent}}%)
{{app.warningTooltip}}
[% locale.maketext('Data Unavailable') %]
[% IF display_welcome_panel %] [% END %] [% SET application_dir = ExpVar.expand('$basedir') _ "/tools/"; SET file = ExpVar.expand('$basefilename'); SET requirejs_url_base = '/frontend/' _ user_theme; %] [% PROCESS '_assets/cjt2_header_include.tt' %] [% END #wrapper -%] [% BLOCK js_block_first %] [% PROCESS tools/views/applicationListHeader.html.tt %] [% END %] [% BLOCK register_nvdata %] [% END %]