From d5ea56d07877176e38662cca3a5c06f62d90ad32 Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Mon, 5 Feb 2024 07:24:32 +0100
Subject: [PATCH 1/3] Update dashboard.tpl
change active users to All Users Insight
add All users to graph
---
ui/ui/dashboard.tpl | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl
index 26a6abed..1b37f6fe 100644
--- a/ui/ui/dashboard.tpl
+++ b/ui/ui/dashboard.tpl
@@ -165,7 +165,7 @@
-
{Lang::T('Active Users')}
+
{Lang::T('All Users Insights')}
@@ -306,16 +306,17 @@
document.addEventListener("DOMContentLoaded", function () {
// Get the data from PHP and assign it to JavaScript variables
var u_act = '{/literal}{$u_act}{literal}';
+ var c_all = '{/literal}{$c_all}{literal}';
var u_all = '{/literal}{$u_all}{literal}';
// Create the chart data
var data = {
- labels: ['Active Users', 'Inactive Users'],
+ labels: ['Active Users', 'Inactive Users', 'All Users'],
datasets: [{
label: 'User Recharges',
- data: [parseInt(u_act), parseInt(u_all)],
- backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)'],
- borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)'],
+ data: [parseInt(u_act), parseInt(u_all), parseInt(c_all)],
+ backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)', 'rgba(0, 0, 255, 0.5'],
+ borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)', 'rgba(0, 0, 255, 0.7'],
borderWidth: 1
}]
};
From 6c2658bf0351f8760fc05304edc27611657d0714 Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Mon, 5 Feb 2024 07:41:15 +0100
Subject: [PATCH 2/3] Update dashboard.tpl
change all users to total users
---
ui/ui/dashboard.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl
index 1b37f6fe..a3ff1527 100644
--- a/ui/ui/dashboard.tpl
+++ b/ui/ui/dashboard.tpl
@@ -311,7 +311,7 @@
// Create the chart data
var data = {
- labels: ['Active Users', 'Inactive Users', 'All Users'],
+ labels: ['Active Users', 'Inactive Users', 'Total Users'],
datasets: [{
label: 'User Recharges',
data: [parseInt(u_act), parseInt(u_all), parseInt(c_all)],
From 500f3de6a98997f8d6295e351714fff7a24fb442 Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Mon, 5 Feb 2024 08:17:10 +0100
Subject: [PATCH 3/3] Update dashboard.tpl
fixed inactive users in graph
---
ui/ui/dashboard.tpl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl
index a3ff1527..5a39c776 100644
--- a/ui/ui/dashboard.tpl
+++ b/ui/ui/dashboard.tpl
@@ -308,13 +308,15 @@
var u_act = '{/literal}{$u_act}{literal}';
var c_all = '{/literal}{$c_all}{literal}';
var u_all = '{/literal}{$u_all}{literal}';
+ //lets calculate the inactive users as reported
+ var inactive = u_all - u_act;
// Create the chart data
var data = {
labels: ['Active Users', 'Inactive Users', 'Total Users'],
datasets: [{
label: 'User Recharges',
- data: [parseInt(u_act), parseInt(u_all), parseInt(c_all)],
+ data: [parseInt(u_act), parseInt(inactive), parseInt(c_all)],
backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)', 'rgba(0, 0, 255, 0.5'],
borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)', 'rgba(0, 0, 255, 0.7'],
borderWidth: 1