File size: 4,533 Bytes
df281ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Dashboard</title>
    <!-- AdminLTE CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.1.0/css/adminlte.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
    <style>

        html, body {

            height: 100%;

            margin: 0;

            display: flex;

            flex-direction: column;

        }

        .wrapper {

            flex: 1; /* This allows the content to grow and push the footer down */

            padding: 10px;

            margin-left: -35px;

        }

   

    </style>
</head>
<body>
    {% include 'sidepane.html' %}

    <div class="wrapper">
        <!-- Main content 

        <h1>Welcome,tothe RedMindGPT {{ username }}!</h1>

        <h1>Your role in redmindgptis: {{ role }}</h1> -->
        <section class="main-header" style="border-bottom: none;border-top: none;">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-4 col-6">
                        <div class="small-box bg-info">
                            <div class="inner margin-left:10px;">
                                <h3>4</h3>
                                <h4>KnowledgeBase</h4>
                            </div>
                            <div class="icon">
                                <i class="ion ion-bag"></i>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-4 col-6">
                        <div class="small-box bg-success">
                            <div class="inner">
                                <h3>1</h3>
                                <h4>Data connectors</h4>
                            </div>
                            <div class="icon">
                                <i class="ion ion-stats-bars"></i>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-4 col-6">
                        <div class="small-box bg-warning">
                            <div class="inner">
                                <h3>4</h3>
                                <h4>API Connectors</h4>
                            </div>
                            <div class="icon">
                                <i class="ion ion-person-add"></i>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-4 col-6">
                        <div class="small-box bg-warning">
                            <div class="inner">
                                <h3>5</h3>
                                <h4>Prompt_Templates</h4>
                            </div>
                            <div class="icon">
                                <i class="ion ion-person-add"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
   
    <input type="hidden" id="userRole" name="userRole" value={{ role }}>
    
    <footer>
        {% include 'footer.html' %}
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/adminlte.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
    <script>

        window.addEventListener('pageshow', function(event) {

    if (event.persisted || (window.performance && window.performance.navigation.type === 2)) {

        window.location.reload();

    }

});







        document.addEventListener('DOMContentLoaded', function() {

            var role1 = document.getElementById("userRole").value;

            if (!role1) {

                var roleFromInput = sessionStorage.getItem('userRole');

                sessionStorage.setItem('userRole', roleFromInput);

                console.log("Role set in sessionStorage:", roleFromInput);

            } else {

                sessionStorage.setItem('userRole', role1);

                console.log("Retrieved user role from input:", role1); // Debugging

            }



});

</script>
</body>
    
</body>
</html>