Spaces:
Runtime error
Runtime error
Update templates/dashboard.html
Browse files- templates/dashboard.html +118 -120
templates/dashboard.html
CHANGED
@@ -1,120 +1,118 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<title>Dashboard</title>
|
6 |
-
<!-- AdminLTE CSS -->
|
7 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.1.0/css/adminlte.min.css">
|
8 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
|
9 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
|
10 |
-
<style>
|
11 |
-
html, body {
|
12 |
-
height: 100%;
|
13 |
-
margin: 0;
|
14 |
-
display: flex;
|
15 |
-
flex-direction: column;
|
16 |
-
}
|
17 |
-
.wrapper {
|
18 |
-
flex: 1; /* This allows the content to grow and push the footer down */
|
19 |
-
padding: 10px;
|
20 |
-
margin-left: -35px;
|
21 |
-
}
|
22 |
-
|
23 |
-
</style>
|
24 |
-
</head>
|
25 |
-
<body>
|
26 |
-
{% include 'sidepane.html' %}
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
<
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
<
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
<script
|
94 |
-
|
95 |
-
|
96 |
-
window.
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
</body>
|
118 |
-
|
119 |
-
</body>
|
120 |
-
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<title>Dashboard</title>
|
6 |
+
<!-- AdminLTE CSS -->
|
7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.1.0/css/adminlte.min.css">
|
8 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
|
9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
|
10 |
+
<style>
|
11 |
+
html, body {
|
12 |
+
height: 100%;
|
13 |
+
margin: 0;
|
14 |
+
display: flex;
|
15 |
+
flex-direction: column;
|
16 |
+
}
|
17 |
+
.wrapper {
|
18 |
+
flex: 1; /* This allows the content to grow and push the footer down */
|
19 |
+
padding: 10px;
|
20 |
+
margin-left: -35px;
|
21 |
+
}
|
22 |
+
|
23 |
+
</style>
|
24 |
+
</head>
|
25 |
+
<body>
|
26 |
+
{% include 'sidepane.html' %}
|
27 |
+
|
28 |
+
|
29 |
+
<div class="wrapper">
|
30 |
+
<section class="main-header" style="border-bottom: none;border-top: none;">
|
31 |
+
<div class="container-fluid">
|
32 |
+
<div class="row">
|
33 |
+
<div class="col-lg-4 col-6">
|
34 |
+
<div class="small-box bg-info">
|
35 |
+
<div class="inner margin-left:10px;">
|
36 |
+
<h3>{{table_count_of_each_table.knowledge_base}}</h3>
|
37 |
+
<h4>KnowledgeBase</h4>
|
38 |
+
</div>
|
39 |
+
<div class="icon">
|
40 |
+
<i class="ion ion-bag"></i>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div class="col-lg-4 col-6">
|
46 |
+
<div class="small-box bg-success">
|
47 |
+
<div class="inner">
|
48 |
+
<h3>{{table_count_of_each_table.data_connectors}}</h3>
|
49 |
+
<h4>Data connectors</h4>
|
50 |
+
</div>
|
51 |
+
<div class="icon">
|
52 |
+
<i class="ion ion-stats-bars"></i>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<div class="col-lg-4 col-6">
|
58 |
+
<div class="small-box bg-warning">
|
59 |
+
<div class="inner">
|
60 |
+
<h3>{{table_count_of_each_table.api_connectors}}</h3>
|
61 |
+
<h4>API Connectors</h4>
|
62 |
+
</div>
|
63 |
+
<div class="icon">
|
64 |
+
<i class="ion ion-person-add"></i>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<div class="col-lg-4 col-6">
|
70 |
+
<div class="small-box bg-warning">
|
71 |
+
<div class="inner">
|
72 |
+
<h3>{{table_count_of_each_table.prompt_templates}}</h3>
|
73 |
+
<h4>Prompt_Templates</h4>
|
74 |
+
</div>
|
75 |
+
<div class="icon">
|
76 |
+
<i class="ion ion-person-add"></i>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</section>
|
83 |
+
</div>
|
84 |
+
|
85 |
+
<input type="hidden" id="userRole" name="userRole" value={{ role }}>
|
86 |
+
|
87 |
+
<footer>
|
88 |
+
{% include 'footer.html' %}
|
89 |
+
</footer>
|
90 |
+
|
91 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/adminlte.min.js"></script>
|
92 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
93 |
+
<script>
|
94 |
+
window.addEventListener('pageshow', function(event) {
|
95 |
+
if (event.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
96 |
+
window.location.reload();
|
97 |
+
}
|
98 |
+
});
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
document.addEventListener('DOMContentLoaded', function() {
|
103 |
+
var role1 = document.getElementById("userRole").value;
|
104 |
+
if (!role1) {
|
105 |
+
var roleFromInput = sessionStorage.getItem('userRole');
|
106 |
+
sessionStorage.setItem('userRole', roleFromInput);
|
107 |
+
console.log("Role set in sessionStorage:", roleFromInput);
|
108 |
+
} else {
|
109 |
+
sessionStorage.setItem('userRole', role1);
|
110 |
+
console.log("Retrieved user role from input:", role1); // Debugging
|
111 |
+
}
|
112 |
+
|
113 |
+
});
|
114 |
+
</script>
|
115 |
+
</body>
|
116 |
+
|
117 |
+
</body>
|
118 |
+
</html>
|
|
|
|