From 24640d2d28ff2ba83016f27a270954e5b6925d79 Mon Sep 17 00:00:00 2001 From: Iain-S <25081046+Iain-S@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:46:02 +0100 Subject: [PATCH] Move JavaScript function to its own file --- rctab/static/scripts/download_table.js | 1 + rctab/static/scripts/tab_functions.js | 1 + rctab/static/scripts/tables.js | 1 + .../signed_in_azure_info_details.html | 35 ++++--------------- 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/rctab/static/scripts/download_table.js b/rctab/static/scripts/download_table.js index 482fa50..36e90ad 100644 --- a/rctab/static/scripts/download_table.js +++ b/rctab/static/scripts/download_table.js @@ -1,3 +1,4 @@ +/*ToDo*/ function download_table_as_csv(table_id, start_date, separator = ',') { // see https://stackoverflow.com/questions/15547198/export-html-table-to-csv-using-vanilla-javascript // Select rows from table_id diff --git a/rctab/static/scripts/tab_functions.js b/rctab/static/scripts/tab_functions.js index 8b7f978..549d433 100644 --- a/rctab/static/scripts/tab_functions.js +++ b/rctab/static/scripts/tab_functions.js @@ -1,3 +1,4 @@ +/*ToDo*/ function openTab(evt, tabName) { // Show the selected tab (tabName). Set the selected tab to be the active // tab. The the selected tab will then be activated on page refresh. diff --git a/rctab/static/scripts/tables.js b/rctab/static/scripts/tables.js index ca19356..655a7ef 100644 --- a/rctab/static/scripts/tables.js +++ b/rctab/static/scripts/tables.js @@ -1,3 +1,4 @@ +/*ToDo*/ $(document).ready( function () { // Only run on the main page if ($('#subscription_table_all').length > 0) { diff --git a/rctab/templates/signed_in_azure_info_details.html b/rctab/templates/signed_in_azure_info_details.html index 888dc28..6d5389b 100644 --- a/rctab/templates/signed_in_azure_info_details.html +++ b/rctab/templates/signed_in_azure_info_details.html @@ -1,29 +1,9 @@ - - - - {% extends "signed_in_base.html" %} +{% block head %} +{{ super() }} + + +{% endblock %} {% block noaccess %} @@ -36,7 +16,7 @@

{{ subscription_id }}

Expiry DateYour subscription will expire on this date Status - ApprovedApproved credits are ring fenced for your use but cannot be spent until they are allocated + ApprovedApproved credits are ring-fenced for your use but cannot be spent until they are allocated AllocatedAllocated credits are available to spend. When usage is greater than allocated your account will be disabled Total CostsTotals Costs are the total usage and purchase costs, including amortised costs of reservations RemainingIf this goes below £0.0 your subscription will be disabled @@ -54,7 +34,6 @@

{{ subscription_id }}

-

Useful cost analysis views

The following links will take you to useful cost analysis views for this subscription. @@ -225,7 +204,7 @@

Usage breakdown

- + Load usage data since start date. This may take some time depending on the length of time requested.