Aravind-0808 commited on
Commit
c7525e3
·
1 Parent(s): 2223254

Initial commit

Browse files
app.py CHANGED
@@ -57,6 +57,1520 @@ DB_USER = 'u852023448_redmindgpt'
57
  DB_PASSWORD = 'redmindGpt@123'
58
  DB_HOST = '217.21.88.10'
59
  DB_NAME = 'u852023448_redmindgpt'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  from pydantic import BaseModel
61
  class DatabaseConnection(BaseModel):
62
  database_type: str
@@ -252,15 +1766,16 @@ async def dashboard(request: Request):
252
  for table in all_tables:
253
 
254
  table_name = table[0]
255
- if table_name != "user_feedback":
 
256
  query = f"SELECT COUNT(*) FROM {table_name} WHERE company_id = %s"
257
  cursor.execute(query, (company_id,))
258
-
259
  count = cursor.fetchone()[0]
260
  table_count_of_each_table[table_name] = count
261
- query1=f"select company_name from company_detail where company_id = %s"
262
- cursor.execute(query1,(company_id,))
263
- company_name_result = cursor.fetchone()
264
 
265
  # Check if company_name_result is not None
266
  if company_name_result:
 
57
  DB_PASSWORD = 'redmindGpt@123'
58
  DB_HOST = '217.21.88.10'
59
  DB_NAME = 'u852023448_redmindgpt'
60
+
61
+ import json
62
+ import os
63
+ import logging
64
+ import shutil
65
+ import asyncpg
66
+ from fastapi import FastAPI, File, Query,Form, Request, HTTPException, UploadFile
67
+ from fastapi.responses import JSONResponse, RedirectResponse
68
+ from fastapi.staticfiles import StaticFiles
69
+ from fastapi.templating import Jinja2Templates
70
+ from fastapi.middleware.cors import CORSMiddleware
71
+ from dotenv import load_dotenv
72
+ import mysql.connector
73
+ from typing import List
74
+ from pydantic import BaseModel
75
+ import psycopg2
76
+
77
+
78
+
79
+ # Load environment variables
80
+ load_dotenv()
81
+
82
+ # Configure logging
83
+ logging.basicConfig(
84
+ level=logging.INFO,
85
+ format='%(asctime)s - %(levelname)s - %(message)s',
86
+ handlers=[
87
+ logging.FileHandler("redmindgen.log"),
88
+ logging.StreamHandler() # This ensures logging to console
89
+ ]
90
+ )
91
+ logging.info("Application startup")
92
+
93
+ # Create the FastAPI app
94
+ app = FastAPI(title="RedmindGen", description="Chat with your Data", version="1.0.0")
95
+
96
+ # Mount static files
97
+ app.mount("/static", StaticFiles(directory="static"), name="static")
98
+
99
+ # Jinja2 templates
100
+ templates = Jinja2Templates(directory="templates")
101
+
102
+ # Configure CORS
103
+ origins = [
104
+ "http://localhost:8000",
105
+ "http://127.0.0.1:8000",
106
+ "http://167.71.75.10:8003/"
107
+ ]
108
+
109
+ app.add_middleware(
110
+ CORSMiddleware,
111
+ allow_origins=origins,
112
+ allow_credentials=True,
113
+ allow_methods=["*"],
114
+ allow_headers=["*"],
115
+ )
116
+ DB_USER = 'u852023448_redmindgpt'
117
+ DB_PASSWORD = 'redmindGpt@123'
118
+ DB_HOST = '217.21.88.10'
119
+ DB_NAME = 'u852023448_redmindgpt'
120
+ from pydantic import BaseModel
121
+ class DatabaseConnection(BaseModel):
122
+ database_type: str
123
+ server: str
124
+ port: str
125
+ databaseName: str
126
+ username: str
127
+ password: str
128
+ @app.post("/api/connect")
129
+ async def connect_to_database(connection: DatabaseConnection):
130
+ try:
131
+ print(f"Attempting to connect to database: {connection.database_type}")
132
+ if connection.database_type == "Postgres":
133
+ print(f"PostgreSQL connection details - Host: {connection.server}, Port: {connection.port}, Database: {connection.databaseName}, User: {connection.username}")
134
+ conn = psycopg2.connect(
135
+ host=connection.server,
136
+ port=connection.port,
137
+ database=connection.databaseName,
138
+ user=connection.username,
139
+ password=connection.password
140
+ )
141
+ query_schemas = "SELECT schema_name FROM information_schema.schemata"
142
+ query_tables = "SELECT table_name FROM information_schema.tables WHERE table_schema = %s"
143
+ elif connection.database_type == "mysql":
144
+ print(f"inside mysql",connection.server,connection.port,connection.databaseName,connection.username,connection.password)
145
+ conn = mysql.connector.connect(
146
+ host=connection.server,
147
+ port=connection.port,
148
+ database=connection.databaseName,
149
+ user=connection.username,
150
+ password=connection.password
151
+ )
152
+ query_schemas = "SELECT schema_name FROM information_schema.schemata"
153
+ query_tables = "SELECT table_name FROM information_schema.tables WHERE table_schema = %s"
154
+ else:
155
+ raise HTTPException(status_code=400, detail="Unsupported database type")
156
+
157
+ cursor = conn.cursor()
158
+
159
+ # Fetch all schemas
160
+ cursor.execute(query_schemas)
161
+ schemas = cursor.fetchall()
162
+
163
+ # Fetch all tables within each schema
164
+ schema_tables = {}
165
+ for schema in schemas:
166
+ cursor.execute(query_tables, (schema[0],))
167
+ tables = cursor.fetchall()
168
+ schema_tables[schema[0]] = [table[0] for table in tables]
169
+
170
+ cursor.close()
171
+ conn.close()
172
+
173
+ return {"schemas": [schema[0] for schema in schemas], "schema_tables": schema_tables, "success": True}
174
+
175
+ except Exception as e:
176
+ raise HTTPException(status_code=500, detail=str(e))
177
+
178
+ # Function to create a new database connection for MySQL (Example)
179
+ def get_db_connection():
180
+ try:
181
+ cnx = mysql.connector.connect(user=DB_USER, password=DB_PASSWORD, host=DB_HOST, database=DB_NAME)
182
+ return cnx
183
+ except mysql.connector.Error as err:
184
+ logging.error(f"Database connection error: {err}")
185
+ return None
186
+ # Function to create a new database connection for MySQL (Example)
187
+ def get_db_connection():
188
+ try:
189
+ cnx = mysql.connector.connect(user=DB_USER, password=DB_PASSWORD, host=DB_HOST, database=DB_NAME)
190
+ return cnx
191
+ except mysql.connector.Error as err:
192
+ logging.error(f"Database connection error: {err}")
193
+ return None
194
+
195
+ @app.get("/")
196
+ async def read_root(request: Request):
197
+ return templates.TemplateResponse("index.html", {"request": request})
198
+
199
+ def verify_user(username: str, password: str):
200
+ try:
201
+ cnx = get_db_connection()
202
+ cursor = cnx.cursor()
203
+ query = "SELECT role,company_id FROM user_detail WHERE username = %s AND password = %s"
204
+ values = (username, password)
205
+ cursor.execute(query, values)
206
+ result = cursor.fetchone()
207
+ cursor.close()
208
+ cnx.close()
209
+ if result is not None:
210
+ logging.info(f"User {username}{result[1]} logged in successfully")
211
+ return "success",result[0],result[1]
212
+ else:
213
+ logging.info(f"User {username} login failed")
214
+ return "failure"
215
+ except mysql.connector.Error as err:
216
+ logging.error(f"Database error: {err}")
217
+ return "failure"
218
+
219
+ @app.post("/validate-user")
220
+ async def validate_user(request: Request, username: str = Form(...), password: str = Form(...)):
221
+ status, role ,company_id= verify_user(username, password)
222
+ if status == 'success' and role and company_id:
223
+ logging.info(f"user role {role} is returned")
224
+
225
+ # Set cookies and redirect to the dashboard
226
+ response = RedirectResponse(url="/dashboard", status_code=302)
227
+ response.set_cookie(key="role", value=role)
228
+ response.set_cookie(key="username", value=username)
229
+ response.set_cookie(key="company_id",value=company_id)
230
+ return response
231
+ else:
232
+ # If login fails, redirect back to the index page with an error message
233
+ return templates.TemplateResponse("index.html", {
234
+ "request": request,
235
+ "error": "Invalid username or password"
236
+ })
237
+
238
+ @app.post("/submit_company_profile")
239
+ async def submit_company_profile(request: Request,
240
+ company_name: str = Form(...),
241
+ company_code: str = Form(...),
242
+ domain: str = Form(...),
243
+ llm_tools: List[str] = Form(...),
244
+ username:str=Form(...),
245
+ password:str=Form(...),
246
+ role:str=Form(...)):
247
+ logging.info("Received form submission for company profile")
248
+ logging.info(f"Form data - company_name: {company_name}, company_code: {company_code}, domain: {domain}, llm_tools: {llm_tools}")
249
+
250
+ try:
251
+ cnx = get_db_connection()
252
+ cursor = cnx.cursor()
253
+ query = "INSERT INTO company_detail (company_name, company_code, domain, llm_tools) VALUES (%s, %s, %s, %s)"
254
+ values = (company_name, company_code, domain, ",".join(llm_tools))
255
+ logging.info(f"Executing query: {query} with values: {values}")
256
+ cursor.execute(query, values)
257
+ # Retrieve the inserted company_id
258
+ company_id = cursor.lastrowid
259
+ logging.info(f"Company profile for {company_name} inserted successfully with company_id: {company_id}")
260
+
261
+ # Insert user details with the retrieved company_id
262
+ user_query = "INSERT INTO user_detail (company_id, username, password,role) VALUES (%s, %s, %s, %s)"
263
+ user_values = (company_id, username, password, role)
264
+ logging.info(f"Executing user detail query: {user_query} with values: {user_values}")
265
+ cursor.execute(user_query, user_values)
266
+ cnx.commit()
267
+ logging.info(f"Query executed successfully, {cursor.rowcount} row(s) affected")
268
+ cursor.close()
269
+ cnx.close()
270
+ logging.info(f"Company profile for {company_name} inserted successfully")
271
+ RedirectResponse(url="/company_profile?message=Data saved successfully", status_code=302)
272
+ except mysql.connector.Error as err:
273
+ logging.error(f"Database error: {err}")
274
+ raise HTTPException(status_code=500, detail="Internal Server Error")
275
+
276
+
277
+ @app.get("/api/companies")
278
+ async def get_companies():
279
+ try:
280
+ cnx = get_db_connection()
281
+ cursor = cnx.cursor()
282
+ query = "SELECT company_name FROM company_detail "
283
+ cursor.execute(query)
284
+ companies = cursor.fetchall()
285
+ cursor.close()
286
+ cnx.close()
287
+ return {"companies": [{"name": company[0]} for company in companies]}
288
+ except mysql.connector.Error as err:
289
+ logging.error(f"Database error: {err}")
290
+ raise HTTPException(status_code=500, detail="Internal Server Error")
291
+
292
+ @app.get("/dashboard")
293
+ async def dashboard(request: Request):
294
+ try:
295
+ # Retrieve cookies
296
+ role = request.cookies.get("role")
297
+ username = request.cookies.get("username")
298
+ company_id=request._cookies.get("company_id")
299
+
300
+ # Establish database connection
301
+ cnx = get_db_connection()
302
+ cursor = cnx.cursor()
303
+
304
+ # Fetch all table names
305
+ cursor.execute("SHOW TABLES")
306
+ all_tables = cursor.fetchall()
307
+
308
+ # Dictionary to hold the count of records for each table
309
+ table_count_of_each_table = {}
310
+
311
+ # Fetch count of records for each table
312
+ for table in all_tables:
313
+
314
+ table_name = table[0]
315
+ if table_name != "user_feedback":
316
+ query = f"SELECT COUNT(*) FROM {table_name} WHERE company_id = %s"
317
+ query = f"SELECT COUNT(*) FROM {table_name} WHERE company_id = %s"
318
+ cursor.execute(query, (company_id,))
319
+
320
+ count = cursor.fetchone()[0]
321
+ table_count_of_each_table[table_name] = count
322
+ query1=f"select company_name from company_detail where company_id = %s"
323
+ cursor.execute(query1,(company_id,))
324
+ company_name_result = cursor.fetchone()
325
+
326
+ # Check if company_name_result is not None
327
+ if company_name_result:
328
+ company_name = company_name_result[0]
329
+ else:
330
+ company_name = "Unknown" # Default
331
+ # Close cursor and connection
332
+ cursor.close()
333
+ cnx.close()
334
+
335
+ # Log the counts for debugging purposes
336
+ logging.info(table_count_of_each_table)
337
+
338
+ # Render the template with the data, role, and username
339
+ return templates.TemplateResponse("dashboard.html", {
340
+ "request": request,
341
+ "title": "Dashboard",
342
+ "table_count_of_each_table": table_count_of_each_table,
343
+ "role": role,
344
+ "username": username,
345
+ "company_id":company_id,
346
+ "company_name":company_name
347
+ })
348
+ except mysql.connector.Error as err:
349
+ # Log the error and raise an HTTPException
350
+ logging.error(f"Database error: {err}")
351
+ raise HTTPException(status_code=500, detail="Internal Server Error")
352
+
353
+ @app.get("/api/company_record_count/{company_id}")
354
+ async def get_company_record_count(company_id: int):
355
+ try:
356
+ # Establish database connection
357
+ cnx = get_db_connection()
358
+ cursor = cnx.cursor()
359
+
360
+ # List of tables to count records in
361
+ tables = ["knowledge_base", "data_connectors", "api_connectors", "prompt_templates"]
362
+
363
+ # Dictionary to hold the count of records for each table
364
+ table_counts = {}
365
+
366
+ # Fetch count of records for the selected company in each table
367
+ for table in tables:
368
+ query = f"SELECT COUNT(*) FROM {table} WHERE company_id = %s"
369
+ cursor.execute(query, (company_id,))
370
+ count = cursor.fetchone()[0]
371
+ table_counts[table] = count
372
+
373
+ # Close cursor and connection
374
+ cursor.close()
375
+ cnx.close()
376
+
377
+ return {"table_counts": table_counts}
378
+
379
+ except mysql.connector.Error as err:
380
+ logging.error(f"Database error: {err}")
381
+ raise HTTPException(status_code=500, detail="Internal Server Error")
382
+
383
+
384
+ @app.get("/company_profile")
385
+ async def company_profile(request: Request):
386
+ try:
387
+ # Retrieve cookies
388
+ role = request.cookies.get("role")
389
+ company_id = request.cookies.get("company_id")
390
+
391
+ # Render the template with the role and company_id
392
+ return templates.TemplateResponse("company_profile.html", {
393
+ "request": request,
394
+ "role": role,
395
+ "company_id": company_id,
396
+ "title":"Company Profile"
397
+ })
398
+ except Exception as e:
399
+ # Handle exceptions
400
+ logging.error(f"Error: {e}")
401
+ raise HTTPException(status_code=500, detail="Internal Server Error")
402
+ #return templates.TemplateResponse("company_profile.html", {"request": request,"title":"Company Profile"})
403
+ @app.get("/api/company_id")
404
+ async def get_company_id(company_name: str):
405
+ print(f"Received company_name: {company_name}") # Debug statement
406
+ logging.info(f"Received request for company name: {company_name}")
407
+ try:
408
+ cnx = get_db_connection()
409
+ cursor = cnx.cursor()
410
+ query = "SELECT * FROM company_detail WHERE company_name = %s"
411
+ cursor.execute(query, (company_name,))
412
+ result = cursor.fetchone()
413
+ cursor.close()
414
+ cnx.close()
415
+
416
+ if result:
417
+ llm_tools = result[4].split(',') if result[4] else []
418
+ return {"company_id": result[0],
419
+ "company_name":result[1],
420
+ "company_code":result[2],
421
+ "domain":result[3],
422
+ "llm_tools":llm_tools
423
+ }
424
+ else:
425
+ logging.error(f"Company not found for name: {company_name}")
426
+ raise HTTPException(status_code=404, detail="Company not found")
427
+ except mysql.connector.Error as err:
428
+ logging.error(f"Database error: {err}")
429
+ raise HTTPException(status_code=500, detail="Internal Server Error")
430
+
431
+ @app.get("/api/companydetails")
432
+ async def get_companies():
433
+ print(f"Received company_name") # Debug statement
434
+ logging.info(f"Received request for company name")
435
+
436
+ try:
437
+ cnx = get_db_connection()
438
+ cursor = cnx.cursor()
439
+ query = "SELECT * FROM company_detail"
440
+ cursor.execute(query)
441
+ result = cursor.fetchall()
442
+ logging.info(f"Query result: {result}")
443
+ cursor.close()
444
+ cnx.close()
445
+
446
+ companies = []
447
+ for row in result:
448
+ llm_tools = row[4].split(',') if row[4] else []
449
+ logging.info(row[4])
450
+ companies.append({
451
+ "company_id": row[0],
452
+ "company_name": row[1],
453
+ "company_code": row[2],
454
+ "domain": row[3],
455
+ "llm_tools": row[4]
456
+ })
457
+
458
+ if companies:
459
+ return companies
460
+ else:
461
+ logging.error(f"Company not found for name: {result[1]}")
462
+ raise HTTPException(status_code=404, detail="Company not found")
463
+ except mysql.connector.Error as err:
464
+ logging.error(f"Database error: {err}")
465
+ raise HTTPException(status_code=500, detail="Internal Server Error")
466
+
467
+ #to view the details
468
+ @app.get("/api/getcompanydetails/{company_id}")
469
+ async def get_company_details(company_id: int):
470
+ company = await get_company_from_db(company_id)
471
+ if not company:
472
+ raise HTTPException(status_code=404, detail="Company not found")
473
+ return company
474
+
475
+ async def get_company_from_db(company_id: int):
476
+ try:
477
+ # Establish a connection to the database
478
+ cnx = get_db_connection()
479
+ if cnx is None:
480
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
481
+ cursor = cnx.cursor(dictionary=True)
482
+ query = "SELECT * FROM company_detail WHERE company_id = %s"
483
+ cursor.execute(query, (company_id,))
484
+ company = cursor.fetchone()
485
+ cursor.close()
486
+ cnx.close()
487
+ return company
488
+ except mysql.connector.Error as err:
489
+ logging.error(f"Error fetching company: {err}")
490
+ raise HTTPException(status_code=500, detail="Failed to fetch company")
491
+ # to edit the details
492
+ @app.put("/api/putcompanydetails/{company_id}")
493
+ async def update_company_details(company_id: int,
494
+ company_name: str = Form(...),
495
+ company_code: str = Form(...),
496
+ domain: str = Form(...),
497
+ llm_tools: List[str] = Form(...)):
498
+ print(f"Received company_id",company_id) # Debug statement
499
+ logging.info(f"Received request for company data")
500
+ company_data = {
501
+ 'company_name': company_name,
502
+ 'company_code': company_code,
503
+ 'domain': domain,
504
+ 'llm_tools': ','.join(llm_tools)
505
+ }
506
+ updated_company = await update_company_in_db(company_id, company_data)
507
+ if not updated_company:
508
+ raise HTTPException(status_code=500, detail="Failed to update company")
509
+ return updated_company
510
+
511
+ async def update_company_in_db(company_id: int, company_data: dict):
512
+ try:
513
+ print(f"Received company_nid inside function",company_id) # Debug statement
514
+ logging.info(f"Received request for company name")
515
+ cnx = get_db_connection()
516
+ if cnx is None:
517
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
518
+ cursor = cnx.cursor()
519
+ update_query = """
520
+ UPDATE u852023448_redmind.gptcompany_detail cd
521
+ SET cd.company_name = %s, cd.company_code = %s, cd.domain = %s, cd.llm_tools = %s
522
+ WHERE cd.company_id = %s;
523
+ """
524
+ logging.info(f"Executing query: {update_query} with company_id: {company_id}")
525
+ params = (company_id,company_data)
526
+ logging.info(f"Query parameters: {params}")
527
+ print(f"Query parameters: {params}")
528
+
529
+
530
+ cursor.execute(update_query, (
531
+ company_data['company_name'],
532
+ company_data['company_code'],
533
+ company_data['domain'],
534
+ company_data['llm_tools'],
535
+ company_id
536
+ ))
537
+
538
+ cnx.commit()
539
+ success = cursor.rowcount > 0
540
+ cursor.close()
541
+ cnx.close()
542
+ if not success:
543
+ return None
544
+ return company_data
545
+ except mysql.connector.Error as err:
546
+ logging.error(f"Error updating company: {err}")
547
+ raise HTTPException(status_code=500, detail="Failed to update company")
548
+
549
+
550
+ def delete_company_from_db(company_id: int) -> bool:
551
+ print(f"Received company_name: {company_id}") # Debug statement
552
+ logging.info(f"Received request for company name: {company_id}")
553
+ try:
554
+ # Establish a connection to the database
555
+ cnx = get_db_connection()
556
+ if cnx is None:
557
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
558
+ cursor = cnx.cursor()
559
+ delete_query = "DELETE FROM company_detail WHERE company_id = %s"
560
+ cursor.execute(delete_query, (company_id,))
561
+ cnx.commit()
562
+ success = cursor.rowcount > 0
563
+ cursor.close()
564
+ cnx.close()
565
+ return success
566
+ except mysql.connector.Error as err:
567
+ logging.error(f"Error deleting company: {err}")
568
+ raise HTTPException(status_code=500, detail="Failed to delete company")
569
+ @app.delete("/api/delcompanydetails/{company_id}")
570
+ async def delete_company(company_id: int):
571
+ deletion_success = delete_company_from_db(company_id)
572
+ if not deletion_success:
573
+ raise HTTPException(status_code=404, detail="Company not found or failed to delete")
574
+ return {"message": "Company deleted successfully"}
575
+
576
+ @app.get("/knowledgebase")
577
+ async def knowledgebase(request: Request):
578
+ try:
579
+ # Retrieve cookies
580
+ role = request.cookies.get("role")
581
+ company_id = request.cookies.get("company_id")
582
+
583
+ # Render the template with the role and company_id
584
+ return templates.TemplateResponse("knowledgebase.html", {
585
+ "request": request,
586
+ "role": role,
587
+ "company_id": company_id,
588
+ "title":"KnowledgeBase"
589
+ })
590
+ except Exception as e:
591
+ # Handle exceptions
592
+ logging.error(f"Error: {e}")
593
+ raise HTTPException(status_code=500, detail="Internal Server Error")
594
+
595
+
596
+ #to insert into knowledgebase
597
+ @app.post("/upload_document")
598
+ async def upload_document(
599
+ request: Request,
600
+ company_id:str=Form(...),
601
+ uploadFile: UploadFile = File(...),
602
+ documentName: str = Form(...),
603
+ documentDescription: str = Form(...),
604
+ department: str = Form(...),
605
+ vectorDBflag:str=Form(...),
606
+ version: str = Form(...),
607
+ lastUpdated: str = Form(...)
608
+ ):
609
+ try:
610
+ # Save the uploaded file
611
+ upload_folder = "uploads/"
612
+ os.makedirs(upload_folder, exist_ok=True)
613
+ file_path = os.path.join(upload_folder, uploadFile.filename)
614
+
615
+ with open(file_path, "wb") as buffer:
616
+ shutil.copyfileobj(uploadFile.file, buffer)
617
+
618
+ # Save the details to the database
619
+ cnx = get_db_connection()
620
+ cursor = cnx.cursor()
621
+ query = """
622
+ INSERT INTO knowledge_base (company_id,file_path, document_name, document_desc, department, version,vectorDBflag, last_updated)
623
+ VALUES (%s,%s, %s, %s, %s, %s,%s, %s)
624
+ """
625
+ values = (company_id,file_path, documentName, documentDescription, department, version,vectorDBflag, lastUpdated)
626
+ cursor.execute(query, values)
627
+ cnx.commit()
628
+ row_id=cursor.lastrowid
629
+ cursor.close()
630
+ cnx.close()
631
+
632
+ logging.info(f"Document {documentName} uploaded successfully")
633
+ return JSONResponse(status_code=200, content={"message": "Data saved successfully", "row_id": row_id})
634
+ #return RedirectResponse(url="/knowledgebase", status_code=302)
635
+ except mysql.connector.Error as err:
636
+ logging.error(f"Database error: {err}")
637
+ raise HTTPException(status_code=500, detail="Internal Server Error")
638
+
639
+ #to retrieve from knowledgebase
640
+ @app.get("/api/document_upload")
641
+ async def get_document(company_id: str = Query(...)):
642
+ print(f"Received companyId and name: {company_id}") # Log rec
643
+ #async def get_data_connectors(company_id: str, company_name: str):
644
+ logging.info(f"Received request for company_id and company_id: {company_id}")
645
+ try:
646
+ cnx = get_db_connection()
647
+ cursor = cnx.cursor()
648
+ query = """
649
+ SELECT kb.kid,kb.company_id, kb.file_path, kb.document_name, kb.document_desc,kb.department,kb.version,kb.vectorDBflag,kb.last_updated
650
+ FROM u852023448_redmindgpt.knowledge_base kb
651
+ JOIN u852023448_redmindgpt.company_detail cd ON kb.company_id = cd.company_id
652
+ WHERE kb.company_id = %s
653
+ """
654
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
655
+ params = (company_id,)
656
+ logging.info(f"Query parameters: {params}")
657
+ print(f"Query parameters: {params}")
658
+
659
+ cursor.execute(query, params) # Pa
660
+ result = cursor.fetchall()
661
+ logging.info(f"Query result: {result}")
662
+ cursor.close
663
+ cnx.close()
664
+ companies=[]
665
+ for row in result:
666
+
667
+ companies.append({
668
+ "row_id":row[0],
669
+ "company_id": row[1],
670
+ "file_path":row[2],
671
+ "document_name": row[3],
672
+ "document_desc": row[4],
673
+ "department": row[5],
674
+ "version": row[6],
675
+ "vectorDBflag":row[7],
676
+ "last_updated": row[8]
677
+ })
678
+ if companies:
679
+ return companies
680
+ else:
681
+ logging.warning(f"No document found for company_id: {company_id}")
682
+ raise HTTPException(status_code=404, detail="Data document not found")
683
+ except mysql.connector.Error as err:
684
+ logging.error(f"Database error: {err}")
685
+ raise HTTPException(status_code=500, detail="Internal Server Error")
686
+
687
+ #on update of modal form the data table is refresh the value in datatable
688
+ @app.get("/api/document_update")
689
+ async def get_document(company_id: str = Query(...)):
690
+ print(f"Received companyId and name: {company_id},{company_id}") # Log rec
691
+ #async def get_data_connectors(company_id: str, company_name: str):
692
+ logging.info(f"Received request for company_id and company_id: {company_id},{company_id}")
693
+ try:
694
+ cnx = get_db_connection()
695
+ cursor = cnx.cursor()
696
+ query = """
697
+ SELECT kb.kid,kb.company_id, kb.file_path, kb.document_name, kb.document_desc,kb.department,kb.version,kb.vectorDBflag,kb.last_updated
698
+ FROM u852023448_redmindgpt.knowledge_base kb
699
+ JOIN u852023448_redmindgpt.company_detail cd ON kb.company_id = cd.company_id
700
+ WHERE kb.company_id = %s
701
+ """
702
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
703
+ values= (company_id,)
704
+ # logging.info(f"Query parameters: {params}")
705
+ print(f"Query parameters: {values}")
706
+
707
+ cursor.execute(query, values) # Pa
708
+ result = cursor.fetchall()
709
+ logging.info(f"Query result: {r.esult}")
710
+ cursor.close
711
+ cnx.close()
712
+ companies=[]
713
+ for row in result:
714
+
715
+ companies.append({
716
+ "kid":row[0],
717
+ "company_id": row[1],
718
+ "file_path":row[2],
719
+ "document_name": row[3],
720
+ "document_desc": row[4],
721
+ "department": row[5],
722
+ "version": row[6],
723
+ "vectorDBflag":row[7],
724
+ "last_updated": row[8]
725
+ })
726
+ if companies:
727
+ return companies
728
+ else:
729
+ logging.warning(f"No document found for company_id: {company_id}")
730
+ raise HTTPException(status_code=404, detail="Data document not found")
731
+ except mysql.connector.Error as err:
732
+ logging.error(f"Database error: {err}")
733
+ raise HTTPException(status_code=500, detail="Internal Server Error")
734
+
735
+ #to get data for view in knowledgebase
736
+ @app.get("/api/getknowledgebase/{company_id}")
737
+ async def get_company_details(company_id: int):
738
+ company = await get_knowledge_from_db(company_id)
739
+ if not company:
740
+ raise HTTPException(status_code=404, detail="Company not found")
741
+ return company
742
+
743
+ async def get_knowledge_from_db(company_id: int):
744
+ try:
745
+ # Establish a connection to the database
746
+ cnx = get_db_connection()
747
+ if cnx is None:
748
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
749
+ cursor = cnx.cursor(dictionary=True)
750
+ query = "SELECT * FROM knowledge_base WHERE kid = %s"
751
+ cursor.execute(query, (company_id,))
752
+ company = cursor.fetchone()
753
+ cursor.close()
754
+ cnx.close()
755
+ if company:
756
+ logging.debug(f"Extracted filename")
757
+ if company.get('file_path'):
758
+ company['file_path'] = os.path.basename(company['file_path'])
759
+ logging.debug(f"Extracted filename: {company['file_path']}")
760
+ return company
761
+ else:
762
+ raise HTTPException(status_code=404, detail="Company not found or file not found for the company")
763
+ except mysql.connector.Error as err:
764
+ logging.error(f"Error fetching company: {err}")
765
+ raise HTTPException(status_code=500, detail="Failed to fetch company")
766
+
767
+ # to edit the knowledgebase details
768
+ @app.put("/api/putknowledgebase/{companyId}")
769
+ async def update_company_details(
770
+ request: Request,
771
+ companyId: int,
772
+ company_id: str = Form(...),
773
+ file_path: UploadFile = File(...),
774
+ documentName: str = Form(...),
775
+ documentDescription: str = Form(...),
776
+ department: str = Form(...),
777
+ version: str = Form(...),
778
+ vectorDBFlag: str = Form(...),
779
+ lastUpdated: str = Form(...)
780
+ ):
781
+ logging.info(f"Received request for company data with ID inside edit/update knowledgebase: {companyId}")
782
+ print(f"Received request for company data with ID inside edit/update knowledgebase file name: {file_path.filename}")
783
+
784
+ # Create the upload folder if it doesn't exist
785
+ upload_folder = "uploads/"
786
+ os.makedirs(upload_folder, exist_ok=True)
787
+
788
+ # Construct the file path for saving
789
+ saved_file_path = os.path.join(upload_folder, file_path.filename)
790
+
791
+ try:
792
+ # Save the uploaded file to the server
793
+ with open(saved_file_path, "wb") as buffer:
794
+ shutil.copyfileobj(file_path.file, buffer)
795
+ except Exception as e:
796
+ logging.error(f"Error saving file: {e}")
797
+ raise HTTPException(status_code=500, detail="Failed to save file")
798
+
799
+ # Prepare the company data dictionary
800
+ company_data = {
801
+ 'kid': companyId,
802
+ 'company_id': company_id,
803
+ 'file_path': saved_file_path, # Use the path where the file was saved
804
+ 'document_name': documentName,
805
+ 'document_desc': documentDescription,
806
+ 'department': department,
807
+ 'version': version,
808
+ 'vectorDBflag': vectorDBFlag,
809
+ 'last_updated': lastUpdated
810
+ }
811
+
812
+ # Update the knowledge base in the database
813
+ updated_company = await update_knowledge_in_db(companyId, company_data)
814
+ if not updated_company:
815
+ raise HTTPException(status_code=500, detail="Failed to update company")
816
+ return updated_company
817
+
818
+ async def update_knowledge_in_db(kid: int, company_data: dict):
819
+ try:
820
+ logging.info(f"Updating knowledge base for ID: {kid}")
821
+ cnx = get_db_connection()
822
+ if cnx is None:
823
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
824
+
825
+ cursor = cnx.cursor()
826
+ update_query = """
827
+ UPDATE u852023448_redmindgpt.knowledge_base kb
828
+ SET kb.company_id = %s, kb.document_name = %s, kb.document_desc = %s,
829
+ kb.department = %s, kb.version = %s, kb.vectorDBflag = %s, kb.last_updated = %s
830
+ WHERE kb.kid = %s;
831
+ """
832
+ logging.info(f"Executing update query: {update_query}")
833
+
834
+ cursor.execute(update_query, (
835
+ company_data['company_id'],
836
+ company_data['document_name'],
837
+ company_data['document_desc'],
838
+ company_data['department'],
839
+ company_data['version'],
840
+ company_data['vectorDBflag'],
841
+ company_data['last_updated'],
842
+ kid
843
+ ))
844
+
845
+ cnx.commit()
846
+ success = cursor.rowcount > 0
847
+ cursor.close()
848
+ cnx.close()
849
+
850
+ if not success:
851
+ logging.info("No rows updated")
852
+ return None
853
+ logging.info("Update successful")
854
+ return company_data
855
+ except mysql.connector.Error as err:
856
+ logging.error(f"Database error: {err}")
857
+ raise HTTPException(status_code=500, detail="Failed to update company")
858
+ except Exception as e:
859
+ logging.error(f"Unexpected error: {e}")
860
+ raise HTTPException(status_code=500, detail="Unexpected error occurred")
861
+
862
+
863
+ def delete_knowledge_from_db(company_id: int) -> bool:
864
+ print(f"Received knowledge base company_id: {company_id}") # Debug statement
865
+ logging.info(f"Received request for knowledgebase company id: {company_id}")
866
+ try:
867
+ # Establish a connection to the database
868
+ cnx = get_db_connection()
869
+ if cnx is None:
870
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
871
+ cursor = cnx.cursor()
872
+ delete_query = "DELETE FROM knowledge_base WHERE kid = %s"
873
+ cursor.execute(delete_query, (company_id,))
874
+ cnx.commit()
875
+ success = cursor.rowcount > 0
876
+ cursor.close()
877
+ cnx.close()
878
+ return success
879
+ except mysql.connector.Error as err:
880
+ logging.error(f"Error deleting company: {err}")
881
+ raise HTTPException(status_code=500, detail="Failed to delete company")
882
+
883
+ #to perform delete operation in knowlegebase
884
+ @app.delete("/api/delknowledgebase/{company_id}")
885
+ async def delete_company(company_id: int):
886
+ deletion_success = delete_knowledge_from_db(company_id)
887
+ if not deletion_success:
888
+ raise HTTPException(status_code=404, detail="Company not found or failed to delete")
889
+ return {"message": "Company deleted successfully"}
890
+
891
+
892
+ @app.get("/data_connectors")
893
+ async def data_connectors(request: Request):
894
+ try:
895
+ # Retrieve cookies
896
+ role = request.cookies.get("role")
897
+ company_id = request.cookies.get("company_id")
898
+
899
+ # Render the template with the role and company_id
900
+ return templates.TemplateResponse("data_connectors.html", {
901
+ "request": request,
902
+ "role": role,
903
+ "company_id": company_id,
904
+ "title": "Data Connectors"
905
+ })
906
+ except Exception as e:
907
+ # Handle exceptions
908
+ logging.error(f"Error: {e}")
909
+ raise HTTPException(status_code=500, detail="Internal Server Error")
910
+
911
+ #to insert into data_connectors
912
+ @app.post("/save_data_connectors")
913
+ async def save_data_connectors( request: Request,
914
+ company_id: int = Form(...),
915
+ database: List[str] = Form(...),
916
+ server: str = Form(...),
917
+ port: str = Form(...),
918
+ databaseName:List[str]= Form(...),
919
+ username: str=Form(...),
920
+ password: str=Form(...),
921
+ selectedTables: List[str] = Form(...)):
922
+ logging.info(f"Received form submission for database_connectors")
923
+ print(f"Received form submission for database_connectors")
924
+ try:
925
+ cnx = get_db_connection()
926
+ cursor = cnx.cursor()
927
+ # Check if the company_id already exists in the data_connectors table
928
+ check_query = "SELECT COUNT(*) FROM data_connectors WHERE company_id = %s"
929
+ cursor.execute(check_query, (company_id,))
930
+ exists = cursor.fetchone()[0] > 0
931
+
932
+ if exists:
933
+ # Update the existing record
934
+ query = """
935
+ UPDATE data_connectors
936
+ SET databasetype = %s, serverip = %s, port = %s, database_name = %s, username = %s, password = %s, dbtablename = %s
937
+ WHERE company_id = %s
938
+ """
939
+ values = (",".join(database), server, port, ",".join(databaseName), username, password or '', ",".join(selectedTables), company_id)
940
+ logging.info(f"Executing update query: {query} with values: {values}")
941
+ cursor.execute(query, values)
942
+ cnx.commit()
943
+ logging.info(f"Query executed successfully, {cursor.rowcount} row(s) updated")
944
+ else:
945
+ # Insert a new record
946
+ query = """
947
+ INSERT INTO data_connectors(company_id, databasetype, serverip, port, database_name, username, password, dbtablename)
948
+ VALUES (%s, %s, %s, %s, %s, %s, %s, %s)
949
+ """
950
+ values = (company_id, ",".join(database), server, port, ",".join(databaseName), username, password or '', ",".join(selectedTables))
951
+ logging.info(f"Executing insert query: {query} with values: {values}")
952
+ cursor.execute(query, values)
953
+ cnx.commit()
954
+ logging.info(f"Query executed successfully, {cursor.rowcount} row(s) inserted")
955
+
956
+ cursor.close()
957
+ cnx.close()
958
+
959
+ # logging.info(f"Data_connectors for {database} processed successfully")
960
+ # return JSONResponse(content={"status": "success", "message": "Data saved successfully"}, status_code=200)
961
+ response = {
962
+ "msg": "Data saved successfully",
963
+ "url": "/save_data_connectors", # The URL you want to redirect to
964
+ "created": True
965
+ }
966
+ return JSONResponse(content=response)
967
+
968
+
969
+ except mysql.connector.Error as err:
970
+ logging.error(f"Database error: {err}")
971
+ return JSONResponse(content={"status": "error", "message": "Internal Server Error"}, status_code=500)
972
+ except Exception as e:
973
+ logging.error(f"Unexpected error: {e}")
974
+ return JSONResponse(content={"status": "error", "message": "Unexpected Server Error"}, status_code=500)
975
+
976
+ @app.get("/api/check_data_connectors")
977
+ async def get_data_connectors(company_id: str = Query(...), company_name: str = Query(...)):
978
+ print(f"Received companyId and name: {company_id},{company_name}") # Log rec
979
+ #async def get_data_connectors(company_id: str, company_name: str):
980
+ logging.info(f"Received request for company_id and company_id: {company_id},{company_name}")
981
+ try:
982
+ cnx = get_db_connection()
983
+ cursor = cnx.cursor()
984
+ query = """
985
+ SELECT dc.company_id, dc.databasetype, dc.serverip, dc.port,dc.database_name, dc.username, dc.password ,dc.dbtablename
986
+ FROM u852023448_redmindgpt.data_connectors dc
987
+ JOIN u852023448_redmindgpt.company_detail cd ON dc.company_id = cd.company_id
988
+ WHERE dc.company_id = %s and cd.company_name=%s
989
+ """
990
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
991
+ params = (company_id,company_name)
992
+ logging.info(f"Query parameters: {params}")
993
+ print(f"Query parameters: {params}")
994
+
995
+ cursor.execute(query, params) # Pa
996
+ result = cursor.fetchone()
997
+ logging.info(f"Query result: {result}")
998
+ cursor.close()
999
+ cnx.close()
1000
+
1001
+ if result:
1002
+ databasetype = result[1]
1003
+ dbtablename = result[7].split(',') if result[7] else []
1004
+ logging.info(f"Data found for company_id: {company_id}")
1005
+ return {
1006
+ "company_id": result[0],
1007
+ "databasetype":databasetype,
1008
+ "serverip": result[2],
1009
+ "port": result[3],
1010
+ "database_name": result[4],
1011
+ "username": result[5],
1012
+ "password": result[6],
1013
+ "dbtablename": dbtablename
1014
+ }
1015
+ else:
1016
+ logging.warning(f"No data found for company_id: {company_id}")
1017
+ raise HTTPException(status_code=404, detail="Data connector not found")
1018
+ except mysql.connector.Error as err:
1019
+ logging.error(f"Database error: {err}")
1020
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1021
+
1022
+ @app.get("/API_connectors")
1023
+ async def API_connectors(request: Request):
1024
+ try:
1025
+ # Retrieve cookies
1026
+ role = request.cookies.get("role")
1027
+ company_id = request.cookies.get("company_id")
1028
+
1029
+ # Render the template with the role and company_id
1030
+ return templates.TemplateResponse("API_connectors.html", {
1031
+ "request": request,
1032
+ "role": role,
1033
+ "company_id": company_id,
1034
+ "title":"API Connectors"
1035
+ })
1036
+ except Exception as e:
1037
+ # Handle exceptions
1038
+ logging.error(f"Error: {e}")
1039
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1040
+
1041
+ #save api connectors
1042
+ @app.post("/api/save_api_details")
1043
+ async def API_saveconnectors(request: Request,
1044
+ company_id:int=Form(...),
1045
+ APIName:str=Form(...),
1046
+ APIEndpoint:str=Form(...),
1047
+ Auth_Bearer:str=Form(...),
1048
+ Inputjson:str=Form(...),
1049
+ OutputJson:str=Form(...),
1050
+ Description:str=Form(...)):
1051
+ logging.info(f"Received form submission for database_connectors")
1052
+ try:
1053
+ cnx =get_db_connection()
1054
+ cursor = cnx.cursor()
1055
+ #databasetype_json=json.dumps(database)
1056
+ query = "INSERT INTO api_connectors(company_id,api_name, api_endpoint, auth_token, input_param,output_json,description) VALUES (%s,%s, %s, %s, %s,%s,%s)"
1057
+ values = (company_id, APIName, APIEndpoint, Auth_Bearer, Inputjson,OutputJson,Description)
1058
+ logging.info(f"Executing query: {query} with values: {values}")
1059
+ cursor.execute(query, values)
1060
+ cnx.commit()
1061
+ logging.info(f"Query executed successfully, {cursor.rowcount} row(s) affected")
1062
+ row_id = cursor.lastrowid
1063
+ cursor.close()
1064
+ cnx.close()
1065
+ logging.info(f"Data_connectors for {APIName} inserted successfully")
1066
+ return JSONResponse(status_code=200, content={"message": "Data saved successfully", "row_id": row_id})
1067
+ #return RedirectResponse(url="/data_connectors", status_code=302)
1068
+ except mysql.connector.Error as err:
1069
+ logging.error(f"Database error: {err}")
1070
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1071
+ # retrieve api connectors
1072
+ @app.get("/api/get_api_connectors")
1073
+ async def get_api_connectors(company_id: str = Query(...)):
1074
+ print(f"Received companyId and name: {company_id}") # Log rec
1075
+ #async def get_data_connectors(company_id: str, company_name: str):
1076
+ logging.info(f"Received request for company_id and company_id: {company_id}")
1077
+ try:
1078
+ cnx =get_db_connection()
1079
+ cursor = cnx.cursor()
1080
+ query = """
1081
+ SELECT ac.id, ac.company_id, ac.api_name, ac.api_endpoint,ac.auth_token,ac.input_param, ac.output_json, ac.description
1082
+ FROM u852023448_redmindgpt.api_connectors ac
1083
+ JOIN u852023448_redmindgpt.company_detail cd ON ac.company_id = cd.company_id
1084
+ WHERE ac.company_id = %s
1085
+ """
1086
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
1087
+ params = (company_id,)
1088
+ logging.info(f"Query parameters: {params}")
1089
+ print(f"Query parameters: {params}")
1090
+
1091
+ cursor.execute(query, params) # Pa
1092
+ result = cursor.fetchall()
1093
+ logging.info(f"Query result: {result}")
1094
+ cursor.close()
1095
+ cnx.close()
1096
+ companies=[]
1097
+ for row in result:
1098
+ companies.append({
1099
+ "row_id":row[0],
1100
+ "company_id": row[1],
1101
+ "APIName":row[2],
1102
+ "APIEndpoint": row[3]
1103
+ # "Auth_Bearer": result[3],
1104
+ # "Inputjson": result[4],
1105
+ #"OutputJson": result[5],
1106
+ #"description": result[6]
1107
+
1108
+ })
1109
+ if companies:
1110
+ return companies
1111
+ else:
1112
+ logging.warning(f"No data found for company_id: {company_id}")
1113
+ raise HTTPException(status_code=404, detail="Data connector not found")
1114
+ except mysql.connector.Error as err:
1115
+ logging.error(f"Database error: {err}")
1116
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1117
+ #to view the table details in modal
1118
+ @app.get("/api/viewapiconnectors/{company_id}")
1119
+ async def get_company_details(company_id: int):
1120
+
1121
+ company = await get_api_from_db(company_id)
1122
+ if not company:
1123
+ raise HTTPException(status_code=404, detail="Company not found")
1124
+ return company
1125
+
1126
+ async def get_api_from_db(company_id: int):
1127
+ try:
1128
+ # Establish a connection to the database
1129
+ cnx = get_db_connection()
1130
+ if cnx is None:
1131
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
1132
+ cursor = cnx.cursor(dictionary=True)
1133
+ query = "SELECT * FROM api_connectors WHERE id = %s"
1134
+ cursor.execute(query, (company_id,))
1135
+ company = cursor.fetchone()
1136
+ cursor.close()
1137
+ cnx.close()
1138
+ if company:
1139
+ logging.info(f"api details:{company}")
1140
+ return company
1141
+ else:
1142
+ raise HTTPException(status_code=404, detail="Company not found or file not found for the company")
1143
+ except mysql.connector.Error as err:
1144
+ logging.error(f"Error fetching company: {err}")
1145
+ raise HTTPException(status_code=500, detail="Failed to fetch company")
1146
+ #to edit the api details in modal form
1147
+ @app.put("/api/editapiconnectors/{companyId}")
1148
+ async def update_company_details(
1149
+ request: Request,
1150
+ companyId: int,
1151
+ company_id:str=Form(...),
1152
+ APIName:str=Form(...),
1153
+ APIEndpoint:str=Form(...),
1154
+ Auth_Bearer:str=Form(...),
1155
+ Inputjson:str=Form(...),
1156
+ OutputJson:str=Form(...),
1157
+ Description:str=Form(...)):
1158
+ logging.info(f"Received form submission for database_connectors")
1159
+ logging.info(f"Received request for company data with ID inside edit/update knowledgebase: {companyId}")
1160
+
1161
+ # Prepare the company data dictionary
1162
+ company_data = {
1163
+ 'kid': companyId,
1164
+ 'company_id': company_id,
1165
+ 'api_name': APIName,
1166
+ 'api_endpoint': APIEndpoint,
1167
+ 'auth_token': Auth_Bearer,
1168
+ 'input_param': Inputjson,
1169
+ 'output_json': OutputJson,
1170
+ 'description': Description
1171
+ }
1172
+
1173
+ # Update the knowledge base in the database
1174
+ updated_company = await update_api_in_db(companyId, company_data)
1175
+ if not updated_company:
1176
+ raise HTTPException(status_code=500, detail="Failed to update company")
1177
+ return updated_company
1178
+
1179
+ async def update_api_in_db(id: int, company_data: dict):
1180
+ try:
1181
+ logging.info(f"Updating api for ID: {id}")
1182
+ cnx = get_db_connection()
1183
+ if cnx is None:
1184
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
1185
+
1186
+ cursor = cnx.cursor()
1187
+ update_query = """
1188
+ UPDATE u852023448_redmindgpt.api_connectors ac
1189
+ SET ac.company_id = %s, ac.api_name = %s, ac.api_endpoint= %s,
1190
+ ac.auth_token= %s, ac.input_param= %s,ac.output_json = %s, ac.description= %s
1191
+ WHERE ac.id = %s;
1192
+ """
1193
+ logging.info(f"Executing update query: {update_query}")
1194
+
1195
+ cursor.execute(update_query, (
1196
+ company_data['company_id'],
1197
+ company_data['api_name'],
1198
+ company_data['api_endpoint'],
1199
+ company_data['auth_token'],
1200
+ company_data['input_param'],
1201
+ company_data['output_json'],
1202
+ company_data['description'],
1203
+ id
1204
+ ))
1205
+
1206
+ cnx.commit()
1207
+ success = cursor.rowcount > 0
1208
+ cursor.close()
1209
+ cnx.close()
1210
+
1211
+ if not success:
1212
+ logging.info("No rows updated")
1213
+ return None
1214
+ logging.info("Update successful")
1215
+ return company_data
1216
+ except mysql.connector.Error as err:
1217
+ logging.error(f"Database error: {err}")
1218
+ raise HTTPException(status_code=500, detail="Failed to update company")
1219
+ except Exception as e:
1220
+ logging.error(f"Unexpected error: {e}")
1221
+ raise HTTPException(status_code=500, detail="Unexpected error occurred")
1222
+
1223
+ #on update of modal form the data table is refreshed to dispalyupdated value in datatable
1224
+ @app.get("/api/api_updatetable")
1225
+ async def get_document(company_id: str = Query(...)):
1226
+ print(f"Received companyId and name for api datatable update: {company_id},{company_id}") # Log rec
1227
+ #async def get_data_connectors(company_id: str, company_name: str):
1228
+ logging.info(f"Received request for company_id and company_id: {company_id},{company_id}")
1229
+ try:
1230
+ cnx = get_db_connection()
1231
+ cursor = cnx.cursor()
1232
+ query=""" SELECT ac.id,ac.company_id, ac.api_name, ac.api_endpoint,ac.auth_token,ac.input_param, ac.output_json, ac.description
1233
+ FROM u852023448_redmindgpt.api_connectors ac
1234
+ JOIN u852023448_redmindgpt.company_detail cd ON ac.company_id = cd.company_id
1235
+ WHERE ac.company_id = %s
1236
+ """
1237
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
1238
+ values= (company_id,)
1239
+ # logging.info(f"Query parameters: {params}")
1240
+ print(f"Query parameters: {values}")
1241
+
1242
+ cursor.execute(query, values) # Pa
1243
+ result = cursor.fetchall()
1244
+ logging.info(f"Query result for update table: {result}")
1245
+ cursor.close
1246
+ cnx.close()
1247
+ companies=[]
1248
+ for row in result:
1249
+
1250
+ companies.append({
1251
+ "row_id":row[0],
1252
+ "company_id": row[1],
1253
+ "api_name":row[2],
1254
+ "api_endpoint": row[3],
1255
+ # "Auth_Bearer": row[4],
1256
+ # "Inputjson": row[5],
1257
+ # "OutputJson": row[6],
1258
+ # "description": row[7]
1259
+
1260
+ })
1261
+ if companies:
1262
+ return companies
1263
+ else:
1264
+ logging.warning(f"No document found for company_id: {company_id}")
1265
+ raise HTTPException(status_code=404, detail="Data document not found")
1266
+ except mysql.connector.Error as err:
1267
+ logging.error(f"Database error: {err}")
1268
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1269
+
1270
+ #to delete api details from db
1271
+ @app.delete("/api/deleteapi/{company_id}")
1272
+ async def delete_company(company_id: int):
1273
+ deletion_success = delete_api_from_db(company_id)
1274
+ if not deletion_success:
1275
+ raise HTTPException(status_code=404, detail="Company not found or failed to delete")
1276
+ return {"message": "Company deleted successfully"}
1277
+
1278
+ def delete_api_from_db(company_id: int) -> bool:
1279
+ print(f"Received api for company_id: {company_id}") # Debug statement
1280
+ logging.info(f"Received request for api for company id: {company_id}")
1281
+ try:
1282
+ # Establish a connection to the database
1283
+ cnx = get_db_connection()
1284
+ if cnx is None:
1285
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
1286
+ cursor = cnx.cursor()
1287
+ delete_query = "DELETE FROM api_connectors WHERE id = %s"
1288
+ cursor.execute(delete_query, (company_id,))
1289
+ cnx.commit()
1290
+ success = cursor.rowcount > 0
1291
+ cursor.close()
1292
+ cnx.close()
1293
+ return success
1294
+ except mysql.connector.Error as err:
1295
+ logging.error(f"Error deleting company: {err}")
1296
+ raise HTTPException(status_code=500, detail="Failed to delete company")
1297
+
1298
+
1299
+ @app.get("/prompt_template")
1300
+ async def prompt_template(request: Request):
1301
+ try:
1302
+ # Retrieve cookies
1303
+ role = request.cookies.get("role")
1304
+ company_id = request.cookies.get("company_id")
1305
+
1306
+ # Render the template with the role and company_id
1307
+ return templates.TemplateResponse("prompt_template.html", {
1308
+ "request": request,
1309
+ "role": role,
1310
+ "company_id": company_id,
1311
+ "title":"Prompt Templates"
1312
+ })
1313
+ except Exception as e:
1314
+ # Handle exceptions
1315
+ logging.error(f"Error: {e}")
1316
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1317
+ # to insert into prompt templates
1318
+ @app.post("/api/save_prompt_details")
1319
+ async def prompt_saveconnectors(request: Request,
1320
+ company_id:int=Form(...),
1321
+ scenario:str=Form(...),
1322
+ sampleprompt:str=Form(...),
1323
+ comments:str=Form(...),
1324
+ ):
1325
+ logging.info(f"Received form submission for database_connectors")
1326
+ try:
1327
+ cnx =get_db_connection()
1328
+ cursor = cnx.cursor()
1329
+ #databasetype_json=json.dumps(database)
1330
+ query = "INSERT INTO prompt_templates(company_id,scenario, prompts, comments) VALUES (%s,%s, %s, %s)"
1331
+ values = (company_id, scenario, sampleprompt, comments)
1332
+ logging.info(f"Executing query: {query} with values: {values}")
1333
+ cursor.execute(query, values)
1334
+ cnx.commit()
1335
+ logging.info(f"Query executed successfully, {cursor.rowcount} row(s) affected")
1336
+ row_id = cursor.lastrowid # Get the last inserted row_id
1337
+ cursor.close()
1338
+ cnx.close()
1339
+ logging.info(f"Data_connectors for {scenario} inserted successfully")
1340
+ return JSONResponse(status_code=200, content={"message": "Data saved successfully", "row_id": row_id})
1341
+ #return RedirectResponse(url="/prompt_template", status_code=302)
1342
+ except mysql.connector.Error as err:
1343
+ logging.error(f"Database error: {err}")
1344
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1345
+ # retrieve api connectors
1346
+ @app.get("/api/get_prompt_templates")
1347
+ async def get_prompt_connectors(company_id: str = Query(...)):
1348
+ print(f"Received companyId and name: {company_id}") # Log rec
1349
+ #async def get_data_connectors(company_id: str, company_name: str):
1350
+ logging.info(f"Received request for company_id and company_id: {company_id}")
1351
+ try:
1352
+ cnx =get_db_connection()
1353
+ cursor = cnx.cursor()
1354
+ query = """
1355
+ SELECT pt.id,pt.company_id,pt.scenario,pt.prompts,pt.comments
1356
+ FROM u852023448_redmindgpt.prompt_templates pt
1357
+ JOIN u852023448_redmindgpt.company_detail cd ON pt.company_id = cd.company_id
1358
+ WHERE pt.company_id = %s
1359
+ """
1360
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
1361
+ params = (company_id,)
1362
+ logging.info(f"Query parameters: {params}")
1363
+ print(f"Query parameters: {params}")
1364
+
1365
+ cursor.execute(query, params) # Pa
1366
+ result = cursor.fetchall()
1367
+ logging.info(f"Query result: {result}")
1368
+ cursor.close()
1369
+ cnx.close()
1370
+ companies=[]
1371
+ for row in result:
1372
+ companies.append({
1373
+ "row_id":row[0],
1374
+ "company_id": row[1],
1375
+ "scenario":row[2],
1376
+ "prompt": row[3]
1377
+ # "Auth_Bearer": result[3],
1378
+ # "Inputjson": result[4],
1379
+ #"OutputJson": result[5],
1380
+ #"description": result[6]
1381
+
1382
+ })
1383
+ if companies:
1384
+ return companies
1385
+ else:
1386
+ logging.warning(f"No data found for company_id: {company_id}")
1387
+ raise HTTPException(status_code=404, detail="Data connector not found")
1388
+ except mysql.connector.Error as err:
1389
+ logging.error(f"Database error: {err}")
1390
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1391
+
1392
+ def delete_prompt_template_from_db(row_id: int) -> bool:
1393
+ logging.info(f"Received request for prompt_template company id: {row_id}")
1394
+ logging.info(f"Received request for prompt_template row id: {row_id}")
1395
+
1396
+ try:
1397
+ # Establish a connection to the database
1398
+ cnx = get_db_connection()
1399
+ if cnx is None:
1400
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
1401
+ cursor = cnx.cursor()
1402
+ delete_query = "DELETE FROM prompt_templates WHERE id = %s"
1403
+
1404
+ logging.info(f"sql delete query for prompt template ===> {delete_query}")
1405
+
1406
+ cursor.execute(delete_query, (row_id,))
1407
+ cnx.commit()
1408
+ success = cursor.rowcount > 0
1409
+ logging.info (f"deleted succesfully ! ===> {success}")
1410
+
1411
+ cursor.close()
1412
+ cnx.close()
1413
+ return success
1414
+ except mysql.connector.Error as err:
1415
+ print('python')
1416
+ logging.error(f"Error deleting company: {err}")
1417
+ raise HTTPException(status_code=500, detail="Failed to delete company")
1418
+
1419
+ @app.delete("/api/prompt_template_for_del/{row_id}")
1420
+ async def delete_company(row_id: int):
1421
+ deletion_success = delete_prompt_template_from_db(row_id)
1422
+ logging.info(f"company row_id +++> {row_id}")
1423
+
1424
+ if not deletion_success:
1425
+ raise HTTPException(status_code=404, detail="Company not found or failed to delete")
1426
+ return {"message": "Company deleted successfully"}
1427
+
1428
+ # promt_template view function ! ............
1429
+
1430
+ #to get data for view in promt_templae by id
1431
+ @app.get("/api/getpromttemplate/{company_id}")
1432
+ async def get_promt_company_details(company_id: int):
1433
+ company = await get_promt_from_db(company_id)
1434
+ if not company:
1435
+ raise HTTPException(status_code=404, detail="Company not found")
1436
+ return company
1437
+
1438
+ async def get_promt_from_db(company_id: int):
1439
+ try:
1440
+ # Establish a connection to the database
1441
+ cnx = get_db_connection()
1442
+ if cnx is None:
1443
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
1444
+ cursor = cnx.cursor(dictionary=True)
1445
+ query = "SELECT * FROM prompt_templates WHERE id = %s"
1446
+ logging.info(f"row_id in db addresss ========> {company_id}")
1447
+
1448
+ cursor.execute(query, (company_id,))
1449
+ company = cursor.fetchone()
1450
+ cursor.close()
1451
+ cnx.close()
1452
+ if company:
1453
+ logging.info(f"row_id in db addresss ========> {company}")
1454
+ return company
1455
+
1456
+ else:
1457
+ raise HTTPException(status_code=404, detail="Company not found or file not found for the company")
1458
+ except mysql.connector.Error as err:
1459
+ logging.error(f"Error fetching company: {err}")
1460
+ raise HTTPException(status_code=500, detail="Failed to fetch company")
1461
+
1462
+ # Function to update company details
1463
+ @app.put("/api/putprompttemplates/{kid}")
1464
+ async def update_company_details(
1465
+ kid: int,
1466
+ scenario: str = Form(...),
1467
+ prompt: str = Form(...),
1468
+ comments: str = Form(...)
1469
+ ):
1470
+ logging.info(f"Received request for company data with ID: {kid}")
1471
+ company_data = {
1472
+ 'scenario': scenario,
1473
+ 'prompts': prompt,
1474
+ 'comments': comments,
1475
+ }
1476
+ updated_company = await update_prompt_in_db(kid, company_data)
1477
+ if not updated_company:
1478
+ raise HTTPException(status_code=500, detail="Failed to update company")
1479
+ return updated_company
1480
+
1481
+ # Database query function to update company data
1482
+ async def update_prompt_in_db(kid: int, company_data: dict):
1483
+ try:
1484
+ logging.info(f"Updating prompt for ID: {kid}")
1485
+ cnx = get_db_connection()
1486
+ if cnx is None:
1487
+ raise HTTPException(status_code=500, detail="Failed to connect to the database")
1488
+
1489
+ cursor = cnx.cursor()
1490
+ update_query = """
1491
+ UPDATE u852023448_redmindgpt.prompt_templates pt
1492
+ SET pt.scenario=%s, pt.prompts=%s, pt.comments=%s
1493
+ WHERE pt.id = %s;
1494
+ """
1495
+ logging.info(f"row_id in prompt db address ========> {kid}")
1496
+ logging.info(f"SQL update query for company ===> {update_query}")
1497
+
1498
+ cursor.execute(update_query, (
1499
+ company_data['scenario'],
1500
+ company_data['prompts'],
1501
+ company_data['comments'],
1502
+ kid
1503
+ ))
1504
+
1505
+ cnx.commit()
1506
+ success = cursor.rowcount > 0
1507
+ cursor.close()
1508
+ cnx.close()
1509
+
1510
+ if not success:
1511
+ return None
1512
+ return company_data
1513
+
1514
+ except mysql.connector.Error as err:
1515
+ logging.error(f"Error updating company: {err}")
1516
+ raise HTTPException(status_code=500, detail="Failed to update company")
1517
+
1518
+ # to refresh prompt data table
1519
+ @app.get("/api/prompt_update")
1520
+ async def get_document(company_id: str = Query(...)):
1521
+ print(f"Received companyId and name: {company_id},{company_id}") # Log rec
1522
+ #async def get_data_connectors(company_id: str, company_name: str):
1523
+ logging.info(f"Received request for company_id and company_id: {company_id},{company_id}")
1524
+ try:
1525
+ cnx = get_db_connection()
1526
+ cursor = cnx.cursor()
1527
+ query = """
1528
+ SELECT pt.id,pt.company_id,pt.scenario,pt.prompts,pt.comments
1529
+ FROM u852023448_redmindgpt.prompt_templates pt
1530
+ JOIN u852023448_redmindgpt.company_detail cd ON pt.company_id = cd.company_id
1531
+ WHERE pt.company_id = %s
1532
+ """
1533
+ logging.info(f"Executing query: {query} with company_id: {company_id}")
1534
+ values= (company_id,)
1535
+ # logging.info(f"Query parameters: {params}")
1536
+ print(f"Query parameters: {values}")
1537
+
1538
+ cursor.execute(query, values) # Pa
1539
+ result = cursor.fetchall()
1540
+ logging.info(f"Query result: {result}")
1541
+ cursor.close
1542
+ cnx.close()
1543
+ companies=[]
1544
+ for row in result:
1545
+ companies.append({
1546
+ 'id':row[0],
1547
+ "company_id": row[1],
1548
+ "scenario":row[2],
1549
+ "prompts": row[3]
1550
+ # "Auth_Bearer": result[3],
1551
+ # "Inputjson": result[4],
1552
+ #"OutputJson": result[5],
1553
+ #"description": result[6]
1554
+
1555
+ })
1556
+ if companies:
1557
+ logging.info(f"the primary key id is {companies}")
1558
+ return companies
1559
+ else:
1560
+ logging.warning(f"No document found for company_id: {company_id}")
1561
+ raise HTTPException(status_code=404, detail="Data document not found")
1562
+ except mysql.connector.Error as err:
1563
+ logging.error(f"Database error: {err}")
1564
+ raise HTTPException(status_code=500, detail="Internal Server Error")
1565
+
1566
+ @app.get("/chatbot")
1567
+ async def chatbot(request: Request):
1568
+ return templates.TemplateResponse("chatbot.html", {"request": request,"title":"Chatbot"})
1569
+
1570
+ if __name__ == "__main__":
1571
+ import uvicorn
1572
+ uvicorn.run(app, host="127.0.0.1", port=8000)
1573
+
1574
  from pydantic import BaseModel
1575
  class DatabaseConnection(BaseModel):
1576
  database_type: str
 
1766
  for table in all_tables:
1767
 
1768
  table_name = table[0]
1769
+ if table_name != "user_feedback":
1770
+ query = f"SELECT COUNT(*) FROM {table_name} WHERE company_id = %s"
1771
  query = f"SELECT COUNT(*) FROM {table_name} WHERE company_id = %s"
1772
  cursor.execute(query, (company_id,))
1773
+
1774
  count = cursor.fetchone()[0]
1775
  table_count_of_each_table[table_name] = count
1776
+ query1=f"select company_name from company_detail where company_id = %s"
1777
+ cursor.execute(query1,(company_id,))
1778
+ company_name_result = cursor.fetchone()
1779
 
1780
  # Check if company_name_result is not None
1781
  if company_name_result:
redmindgen.log CHANGED
@@ -1,236 +0,0 @@
1
- 2024-06-26 15:05:45,671 - INFO - File upload start
2
- 2024-06-26 15:06:10,308 - INFO - File upload start
3
- 2024-06-26 20:56:57,535 - INFO - File upload start
4
- 2024-06-27 10:23:14,083 - INFO - File upload start
5
- 2024-06-27 10:25:33,473 - INFO - File upload start
6
- 2024-06-27 19:46:45,688 - INFO - File upload start
7
- 2024-06-28 11:30:27,909 - INFO - File upload start
8
- 2024-06-28 11:31:34,367 - INFO - File upload start
9
- 2024-06-28 11:45:59,119 - INFO - File upload start
10
- 2024-06-28 12:03:18,147 - INFO - File upload start
11
- 2024-06-28 12:23:09,794 - INFO - File upload start
12
- 2024-06-28 12:40:34,867 - INFO - File upload start
13
- 2024-06-28 12:50:31,907 - INFO - File upload start
14
- 2024-06-28 12:52:50,973 - INFO - File upload start
15
- 2024-06-28 14:13:58,362 - INFO - File upload start
16
- 2024-06-28 14:15:39,003 - INFO - File upload start
17
- 2024-06-28 14:16:38,501 - INFO - File upload start
18
- 2024-06-28 14:30:55,406 - INFO - File upload start
19
- 2024-06-28 14:31:33,800 - INFO - File upload start
20
- 2024-06-28 14:32:14,903 - INFO - File upload start
21
- 2024-06-28 14:33:13,832 - INFO - File upload start
22
- 2024-06-28 14:37:37,770 - INFO - File upload start
23
- 2024-06-28 14:38:27,848 - INFO - File upload start
24
- 2024-06-28 14:38:45,450 - INFO - File upload start
25
- 2024-06-28 14:39:22,595 - INFO - File upload start
26
- 2024-06-28 14:41:45,804 - INFO - File upload start
27
- 2024-06-28 14:42:28,047 - INFO - File upload start
28
- 2024-06-28 14:42:52,537 - INFO - File upload start
29
- 2024-06-28 14:42:55,555 - INFO - File upload start
30
- 2024-06-28 14:43:43,017 - INFO - File upload start
31
- 2024-06-28 14:46:42,645 - INFO - File upload start
32
- 2024-06-28 14:47:57,404 - INFO - File upload start
33
- 2024-06-28 14:51:18,761 - INFO - File upload start
34
- 2024-06-28 14:51:45,278 - INFO - File upload start
35
- 2024-06-28 14:52:18,757 - INFO - File upload start
36
- 2024-06-28 14:54:31,946 - INFO - File upload start
37
- 2024-06-28 14:54:43,198 - INFO - File upload start
38
- 2024-07-05 14:37:16,254 - INFO - File upload start
39
- 2024-07-09 10:24:45,033 - INFO - File upload start
40
- 2024-07-09 10:27:12,902 - INFO - File upload start
41
- 2024-07-09 10:28:05,599 - INFO - File upload start
42
- 2024-07-09 10:28:32,249 - INFO - File upload start
43
- 2024-07-09 10:30:40,884 - INFO - File upload start
44
- 2024-07-09 10:32:49,297 - INFO - File upload start
45
- 2024-07-09 10:33:52,842 - INFO - File upload start
46
- 2024-07-09 10:36:09,099 - INFO - File upload start
47
- 2024-07-09 10:41:58,156 - INFO - File upload start
48
- 2024-07-09 10:44:11,534 - INFO - File upload start
49
- 2024-07-09 13:48:26,883 - INFO - File upload start
50
- 2024-07-09 13:51:02,458 - INFO - File upload start
51
- 2024-07-09 13:52:43,802 - INFO - File upload start
52
- 2024-07-09 13:53:24,800 - INFO - File upload start
53
- 2024-07-09 14:13:09,374 - INFO - File upload start
54
- 2024-07-09 14:15:08,118 - INFO - File upload start
55
- 2024-07-09 14:20:15,337 - INFO - File upload start
56
- 2024-07-09 15:18:47,858 - INFO - File upload start
57
- 2024-07-09 15:20:43,515 - INFO - File upload start
58
- 2024-07-09 15:22:10,977 - INFO - File upload start
59
- 2024-07-09 15:23:11,741 - INFO - File upload start
60
- 2024-07-09 15:24:02,811 - INFO - File upload start
61
- 2024-07-09 15:24:51,644 - INFO - File upload start
62
- 2024-07-09 15:26:57,307 - INFO - File upload start
63
- 2024-07-09 15:27:47,890 - INFO - File upload start
64
- 2024-07-09 15:28:54,605 - INFO - File upload start
65
- 2024-07-09 15:32:04,124 - INFO - File upload start
66
- 2024-07-10 10:48:52,249 - INFO - File upload start
67
- 2024-07-18 12:33:01,569 - INFO - File upload start
68
- 2024-07-18 12:43:49,151 - INFO - File upload start
69
- 2024-07-18 12:50:59,304 - INFO - File upload start
70
- 2024-07-18 12:51:05,343 - INFO - File upload start
71
- 2024-07-18 13:46:12,984 - INFO - File upload start
72
- 2024-07-18 13:47:27,113 - INFO - File upload start
73
- 2024-07-18 13:53:14,622 - INFO - File upload start
74
- 2024-07-18 13:55:23,502 - INFO - File upload start
75
- 2024-07-18 14:08:29,239 - INFO - File upload start
76
- 2024-07-18 14:16:55,475 - INFO - File upload start
77
- 2024-07-18 14:25:44,967 - INFO - File upload start
78
- 2024-07-18 14:36:46,313 - INFO - File upload start
79
- 2024-07-18 14:40:11,808 - INFO - File upload start
80
- 2024-07-18 14:40:42,615 - INFO - Received question: what is the weather in chennai
81
- 2024-07-18 14:40:43,629 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
82
- 2024-07-18 14:40:55,968 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
83
- 2024-07-18 14:40:55,984 - INFO - Executing SQL query: This question is not related to the provided database schema, as it is about the weather in a specific location (Chennai) and cannot be answered using the data in the tables. You would need to use a weather API or service to get the current weather information for Chennai.
84
- 2024-07-18 14:40:56,620 - ERROR - Error executing query: This question is not related to the provided database schema, as it is about the weather in a specific location (Chennai) and cannot be answered using the data in the tables. You would need to use a weather API or service to get the current weather information for Chennai., Error: (mysql.connector.errors.ProgrammingError) 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'This question is not related to the provided database schema, as it is about the' at line 1
85
- [SQL: This question is not related to the provided database schema, as it is about the weather in a specific location (Chennai) and cannot be answered using the data in the tables. You would need to use a weather API or service to get the current weather information for Chennai.]
86
- (Background on this error at: https://sqlalche.me/e/20/f405)
87
- 2024-07-18 14:40:57,382 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
88
- 2024-07-18 14:41:08,706 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
89
- 2024-07-18 14:41:08,720 - INFO - Executing SQL query: This question is not related to the provided database schema and cannot be answered using SQL queries. You may need to use a weather API or service to get the current weather information for Chennai.
90
- 2024-07-18 14:41:09,363 - ERROR - Error executing query: This question is not related to the provided database schema and cannot be answered using SQL queries. You may need to use a weather API or service to get the current weather information for Chennai., Error: (mysql.connector.errors.ProgrammingError) 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'This question is not related to the provided database schema and cannot be answe' at line 1
91
- [SQL: This question is not related to the provided database schema and cannot be answered using SQL queries. You may need to use a weather API or service to get the current weather information for Chennai.]
92
- (Background on this error at: https://sqlalche.me/e/20/f405)
93
- 2024-07-18 14:41:10,032 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
94
- 2024-07-18 14:41:21,325 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
95
- 2024-07-18 14:41:21,335 - INFO - Executing SQL query: This question is not related to the provided database schema and cannot be answered using SQL queries. You may need to use a weather API or service to get the current weather information for Chennai.
96
- 2024-07-18 14:41:43,996 - INFO - File upload start
97
- 2024-07-18 14:42:14,242 - INFO - Received question: what is the college name
98
- 2024-07-18 14:42:15,023 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
99
- 2024-07-18 14:42:27,078 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
100
- 2024-07-18 14:42:27,094 - INFO - Executing SQL query: SELECT CollegeName
101
- FROM buildings;
102
- 2024-07-18 14:42:27,843 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
103
- 2024-07-18 14:42:28,479 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
104
- 2024-07-18 14:42:29,471 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
105
- 2024-07-18 14:42:29,476 - INFO - Response generated: The college name is SCCC.
106
- 2024-07-18 14:44:53,957 - INFO - File upload start
107
- 2024-07-18 14:54:50,464 - INFO - File upload start
108
- 2024-07-18 14:55:14,833 - INFO - File upload start
109
- 2024-07-18 14:55:40,011 - INFO - Received question: what is the college name
110
- 2024-07-18 14:55:40,909 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
111
- 2024-07-18 14:55:51,399 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
112
- 2024-07-18 14:55:51,415 - INFO - Executing SQL query: SELECT CollegeName
113
- FROM buildings;
114
- 2024-07-18 14:55:52,048 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
115
- 2024-07-18 14:55:52,599 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
116
- 2024-07-18 14:55:53,523 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
117
- 2024-07-18 14:55:53,526 - INFO - Response generated: The college name is SCCC (retrieved from the database).
118
- 2024-07-18 14:59:35,543 - INFO - Received question: what is the college name
119
- 2024-07-18 14:59:36,526 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
120
- 2024-07-18 14:59:48,046 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
121
- 2024-07-18 14:59:48,046 - INFO - Executing SQL query: SELECT CollegeName
122
- FROM buildings;
123
- 2024-07-18 14:59:48,723 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
124
- 2024-07-18 14:59:49,583 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
125
- 2024-07-18 14:59:50,459 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
126
- 2024-07-18 14:59:50,461 - INFO - Response generated: The college name is "SCCC".
127
- 2024-07-19 10:58:51,724 - INFO - File upload start
128
- 2024-07-19 11:25:35,546 - WARNING - Did not find CR at end of boundary (40)
129
- 2024-07-19 11:26:36,567 - WARNING - Did not find CR at end of boundary (40)
130
- 2024-07-19 11:29:24,545 - INFO - File upload start
131
- 2024-07-19 11:29:46,970 - INFO - Received question: what is the college name
132
- 2024-07-19 11:29:47,868 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
133
- 2024-07-19 11:29:59,588 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
134
- 2024-07-19 11:29:59,602 - INFO - Executing SQL query: SELECTSELECT CollegeName
135
- FROM buildings;
136
- 2024-07-19 11:30:00,235 - ERROR - Error executing query: SELECTSELECT CollegeName
137
- FROM buildings;, Error: (mysql.connector.errors.ProgrammingError) 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECTSELECT CollegeName
138
- FROM buildings' at line 1
139
- [SQL: SELECTSELECT CollegeName
140
- FROM buildings;]
141
- (Background on this error at: https://sqlalche.me/e/20/f405)
142
- 2024-07-19 11:30:00,856 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
143
- 2024-07-19 11:30:11,376 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
144
- 2024-07-19 11:30:11,378 - INFO - Executing SQL query: SELECT CollegeName
145
- FROM buildings;
146
- 2024-07-19 11:30:12,379 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
147
- 2024-07-19 11:30:13,039 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
148
- 2024-07-19 11:30:14,129 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
149
- 2024-07-19 11:30:14,130 - INFO - Response generated: The college name is SCCC (appears multiple times in the data).
150
- 2024-07-19 11:31:25,438 - INFO - Received question: what is the college name
151
- 2024-07-19 11:31:26,456 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
152
- 2024-07-19 11:31:36,647 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
153
- 2024-07-19 11:31:36,649 - INFO - Executing SQL query: SELECT CollegeName
154
- FROM buildings;
155
- 2024-07-19 11:31:37,289 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
156
- 2024-07-19 11:31:38,107 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
157
- 2024-07-19 11:31:39,172 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
158
- 2024-07-19 11:31:39,173 - INFO - Response generated: The college name is SCCC (repeated multiple times in the data).
159
- 2024-07-19 11:32:01,191 - INFO - Received question: what is the college name
160
- 2024-07-19 11:32:01,981 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
161
- 2024-07-19 11:32:13,386 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
162
- 2024-07-19 11:32:13,388 - INFO - Executing SQL query: SELECT CollegeName
163
- FROM buildings;
164
- 2024-07-19 11:32:14,108 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
165
- 2024-07-19 11:32:14,872 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
166
- 2024-07-19 11:32:15,784 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
167
- 2024-07-19 11:32:15,786 - INFO - Response generated: The college name is SCCC.
168
- 2024-07-19 12:32:42,687 - INFO - File upload start
169
- 2024-07-19 12:33:09,641 - INFO - File upload start
170
- 2024-07-19 12:33:47,562 - INFO - File upload start
171
- 2024-07-19 12:34:08,515 - INFO - Received question: what are the faculty names
172
- 2024-07-19 12:34:09,305 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
173
- 2024-07-19 12:34:21,872 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
174
- 2024-07-19 12:34:21,884 - INFO - Executing SQL query: SELECT FacultyName AS name FROM faculty;
175
- 2024-07-19 12:34:22,691 - INFO - Query successful: [('Tanya Ferguson',), ("Guy O'Neill",), ('Dennis Wilks',), ('Kenneth Mason',), ('Mike Briley',), ('Mary George',), ('June Walkters',), ('Angela Mendez',), ('John Leak',), ('Carey Cochran',)]
176
- 2024-07-19 12:34:23,315 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
177
- 2024-07-19 12:34:25,037 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
178
- 2024-07-19 12:34:25,037 - INFO - Response generated: The faculty names are as follows:
179
- 1. Tanya Ferguson
180
- 2. Guy O'Neill
181
- 3. Dennis Wilks
182
- 4. Kenneth Mason
183
- 5. Mike Briley
184
- 6. Mary George
185
- 7. June Walkters
186
- 8. Angela Mendez
187
- 9. John Leak
188
- 10. Carey Cochran
189
- 2024-07-19 12:35:10,296 - INFO - Received question: what is the college name
190
- 2024-07-19 12:35:11,275 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
191
- 2024-07-19 12:35:23,826 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
192
- 2024-07-19 12:35:23,826 - INFO - Executing SQL query: SELECT CollegeName
193
- FROM buildings;
194
- 2024-07-19 12:35:24,533 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
195
- 2024-07-19 12:35:25,144 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
196
- 2024-07-19 12:35:26,577 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
197
- 2024-07-19 12:35:26,577 - INFO - Response generated: The college name is SCCC (repeated multiple times in the database).
198
- 2024-07-19 13:17:17,036 - INFO - File upload start
199
- 2024-07-19 13:19:33,261 - INFO - File upload start
200
- 2024-07-19 13:21:21,623 - INFO - Received question: what is the college name
201
- 2024-07-19 13:21:22,303 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
202
- 2024-07-19 13:21:33,883 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
203
- 2024-07-19 13:21:33,890 - INFO - Executing SQL query: SELECT CollegeName
204
- FROM buildings;
205
- 2024-07-19 13:21:34,550 - INFO - Query successful: [('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',), ('SCCC',)]
206
- 2024-07-19 13:21:35,158 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
207
- 2024-07-19 13:21:35,946 - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
208
- 2024-07-19 13:21:35,949 - INFO - Response generated: The college name is SCCC.
209
- 2024-07-19 14:53:48,407 - INFO - File upload start
210
- 2024-07-22 10:12:26,425 - INFO - File upload start
211
- 2024-07-22 10:12:43,516 - INFO - File upload start
212
- 2024-07-22 10:29:30,854 - INFO - File upload start
213
- 2024-07-22 10:34:39,763 - INFO - File upload start
214
- 2024-07-22 10:45:52,996 - INFO - File upload start
215
- 2024-07-22 10:54:35,696 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
216
- 2024-07-22 11:03:11,588 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
217
- 2024-07-22 11:32:50,544 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
218
- 2024-07-22 11:34:11,514 - INFO - File upload start
219
- 2024-07-22 11:35:17,929 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
220
- 2024-07-22 11:35:51,872 - INFO - File upload start
221
- 2024-07-22 11:35:55,811 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
222
- 2024-07-22 11:47:11,227 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
223
- 2024-07-22 11:57:15,569 - INFO - File upload start
224
- 2024-07-22 12:08:32,603 - INFO - File upload start
225
- 2024-07-22 12:09:31,581 - INFO - File upload start
226
- 2024-07-22 12:10:00,231 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
227
- 2024-07-22 12:11:49,767 - INFO - File upload start
228
- 2024-07-22 12:12:11,229 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
229
- 2024-07-22 12:12:33,191 - INFO - File upload start
230
- 2024-07-22 12:12:42,069 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
231
- 2024-07-22 12:14:01,202 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
232
- 2024-07-22 12:30:49,041 - INFO - File upload start
233
- 2024-07-22 12:31:09,887 - INFO - File upload start
234
- 2024-07-22 12:32:09,656 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
235
- 2024-07-22 12:32:39,727 - INFO - File upload start
236
- 2024-07-22 12:33:21,572 - ERROR - Error handling file uploads: expected str, bytes or os.PathLike object, not NoneType
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/css/API_connectors.css CHANGED
@@ -2,11 +2,7 @@
2
  margin-top: -10px;
3
  }
4
 
5
- .card {
6
- padding: 0;
7
- margin-top: -15px;
8
- margin-left: -40px;
9
- }
10
 
11
  .header-row {
12
  display: flex;
@@ -88,4 +84,21 @@ td:nth-child(6) {
88
  div.dataTables_wrapper div.dataTables_length select {
89
  width: 60px;
90
  display: inline-block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  }
 
2
  margin-top: -10px;
3
  }
4
 
5
+
 
 
 
 
6
 
7
  .header-row {
8
  display: flex;
 
84
  div.dataTables_wrapper div.dataTables_length select {
85
  width: 60px;
86
  display: inline-block;
87
+ }
88
+
89
+ aside{
90
+ margin-top: 100px !important;
91
+ }
92
+ .navbar{
93
+
94
+ margin-left: 0px !important;
95
+ }
96
+ ul {
97
+ display: flex !important;
98
+ row-gap: 20px !important;
99
+ margin-top: 40px !important;
100
+ }
101
+ i{
102
+ margin-top: 0px !important;
103
+ margin-right: 10px !important;
104
  }
static/css/company_profile.css CHANGED
@@ -8,12 +8,6 @@ body {
8
  background-color: transparent !important;
9
  }
10
 
11
- .card {
12
- padding: 0;
13
- margin-top: 10px;
14
- margin-left: -50px;
15
- }
16
-
17
  /* Ensure the DataTable wrapper takes the full width */
18
  .dataTables_wrapper {
19
  width: 100%;
@@ -204,4 +198,24 @@ td:nth-child(8) {
204
  background: none;
205
  font-size: 16px;
206
  cursor: pointer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  }
 
8
  background-color: transparent !important;
9
  }
10
 
 
 
 
 
 
 
11
  /* Ensure the DataTable wrapper takes the full width */
12
  .dataTables_wrapper {
13
  width: 100%;
 
198
  background: none;
199
  font-size: 16px;
200
  cursor: pointer;
201
+ }
202
+
203
+ aside {
204
+ margin-top: 100px !important;
205
+ }
206
+
207
+ .navbar {
208
+
209
+ margin-left: 0px !important;
210
+ }
211
+
212
+ ul {
213
+ display: flex !important;
214
+ row-gap: 20px !important;
215
+ margin-top: 40px !important;
216
+ }
217
+
218
+ i {
219
+ margin-top: 0px !important;
220
+ margin-right: 10px !important;
221
  }
static/css/dashboard.css CHANGED
@@ -14,8 +14,7 @@
14
  --rgba-primary-8: rgba(64, 24, 157, 0.8);
15
  --rgba-primary-9: rgba(64, 24, 157, 0.9);
16
  --font-family-base: Roboto, sans-serif;
17
- --font-family-title: Roboto, sans-serif;
18
- }
19
 
20
  /*
21
  0 - 600: Phone
@@ -28,292 +27,192 @@ The smaller device rules always should write below the bigger device rules
28
  Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Component
29
  */
30
  .event-chart {
31
- margin: -10px 0px;
32
- }
33
 
34
  .default-select.style-1 {
35
  border: 0;
36
  font-size: 12px;
37
- padding: 5px;
38
- }
39
-
40
- .default-select.style-1 option {
41
- background: #fff;
42
- box-shadow: 0 10px 40px 0 rgba(32, 28, 69, 0.1);
43
- }
44
 
45
  .event-table {
46
- border-radius: 1.25rem;
47
- }
48
-
49
- .event-table thead th {
50
- color: #000;
51
- font-size: 18px;
52
- white-space: nowrap;
53
- font-weight: 600;
54
- padding: 20px 10px;
55
- }
56
-
57
- .event-table tbody td {
58
- font-size: 14px;
59
- padding: 20px 10px;
60
- }
61
-
62
- @media only screen and (max-width: 1400px) {
63
  .event-table thead th {
64
  color: #000;
65
- font-size: 15px;
66
  white-space: nowrap;
67
  font-weight: 600;
68
- }
69
-
70
  .event-table tbody td {
71
- padding: 12px 15px;
72
- }
73
- }
 
 
 
 
 
 
 
74
 
75
  .dropdown-no-icon .dropdown-toggle:after {
76
- content: none;
77
- }
78
 
79
  .detault-daterange .dashboard-select.mat-form-field-appearance-fill .mat-form-field-flex {
80
- padding: 0em 1em 0 1em;
81
- }
82
-
83
- .detault-daterange .mat-form-field-prefix,
84
- .detault-daterange .mat-form-field-suffix {
85
- top: 5px;
86
- }
87
 
88
  .dashboard-select {
89
- font-size: 16px;
90
- }
91
-
92
- .dashboard-select .mat-form-field-wrapper,
93
- .dashboard-select .mat-form-field-appearance-fill .mat-form-field-flex {
94
- padding: 0;
95
- background: transparent;
96
- }
97
-
98
- .dashboard-select .mat-form-field-underline {
99
- display: none;
100
- }
101
-
102
- .dashboard-select .mat-form-field-infix {
103
- border: 0;
104
- }
105
-
106
- .dashboard-select.mat-form-field-appearance-fill .mat-select-arrow-wrapper {
107
- transform: translateY(-10%);
108
- }
109
-
110
- .dashboard-select.mat-form-field-appearance-fill .mat-form-field-flex {
111
- padding: 1em 1em 0 1em;
112
- background-color: #fff;
113
- }
114
-
115
- .dashboard-select.mat-form-field-appearance-fill .mat-form-field-infix {
116
- padding: .25em 0 1em 0;
117
- }
118
-
119
- .dashboard-select .mat-select-arrow,
120
- .dashboard-select .mat-select-value {
121
- color: #40189D;
122
- }
123
-
124
- .dashboard-select.style-1 {
125
- font-size: 16px;
126
- border: 1px solid #f0f1f5;
127
- border-radius: 3rem;
128
- }
129
-
130
- .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-infix {
131
- padding: 6px 0 18px 0;
132
- }
133
-
134
- .dashboard-select.style-1 .mat-form-field-infix {
135
- padding: 15px 15px;
136
- width: auto;
137
- }
138
-
139
- .dashboard-select.style-1 .mat-select-value {
140
- max-width: unset;
141
- padding-right: 6px;
142
- }
143
-
144
- .dashboard-select.style-1 .mat-select-arrow,
145
- .dashboard-select.style-1 .mat-select-value {
146
- color: #000;
147
- }
148
-
149
- .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-flex {
150
- border-radius: 3rem;
151
- background-color: #fff;
152
- padding: 12px 20px 0;
153
- }
154
-
155
- @media only screen and (max-width: 1400px) {
156
  .dashboard-select.style-1 {
157
- font-size: 0.813rem;
158
- }
159
-
160
- .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-infix {
161
- padding: 6px 0 12px 0;
162
- }
163
-
164
- .dashboard-select.style-1 .mat-form-field-infix {
165
- padding: 11px 15px;
166
- width: auto;
167
- }
168
-
169
- .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-flex {
170
- padding: 8px 15px 0;
171
- }
172
- }
 
 
 
 
 
 
 
 
 
 
 
173
 
174
  .compose-content .dropzone {
175
  display: flex;
176
  align-items: center;
177
- justify-content: center;
178
- }
179
 
180
  .latest-salebx {
181
- height: 630px;
182
- }
183
-
184
- @media only screen and (max-width: 1199px) {
185
- .latest-salebx {
186
- height: 350px;
187
- }
188
- }
189
 
190
  .about-company {
191
- border-top: 1px solid #EEEEEE;
192
- }
193
-
194
- @media only screen and (max-width: 1199px) {
195
- .about-company {
196
- border-top: 0;
197
- border-left: 1px solid #EEEEEE;
198
- }
199
- }
200
-
201
- @media only screen and (max-width: 767px) {
202
- .about-company {
203
- border-left: 0;
204
- border-top: 1px solid #EEEEEE;
205
- }
206
- }
207
 
208
  .post-input .btn-social {
209
- margin-right: 4px;
210
- }
211
 
212
  .rating-widget .ng-star-inserted {
213
  color: #40189D;
214
- font-size: 30px;
215
- }
216
 
217
  .default-accordion {
218
  box-shadow: none;
219
  margin-bottom: 1.25rem;
220
  height: unset;
221
- border-radius: 5px;
222
- }
223
-
224
- .default-accordion .card-header {
225
- padding: 0;
226
- border: 0;
227
- }
228
-
229
- .default-accordion .card-header button {
230
- border-radius: 5px;
231
- background: #40189D;
232
- color: #fff;
233
- display: block;
234
- border: 0;
235
- width: 100%;
236
- text-align: left;
237
- padding-right: 40px;
238
- }
239
-
240
- .default-accordion .card-header button.collapsed {
241
- background: rgba(64, 24, 157, 0.15);
242
- color: #000;
243
- }
244
-
245
- .default-accordion .card-header button.collapsed:after {
246
- content: "\e61a";
247
- }
248
-
249
- .default-accordion .card-header button:focus {
250
- box-shadow: none;
251
- }
252
-
253
- .default-accordion .card-header button:after {
254
- position: absolute;
255
- font-family: 'themify';
256
- top: 50%;
257
- content: "\e622";
258
- transform: translateY(-50%);
259
- right: 20px;
260
- }
261
 
262
  .custom-header-accordion {
263
  border: 1px solid #EEEEEE;
264
  box-shadow: none;
265
  margin-bottom: 0;
266
- height: unset;
267
- }
268
-
269
- .custom-header-accordion .card-header button:focus {
270
- box-shadow: none;
271
- }
272
 
273
  .prevent-accordion {
274
  box-shadow: none;
275
  margin-bottom: 1.25rem;
276
  height: unset;
277
- border-radius: 5px;
278
- }
279
-
280
- .prevent-accordion .card-header {
281
- padding: 0;
282
- border: 0;
283
- }
284
-
285
- .prevent-accordion .card-header button {
286
- background: #40189D;
287
- border-radius: 5px;
288
- color: #fff;
289
- display: block;
290
- border: 0;
291
- width: 100%;
292
- text-align: left;
293
- padding-right: 40px;
294
- }
295
-
296
- .prevent-accordion .card-header button.collapsed {
297
- background: rgba(64, 24, 157, 0.15);
298
- color: #000;
299
- }
300
-
301
- .prevent-accordion .card-header button.collapsed:after {
302
- content: "\e61a";
303
- }
304
-
305
- .prevent-accordion .card-header button:focus {
306
- box-shadow: none;
307
- }
308
-
309
- .prevent-accordion .card-header button:after {
310
- position: absolute;
311
- font-family: 'themify';
312
- top: 50%;
313
- content: "\e622";
314
- transform: translateY(-50%);
315
- right: 20px;
316
- }
317
 
318
  .default-nestable {
319
  /* .nestable-row{
@@ -321,341 +220,224 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
321
  }
322
  .ngx-nestable{
323
  width:50%;
324
- }*/
325
- }
326
-
327
- .default-nestable .dd-dragel .ngx-nestable-hidden,
328
- .default-nestable .dd-dragel button {
329
- visibility: hidden;
330
- }
331
-
332
- .default-nestable .dd-list .dd-item .nestable-item-container {
333
- background: #e6defa;
334
- color: #000;
335
- position: relative;
336
- display: flex;
337
- flex-direction: row;
338
- align-items: center;
339
- min-height: 32px;
340
- font-size: 16px;
341
- font-family: Roboto, sans-serif;
342
- cursor: pointer;
343
- outline: 0;
344
- border-radius: 5px;
345
- margin-bottom: 3px;
346
- padding: 10px 10px;
347
- -webkit-transition: all 0.5s;
348
- -ms-transition: all 0.5s;
349
- transition: all 0.5s;
350
- }
351
-
352
- .default-nestable .dd-list .dd-item .nestable-item-container:hover {
353
- background: #40189D;
354
- color: #fff;
355
- }
356
-
357
- .default-nestable .dd-list .dd-item .nestable-item-container:hover button {
358
- color: #fff;
359
- }
360
-
361
- .default-nestable .dd-list .dd-item .nestable-item-container button {
362
- font-family: 'Material Icons';
363
- font-weight: normal;
364
- font-style: normal;
365
- outline: 0;
366
- border: 0;
367
- font-size: 24px;
368
- line-height: 1;
369
- letter-spacing: normal;
370
- text-transform: none;
371
- margin-right: 10px;
372
- background: transparent;
373
- color: #000;
374
- display: inline-block;
375
- white-space: nowrap;
376
- word-wrap: normal;
377
- direction: ltr;
378
- -webkit-font-feature-settings: 'liga';
379
- -webkit-font-smoothing: antialiased;
380
- }
381
-
382
- @media only screen and (max-width: 575px) {
383
  .default-nestable .dd-list .dd-item .nestable-item-container {
384
- padding: 0;
385
- }
386
- }
387
-
388
- .default-nestable .result-bx textarea {
389
- height: 100%;
390
- width: 100%;
391
- }
392
-
393
- @media only screen and (max-width: 991px) {
394
- .default-nestable .result-bx {
395
- margin-top: 30px;
396
- }
397
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  .default-nestable .result-bx textarea {
399
- height: 600px;
400
- width: 100%;
401
- }
402
- }
 
 
 
 
403
 
404
  .alert-dismissible .close {
405
  height: 100%;
406
- font-size: 30px;
407
- }
408
-
409
- .alert-dismissible .close span {
410
- font-weight: 400;
411
- }
412
 
413
  .calendar-responsive {
414
  overflow: auto;
415
- display: block;
416
- }
417
 
418
  .default-calendar ngb-datepicker {
419
  border: 0;
420
- background: #f3f3f3;
421
- }
422
-
423
  .default-calendar .form-group .input-group .form-control {
424
- color: #000;
425
- }
426
-
427
  .default-calendar .form-group .input-group .input-group-append button {
428
  background-image: none !important;
429
  padding: 0px;
430
  border-color: #40189D;
431
  background: #40189D;
432
  width: 45px;
433
- text-align: center;
434
- }
435
-
436
- .default-calendar .form-group .input-group .input-group-append button:after {
437
- color: #fff;
438
- content: "\f133";
439
- font-family: 'Line Awesome Free';
440
- padding: 0;
441
- font-size: 26px;
442
- }
443
-
444
- .default-calendar .form-group .input-group .input-group-append button:hover {
445
- background: #40189D;
446
- }
447
-
448
- .default-calendar .form-group .input-group .input-group-append button:hover:after {
449
- color: #fff;
450
- }
451
-
452
- .default-calendar .form-group .input-group .input-group-append button:focus {
453
- box-shadow: none;
454
- }
455
-
456
  .default-calendar .weekend {
457
- background-color: #40189D;
458
- }
459
-
460
  .default-calendar .ngb-dp-header {
461
  background: #40189D;
462
- padding: 8px 5px;
463
- }
464
-
465
- .default-calendar .ngb-dp-header .ngb-dp-navigation-chevron {
466
- border-color: #fff;
467
- }
468
-
469
- .default-calendar .ngb-dp-header .custom-select {
470
- color: #fff;
471
- background: #40189D;
472
- border-radius: 5px;
473
- margin: 0 5px;
474
- padding: 0 20px;
475
- }
476
-
477
  .default-calendar .ngb-dp-weekdays {
478
  border: 1px solid rgba(64, 24, 157, 0.25);
479
- background: #fff;
480
- }
481
-
482
- .default-calendar .ngb-dp-weekdays .ngb-dp-weekday {
483
- color: #40189D;
484
- font-weight: 600;
485
- font-size: 15px;
486
- font-style: unset;
487
- }
488
-
489
- .default-calendar .ngb-dp-day,
490
- .default-calendar .ngb-dp-week-number,
491
- .default-calendar .ngb-dp-weekday {
492
  max-height: 40px;
493
  max-width: 40px;
494
  height: 40px;
495
  width: 35px;
496
- line-height: 40px;
497
- }
498
-
499
  .default-calendar [ngbDatepickerDayView] {
500
  max-height: 40px;
501
  max-width: 40px;
502
  width: 35px;
503
  height: 40px;
504
- line-height: 40px;
505
- }
506
-
507
- .default-calendar [ngbDatepickerDayView]:active {
508
- background-color: #40189D !important;
509
- color: white !important;
510
- }
511
-
512
  .default-calendar .ngb-dp-navigation-select {
513
- flex: unset;
514
- }
515
-
516
  .default-calendar .custom-day {
517
  height: 40px !important;
518
  line-height: 40px;
519
  padding: 0px !important;
520
- width: 100% !important;
521
- }
522
-
523
- .default-calendar .custom-day.range,
524
- .default-calendar .custom-day:hover {
525
  height: 40px;
526
- background-color: #40189D !important;
527
- }
528
-
529
  .default-calendar .ngb-dp-month-name {
530
  padding: 8px 0px;
531
- height: auto;
532
- }
533
 
534
  .dashboard-full-calendar.fc .fc-button-primary {
535
  background-color: #40189D;
536
  color: #fff;
537
- border: 0;
538
- }
539
-
540
- .dashboard-full-calendar.fc .fc-button-primary:hover,
541
- .dashboard-full-calendar.fc .fc-button-primary.fc-button-active,
542
- .dashboard-full-calendar.fc .fc-button-primary:active {
543
- background-color: #1c0a45 !important;
544
- }
545
-
546
- .dashboard-full-calendar.fc .fc-button-primary:focus {
547
- box-shadow: none !important;
548
- }
549
-
550
- .dashboard-full-calendar.fc-theme-standard td,
551
- .dashboard-full-calendar.fc-theme-standard th,
552
- .dashboard-full-calendar.fc-theme-standard .fc-scrollgrid,
553
- .dashboard-full-calendar.fc-theme-standard .fc-list {
554
- border-color: #ECF0F3;
555
- }
556
-
557
  .dashboard-full-calendar .fc-daygrid-day.fc-day-today {
558
- background-color: #e6defa !important;
559
- }
560
-
561
  .dashboard-full-calendar .fc-daygrid-dot-event {
562
  background: #fff;
563
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
564
- }
565
-
566
  .dashboard-full-calendar.fc-theme-standard th {
567
  padding: 0.75rem 0.5rem;
568
  font-size: 1rem;
569
- font-weight: 500;
570
- }
571
-
572
- .dashboard-full-calendar.fc-theme-standard th a {
573
- color: #B5B5C3;
574
- }
575
-
576
- .dashboard-full-calendar .fc-h-event,
577
- .dashboard-full-calendar .fc-v-event {
578
  background-color: #40189D;
579
- border-color: #40189D;
580
- }
581
-
582
- .dashboard-full-calendar .fc-daygrid-event-dot,
583
- .dashboard-full-calendar .fc-list-event-dot {
584
- border-color: #40189D !important;
585
- }
586
-
587
  @media only screen and (max-width: 767px) {
588
  .dashboard-full-calendar.fc .fc-toolbar {
589
  display: block;
590
- text-align: center;
591
- }
592
-
593
- .dashboard-full-calendar.fc .fc-toolbar .fc-toolbar-title {
594
- margin: 10px;
595
- }
596
- }
597
 
598
  .calendar-list {
599
- margin-bottom: 10px;
600
- }
601
-
602
- .calendar-list .list-group-item {
603
- background: #f4f6fa;
604
- color: #40189D;
605
- border: 0;
606
- margin-bottom: 5px;
607
- border-radius: 6px;
608
- position: relative;
609
- border-left: 4px solid #40189D;
610
- }
611
 
612
  .calendar-checkbox {
613
  border-radius: 6px;
614
  background: #e6defa;
615
  padding: 10px 15px;
616
  margin-bottom: 5px;
617
- color: #000;
618
- }
619
-
620
- .calendar-checkbox label {
621
- margin-bottom: 0;
622
- }
623
-
624
- .calendar-checkbox input[type=checkbox],
625
- .calendar-checkbox input[type=radio] {
626
- margin-right: 6px;
627
- }
628
 
629
  .calendar-description h2 {
630
  margin-top: 30px;
631
  font-size: 25px;
632
  font-weight: 600;
633
- color: #000;
634
- }
635
-
636
  .calendar-description ul li {
637
  font-size: 15px;
638
- color: #000;
639
- }
640
 
641
  .default-carousel .carousel-caption {
642
  background: rgba(0, 0, 0, 0.5);
643
  bottom: 45px;
644
- padding: 15px 15px;
645
- }
646
-
647
- .default-carousel .carousel-caption h3 {
648
- color: #fff;
649
- }
650
-
651
- @media only screen and (max-width: 575px) {
652
- .default-carousel .carousel-caption {
653
- width: 90%;
654
- left: 50%;
655
- transform: translatex(-50%);
656
- }
657
- }
658
-
659
  .default-carousel .carousel-indicators li {
660
  -webkit-transition: all 0.5s;
661
  -ms-transition: all 0.5s;
@@ -664,61 +446,41 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
664
  width: 13px;
665
  border: 0;
666
  border-radius: 13px;
667
- background: #40189D;
668
- }
669
-
670
- .default-carousel .carousel-indicators li.active {
671
- width: 30px;
672
- }
673
-
674
  @media only screen and (max-width: 575px) {
675
  .default-carousel .carousel-item img {
676
- height: 280px;
677
- }
678
- }
679
 
680
  .default-rating span {
681
- font-size: 35px;
682
- }
683
 
684
  .pagination-responsive {
685
- overflow: auto;
686
- }
687
 
688
  .pagination .page-item .page-link span {
689
- color: #B1B1B1;
690
- }
691
 
692
  .pagination .page-item .page-link:hover span {
693
- color: #fff;
694
- }
695
 
696
  .progress {
697
- height: 16px;
698
- }
699
 
700
  .form-select.mat-form-field {
701
- display: block;
702
- }
703
-
704
  .form-select .mat-form-field-infix {
705
- border-top: 0;
706
- }
707
-
708
  .form-select .mat-form-field-underline {
709
- display: none;
710
- }
711
-
712
  .form-select.mat-form-field-appearance-fill .mat-form-field-flex {
713
  border-radius: 1.25rem;
714
  padding: 15px 15px 8px;
715
  background: transparent;
716
- border: 1px solid #EEEEEE;
717
- }
718
-
719
  .form-select.mat-form-field-appearance-fill .mat-select-arrow-wrapper {
720
- transform: translateY(0%);
721
- }
722
 
723
  /** Material Scsss start**/
724
  /* auto compelete */
@@ -743,24 +505,16 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
743
  color:rgba($black,0.5);
744
  left: 15px;
745
  top: 30px;
746
- } */
747
- }
748
-
749
- .default-autocomplete .mat-form-field {
750
- width: 100%;
751
- }
752
-
753
- .default-autocomplete .mat-form-field-appearance-legacy.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label,
754
- .default-autocomplete .mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,
755
- .default-autocomplete .mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label {
756
- /* transform: translateY(-2rem) scale(0.85) perspective(100px) translateZ(0.001px);
757
  -ms-transform: translateY(-2rem) scale(0.85); */
758
- color: #40189D;
759
- }
760
-
761
- .default-autocomplete .mat-form-field.mat-focused .mat-form-field-ripple {
762
- background-color: #40189D;
763
- }
764
 
765
  /* badge */
766
  .mat-flat-button.mat-primary,
@@ -768,86 +522,58 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
768
  .mat-fab.mat-primary,
769
  .mat-mini-fab.mat-primary,
770
  .mat-badge-content {
771
- background-color: #40189D;
772
- }
773
 
774
  .mat-badge-accent .mat-badge-content {
775
  background: #8BC740;
776
- color: #fff;
777
- }
778
 
779
  /* Bottom Sheet */
780
  .mat-bottom-sheet-container {
781
  max-height: 80vh;
782
- overflow: auto;
783
- }
784
-
785
- .mat-bottom-sheet-container ul li a {
786
- padding: 15px 15px;
787
- display: block;
788
- }
789
-
790
- .mat-bottom-sheet-container ul li a:hover,
791
- .mat-bottom-sheet-container ul li a:focus {
792
- background: rgba(0, 0, 0, 0.04);
793
- }
794
-
795
- .mat-bottom-sheet-container ul li a span {
796
- color: #000;
797
- display: block;
798
- font-size: 16px;
799
- }
800
-
801
- .mat-bottom-sheet-container ul li a span:last-child {
802
- font-size: 14px;
803
- }
804
 
805
  /* button */
806
  .default-mt-btn .mat-button.mat-primary,
807
  .default-mt-btn .mat-icon-button.mat-primary,
808
  .default-mt-btn .mat-stroked-button.mat-primary {
809
- color: #40189D;
810
- }
811
-
812
  .default-mt-btn .example-label {
813
  font-size: 1rem !important;
814
- color: #000;
815
- }
816
-
817
  .default-mt-btn .example-button-row {
818
- width: auto !important;
819
- }
820
-
821
- .default-mt-btn .example-button-row .mat-button-base {
822
- margin: 15px 15px 15px 0 !important;
823
- }
824
-
825
  .default-mt-btn .mat-flat-button.mat-accent,
826
  .default-mt-btn .mat-raised-button.mat-accent,
827
  .default-mt-btn .mat-fab.mat-accent,
828
  .default-mt-btn .mat-mini-fab.mat-accent {
829
- background-color: #8BC740;
830
- }
831
-
832
  .default-mt-btn .mat-flat-button.mat-accent,
833
  .default-mt-btn .mat-raised-button.mat-accent,
834
  .default-mt-btn .mat-fab.mat-accent,
835
  .default-mt-btn .mat-mini-fab.mat-accent {
836
- color: #fff;
837
- }
838
-
839
  .default-mt-btn .mat-button.mat-accent,
840
  .default-mt-btn .mat-icon-button.mat-accent,
841
  .default-mt-btn .mat-stroked-button.mat-accent {
842
- color: #8BC740;
843
- }
844
-
845
  .default-mt-btn .mat-button.mat-accent .mat-button-focus-overlay,
846
  .default-mt-btn .mat-icon-button.mat-accent .mat-button-focus-overlay,
847
  .default-mt-btn .mat-stroked-button.mat-accent .mat-button-focus-overlay {
848
- background-color: #8BC740;
849
- }
850
-
851
  .default-mt-btn .mat-button,
852
  .default-mt-btn .mat-raised-button,
853
  .default-mt-btn .mat-stroked-button,
@@ -855,93 +581,64 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
855
  padding: 0 25px;
856
  line-height: 55px;
857
  border-radius: 1.25rem;
858
- font-size: 1rem;
859
- }
860
-
861
  @media only screen and (max-width: 1400px) {
862
  .default-mt-btn .example-button-row {
863
- width: auto !important;
864
- }
865
-
866
- .default-mt-btn .example-button-row .mat-button-base {
867
- margin: 10px 10px 10px 0 !important;
868
- }
869
-
870
  .default-mt-btn .mat-button,
871
  .default-mt-btn .mat-raised-button,
872
  .default-mt-btn .mat-stroked-button,
873
  .default-mt-btn .mat-flat-button {
874
  padding: 0 15px;
875
  line-height: 40px;
876
- font-size: 14px;
877
- }
878
- }
879
-
880
  @media only screen and (max-width: 575px) {
881
  .default-mt-btn .btn-list-group {
882
  display: block !important;
883
- padding: 10px 0px;
884
- }
885
-
886
- .default-mt-btn .btn-list-group .example-label {
887
- display: block !important;
888
- }
889
-
890
  .default-mt-btn .example-button-row {
891
- width: auto !important;
892
- }
893
-
894
- .default-mt-btn .example-button-row .mat-button-base {
895
- margin: 5px 10px 5px 0 !important;
896
- }
897
-
898
  .default-mt-btn .example-button-container {
899
- width: 80px !important;
900
- }
901
- }
902
 
903
  /* card */
904
  .default-mt-card .mat-card {
905
- border-radius: 1.25rem;
906
- }
907
 
908
  /* checkbox */
909
  .default-mt-checkbox .example-section {
910
- margin: 0 !important;
911
- }
912
 
913
  .mat-checkbox-checked:not(.mat-checkbox-disabled).mat-primary .mat-ripple-element,
914
  .mat-checkbox:active:not(.mat-checkbox-disabled).mat-primary .mat-ripple-element {
915
- background: #40189D;
916
- }
917
 
918
  .mat-checkbox-indeterminate.mat-primary .mat-checkbox-background,
919
  .mat-checkbox-checked.mat-primary .mat-checkbox-background {
920
- background-color: #40189D;
921
- }
922
 
923
- .mat-primary .mat-pseudo-checkbox-checked,
924
- .mat-primary .mat-pseudo-checkbox-indeterminate {
925
- background: #40189D;
926
- }
927
 
928
  .mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
929
- color: #40189D;
930
- }
931
 
932
  .mat-checkbox-indeterminate.mat-accent .mat-checkbox-background,
933
  .mat-checkbox-checked.mat-accent .mat-checkbox-background {
934
- background-color: #8BC740;
935
- }
936
 
937
  .mat-checkbox-checked:not(.mat-checkbox-disabled).mat-accent .mat-ripple-element,
938
  .mat-checkbox:active:not(.mat-checkbox-disabled).mat-accent .mat-ripple-element {
939
- background: #8BC740;
940
- }
941
 
942
  .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle {
943
- border-color: #8BC740;
944
- }
945
 
946
  .mat-radio-button.mat-accent .mat-radio-inner-circle,
947
  .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),
@@ -951,118 +648,76 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
951
  .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),
952
  .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-persistent-ripple,
953
  .mat-radio-button.mat-accent:active .mat-radio-persistent-ripple {
954
- background-color: #8BC740;
955
- }
956
 
957
  .mat-pseudo-checkbox-checked,
958
  .mat-pseudo-checkbox-indeterminate,
959
  .mat-accent .mat-pseudo-checkbox-checked,
960
  .mat-accent .mat-pseudo-checkbox-indeterminate {
961
- background: #8BC740;
962
- }
963
 
964
  /* chips */
965
  .default-mt-chips .mat-input-element {
966
- color: rgba(0, 0, 0, 0.6);
967
- }
968
-
969
  .default-mt-chips .mat-chip.mat-standard-chip,
970
  .default-mt-chips .mat-chip.mat-standard-chip.mat-chip-selected.mat-primary {
971
  background-color: #40189D;
972
- color: #fff;
973
- }
974
-
975
  .default-mt-chips .mat-form-field-appearance-legacy .mat-form-field-label,
976
  .default-mt-chips .mat-form-field-appearance-legacy .mat-hint,
977
  .default-mt-chips input.mat-chip-input::placeholder {
978
- color: rgba(0, 0, 0, 0.54);
979
- }
980
-
981
  .default-mt-chips .mat-form-field.mat-focused .mat-form-field-label {
982
- color: #40189D;
983
- }
984
-
985
  .default-mt-chips .mat-form-field.mat-focused .mat-form-field-ripple {
986
- background-color: #40189D;
987
- }
988
-
989
  .default-mt-chips .mat-chip.mat-standard-chip .mat-chip-remove {
990
  opacity: 1;
991
- color: rgba(255, 255, 255, 0.8);
992
- }
993
-
994
  .default-mt-chips .mat-form-field-appearance-legacy .mat-form-field-underline {
995
- background-color: rgba(0, 0, 0, 0.42);
996
- }
997
-
998
  .default-mt-chips .mat-form-field-infix {
999
  width: 100%;
1000
- color: #fff;
1001
- }
1002
-
1003
  .default-mt-chips .mat-chip.mat-standard-chip.mat-chip-selected.mat-accent {
1004
  background-color: #8BC740;
1005
- color: #fff;
1006
- }
1007
 
1008
  /* datepicker */
1009
  .default-mt-datepicker .mat-form-field-appearance-fill .mat-form-field-flex {
1010
- background-color: rgba(64, 24, 157, 0.1);
1011
- }
1012
-
1013
  .default-mt-datepicker .mat-form-field-label {
1014
- color: rgba(0, 0, 0, 0.6);
1015
- }
1016
-
1017
  .default-mt-datepicker .mat-date-range-input-inner,
1018
  .default-mt-datepicker .mat-calendar-body-cell-content,
1019
  .default-mt-datepicker .mat-date-range-input-separator {
1020
- color: #000;
1021
- }
1022
-
1023
  .default-mt-datepicker .mat-icon-button svg path {
1024
- fill: rgba(0, 0, 0, 0.7);
1025
- }
1026
-
1027
  .default-mt-datepicker .mat-form-field.mat-focused .mat-form-field-ripple {
1028
- background: #40189D;
1029
- }
1030
-
1031
  .default-mt-datepicker .mat-form-field.mat-focused .mat-form-field-label {
1032
- color: #40189D;
1033
- }
1034
-
1035
  .default-mt-datepicker .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-label {
1036
- color: rgba(0, 0, 0, 0.5);
1037
- }
1038
-
1039
  .default-mt-datepicker .mat-form-field-appearance-fill .mat-form-field-underline:before {
1040
- background-color: rgba(0, 0, 0, 0.42);
1041
- }
1042
-
1043
  .default-mt-datepicker .mat-input-element:disabled,
1044
  .default-mt-datepicker .mat-form-field-type-mat-native-select.mat-form-field-disabled .mat-form-field-infix::after {
1045
- color: #000;
1046
- }
1047
 
1048
- .mat-calendar-body-comparison-identical,
1049
- .mat-calendar-body-in-comparison-range::before {
1050
- background: rgba(139, 199, 64, 0.2);
1051
- }
1052
 
1053
  .mat-calendar-body-selected {
1054
- background-color: #40189D;
1055
- }
1056
 
1057
  .mat-calendar-body-in-range::before {
1058
- background: rgba(64, 24, 157, 0.1);
1059
- }
1060
 
1061
- .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),
1062
- .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),
1063
- .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical) {
1064
- background-color: rgba(64, 24, 157, 0.3);
1065
- }
1066
 
1067
  .mat-datepicker-content-container .example-header button {
1068
  height: 35px;
@@ -1071,111 +726,73 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
1071
  border: 0;
1072
  border-radius: 35px;
1073
  font-size: 18px;
1074
- margin: 0 2px;
1075
- }
1076
 
1077
  /* dialog */
1078
  /* divider */
1079
  /* expansion */
1080
  .default-mt-expansion .mat-expansion-panel-header-description {
1081
  justify-content: space-between;
1082
- align-items: center;
1083
- }
1084
-
1085
  .default-mt-expansion .mat-accordion .mat-expansion-panel:first-of-type {
1086
  border-top-right-radius: 1.25rem;
1087
- border-top-left-radius: 1.25rem;
1088
- }
1089
-
1090
  .default-mt-expansion .mat-accordion .mat-expansion-panel:last-of-type {
1091
  border-bottom-right-radius: 1.25rem;
1092
- border-bottom-left-radius: 1.25rem;
1093
- }
1094
-
1095
  .default-mt-expansion .mat-expansion-panel-header {
1096
  height: auto;
1097
- padding: 15px 20px !important;
1098
- }
1099
 
1100
  /* form-field */
1101
  .default-mt-formfield .mat-form-field {
1102
- width: 100%;
1103
- }
1104
-
1105
  .default-mt-formfield .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick {
1106
- color: #40189D;
1107
- }
1108
-
1109
- .default-mt-formfield .example-container .mat-form-field+.mat-form-field {
1110
- margin-left: 0 !important;
1111
- }
1112
 
1113
  /* input */
1114
  .default-mt-input .example-form {
1115
  width: 100% !important;
1116
  min-width: 150px;
1117
- max-width: 100% !important;
1118
- }
1119
 
1120
  /* progress */
1121
  .default-mt-progress .mat-progress-bar-buffer {
1122
- background-color: #e6defa;
1123
- }
1124
-
1125
  .default-mt-progress .mat-progress-bar-fill::after {
1126
- background-color: #40189D;
1127
- }
1128
-
1129
  .default-mt-progress .mat-progress-bar {
1130
  height: 8px;
1131
- border-radius: 8px;
1132
- }
1133
-
1134
- .default-mt-progress .mat-progress-bar pattern circle {
1135
- fill: #e6defa;
1136
- }
1137
-
1138
  .default-mt-progress .example-section {
1139
- height: auto !important;
1140
- }
1141
-
1142
  .default-mt-progress .mat-progress-bar.mat-accent .mat-progress-bar-fill::after {
1143
- background-color: #8BC740;
1144
- }
1145
-
1146
  .default-mt-progress .mat-progress-bar.mat-accent .mat-progress-bar-background {
1147
- fill: #8BC740;
1148
- }
1149
-
1150
  .default-mt-progress .mat-progress-bar.mat-accent .mat-progress-bar-buffer {
1151
- background-color: #8BC740;
1152
- }
1153
 
1154
- .mat-accent .mat-slider-track-fill,
1155
- .mat-accent .mat-slider-thumb,
1156
- .mat-accent .mat-slider-thumb-label {
1157
- background-color: #8BC740;
1158
- }
1159
 
1160
  /* spinner */
1161
- .mat-progress-spinner.mat-accent circle,
1162
- .mat-spinner.mat-accent circle {
1163
- stroke: #8BC740;
1164
- }
1165
 
1166
- .mat-progress-spinner circle,
1167
- .mat-spinner circle {
1168
- stroke: #40189D;
1169
- }
1170
 
1171
  .default-mt-spinner .example-margin {
1172
- margin: 0 10px;
1173
- }
1174
 
1175
  /* select */
1176
  .default-mt-select .mat-form-field.mat-focused .mat-form-field-label {
1177
- color: #40189D;
1178
- }
1179
 
1180
  /* sidenav */
1181
  .default-mt-sidenav .example-container {
@@ -1183,228 +800,132 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
1183
  width: 100% !important;
1184
  height: 350px !important;
1185
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
1186
- border: 0 !important;
1187
- }
1188
-
1189
  .default-mt-sidenav .mat-drawer-content {
1190
- padding: 25px !important;
1191
- }
1192
 
1193
  /* slidetoggle */
1194
  .default-mt-slidetoggle .mat-slide-toggle.mat-primary.mat-checked .mat-slide-toggle-bar {
1195
- background-color: #e6defa;
1196
- }
1197
-
1198
  .default-mt-slidetoggle .mat-slide-toggle.mat-primary.mat-checked .mat-slide-toggle-thumb {
1199
- background-color: #40189D;
1200
- }
1201
-
1202
  .default-mt-slidetoggle .example-section {
1203
- height: auto !important;
1204
- }
1205
 
1206
  .mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
1207
- background-color: rgba(139, 199, 64, 0.5);
1208
- }
1209
 
1210
  .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
1211
- background-color: #8BC740;
1212
- }
1213
 
1214
  .mat-slide-toggle.mat-checked .mat-ripple-element {
1215
- background-color: #8BC740;
1216
- }
1217
 
1218
  /* slider */
1219
  .default-mt-slider .example-section {
1220
  display: block !important;
1221
- height: auto !important;
1222
- }
1223
 
1224
  /* sort */
1225
  /* stepper */
1226
  .default-mt-stepper .mat-step-header .mat-step-icon-selected,
1227
  .default-mt-stepper .mat-step-header .mat-step-icon-state-done,
1228
  .default-mt-stepper .mat-step-header .mat-step-icon-state-edit {
1229
- background-color: #40189D;
1230
- }
1231
-
1232
  @media only screen and (max-width: 575px) {
1233
  .default-mt-stepper .mat-horizontal-stepper-header-container {
1234
- display: block;
1235
- }
1236
-
1237
- .default-mt-stepper .mat-horizontal-stepper-header-container .mat-horizontal-stepper-header {
1238
- padding: 0;
1239
- height: 60px;
1240
- margin-bottom: 10px;
1241
- margin-top: 10px;
1242
- }
1243
-
1244
  .default-mt-stepper .mat-horizontal-content-container {
1245
- padding: 0;
1246
- }
1247
-
1248
- .default-mt-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,
1249
- .default-mt-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,
1250
- .default-mt-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,
1251
- .default-mt-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after {
1252
- content: none;
1253
- }
1254
-
1255
  .default-mt-stepper .mat-stepper-label-position-bottom .mat-stepper-horizontal-line {
1256
- top: 0;
1257
- }
1258
- }
1259
 
1260
  /* table */
1261
  .default-mt-table .mat-elevation-z8 {
1262
- box-shadow: none;
1263
- }
1264
-
1265
  .default-mt-table .table-responsive {
1266
  border-radius: 1.25rem;
1267
  position: relative;
1268
- z-index: 1;
1269
- }
1270
-
1271
  .default-mt-table .mat-header-cell {
1272
  color: #000;
1273
  padding: 0 10px;
1274
  font-size: 16px;
1275
- font-weight: 500;
1276
- }
1277
-
1278
  .default-mt-table .mat-footer-cell {
1279
- padding: 0 10px;
1280
- }
1281
-
1282
  .default-mt-table .mat-cell {
1283
- padding: 0 10px;
1284
- }
1285
-
1286
  .default-mt-table .example-element-diagram {
1287
  min-width: 100px !important;
1288
  font-weight: 400 !important;
1289
- height: 130px !important;
1290
- }
1291
-
1292
  .default-mt-table mat-row,
1293
  .default-mt-table mat-header-row,
1294
  .default-mt-table mat-footer-row,
1295
  .default-mt-table th.mat-header-cell,
1296
  .default-mt-table td.mat-cell,
1297
  .default-mt-table td.mat-footer-cell {
1298
- border-color: #EEEEEE;
1299
- }
1300
-
1301
  .default-mt-table .stickyColumns-table .mat-table-sticky {
1302
- background: #40189D !important;
1303
- }
1304
-
1305
- .default-mt-table .stickyColumns-table .mat-table-sticky .mat-header-cell {
1306
- color: #fff;
1307
- }
1308
-
1309
- .default-mt-table .stickyColumns-table .mat-table-sticky .mat-cell {
1310
- color: #fff;
1311
- }
1312
-
1313
- .default-mt-table .stickyColumns-table .mat-table-sticky .mat-footer-cell {
1314
- color: #fff;
1315
- }
1316
-
1317
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-left,
1318
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-right,
1319
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-bottom,
1320
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-top {
1321
  border-color: #fff;
1322
- color: #fff;
1323
- }
1324
-
1325
  .default-mt-table .stickyColumns-table .mat-column-filler {
1326
- font-size: 12px;
1327
- }
1328
-
1329
- .default-mt-table .stickyColumns-table mat-cell:first-of-type,
1330
- .default-mt-table .stickyColumns-table mat-header-cell:first-of-type,
1331
- .default-mt-table .stickyColumns-table mat-footer-cell:first-of-type {
1332
- padding-right: 10px;
1333
- }
1334
-
1335
- .default-mt-table .stickyColumns-table mat-cell:last-of-type,
1336
- .default-mt-table .stickyColumns-table mat-header-cell:last-of-type,
1337
- .default-mt-table .stickyColumns-table mat-footer-cell:last-of-type {
1338
- padding-left: 10px;
1339
- }
1340
-
1341
  .default-mt-table .stickyColumns-table .mat-header-cell,
1342
  .default-mt-table .stickyColumns-table .mat-footer-cell,
1343
  .default-mt-table .stickyColumns-table .mat-cell {
1344
- min-width: 100px !important;
1345
- }
1346
-
1347
  .default-mt-table .stickyColumns-table .mat-header-row,
1348
  .default-mt-table .stickyColumns-table .mat-footer-row,
1349
  .default-mt-table .stickyColumns-table .mat-row {
1350
- min-width: 2300px !important;
1351
- }
1352
 
1353
  /* tabs */
1354
- .default-mt-tabs .mat-tab-group.mat-primary .mat-ink-bar,
1355
- .default-mt-tabs .mat-tab-nav-bar.mat-primary .mat-ink-bar {
1356
- background-color: #40189D;
1357
- }
1358
-
1359
  .default-mt-tabs .mat-tab-body-content {
1360
- padding: 10px 15px;
1361
- }
1362
-
1363
- .default-mt-tabs .mat-tab-group.mat-background-primary>.mat-tab-header,
1364
- .default-mt-tabs .mat-tab-group.mat-background-primary>.mat-tab-link-container,
1365
- .default-mt-tabs .mat-tab-group.mat-background-primary>.mat-tab-header-pagination,
1366
- .default-mt-tabs .mat-tab-nav-bar.mat-background-primary>.mat-tab-header,
1367
- .default-mt-tabs .mat-tab-nav-bar.mat-background-primary>.mat-tab-link-container,
1368
- .default-mt-tabs .mat-tab-nav-bar.mat-background-primary>.mat-tab-header-pagination {
1369
- background-color: #40189D;
1370
- }
1371
-
1372
- .default-mt-tabs .mat-tab-group.mat-background-accent>.mat-tab-header,
1373
- .default-mt-tabs .mat-tab-group.mat-background-accent>.mat-tab-link-container,
1374
- .default-mt-tabs .mat-tab-group.mat-background-accent>.mat-tab-header-pagination,
1375
- .default-mt-tabs .mat-tab-nav-bar.mat-background-accent>.mat-tab-header,
1376
- .default-mt-tabs .mat-tab-nav-bar.mat-background-accent>.mat-tab-link-container,
1377
- .default-mt-tabs .mat-tab-nav-bar.mat-background-accent>.mat-tab-header-pagination {
1378
- background-color: #8BC740;
1379
- }
1380
-
1381
- .default-mt-tabs .mat-tab-group.mat-accent.mat-background-accent>.mat-tab-header .mat-ink-bar,
1382
- .default-mt-tabs .mat-tab-group.mat-accent.mat-background-accent>.mat-tab-link-container .mat-ink-bar,
1383
- .default-mt-tabs .mat-tab-nav-bar.mat-accent.mat-background-accent>.mat-tab-header .mat-ink-bar,
1384
- .default-mt-tabs .mat-tab-nav-bar.mat-accent.mat-background-accent>.mat-tab-link-container .mat-ink-bar {
1385
- background-color: #fff;
1386
- }
1387
-
1388
- .default-mt-tabs .mat-tab-group.mat-background-accent>.mat-tab-header .mat-tab-label,
1389
- .default-mt-tabs .mat-tab-group.mat-background-accent>.mat-tab-link-container .mat-tab-link,
1390
- .default-mt-tabs .mat-tab-nav-bar.mat-background-accent>.mat-tab-header .mat-tab-label,
1391
- .default-mt-tabs .mat-tab-nav-bar.mat-background-accent>.mat-tab-link-container .mat-tab-link {
1392
- color: rgba(255, 255, 255, 0.8);
1393
- }
1394
 
1395
  /* tree */
1396
  .default-mt-tree .mat-checkbox-layout {
1397
- margin: 0;
1398
- }
1399
-
1400
  .default-mt-tree .mat-tree {
1401
  background: rgba(0, 0, 0, 0.05);
1402
- overflow: auto;
1403
- }
1404
 
1405
  /* toolbar */
1406
  .default-mt-toolbar .mat-toolbar.mat-primary {
1407
- background: #40189D;
1408
- }
1409
 
1410
- /*# sourceMappingURL=dashboard.css.map */
 
14
  --rgba-primary-8: rgba(64, 24, 157, 0.8);
15
  --rgba-primary-9: rgba(64, 24, 157, 0.9);
16
  --font-family-base: Roboto, sans-serif;
17
+ --font-family-title: Roboto, sans-serif; }
 
18
 
19
  /*
20
  0 - 600: Phone
 
27
  Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Component
28
  */
29
  .event-chart {
30
+ margin: -10px 0px; }
 
31
 
32
  .default-select.style-1 {
33
  border: 0;
34
  font-size: 12px;
35
+ padding: 5px; }
36
+ .default-select.style-1 option {
37
+ background: #fff;
38
+ box-shadow: 0 10px 40px 0 rgba(32, 28, 69, 0.1); }
 
 
 
39
 
40
  .event-table {
41
+ border-radius: 1.25rem; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  .event-table thead th {
43
  color: #000;
44
+ font-size: 18px;
45
  white-space: nowrap;
46
  font-weight: 600;
47
+ padding: 20px 10px; }
 
48
  .event-table tbody td {
49
+ font-size: 14px;
50
+ padding: 20px 10px; }
51
+ @media only screen and (max-width: 1400px) {
52
+ .event-table thead th {
53
+ color: #000;
54
+ font-size: 15px;
55
+ white-space: nowrap;
56
+ font-weight: 600; }
57
+ .event-table tbody td {
58
+ padding: 12px 15px; } }
59
 
60
  .dropdown-no-icon .dropdown-toggle:after {
61
+ content: none; }
 
62
 
63
  .detault-daterange .dashboard-select.mat-form-field-appearance-fill .mat-form-field-flex {
64
+ padding: 0em 1em 0 1em; }
65
+ .detault-daterange .mat-form-field-prefix, .detault-daterange .mat-form-field-suffix {
66
+ top: 5px; }
 
 
 
 
67
 
68
  .dashboard-select {
69
+ font-size: 16px; }
70
+ .dashboard-select .mat-form-field-wrapper,
71
+ .dashboard-select .mat-form-field-appearance-fill .mat-form-field-flex {
72
+ padding: 0;
73
+ background: transparent; }
74
+ .dashboard-select .mat-form-field-underline {
75
+ display: none; }
76
+ .dashboard-select .mat-form-field-infix {
77
+ border: 0; }
78
+ .dashboard-select.mat-form-field-appearance-fill .mat-select-arrow-wrapper {
79
+ transform: translateY(-10%); }
80
+ .dashboard-select.mat-form-field-appearance-fill .mat-form-field-flex {
81
+ padding: 1em 1em 0 1em;
82
+ background-color: #fff; }
83
+ .dashboard-select.mat-form-field-appearance-fill .mat-form-field-infix {
84
+ padding: .25em 0 1em 0; }
85
+ .dashboard-select .mat-select-arrow, .dashboard-select .mat-select-value {
86
+ color: #40189D; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  .dashboard-select.style-1 {
88
+ font-size: 16px;
89
+ border: 1px solid #f0f1f5;
90
+ border-radius: 3rem; }
91
+ .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-infix {
92
+ padding: 6px 0 18px 0; }
93
+ .dashboard-select.style-1 .mat-form-field-infix {
94
+ padding: 15px 15px;
95
+ width: auto; }
96
+ .dashboard-select.style-1 .mat-select-value {
97
+ max-width: unset;
98
+ padding-right: 6px; }
99
+ .dashboard-select.style-1 .mat-select-arrow, .dashboard-select.style-1 .mat-select-value {
100
+ color: #000; }
101
+ .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-flex {
102
+ border-radius: 3rem;
103
+ background-color: #fff;
104
+ padding: 12px 20px 0; }
105
+ @media only screen and (max-width: 1400px) {
106
+ .dashboard-select.style-1 {
107
+ font-size: 0.813rem; }
108
+ .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-infix {
109
+ padding: 6px 0 12px 0; }
110
+ .dashboard-select.style-1 .mat-form-field-infix {
111
+ padding: 11px 15px;
112
+ width: auto; }
113
+ .dashboard-select.style-1.mat-form-field-appearance-fill .mat-form-field-flex {
114
+ padding: 8px 15px 0; } }
115
 
116
  .compose-content .dropzone {
117
  display: flex;
118
  align-items: center;
119
+ justify-content: center; }
 
120
 
121
  .latest-salebx {
122
+ height: 630px; }
123
+ @media only screen and (max-width: 1199px) {
124
+ .latest-salebx {
125
+ height: 350px; } }
 
 
 
 
126
 
127
  .about-company {
128
+ border-top: 1px solid #EEEEEE; }
129
+ @media only screen and (max-width: 1199px) {
130
+ .about-company {
131
+ border-top: 0;
132
+ border-left: 1px solid #EEEEEE; } }
133
+ @media only screen and (max-width: 767px) {
134
+ .about-company {
135
+ border-left: 0;
136
+ border-top: 1px solid #EEEEEE; } }
 
 
 
 
 
 
 
137
 
138
  .post-input .btn-social {
139
+ margin-right: 4px; }
 
140
 
141
  .rating-widget .ng-star-inserted {
142
  color: #40189D;
143
+ font-size: 30px; }
 
144
 
145
  .default-accordion {
146
  box-shadow: none;
147
  margin-bottom: 1.25rem;
148
  height: unset;
149
+ border-radius: 5px; }
150
+ .default-accordion .card-header {
151
+ padding: 0;
152
+ border: 0; }
153
+ .default-accordion .card-header button {
154
+ border-radius: 5px;
155
+ background: #40189D;
156
+ color: #fff;
157
+ display: block;
158
+ border: 0;
159
+ width: 100%;
160
+ text-align: left;
161
+ padding-right: 40px; }
162
+ .default-accordion .card-header button.collapsed {
163
+ background: rgba(64, 24, 157, 0.15);
164
+ color: #000; }
165
+ .default-accordion .card-header button.collapsed:after {
166
+ content: "\e61a"; }
167
+ .default-accordion .card-header button:focus {
168
+ box-shadow: none; }
169
+ .default-accordion .card-header button:after {
170
+ position: absolute;
171
+ font-family: 'themify';
172
+ top: 50%;
173
+ content: "\e622";
174
+ transform: translateY(-50%);
175
+ right: 20px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
176
 
177
  .custom-header-accordion {
178
  border: 1px solid #EEEEEE;
179
  box-shadow: none;
180
  margin-bottom: 0;
181
+ height: unset; }
182
+ .custom-header-accordion .card-header button:focus {
183
+ box-shadow: none; }
 
 
 
184
 
185
  .prevent-accordion {
186
  box-shadow: none;
187
  margin-bottom: 1.25rem;
188
  height: unset;
189
+ border-radius: 5px; }
190
+ .prevent-accordion .card-header {
191
+ padding: 0;
192
+ border: 0; }
193
+ .prevent-accordion .card-header button {
194
+ background: #40189D;
195
+ border-radius: 5px;
196
+ color: #fff;
197
+ display: block;
198
+ border: 0;
199
+ width: 100%;
200
+ text-align: left;
201
+ padding-right: 40px; }
202
+ .prevent-accordion .card-header button.collapsed {
203
+ background: rgba(64, 24, 157, 0.15);
204
+ color: #000; }
205
+ .prevent-accordion .card-header button.collapsed:after {
206
+ content: "\e61a"; }
207
+ .prevent-accordion .card-header button:focus {
208
+ box-shadow: none; }
209
+ .prevent-accordion .card-header button:after {
210
+ position: absolute;
211
+ font-family: 'themify';
212
+ top: 50%;
213
+ content: "\e622";
214
+ transform: translateY(-50%);
215
+ right: 20px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
216
 
217
  .default-nestable {
218
  /* .nestable-row{
 
220
  }
221
  .ngx-nestable{
222
  width:50%;
223
+ }*/ }
224
+ .default-nestable .dd-dragel .ngx-nestable-hidden,
225
+ .default-nestable .dd-dragel button {
226
+ visibility: hidden; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  .default-nestable .dd-list .dd-item .nestable-item-container {
228
+ background: #e6defa;
229
+ color: #000;
230
+ position: relative;
231
+ display: flex;
232
+ flex-direction: row;
233
+ align-items: center;
234
+ min-height: 32px;
235
+ font-size: 16px;
236
+ font-family: Roboto,sans-serif;
237
+ cursor: pointer;
238
+ outline: 0;
239
+ border-radius: 5px;
240
+ margin-bottom: 3px;
241
+ padding: 10px 10px;
242
+ -webkit-transition: all 0.5s;
243
+ -ms-transition: all 0.5s;
244
+ transition: all 0.5s; }
245
+ .default-nestable .dd-list .dd-item .nestable-item-container:hover {
246
+ background: #40189D;
247
+ color: #fff; }
248
+ .default-nestable .dd-list .dd-item .nestable-item-container:hover button {
249
+ color: #fff; }
250
+ .default-nestable .dd-list .dd-item .nestable-item-container button {
251
+ font-family: 'Material Icons';
252
+ font-weight: normal;
253
+ font-style: normal;
254
+ outline: 0;
255
+ border: 0;
256
+ font-size: 24px;
257
+ line-height: 1;
258
+ letter-spacing: normal;
259
+ text-transform: none;
260
+ margin-right: 10px;
261
+ background: transparent;
262
+ color: #000;
263
+ display: inline-block;
264
+ white-space: nowrap;
265
+ word-wrap: normal;
266
+ direction: ltr;
267
+ -webkit-font-feature-settings: 'liga';
268
+ -webkit-font-smoothing: antialiased; }
269
+ @media only screen and (max-width: 575px) {
270
+ .default-nestable .dd-list .dd-item .nestable-item-container {
271
+ padding: 0; } }
272
  .default-nestable .result-bx textarea {
273
+ height: 100%;
274
+ width: 100%; }
275
+ @media only screen and (max-width: 991px) {
276
+ .default-nestable .result-bx {
277
+ margin-top: 30px; }
278
+ .default-nestable .result-bx textarea {
279
+ height: 600px;
280
+ width: 100%; } }
281
 
282
  .alert-dismissible .close {
283
  height: 100%;
284
+ font-size: 30px; }
285
+ .alert-dismissible .close span {
286
+ font-weight: 400; }
 
 
 
287
 
288
  .calendar-responsive {
289
  overflow: auto;
290
+ display: block; }
 
291
 
292
  .default-calendar ngb-datepicker {
293
  border: 0;
294
+ background: #f3f3f3; }
 
 
295
  .default-calendar .form-group .input-group .form-control {
296
+ color: #000; }
 
 
297
  .default-calendar .form-group .input-group .input-group-append button {
298
  background-image: none !important;
299
  padding: 0px;
300
  border-color: #40189D;
301
  background: #40189D;
302
  width: 45px;
303
+ text-align: center; }
304
+ .default-calendar .form-group .input-group .input-group-append button:after {
305
+ color: #fff;
306
+ content: "\f133";
307
+ font-family: 'Line Awesome Free';
308
+ padding: 0;
309
+ font-size: 26px; }
310
+ .default-calendar .form-group .input-group .input-group-append button:hover {
311
+ background: #40189D; }
312
+ .default-calendar .form-group .input-group .input-group-append button:hover:after {
313
+ color: #fff; }
314
+ .default-calendar .form-group .input-group .input-group-append button:focus {
315
+ box-shadow: none; }
 
 
 
 
 
 
 
 
 
 
316
  .default-calendar .weekend {
317
+ background-color: #40189D; }
 
 
318
  .default-calendar .ngb-dp-header {
319
  background: #40189D;
320
+ padding: 8px 5px; }
321
+ .default-calendar .ngb-dp-header .ngb-dp-navigation-chevron {
322
+ border-color: #fff; }
323
+ .default-calendar .ngb-dp-header .custom-select {
324
+ color: #fff;
325
+ background: #40189D;
326
+ border-radius: 5px;
327
+ margin: 0 5px;
328
+ padding: 0 20px; }
 
 
 
 
 
 
329
  .default-calendar .ngb-dp-weekdays {
330
  border: 1px solid rgba(64, 24, 157, 0.25);
331
+ background: #fff; }
332
+ .default-calendar .ngb-dp-weekdays .ngb-dp-weekday {
333
+ color: #40189D;
334
+ font-weight: 600;
335
+ font-size: 15px;
336
+ font-style: unset; }
337
+ .default-calendar .ngb-dp-day, .default-calendar .ngb-dp-week-number, .default-calendar .ngb-dp-weekday {
 
 
 
 
 
 
338
  max-height: 40px;
339
  max-width: 40px;
340
  height: 40px;
341
  width: 35px;
342
+ line-height: 40px; }
 
 
343
  .default-calendar [ngbDatepickerDayView] {
344
  max-height: 40px;
345
  max-width: 40px;
346
  width: 35px;
347
  height: 40px;
348
+ line-height: 40px; }
349
+ .default-calendar [ngbDatepickerDayView]:active {
350
+ background-color: #40189D !important;
351
+ color: white !important; }
 
 
 
 
352
  .default-calendar .ngb-dp-navigation-select {
353
+ flex: unset; }
 
 
354
  .default-calendar .custom-day {
355
  height: 40px !important;
356
  line-height: 40px;
357
  padding: 0px !important;
358
+ width: 100% !important; }
359
+ .default-calendar .custom-day.range, .default-calendar .custom-day:hover {
 
 
 
360
  height: 40px;
361
+ background-color: #40189D !important; }
 
 
362
  .default-calendar .ngb-dp-month-name {
363
  padding: 8px 0px;
364
+ height: auto; }
 
365
 
366
  .dashboard-full-calendar.fc .fc-button-primary {
367
  background-color: #40189D;
368
  color: #fff;
369
+ border: 0; }
370
+ .dashboard-full-calendar.fc .fc-button-primary:hover, .dashboard-full-calendar.fc .fc-button-primary.fc-button-active, .dashboard-full-calendar.fc .fc-button-primary:active {
371
+ background-color: #1c0a45 !important; }
372
+ .dashboard-full-calendar.fc .fc-button-primary:focus {
373
+ box-shadow: none !important; }
374
+ .dashboard-full-calendar.fc-theme-standard td, .dashboard-full-calendar.fc-theme-standard th, .dashboard-full-calendar.fc-theme-standard .fc-scrollgrid, .dashboard-full-calendar.fc-theme-standard .fc-list {
375
+ border-color: #ECF0F3; }
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  .dashboard-full-calendar .fc-daygrid-day.fc-day-today {
377
+ background-color: #e6defa !important; }
 
 
378
  .dashboard-full-calendar .fc-daygrid-dot-event {
379
  background: #fff;
380
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); }
 
 
381
  .dashboard-full-calendar.fc-theme-standard th {
382
  padding: 0.75rem 0.5rem;
383
  font-size: 1rem;
384
+ font-weight: 500; }
385
+ .dashboard-full-calendar.fc-theme-standard th a {
386
+ color: #B5B5C3; }
387
+ .dashboard-full-calendar .fc-h-event, .dashboard-full-calendar .fc-v-event {
 
 
 
 
 
388
  background-color: #40189D;
389
+ border-color: #40189D; }
390
+ .dashboard-full-calendar .fc-daygrid-event-dot, .dashboard-full-calendar .fc-list-event-dot {
391
+ border-color: #40189D !important; }
 
 
 
 
 
392
  @media only screen and (max-width: 767px) {
393
  .dashboard-full-calendar.fc .fc-toolbar {
394
  display: block;
395
+ text-align: center; }
396
+ .dashboard-full-calendar.fc .fc-toolbar .fc-toolbar-title {
397
+ margin: 10px; } }
 
 
 
 
398
 
399
  .calendar-list {
400
+ margin-bottom: 10px; }
401
+ .calendar-list .list-group-item {
402
+ background: #f4f6fa;
403
+ color: #40189D;
404
+ border: 0;
405
+ margin-bottom: 5px;
406
+ border-radius: 6px;
407
+ position: relative;
408
+ border-left: 4px solid #40189D; }
 
 
 
409
 
410
  .calendar-checkbox {
411
  border-radius: 6px;
412
  background: #e6defa;
413
  padding: 10px 15px;
414
  margin-bottom: 5px;
415
+ color: #000; }
416
+ .calendar-checkbox label {
417
+ margin-bottom: 0; }
418
+ .calendar-checkbox input[type=checkbox], .calendar-checkbox input[type=radio] {
419
+ margin-right: 6px; }
 
 
 
 
 
 
420
 
421
  .calendar-description h2 {
422
  margin-top: 30px;
423
  font-size: 25px;
424
  font-weight: 600;
425
+ color: #000; }
 
 
426
  .calendar-description ul li {
427
  font-size: 15px;
428
+ color: #000; }
 
429
 
430
  .default-carousel .carousel-caption {
431
  background: rgba(0, 0, 0, 0.5);
432
  bottom: 45px;
433
+ padding: 15px 15px; }
434
+ .default-carousel .carousel-caption h3 {
435
+ color: #fff; }
436
+ @media only screen and (max-width: 575px) {
437
+ .default-carousel .carousel-caption {
438
+ width: 90%;
439
+ left: 50%;
440
+ transform: translatex(-50%); } }
 
 
 
 
 
 
 
441
  .default-carousel .carousel-indicators li {
442
  -webkit-transition: all 0.5s;
443
  -ms-transition: all 0.5s;
 
446
  width: 13px;
447
  border: 0;
448
  border-radius: 13px;
449
+ background: #40189D; }
450
+ .default-carousel .carousel-indicators li.active {
451
+ width: 30px; }
 
 
 
 
452
  @media only screen and (max-width: 575px) {
453
  .default-carousel .carousel-item img {
454
+ height: 280px; } }
 
 
455
 
456
  .default-rating span {
457
+ font-size: 35px; }
 
458
 
459
  .pagination-responsive {
460
+ overflow: auto; }
 
461
 
462
  .pagination .page-item .page-link span {
463
+ color: #B1B1B1; }
 
464
 
465
  .pagination .page-item .page-link:hover span {
466
+ color: #fff; }
 
467
 
468
  .progress {
469
+ height: 16px; }
 
470
 
471
  .form-select.mat-form-field {
472
+ display: block; }
 
 
473
  .form-select .mat-form-field-infix {
474
+ border-top: 0; }
 
 
475
  .form-select .mat-form-field-underline {
476
+ display: none; }
 
 
477
  .form-select.mat-form-field-appearance-fill .mat-form-field-flex {
478
  border-radius: 1.25rem;
479
  padding: 15px 15px 8px;
480
  background: transparent;
481
+ border: 1px solid #EEEEEE; }
 
 
482
  .form-select.mat-form-field-appearance-fill .mat-select-arrow-wrapper {
483
+ transform: translateY(0%); }
 
484
 
485
  /** Material Scsss start**/
486
  /* auto compelete */
 
505
  color:rgba($black,0.5);
506
  left: 15px;
507
  top: 30px;
508
+ } */ }
509
+ .default-autocomplete .mat-form-field {
510
+ width: 100%; }
511
+ .default-autocomplete .mat-form-field-appearance-legacy.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill + .mat-form-field-label-wrapper .mat-form-field-label,
512
+ .default-autocomplete .mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label, .default-autocomplete .mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server:focus + .mat-form-field-label-wrapper .mat-form-field-label {
513
+ /* transform: translateY(-2rem) scale(0.85) perspective(100px) translateZ(0.001px);
 
 
 
 
 
514
  -ms-transform: translateY(-2rem) scale(0.85); */
515
+ color: #40189D; }
516
+ .default-autocomplete .mat-form-field.mat-focused .mat-form-field-ripple {
517
+ background-color: #40189D; }
 
 
 
518
 
519
  /* badge */
520
  .mat-flat-button.mat-primary,
 
522
  .mat-fab.mat-primary,
523
  .mat-mini-fab.mat-primary,
524
  .mat-badge-content {
525
+ background-color: #40189D; }
 
526
 
527
  .mat-badge-accent .mat-badge-content {
528
  background: #8BC740;
529
+ color: #fff; }
 
530
 
531
  /* Bottom Sheet */
532
  .mat-bottom-sheet-container {
533
  max-height: 80vh;
534
+ overflow: auto; }
535
+ .mat-bottom-sheet-container ul li a {
536
+ padding: 15px 15px;
537
+ display: block; }
538
+ .mat-bottom-sheet-container ul li a:hover, .mat-bottom-sheet-container ul li a:focus {
539
+ background: rgba(0, 0, 0, 0.04); }
540
+ .mat-bottom-sheet-container ul li a span {
541
+ color: #000;
542
+ display: block;
543
+ font-size: 16px; }
544
+ .mat-bottom-sheet-container ul li a span:last-child {
545
+ font-size: 14px; }
 
 
 
 
 
 
 
 
 
 
546
 
547
  /* button */
548
  .default-mt-btn .mat-button.mat-primary,
549
  .default-mt-btn .mat-icon-button.mat-primary,
550
  .default-mt-btn .mat-stroked-button.mat-primary {
551
+ color: #40189D; }
 
 
552
  .default-mt-btn .example-label {
553
  font-size: 1rem !important;
554
+ color: #000; }
 
 
555
  .default-mt-btn .example-button-row {
556
+ width: auto !important; }
557
+ .default-mt-btn .example-button-row .mat-button-base {
558
+ margin: 15px 15px 15px 0 !important; }
 
 
 
 
559
  .default-mt-btn .mat-flat-button.mat-accent,
560
  .default-mt-btn .mat-raised-button.mat-accent,
561
  .default-mt-btn .mat-fab.mat-accent,
562
  .default-mt-btn .mat-mini-fab.mat-accent {
563
+ background-color: #8BC740; }
 
 
564
  .default-mt-btn .mat-flat-button.mat-accent,
565
  .default-mt-btn .mat-raised-button.mat-accent,
566
  .default-mt-btn .mat-fab.mat-accent,
567
  .default-mt-btn .mat-mini-fab.mat-accent {
568
+ color: #fff; }
 
 
569
  .default-mt-btn .mat-button.mat-accent,
570
  .default-mt-btn .mat-icon-button.mat-accent,
571
  .default-mt-btn .mat-stroked-button.mat-accent {
572
+ color: #8BC740; }
 
 
573
  .default-mt-btn .mat-button.mat-accent .mat-button-focus-overlay,
574
  .default-mt-btn .mat-icon-button.mat-accent .mat-button-focus-overlay,
575
  .default-mt-btn .mat-stroked-button.mat-accent .mat-button-focus-overlay {
576
+ background-color: #8BC740; }
 
 
577
  .default-mt-btn .mat-button,
578
  .default-mt-btn .mat-raised-button,
579
  .default-mt-btn .mat-stroked-button,
 
581
  padding: 0 25px;
582
  line-height: 55px;
583
  border-radius: 1.25rem;
584
+ font-size: 1rem; }
 
 
585
  @media only screen and (max-width: 1400px) {
586
  .default-mt-btn .example-button-row {
587
+ width: auto !important; }
588
+ .default-mt-btn .example-button-row .mat-button-base {
589
+ margin: 10px 10px 10px 0 !important; }
 
 
 
 
590
  .default-mt-btn .mat-button,
591
  .default-mt-btn .mat-raised-button,
592
  .default-mt-btn .mat-stroked-button,
593
  .default-mt-btn .mat-flat-button {
594
  padding: 0 15px;
595
  line-height: 40px;
596
+ font-size: 14px; } }
 
 
 
597
  @media only screen and (max-width: 575px) {
598
  .default-mt-btn .btn-list-group {
599
  display: block !important;
600
+ padding: 10px 0px; }
601
+ .default-mt-btn .btn-list-group .example-label {
602
+ display: block !important; }
 
 
 
 
603
  .default-mt-btn .example-button-row {
604
+ width: auto !important; }
605
+ .default-mt-btn .example-button-row .mat-button-base {
606
+ margin: 5px 10px 5px 0 !important; }
 
 
 
 
607
  .default-mt-btn .example-button-container {
608
+ width: 80px !important; } }
 
 
609
 
610
  /* card */
611
  .default-mt-card .mat-card {
612
+ border-radius: 1.25rem; }
 
613
 
614
  /* checkbox */
615
  .default-mt-checkbox .example-section {
616
+ margin: 0 !important; }
 
617
 
618
  .mat-checkbox-checked:not(.mat-checkbox-disabled).mat-primary .mat-ripple-element,
619
  .mat-checkbox:active:not(.mat-checkbox-disabled).mat-primary .mat-ripple-element {
620
+ background: #40189D; }
 
621
 
622
  .mat-checkbox-indeterminate.mat-primary .mat-checkbox-background,
623
  .mat-checkbox-checked.mat-primary .mat-checkbox-background {
624
+ background-color: #40189D; }
 
625
 
626
+ .mat-primary .mat-pseudo-checkbox-checked, .mat-primary .mat-pseudo-checkbox-indeterminate {
627
+ background: #40189D; }
 
 
628
 
629
  .mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
630
+ color: #40189D; }
 
631
 
632
  .mat-checkbox-indeterminate.mat-accent .mat-checkbox-background,
633
  .mat-checkbox-checked.mat-accent .mat-checkbox-background {
634
+ background-color: #8BC740; }
 
635
 
636
  .mat-checkbox-checked:not(.mat-checkbox-disabled).mat-accent .mat-ripple-element,
637
  .mat-checkbox:active:not(.mat-checkbox-disabled).mat-accent .mat-ripple-element {
638
+ background: #8BC740; }
 
639
 
640
  .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle {
641
+ border-color: #8BC740; }
 
642
 
643
  .mat-radio-button.mat-accent .mat-radio-inner-circle,
644
  .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),
 
648
  .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),
649
  .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-persistent-ripple,
650
  .mat-radio-button.mat-accent:active .mat-radio-persistent-ripple {
651
+ background-color: #8BC740; }
 
652
 
653
  .mat-pseudo-checkbox-checked,
654
  .mat-pseudo-checkbox-indeterminate,
655
  .mat-accent .mat-pseudo-checkbox-checked,
656
  .mat-accent .mat-pseudo-checkbox-indeterminate {
657
+ background: #8BC740; }
 
658
 
659
  /* chips */
660
  .default-mt-chips .mat-input-element {
661
+ color: rgba(0, 0, 0, 0.6); }
 
 
662
  .default-mt-chips .mat-chip.mat-standard-chip,
663
  .default-mt-chips .mat-chip.mat-standard-chip.mat-chip-selected.mat-primary {
664
  background-color: #40189D;
665
+ color: #fff; }
 
 
666
  .default-mt-chips .mat-form-field-appearance-legacy .mat-form-field-label,
667
  .default-mt-chips .mat-form-field-appearance-legacy .mat-hint,
668
  .default-mt-chips input.mat-chip-input::placeholder {
669
+ color: rgba(0, 0, 0, 0.54); }
 
 
670
  .default-mt-chips .mat-form-field.mat-focused .mat-form-field-label {
671
+ color: #40189D; }
 
 
672
  .default-mt-chips .mat-form-field.mat-focused .mat-form-field-ripple {
673
+ background-color: #40189D; }
 
 
674
  .default-mt-chips .mat-chip.mat-standard-chip .mat-chip-remove {
675
  opacity: 1;
676
+ color: rgba(255, 255, 255, 0.8); }
 
 
677
  .default-mt-chips .mat-form-field-appearance-legacy .mat-form-field-underline {
678
+ background-color: rgba(0, 0, 0, 0.42); }
 
 
679
  .default-mt-chips .mat-form-field-infix {
680
  width: 100%;
681
+ color: #fff; }
 
 
682
  .default-mt-chips .mat-chip.mat-standard-chip.mat-chip-selected.mat-accent {
683
  background-color: #8BC740;
684
+ color: #fff; }
 
685
 
686
  /* datepicker */
687
  .default-mt-datepicker .mat-form-field-appearance-fill .mat-form-field-flex {
688
+ background-color: rgba(64, 24, 157, 0.1); }
 
 
689
  .default-mt-datepicker .mat-form-field-label {
690
+ color: rgba(0, 0, 0, 0.6); }
 
 
691
  .default-mt-datepicker .mat-date-range-input-inner,
692
  .default-mt-datepicker .mat-calendar-body-cell-content,
693
  .default-mt-datepicker .mat-date-range-input-separator {
694
+ color: #000; }
 
 
695
  .default-mt-datepicker .mat-icon-button svg path {
696
+ fill: rgba(0, 0, 0, 0.7); }
 
 
697
  .default-mt-datepicker .mat-form-field.mat-focused .mat-form-field-ripple {
698
+ background: #40189D; }
 
 
699
  .default-mt-datepicker .mat-form-field.mat-focused .mat-form-field-label {
700
+ color: #40189D; }
 
 
701
  .default-mt-datepicker .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-label {
702
+ color: rgba(0, 0, 0, 0.5); }
 
 
703
  .default-mt-datepicker .mat-form-field-appearance-fill .mat-form-field-underline:before {
704
+ background-color: rgba(0, 0, 0, 0.42); }
 
 
705
  .default-mt-datepicker .mat-input-element:disabled,
706
  .default-mt-datepicker .mat-form-field-type-mat-native-select.mat-form-field-disabled .mat-form-field-infix::after {
707
+ color: #000; }
 
708
 
709
+ .mat-calendar-body-comparison-identical, .mat-calendar-body-in-comparison-range::before {
710
+ background: rgba(139, 199, 64, 0.2); }
 
 
711
 
712
  .mat-calendar-body-selected {
713
+ background-color: #40189D; }
 
714
 
715
  .mat-calendar-body-in-range::before {
716
+ background: rgba(64, 24, 157, 0.1); }
 
717
 
718
+ .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),
719
+ .cdk-keyboard-focused .mat-calendar-body-active > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical), .cdk-program-focused .mat-calendar-body-active > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical) {
720
+ background-color: rgba(64, 24, 157, 0.3); }
 
 
721
 
722
  .mat-datepicker-content-container .example-header button {
723
  height: 35px;
 
726
  border: 0;
727
  border-radius: 35px;
728
  font-size: 18px;
729
+ margin: 0 2px; }
 
730
 
731
  /* dialog */
732
  /* divider */
733
  /* expansion */
734
  .default-mt-expansion .mat-expansion-panel-header-description {
735
  justify-content: space-between;
736
+ align-items: center; }
 
 
737
  .default-mt-expansion .mat-accordion .mat-expansion-panel:first-of-type {
738
  border-top-right-radius: 1.25rem;
739
+ border-top-left-radius: 1.25rem; }
 
 
740
  .default-mt-expansion .mat-accordion .mat-expansion-panel:last-of-type {
741
  border-bottom-right-radius: 1.25rem;
742
+ border-bottom-left-radius: 1.25rem; }
 
 
743
  .default-mt-expansion .mat-expansion-panel-header {
744
  height: auto;
745
+ padding: 15px 20px !important; }
 
746
 
747
  /* form-field */
748
  .default-mt-formfield .mat-form-field {
749
+ width: 100%; }
 
 
750
  .default-mt-formfield .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick {
751
+ color: #40189D; }
752
+ .default-mt-formfield .example-container .mat-form-field + .mat-form-field {
753
+ margin-left: 0 !important; }
 
 
 
754
 
755
  /* input */
756
  .default-mt-input .example-form {
757
  width: 100% !important;
758
  min-width: 150px;
759
+ max-width: 100% !important; }
 
760
 
761
  /* progress */
762
  .default-mt-progress .mat-progress-bar-buffer {
763
+ background-color: #e6defa; }
 
 
764
  .default-mt-progress .mat-progress-bar-fill::after {
765
+ background-color: #40189D; }
 
 
766
  .default-mt-progress .mat-progress-bar {
767
  height: 8px;
768
+ border-radius: 8px; }
769
+ .default-mt-progress .mat-progress-bar pattern circle {
770
+ fill: #e6defa; }
 
 
 
 
771
  .default-mt-progress .example-section {
772
+ height: auto !important; }
 
 
773
  .default-mt-progress .mat-progress-bar.mat-accent .mat-progress-bar-fill::after {
774
+ background-color: #8BC740; }
 
 
775
  .default-mt-progress .mat-progress-bar.mat-accent .mat-progress-bar-background {
776
+ fill: #8BC740; }
 
 
777
  .default-mt-progress .mat-progress-bar.mat-accent .mat-progress-bar-buffer {
778
+ background-color: #8BC740; }
 
779
 
780
+ .mat-accent .mat-slider-track-fill, .mat-accent .mat-slider-thumb, .mat-accent .mat-slider-thumb-label {
781
+ background-color: #8BC740; }
 
 
 
782
 
783
  /* spinner */
784
+ .mat-progress-spinner.mat-accent circle, .mat-spinner.mat-accent circle {
785
+ stroke: #8BC740; }
 
 
786
 
787
+ .mat-progress-spinner circle, .mat-spinner circle {
788
+ stroke: #40189D; }
 
 
789
 
790
  .default-mt-spinner .example-margin {
791
+ margin: 0 10px; }
 
792
 
793
  /* select */
794
  .default-mt-select .mat-form-field.mat-focused .mat-form-field-label {
795
+ color: #40189D; }
 
796
 
797
  /* sidenav */
798
  .default-mt-sidenav .example-container {
 
800
  width: 100% !important;
801
  height: 350px !important;
802
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
803
+ border: 0 !important; }
 
 
804
  .default-mt-sidenav .mat-drawer-content {
805
+ padding: 25px !important; }
 
806
 
807
  /* slidetoggle */
808
  .default-mt-slidetoggle .mat-slide-toggle.mat-primary.mat-checked .mat-slide-toggle-bar {
809
+ background-color: #e6defa; }
 
 
810
  .default-mt-slidetoggle .mat-slide-toggle.mat-primary.mat-checked .mat-slide-toggle-thumb {
811
+ background-color: #40189D; }
 
 
812
  .default-mt-slidetoggle .example-section {
813
+ height: auto !important; }
 
814
 
815
  .mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
816
+ background-color: rgba(139, 199, 64, 0.5); }
 
817
 
818
  .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
819
+ background-color: #8BC740; }
 
820
 
821
  .mat-slide-toggle.mat-checked .mat-ripple-element {
822
+ background-color: #8BC740; }
 
823
 
824
  /* slider */
825
  .default-mt-slider .example-section {
826
  display: block !important;
827
+ height: auto !important; }
 
828
 
829
  /* sort */
830
  /* stepper */
831
  .default-mt-stepper .mat-step-header .mat-step-icon-selected,
832
  .default-mt-stepper .mat-step-header .mat-step-icon-state-done,
833
  .default-mt-stepper .mat-step-header .mat-step-icon-state-edit {
834
+ background-color: #40189D; }
 
 
835
  @media only screen and (max-width: 575px) {
836
  .default-mt-stepper .mat-horizontal-stepper-header-container {
837
+ display: block; }
838
+ .default-mt-stepper .mat-horizontal-stepper-header-container .mat-horizontal-stepper-header {
839
+ padding: 0;
840
+ height: 60px;
841
+ margin-bottom: 10px;
842
+ margin-top: 10px; }
 
 
 
 
843
  .default-mt-stepper .mat-horizontal-content-container {
844
+ padding: 0; }
845
+ .default-mt-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before, .default-mt-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before, .default-mt-stepper .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after, .default-mt-stepper [dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after {
846
+ content: none; }
 
 
 
 
 
 
 
847
  .default-mt-stepper .mat-stepper-label-position-bottom .mat-stepper-horizontal-line {
848
+ top: 0; } }
 
 
849
 
850
  /* table */
851
  .default-mt-table .mat-elevation-z8 {
852
+ box-shadow: none; }
 
 
853
  .default-mt-table .table-responsive {
854
  border-radius: 1.25rem;
855
  position: relative;
856
+ z-index: 1; }
 
 
857
  .default-mt-table .mat-header-cell {
858
  color: #000;
859
  padding: 0 10px;
860
  font-size: 16px;
861
+ font-weight: 500; }
 
 
862
  .default-mt-table .mat-footer-cell {
863
+ padding: 0 10px; }
 
 
864
  .default-mt-table .mat-cell {
865
+ padding: 0 10px; }
 
 
866
  .default-mt-table .example-element-diagram {
867
  min-width: 100px !important;
868
  font-weight: 400 !important;
869
+ height: 130px !important; }
 
 
870
  .default-mt-table mat-row,
871
  .default-mt-table mat-header-row,
872
  .default-mt-table mat-footer-row,
873
  .default-mt-table th.mat-header-cell,
874
  .default-mt-table td.mat-cell,
875
  .default-mt-table td.mat-footer-cell {
876
+ border-color: #EEEEEE; }
 
 
877
  .default-mt-table .stickyColumns-table .mat-table-sticky {
878
+ background: #40189D !important; }
879
+ .default-mt-table .stickyColumns-table .mat-table-sticky .mat-header-cell {
880
+ color: #fff; }
881
+ .default-mt-table .stickyColumns-table .mat-table-sticky .mat-cell {
882
+ color: #fff; }
883
+ .default-mt-table .stickyColumns-table .mat-table-sticky .mat-footer-cell {
884
+ color: #fff; }
 
 
 
 
 
 
 
 
885
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-left,
886
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-right,
887
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-bottom,
888
  .default-mt-table .stickyColumns-table .mat-table-sticky-border-elem-top {
889
  border-color: #fff;
890
+ color: #fff; }
 
 
891
  .default-mt-table .stickyColumns-table .mat-column-filler {
892
+ font-size: 12px; }
893
+ .default-mt-table .stickyColumns-table mat-cell:first-of-type, .default-mt-table .stickyColumns-table mat-header-cell:first-of-type, .default-mt-table .stickyColumns-table mat-footer-cell:first-of-type {
894
+ padding-right: 10px; }
895
+ .default-mt-table .stickyColumns-table mat-cell:last-of-type, .default-mt-table .stickyColumns-table mat-header-cell:last-of-type, .default-mt-table .stickyColumns-table mat-footer-cell:last-of-type {
896
+ padding-left: 10px; }
 
 
 
 
 
 
 
 
 
 
897
  .default-mt-table .stickyColumns-table .mat-header-cell,
898
  .default-mt-table .stickyColumns-table .mat-footer-cell,
899
  .default-mt-table .stickyColumns-table .mat-cell {
900
+ min-width: 100px !important; }
 
 
901
  .default-mt-table .stickyColumns-table .mat-header-row,
902
  .default-mt-table .stickyColumns-table .mat-footer-row,
903
  .default-mt-table .stickyColumns-table .mat-row {
904
+ min-width: 2300px !important; }
 
905
 
906
  /* tabs */
907
+ .default-mt-tabs .mat-tab-group.mat-primary .mat-ink-bar, .default-mt-tabs .mat-tab-nav-bar.mat-primary .mat-ink-bar {
908
+ background-color: #40189D; }
 
 
 
909
  .default-mt-tabs .mat-tab-body-content {
910
+ padding: 10px 15px; }
911
+ .default-mt-tabs .mat-tab-group.mat-background-primary > .mat-tab-header, .default-mt-tabs .mat-tab-group.mat-background-primary > .mat-tab-link-container, .default-mt-tabs .mat-tab-group.mat-background-primary > .mat-tab-header-pagination, .default-mt-tabs .mat-tab-nav-bar.mat-background-primary > .mat-tab-header, .default-mt-tabs .mat-tab-nav-bar.mat-background-primary > .mat-tab-link-container, .default-mt-tabs .mat-tab-nav-bar.mat-background-primary > .mat-tab-header-pagination {
912
+ background-color: #40189D; }
913
+ .default-mt-tabs .mat-tab-group.mat-background-accent > .mat-tab-header, .default-mt-tabs .mat-tab-group.mat-background-accent > .mat-tab-link-container, .default-mt-tabs .mat-tab-group.mat-background-accent > .mat-tab-header-pagination, .default-mt-tabs .mat-tab-nav-bar.mat-background-accent > .mat-tab-header, .default-mt-tabs .mat-tab-nav-bar.mat-background-accent > .mat-tab-link-container, .default-mt-tabs .mat-tab-nav-bar.mat-background-accent > .mat-tab-header-pagination {
914
+ background-color: #8BC740; }
915
+ .default-mt-tabs .mat-tab-group.mat-accent.mat-background-accent > .mat-tab-header .mat-ink-bar, .default-mt-tabs .mat-tab-group.mat-accent.mat-background-accent > .mat-tab-link-container .mat-ink-bar, .default-mt-tabs .mat-tab-nav-bar.mat-accent.mat-background-accent > .mat-tab-header .mat-ink-bar, .default-mt-tabs .mat-tab-nav-bar.mat-accent.mat-background-accent > .mat-tab-link-container .mat-ink-bar {
916
+ background-color: #fff; }
917
+ .default-mt-tabs .mat-tab-group.mat-background-accent > .mat-tab-header .mat-tab-label, .default-mt-tabs .mat-tab-group.mat-background-accent > .mat-tab-link-container .mat-tab-link, .default-mt-tabs .mat-tab-nav-bar.mat-background-accent > .mat-tab-header .mat-tab-label, .default-mt-tabs .mat-tab-nav-bar.mat-background-accent > .mat-tab-link-container .mat-tab-link {
918
+ color: rgba(255, 255, 255, 0.8); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
919
 
920
  /* tree */
921
  .default-mt-tree .mat-checkbox-layout {
922
+ margin: 0; }
 
 
923
  .default-mt-tree .mat-tree {
924
  background: rgba(0, 0, 0, 0.05);
925
+ overflow: auto; }
 
926
 
927
  /* toolbar */
928
  .default-mt-toolbar .mat-toolbar.mat-primary {
929
+ background: #40189D; }
 
930
 
931
+ /*# sourceMappingURL=dashboard.css.map */
static/css/dashboard1.css CHANGED
@@ -20,7 +20,7 @@
20
  .wrapper {
21
  flex: 1;
22
  padding: 10px;
23
- margin-left: 250px;
24
  /* Default sidebar width */
25
  transition: margin-left 0.3s ease;
26
  }
@@ -57,7 +57,6 @@
57
 
58
  .media-body {
59
  text-align: right;
60
- overflow: hidden;
61
  }
62
 
63
  .fs-30 {
@@ -69,22 +68,29 @@
69
  }
70
 
71
 
 
 
 
 
 
72
 
 
 
 
73
 
 
74
 
75
- @media screen and (max-width:1030px) {
76
- .wrapper {
77
- padding: 10px;
78
- margin-left: 0px;
79
  }
80
 
81
-
82
  .fs-30 {
83
- font-size: 1.3rem !important;
84
  }
85
-
86
  .fs-48 {
87
- font-size: 2rem !important;
88
  }
89
-
90
  }
 
20
  .wrapper {
21
  flex: 1;
22
  padding: 10px;
23
+ margin-left: 300px;
24
  /* Default sidebar width */
25
  transition: margin-left 0.3s ease;
26
  }
 
57
 
58
  .media-body {
59
  text-align: right;
 
60
  }
61
 
62
  .fs-30 {
 
68
  }
69
 
70
 
71
+ /* Responsive Styles */
72
+ @media (max-width: 992px) {
73
+ .wrapper {
74
+ margin-left: 200px;
75
+ }
76
 
77
+ .main-header {
78
+ padding: 15px;
79
+ }
80
 
81
+ }
82
 
83
+ @media (max-width: 768px) {
84
+ .feature-icon {
85
+ width: 40px;
86
+ height: 40px;
87
  }
88
 
 
89
  .fs-30 {
90
+ font-size: 1.5rem;
91
  }
92
+
93
  .fs-48 {
94
+ font-size: 2.5rem;
95
  }
 
96
  }
static/css/data_connectors.css CHANGED
@@ -2,7 +2,24 @@
2
  display: none;
3
  }
4
 
 
 
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  /* .container {
8
  margin-top: 50px;
@@ -18,23 +35,23 @@
18
 
19
  .form-group {
20
  margin-bottom: 20px;
 
21
  }
22
 
23
  .form-group label {
24
  font-weight: bold;
25
  margin-top: -10px;
26
- margin-left: -22px;
27
  display: block;
28
  }
29
 
30
  .form-group input,
31
  .form-group select,
32
  .form-group textarea {
33
- width: 100%;
34
- margin-left: -22px;
35
  padding: 2px;
36
  border: 1px solid #ccc;
37
- border-radius: 4px;
38
  }
39
 
40
  .btn-primary {
@@ -111,17 +128,28 @@
111
  }
112
 
113
  .custom-dropdown {
114
- width: 250px;
115
- /* Adjust the width as needed */
116
  }
117
 
118
  /* Ensure the new row aligns with the previous row */
119
  #schema-table-section {
 
 
 
 
 
 
 
120
 
121
- margin-left: -20px;
122
- /* Adjust this if you need spacing between rows */
123
- padding-top: 5px;
124
- /* Adjust padding if needed */
 
 
 
 
125
  }
126
 
127
  .alert {
@@ -154,60 +182,37 @@
154
  cursor: pointer;
155
  }
156
 
157
- .wrapper {
158
- margin-left: 100px;
159
- overflow: hidden;
160
- padding: 0% !important;
161
 
162
  }
163
 
164
- .main-header {
165
- width: 80%;
166
- margin-top: 100px;
167
- border: none;
168
-
169
-
170
-
171
  }
172
 
173
- @media screen and (max-width:990px) {
174
- .wrapper {
175
- margin-left: 0%;
176
- overflow: none;
177
- width: auto;
178
- z-index: 1;
179
-
180
- }
181
-
182
-
183
- .main-header {
184
- margin-top: 0%;
185
- width: 100%;
186
- padding: 10px;
187
- border: none;
188
- padding-left: 40px;
189
-
190
- }
191
-
192
-
193
- .form-group {
194
- margin-top: 5px;
195
- width: 100% !important;
196
- justify-content: center !important;
197
- column-gap: 50px;
198
-
199
- }
200
 
 
201
  }
202
 
203
- @media screen and (max-width:770px) {
204
- .form-group button {
205
-
206
- margin-bottom: 10px !important;
207
- margin-left: -40px;
208
- margin-right: 45px !important;
209
- width: 110%;
210
 
211
- }
 
 
 
212
 
213
- }
 
 
 
 
 
 
 
 
 
2
  display: none;
3
  }
4
 
5
+ html,
6
+ body {
7
 
8
+ display: flex;
9
+ flex-direction: column;
10
+
11
+ }
12
+
13
+
14
+
15
+ .main-content {
16
+ flex: 1;
17
+ display: inline-flex;
18
+ flex-direction: column;
19
+ align-items: center;
20
+ justify-content: flex-start;
21
+ padding: 30px;
22
+ }
23
 
24
  /* .container {
25
  margin-top: 50px;
 
35
 
36
  .form-group {
37
  margin-bottom: 20px;
38
+ margin-left: 100px;
39
  }
40
 
41
  .form-group label {
42
  font-weight: bold;
43
  margin-top: -10px;
 
44
  display: block;
45
  }
46
 
47
  .form-group input,
48
  .form-group select,
49
  .form-group textarea {
50
+ width: 150%;
51
+ margin-right: 10% !important;
52
  padding: 2px;
53
  border: 1px solid #ccc;
54
+
55
  }
56
 
57
  .btn-primary {
 
128
  }
129
 
130
  .custom-dropdown {
131
+ width: 300px;
132
+
133
  }
134
 
135
  /* Ensure the new row aligns with the previous row */
136
  #schema-table-section {
137
+ padding: 50px;
138
+ background-color: #fff;
139
+ border-radius: 8px;
140
+ box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px !important;
141
+ transition: box-shadow 0.3s ease;
142
+ width: 500px;
143
+ }
144
 
145
+
146
+
147
+
148
+ .wrapper {
149
+ display: flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ margin-left: -100px;
153
  }
154
 
155
  .alert {
 
182
  cursor: pointer;
183
  }
184
 
185
+ #tableschema option {
186
+ margin: 10px 5px;
 
 
187
 
188
  }
189
 
190
+ aside {
191
+ margin-top: 100px !important;
 
 
 
 
 
192
  }
193
 
194
+ .navbar {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
 
196
+ margin-left: 0px !important;
197
  }
198
 
199
+ ul {
200
+ display: flex !important;
201
+ row-gap: 20px !important;
202
+ margin-top: 40px !important;
203
+ }
 
 
204
 
205
+ i {
206
+ margin-top: 0px !important;
207
+ margin-right: 10px !important;
208
+ }
209
 
210
+ textarea {
211
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .1) !important;
212
+ width: 250px !important;
213
+ height: 170px !important;
214
+ background-color: white !important;
215
+ color: black !important;
216
+ padding: 10px !important;
217
+ line-height: 35px !important;
218
+ }
static/css/index.css CHANGED
@@ -6,8 +6,9 @@ body {
6
  background: #f6f5f7;
7
  flex-direction: column;
8
  font-family: 'Montserrat', sans-serif;
9
- height: 100vh;
10
- margin: 0;
 
11
 
12
  }
13
 
@@ -250,7 +251,7 @@ main{
250
  display: flex;
251
  align-items: center;
252
  justify-content: center;
253
- height: 90dvh;
254
  }
255
 
256
  /* Responsive Adjustments */
 
6
  background: #f6f5f7;
7
  flex-direction: column;
8
  font-family: 'Montserrat', sans-serif;
9
+ height: 100dvh;
10
+ display: flex;
11
+ justify-content: center;
12
 
13
  }
14
 
 
251
  display: flex;
252
  align-items: center;
253
  justify-content: center;
254
+ height: 100dvh;
255
  }
256
 
257
  /* Responsive Adjustments */
static/css/knowledgebase.css CHANGED
@@ -27,11 +27,7 @@ h1 {
27
  margin-bottom: 30px;
28
  }
29
 
30
- .card {
31
- padding: 0;
32
- margin-top: -15px;
33
- margin-left: -40px;
34
- }
35
 
36
  .table-responsive {
37
  width: 100%;
@@ -138,4 +134,24 @@ td:nth-child(8) {
138
  background: none;
139
  font-size: 16px;
140
  cursor: pointer;
141
- } */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  margin-bottom: 30px;
28
  }
29
 
30
+
 
 
 
 
31
 
32
  .table-responsive {
33
  width: 100%;
 
134
  background: none;
135
  font-size: 16px;
136
  cursor: pointer;
137
+ } */
138
+
139
+ aside {
140
+ margin-top: 100px !important;
141
+ }
142
+
143
+ .navbar {
144
+
145
+ margin-left: 0px !important;
146
+ }
147
+
148
+ ul {
149
+ display: flex !important;
150
+ row-gap: 20px !important;
151
+ margin-top: 40px !important;
152
+ }
153
+
154
+ i {
155
+ margin-top: 0px !important;
156
+ margin-right: 10px !important;
157
+ }
static/css/prompt_template.css CHANGED
@@ -4,12 +4,6 @@
4
  align-items: center;
5
  }
6
 
7
- .card {
8
- padding: 0;
9
- margin-top: -15px;
10
- margin-left: -40px;
11
- }
12
-
13
  .table-container {
14
  width: 100%;
15
  overflow-x: auto;
@@ -91,4 +85,22 @@ div.dataTables_wrapper div.dataTables_length select {
91
  display: inline-block;
92
  }
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
 
 
 
 
 
4
  align-items: center;
5
  }
6
 
 
 
 
 
 
 
7
  .table-container {
8
  width: 100%;
9
  overflow-x: auto;
 
85
  display: inline-block;
86
  }
87
 
88
+ aside {
89
+ margin-top: 100px !important;
90
+ }
91
+
92
+ .navbar {
93
+
94
+ margin-left: 0px !important;
95
+ }
96
+
97
+ ul {
98
+ display: flex !important;
99
+ row-gap: 20px !important;
100
+ margin-top: 40px !important;
101
+ }
102
 
103
+ i {
104
+ margin-top: 0px !important;
105
+ margin-right: 10px !important;
106
+ }
static/css/sidepane.css CHANGED
@@ -1,30 +1,41 @@
1
- .main-sidebar {
 
2
  background: #222;
 
3
  color: #fff;
4
  width: 250px;
5
- height: 100vh;
6
- overflow-y: auto;
7
  position: fixed;
8
- top: 0;
9
  left: 0;
10
- z-index: 10;
11
  transition: all 0.3s ease;
12
- padding-top: 150px;
13
  }
14
 
 
 
15
  .sidebar-header {
 
16
  padding: 15px;
17
  background: #333;
18
  color: #fff;
 
19
  margin-bottom: 15px;
20
- display: flex;
21
- align-items: center;
22
  }
23
 
24
- .sidebar-header .nav-icon {
25
- margin-right: 10px;
 
 
26
  }
27
 
 
 
 
 
 
 
28
  .nav-link {
29
  display: flex;
30
  align-items: center;
@@ -33,61 +44,69 @@
33
  border-radius: 5px;
34
  transition: background-color 0.3s ease;
35
  text-decoration: none;
36
- opacity: 0.5;
37
-
38
  }
39
 
40
  .nav-link:hover {
41
  background-color: #F8BE12;
 
 
42
  }
43
 
44
- .toggle-section {
45
- display: none;
46
- /* Initially hidden */
 
47
  }
48
 
49
- .nav-item a i {
50
- margin-right: 5px;
51
- margin-top: -10px;
52
  }
53
- #addnewcompany{
54
- margin-left: 25%;
55
- max-width: 800px;
56
 
57
- }
58
 
59
- @media screen and (max-width: 1030px) {
60
- .main-sidebar {
61
- display: none;
62
- }
63
 
64
- #add,
65
- #logout {
66
- font-size: 12px !important;
67
- }
68
- #addnewcompany{
69
- margin-left: 15px;
70
-
71
-
72
- }
73
 
74
 
 
 
 
 
 
 
 
 
75
  }
76
 
77
- @media screen and (max-width: 990px) {
78
 
79
- .logo {
 
 
80
  display: none;
 
 
81
  }
82
- }
83
 
84
- @media screen and (max-width: 530px) {
 
 
85
 
86
- .title {
87
- font-size: 18px;
88
  }
 
 
 
 
89
 
90
- #title {
91
- display: none;
92
  }
 
 
 
93
  }
 
1
+ /* Sidebar Styles */
2
+ .main-sidebar {
3
  background: #222;
4
+ /* Dark background for sidebar */
5
  color: #fff;
6
  width: 250px;
7
+ /* Default width */
8
+ height: 100dvh !important;
9
  position: fixed;
10
+ top: 20 !important;
11
  left: 0;
 
12
  transition: all 0.3s ease;
13
+ /* Ensure sidebar content scrolls if needed */
14
  }
15
 
16
+
17
+
18
  .sidebar-header {
19
+ text-align: start;
20
  padding: 15px;
21
  background: #333;
22
  color: #fff;
23
+ border-radius: 5px;
24
  margin-bottom: 15px;
 
 
25
  }
26
 
27
+
28
+ .sidebar-header i {
29
+ font-size: 1.5rem;
30
+ margin-top: 10px;
31
  }
32
 
33
+ .sidebar-header .menu-text {
34
+ font-size: 14px;
35
+ font-weight: bold;
36
+ }
37
+
38
+ /* Navigation Menu */
39
  .nav-link {
40
  display: flex;
41
  align-items: center;
 
44
  border-radius: 5px;
45
  transition: background-color 0.3s ease;
46
  text-decoration: none;
 
 
47
  }
48
 
49
  .nav-link:hover {
50
  background-color: #F8BE12;
51
+ /* Highlight color on hover */
52
+ color: #fff;
53
  }
54
 
55
+ .menu-text {
56
+ margin-left: 10px;
57
+ font-weight: bold;
58
+ color: #fff;
59
  }
60
 
61
+ /* Sidebar Icon Sizes */
62
+ .nav-icon {
63
+ font-size: 20px;
64
  }
 
 
 
65
 
 
66
 
 
 
 
 
67
 
68
+ /* Content Wrapper */
69
+ #content-wrapper {
70
+ margin-left: 250px;
71
+ padding: 15px;
72
+ height: 700px !important;
73
+ transition: margin-left 0.3s ease;
74
+ }
 
 
75
 
76
 
77
+ ul {
78
+ display: flex;
79
+ row-gap: 10px;
80
+ margin-top: 40px;
81
+ }
82
+ i{
83
+ margin-top: -15px;
84
+ margin-right: 10px;
85
  }
86
 
 
87
 
88
+ /* Responsive Design */
89
+ @media (max-width: 991px) {
90
+ .main-sidebar {
91
  display: none;
92
+ z-index: 100 !important;
93
+
94
  }
 
95
 
96
+ #content-wrapper {
97
+ margin-left: 60px;
98
+ }
99
 
100
+ #sidebarToggle{
101
+ display: block !important;
102
  }
103
+ .main-header{
104
+ margin-left: -210px;
105
+ z-index: 0;
106
+ width: auto;
107
 
 
 
108
  }
109
+
110
+
111
+
112
  }
static/css/style.css CHANGED
The diff for this file is too large to render. See raw diff
 
static/img/Brain.png ADDED
templates/API_connectors.html CHANGED
@@ -12,8 +12,7 @@
12
  <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
13
  <script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
15
- <link rel="stylesheet" href="/static/css/API_connectors.css">
16
-
17
  </head>
18
 
19
  <body>
@@ -25,7 +24,7 @@
25
  <div class="content-header">
26
  <div class="container-fluid">
27
  <div class="container mt-2">
28
- <div class="form-group left-align" id="company-select">
29
  <h4 id="selectedCompany" style="margin-left: 300px;"></h4>
30
 
31
  <!-- <div class="col-12 d-flex justify-content-end mb-3">
@@ -47,7 +46,7 @@
47
  <input type="hidden" id="company_id" name="company_id" class="form-control" required>
48
  </div>
49
  </div>
50
-
51
 
52
  <!-- Main content -->
53
  <section class="content">
@@ -186,22 +185,22 @@
186
  // });
187
 
188
  });
189
- var table = $('#apiTable').DataTable();
190
- const role = sessionStorage.getItem('userRole');
191
- console.log('Current role:', role); // Debug statement to check the role
192
- const company_name = sessionStorage.getItem('company_name');
193
- console.log("company_name", company_name);
194
- // document.getElementById('company_name').textContent = company_name;
195
- const passedCompanyName = sessionStorage.getItem('company_name')
196
- document.getElementById('selectedCompany').innerText = `Company Name: ${passedCompanyName}`;
197
- const company_id = sessionStorage.getItem('company_id');
198
- document.getElementById("company_id").value = company_id;
199
-
200
- data_get_from_db(company_id);
201
 
 
202
 
203
- const companySelect = document.getElementById('company');
204
- const documentForm = document.getElementById('documentForm');
 
205
 
206
 
207
  function moveToNextInput(inputs, currentIndex) {
@@ -215,20 +214,20 @@
215
  }
216
 
217
 
218
- function displayErrorMessage(message) {
219
- const messageContainer = document.getElementById('message-container');
220
- if (messageContainer) {
221
- messageContainer.innerHTML = `<div class='alert alert-danger'>${message}</div>`;
 
222
  }
223
- }
224
-
225
 
 
226
 
227
 
228
  async function data_get_from_db(companyId) {
229
  if (companyId) {
230
  try {
231
- console.log('comp_id', companyId)
232
  const Response = await fetch(`/api/get_api_connectors?company_id=${companyId}`);
233
  console.log("responce from api :==> ", Response)
234
  const connectorsResponse = await Response.json();
@@ -275,65 +274,67 @@
275
  var companyId = $(button).data('kid-id');
276
  const modalTitle = document.getElementById('addModalLabel');
277
  modalTitle.textContent = 'View API Details';
278
- if (companyId) {
279
- $.getJSON(`/api/viewapiconnectors/${companyId}`, function (company) {
280
-
281
- $('#APIName').val(company.api_name).attr('readonly', 'readonly');
282
- $('#APIEndpoint').val(company.api_endpoint).attr('readonly', 'readonly');
283
- $('#Auth_Bearer').val(company.auth_token).attr('readonly', 'readonly');
284
- $('#Inputjson').val(company.input_param).attr('readonly', 'readonly');
285
- $('#OutputJson').val(company.output_json).attr('readonly', 'readonly');
286
- $('#Description').val(company.description).attr('readonly', 'readonly');
287
- $('#save').hide();
288
- $('#saveupdate').hide();
289
- $('#addModal').modal('show');
290
- }).fail(function () {
291
- alert("Error retrieving API details.");
292
- });
293
- }
294
  }
 
295
  // Edit knowledge base details
296
  function editCompany(button) {
297
  var companyId = $(button).data('kid-id');
298
  const modalTitle = document.getElementById('addModalLabel');
299
  modalTitle.textContent = 'Edit API Details';
300
- if (companyId) {
301
- // Fetch company details by ID
302
- $.getJSON(`/api/viewapiconnectors/${companyId}`, function (company) {
303
-
304
- $('#APIName').val(company.api_name);
305
- $('#APIEndpoint').val(company.api_endpoint);
306
- $('#Auth_Bearer').val(company.auth_token);
307
- $('#Inputjson').val(company.input_param);
308
- $('#OutputJson').val(company.output_json);
309
- $('#Description').val(company.description);
310
-
311
- // Show/hide appropriate elements
312
- $('#uploadFile').show(); // Hide the file upload field
313
- $('#save').hide(); // Hide the default save button
314
- $('#saveupdate').show(); // Show the update button
315
-
316
- // Ensure fields are editable
317
- $('#APIName').removeAttr('readonly');
318
- $('#APIEndpoint').removeAttr('readonly');
319
- $('#Auth_Bearer').removeAttr('readonly');
320
- $('#Inputjson').removeAttr('readonly');
321
- $('#OutputJson').removeAttr('readonly');
322
- $('#Description').removeAttr('readonly');
323
-
324
-
325
- // Show the modal
326
- $('#addModal').modal('show');
327
-
328
- // Set up the click event for the update button
329
- $('#saveupdate').off('click').on('click', function () {
330
- saveupdate(companyId); // Pass the company ID for updating
331
- });
332
- }).fail(function () {
333
- alert("Error in retrieving API details.");
334
  });
335
- }
 
 
336
  }
 
337
 
338
  function saveupdate(companyId, filename) {
339
  const formData = new FormData();
@@ -516,7 +517,7 @@
516
  document.getElementById('Description').value = "";
517
  }
518
 
519
-
520
  </script>
521
  </body>
522
 
 
12
  <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
13
  <script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
15
+ <link rel="stylesheet" href="/static/css/API_Connectors.css">
 
16
  </head>
17
 
18
  <body>
 
24
  <div class="content-header">
25
  <div class="container-fluid">
26
  <div class="container mt-2">
27
+ <div class="form-group left-align"id="company-select">
28
  <h4 id="selectedCompany" style="margin-left: 300px;"></h4>
29
 
30
  <!-- <div class="col-12 d-flex justify-content-end mb-3">
 
46
  <input type="hidden" id="company_id" name="company_id" class="form-control" required>
47
  </div>
48
  </div>
49
+
50
 
51
  <!-- Main content -->
52
  <section class="content">
 
185
  // });
186
 
187
  });
188
+ var table = $('#apiTable').DataTable();
189
+ const role = sessionStorage.getItem('userRole');
190
+ console.log('Current role:', role); // Debug statement to check the role
191
+ const company_name=sessionStorage.getItem('company_name');
192
+ console.log("company_name",company_name);
193
+ // document.getElementById('company_name').textContent = company_name;
194
+ const passedCompanyName = sessionStorage.getItem('company_name')
195
+ document.getElementById('selectedCompany').innerText = `Company Name: ${passedCompanyName}`;
196
+ const company_id = sessionStorage.getItem('company_id');
197
+ document.getElementById("company_id").value = company_id;
 
 
198
 
199
+ data_get_from_db(company_id);
200
 
201
+
202
+ const companySelect = document.getElementById('company');
203
+ const documentForm = document.getElementById('documentForm');
204
 
205
 
206
  function moveToNextInput(inputs, currentIndex) {
 
214
  }
215
 
216
 
217
+ function displayErrorMessage(message) {
218
+ const messageContainer = document.getElementById('message-container');
219
+ if (messageContainer) {
220
+ messageContainer.innerHTML = `<div class='alert alert-danger'>${message}</div>`;
221
+ }
222
  }
 
 
223
 
224
+
225
 
226
 
227
  async function data_get_from_db(companyId) {
228
  if (companyId) {
229
  try {
230
+ console.log('comp_id',companyId)
231
  const Response = await fetch(`/api/get_api_connectors?company_id=${companyId}`);
232
  console.log("responce from api :==> ", Response)
233
  const connectorsResponse = await Response.json();
 
274
  var companyId = $(button).data('kid-id');
275
  const modalTitle = document.getElementById('addModalLabel');
276
  modalTitle.textContent = 'View API Details';
277
+ if(companyId)
278
+ {
279
+ $.getJSON(`/api/viewapiconnectors/${companyId}`, function (company) {
280
+
281
+ $('#APIName').val(company.api_name).attr('readonly', 'readonly');
282
+ $('#APIEndpoint').val(company.api_endpoint).attr('readonly', 'readonly');
283
+ $('#Auth_Bearer').val(company.auth_token).attr('readonly', 'readonly');
284
+ $('#Inputjson').val(company.input_param).attr('readonly', 'readonly');
285
+ $('#OutputJson').val(company.output_json).attr('readonly', 'readonly');
286
+ $('#Description').val(company.description).attr('readonly', 'readonly');
287
+ $('#save').hide();
288
+ $('#saveupdate').hide();
289
+ $('#addModal').modal('show');
290
+ }).fail(function () {
291
+ alert("Error retrieving API details.");
292
+ });
293
  }
294
+ }
295
  // Edit knowledge base details
296
  function editCompany(button) {
297
  var companyId = $(button).data('kid-id');
298
  const modalTitle = document.getElementById('addModalLabel');
299
  modalTitle.textContent = 'Edit API Details';
300
+ if(companyId)
301
+ {
302
+ // Fetch company details by ID
303
+ $.getJSON(`/api/viewapiconnectors/${companyId}`, function (company) {
304
+
305
+ $('#APIName').val(company.api_name);
306
+ $('#APIEndpoint').val(company.api_endpoint);
307
+ $('#Auth_Bearer').val(company.auth_token);
308
+ $('#Inputjson').val(company.input_param);
309
+ $('#OutputJson').val(company.output_json);
310
+ $('#Description').val(company.description);
311
+
312
+ // Show/hide appropriate elements
313
+ $('#uploadFile').show(); // Hide the file upload field
314
+ $('#save').hide(); // Hide the default save button
315
+ $('#saveupdate').show(); // Show the update button
316
+
317
+ // Ensure fields are editable
318
+ $('#APIName').removeAttr('readonly');
319
+ $('#APIEndpoint').removeAttr('readonly');
320
+ $('#Auth_Bearer').removeAttr('readonly');
321
+ $('#Inputjson').removeAttr('readonly');
322
+ $('#OutputJson').removeAttr('readonly');
323
+ $('#Description').removeAttr('readonly');
324
+
325
+
326
+ // Show the modal
327
+ $('#addModal').modal('show');
328
+
329
+ // Set up the click event for the update button
330
+ $('#saveupdate').off('click').on('click', function () {
331
+ saveupdate(companyId); // Pass the company ID for updating
 
 
332
  });
333
+ }).fail(function () {
334
+ alert("Error in retrieving API details.");
335
+ });
336
  }
337
+ }
338
 
339
  function saveupdate(companyId, filename) {
340
  const formData = new FormData();
 
517
  document.getElementById('Description').value = "";
518
  }
519
 
520
+
521
  </script>
522
  </body>
523
 
templates/chatbot.html CHANGED
@@ -1,84 +1,81 @@
1
  # jinja2 html page with chatbot functionality using adminlte3 theme
2
  <html>
3
-
4
- <body>
5
- <form id="myform">
6
- <div class="content-wrapper">
7
- <section class="content-header">
8
- <div class="container-fluid">
9
- <div class="row mb-2">
10
- <div class="col-sm-6">
11
- <h1>Chatbot</h1>
12
- </div>
13
- <div class="col-sm-6">
14
- <ol class="breadcrumb float-sm-right">
15
- <li class="breadcrumb-item"><a href="#">Home</a></li>
16
- <li class="breadcrumb-item active">Chatbot</li>
17
- </ol>
18
- </div>
19
- </div>
20
  </div>
21
- </section>
 
 
 
 
 
 
 
 
22
 
23
- <section class="content">
24
- <div class="container-fluid">
25
- <div class="row">
26
- <div class="col-md-8 offset-md-2">
27
- <div class="card card-primary">
28
- <div class="card-header">
29
- <h3 class="card-title">Chat with our AI</h3>
 
 
 
 
 
30
  </div>
31
- <div class="card-body">
32
- <div id="chat-container">
33
- <div class="chat-messages">
34
- <!-- Chat messages will be dynamically added here -->
35
- </div>
36
- <div class="chat-input">
37
- <input type="text" id="user_question" placeholder="Type your message...">
38
- <button id="send-button" onclick="clickform()">Send</button>
39
- </div>
40
- </div>
41
  </div>
42
  </div>
43
  </div>
44
  </div>
45
  </div>
46
- </section>
47
  </div>
48
- </form>
49
- <script>
50
- const chatContainer = document.getElementById('chat-container');
51
- const userInput = document.getElementById('user_question');
52
- const sendButton = document.getElementById('send-button');
53
-
54
- function clickform() {
55
- alert('Please enter');
56
- var formElement = document.getElementById('myForm');
57
- var user_question = document.getElementById('user_question').value;
58
- alert(user_question);
59
- //var data = new FormData(formElement);
60
- //alert(data);
61
- fetch('/chat_with_agent', {
62
- method: 'POST',
63
- //body: data,
64
- })
65
- .then(resp => resp.text()) // or, resp.json(), etc.
66
- .then(data => {
67
- //document.getElementById("responseArea").innerHTML = data;
68
- alert(data);
69
- const chatMessage = document.createElement('div');
70
- chatMessage.classList.add('chat-message');
71
- chatMessage.innerHTML = '<strong>You:</strong> ${user_question}<br><strong>AI:</strong> ${data}';
72
- chatContainer.appendChild(chatMessage);
73
 
74
- userInput.value = '';
75
- userInput.focus();
76
- })
77
- .catch(error => {
78
- console.error(error);
79
- });
80
- }
81
- </script>
82
- </body>
 
 
 
 
 
 
 
 
 
 
83
 
84
- </html>
 
 
 
 
 
 
 
 
 
1
  # jinja2 html page with chatbot functionality using adminlte3 theme
2
  <html>
3
+ <body>
4
+ <form id="myform">
5
+ <div class="content-wrapper">
6
+ <section class="content-header">
7
+ <div class="container-fluid">
8
+ <div class="row mb-2">
9
+ <div class="col-sm-6">
10
+ <h1>Chatbot</h1>
 
 
 
 
 
 
 
 
 
11
  </div>
12
+ <div class="col-sm-6">
13
+ <ol class="breadcrumb float-sm-right">
14
+ <li class="breadcrumb-item"><a href="#">Home</a></li>
15
+ <li class="breadcrumb-item active">Chatbot</li>
16
+ </ol>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </section>
21
 
22
+ <section class="content">
23
+ <div class="container-fluid">
24
+ <div class="row">
25
+ <div class="col-md-8 offset-md-2">
26
+ <div class="card card-primary">
27
+ <div class="card-header">
28
+ <h3 class="card-title">Chat with our AI</h3>
29
+ </div>
30
+ <div class="card-body">
31
+ <div id="chat-container">
32
+ <div class="chat-messages">
33
+ <!-- Chat messages will be dynamically added here -->
34
  </div>
35
+ <div class="chat-input">
36
+ <input type="text" id="user_question" placeholder="Type your message...">
37
+ <button id="send-button" onclick="clickform()">Send</button>
 
 
 
 
 
 
 
38
  </div>
39
  </div>
40
  </div>
41
  </div>
42
  </div>
43
+ </div>
44
  </div>
45
+ </section>
46
+ </div>
47
+ </form>
48
+ <script>
49
+ const chatContainer = document.getElementById('chat-container');
50
+ const userInput = document.getElementById('user_question');
51
+ const sendButton = document.getElementById('send-button');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
+ function clickform() {
54
+ alert('Please enter');
55
+ var formElement = document.getElementById('myForm');
56
+ var user_question = document.getElementById('user_question').value;
57
+ alert(user_question);
58
+ //var data = new FormData(formElement);
59
+ //alert(data);
60
+ fetch('/chat_with_agent', {
61
+ method: 'POST',
62
+ //body: data,
63
+ })
64
+ .then(resp => resp.text()) // or, resp.json(), etc.
65
+ .then(data => {
66
+ //document.getElementById("responseArea").innerHTML = data;
67
+ alert(data);
68
+ const chatMessage = document.createElement('div');
69
+ chatMessage.classList.add('chat-message');
70
+ chatMessage.innerHTML = '<strong>You:</strong> ${user_question}<br><strong>AI:</strong> ${data}';
71
+ chatContainer.appendChild(chatMessage);
72
 
73
+ userInput.value = '';
74
+ userInput.focus();
75
+ })
76
+ .catch(error => {
77
+ console.error(error);
78
+ });
79
+ }
80
+ </script>
81
+ </body></html>
templates/company_profile.html CHANGED
@@ -14,8 +14,9 @@
14
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
15
  <link href="https://cdn.jsdelivr.net/npm/@ttskch/[email protected]/dist/select2-bootstrap4.min.css"
16
  rel="stylesheet" />
 
17
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
18
- <link rel="stylesheet" href="/static/css/company_profile.css">
19
  </head>
20
 
21
  <body>
 
14
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
15
  <link href="https://cdn.jsdelivr.net/npm/@ttskch/[email protected]/dist/select2-bootstrap4.min.css"
16
  rel="stylesheet" />
17
+ <link rel="stylesheet" href="/static/css/Company_Profile.css">
18
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
19
+
20
  </head>
21
 
22
  <body>
templates/dashboard.html CHANGED
@@ -10,10 +10,7 @@
10
  <link rel="stylesheet" type="text/css" href="../static/css/style.css" />
11
  <link rel="stylesheet" type="text/css" href="../static/css/dashboard.css" />
12
  <link rel="stylesheet" type="text/css" href="../static/css/perfect-scrollbar.css" />
13
- <link rel="stylesheet" href="/static/css/dashboard1.css">
14
- <style>
15
-
16
- </style>
17
  </head>
18
 
19
  <body>
@@ -118,14 +115,14 @@
118
  <script>
119
  document.getElementById("add").style.display = "none";
120
 
121
- function updateCompanyName(newCompanyName) {
122
- sessionStorage.setItem('company_name', newCompanyName);
123
- document.getElementById('selectedCompany').innerText = `Company name: ${newCompanyName}`;
124
- const sidePaneCompanyName = document.querySelector('.sidebar .company-name');
125
- if (sidePaneCompanyName) {
126
- sidePaneCompanyName.innerText = newCompanyName;
127
- }
128
- }
129
  function updateSidepane(companyName) {
130
  const sidepaneCompanyElement = document.getElementById('selectedCompany');
131
  if (sidepaneCompanyElement) {
 
10
  <link rel="stylesheet" type="text/css" href="../static/css/style.css" />
11
  <link rel="stylesheet" type="text/css" href="../static/css/dashboard.css" />
12
  <link rel="stylesheet" type="text/css" href="../static/css/perfect-scrollbar.css" />
13
+ <link rel="stylesheet" href="/static/css/Dashboard1.css">
 
 
 
14
  </head>
15
 
16
  <body>
 
115
  <script>
116
  document.getElementById("add").style.display = "none";
117
 
118
+ // function updateCompanyName(newCompanyName) {
119
+ // sessionStorage.setItem('company_name', newCompanyName);
120
+ // document.getElementById('selectedCompany').innerText = `Company name: ${newCompanyName}`;
121
+ // const sidePaneCompanyName = document.querySelector('.sidebar .company-name');
122
+ // if (sidePaneCompanyName) {
123
+ // sidePaneCompanyName.innerText = newCompanyName;
124
+ // }
125
+ // }
126
  function updateSidepane(companyName) {
127
  const sidepaneCompanyElement = document.getElementById('selectedCompany');
128
  if (sidepaneCompanyElement) {
templates/data_connectors.html CHANGED
@@ -7,98 +7,137 @@
7
  <title>Data Connectors</title>
8
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
 
10
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/adminlte.min.css">
11
  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap4.min.css">
12
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
13
- <link rel="stylesheet" href="/static/css/data_connectors.css">
 
 
14
  </head>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- <body>
17
 
 
18
  {% include 'sidepane.html' %}
19
- <div class="wrapper" style="z-index: 1;">
20
- <div class="main-header">
21
  <!-- Content Header (Page header) -->
22
- <!-- <div class="content-header">
23
  <div class="container-fluid">
24
- <div class="container mt-2"> -->
25
- <!-- <div class="form-group left-align">
26
  <label for="company" class="mr-1" style="margin-left:-60px;margin-top:-1px;">Company Name <span class="text-danger">*</span></label>
27
  <select type="text" id="company" name="company" class="form-control "style="width: 20%;margin-left:-60px;margin-bottom:-35px" required>
28
  <option value="" selected>Select</option>
29
  </select>
30
  </div> -->
31
- <!-- <div class="row">
32
  <div id="message-container"
33
  style="padding:10px 10px;margin-left: 150px;width:500px;margin-bottom:-20px; margin-top: -30px;">
34
  </div>
35
  </div>
36
  </div>
37
  </div>
38
- </div> -->
39
 
40
  <form id="databaseconnectorForm" class="needs-validation" novalidate action="/save_data_connectors"
41
  method="post">
42
- <div class="form-group">
43
- <!-- <label for="company_id">company_id</label>--->
44
- <input type="hidden" id="company_id" name="company_id" class="form-control" required>
45
- </div>
46
- <h4 id="selectedCompany" style="margin-left: 300px;margin-bottom: 50px;margin-top: -50px;"></h4>
47
- <div class="row">
48
- <div class="col-md-3">
49
- <div class="form-group">
50
- <label for="database">Database Type<span class="text-danger">*</span></label>
51
- <select type="text" id="database" name="database" class="form-control" required>
52
- <option value="" selected>Select</option>
53
- <option value="Postgres">Postgres</option>
54
- <option value="mysql">mysql</option>
55
- </select>
56
- </div>
57
  </div>
58
- <div class="col-md-3">
59
- <div class="form-group">
60
- <label for="server">Server IP <span class="text-danger">*</span></label>
61
- <input type="text" id="server" name="server" class="form-control" required>
 
 
 
 
 
 
 
62
  </div>
63
- </div>
64
- <div class="col-md-3">
65
- <div class="form-group">
66
- <label for="port">Port <span class="text-danger">*</span></label>
67
- <input type="text" id="port" name="port" class="form-control" required>
68
  </div>
69
- </div>
70
- <div class="col-md-3">
71
- <div class="form-group">
72
- <label for="databaseName">Database Name <span class="text-danger">*</span></label>
73
- <input type="text" id="databaseName" name="databaseName" class="form-control" required>
74
  </div>
75
- </div>
76
- </div>
77
- <div class="row">
78
- <div class="col-md-3">
79
- <div class="form-group">
80
- <label for="userame">UserName <span class="text-danger">*</span></label>
81
- <input type="text" id="username" name="username" class="form-control" required>
82
  </div>
83
  </div>
84
- <div class="col-md-3">
85
- <div class="form-group">
86
- <label for="password">Password <span class="text-danger">*</span></label>
87
- <input type="password" id="password" name="password" class="form-control" required>
 
 
 
 
 
 
 
 
88
  </div>
89
- </div>
90
 
91
- <div class="col-md-6">
92
- <div class="form-group d-flex justify-content-between">
93
- <div class="form-group btn-container">
94
- <button type="button" id="connectBtn" class="btn btn-primary">Connect</button>
95
- <button type="reset" class="btn btn-primary">Clear</button>
 
96
  </div>
97
  </div>
98
  </div>
99
  </div>
100
 
101
- <div id="schema-table-section" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  <div class="row">
103
  <div class="col-md-3">
104
  <div class="form-group1">
@@ -113,39 +152,47 @@
113
  </div>
114
 
115
  <div class="col-md-3">
116
- <div class="form-group1">
117
- <label for="tableschema" style="margin-left: 30px;margin-right: 30px;">Select Tables
118
- <span class="text-danger">*</span></label>
119
- <div class="dropdown custom-dropdown">
120
- <button class="btn btn-secondary dropdown-toggle"
121
- style="margin-left: 30px;margin-right: 0px;" type="button" id="tablesDropdown"
122
- data-bs-toggle="dropdown" aria-expanded="false">
 
 
 
 
 
 
123
  Select Tables
124
  </button>
125
- <ul class="dropdown-menu" aria-labelledby="tablesDropdown">
 
 
 
126
  <li>
127
- <select type="text" id="tableschema" name="tableschema" class="form-control"
128
- multiple required>
129
- <option value="customer_master">customer_master</option>
130
- <option value="efs_company_master">efs_company_master</option>
131
- <option value="efs_group_company_master">efs_group_company_master
 
 
132
  </option>
133
- <option value="efs_region_master">efs_region_master</option>
134
- <option value="party_address_detail">party_address_detail</option>
135
- <option value="wms_warehouse_master">wms_warehouse_master</option>
136
  </select>
137
  </li>
138
  </ul>
139
  </div>
140
  </div>
141
  </div>
142
- <!-- <div class="col-md-3">
143
- <div class="btn-container1">
144
- <button type="button" id="saveBtn" class="btn btn-primary">Save</button>
145
  </div>
146
- </div>
147
- </div>
148
- <div class="row">-->
149
  <div class="col-md-3">
150
  <div class="form-group1">
151
  <label for="selectedTables" id="labelselected">Selected Tables</label>
@@ -154,15 +201,22 @@
154
  </div>
155
  </div>
156
 
157
- <div class="col-md-3">
158
- <div class="form-group">
159
- <div class="btn-container1">
160
- <button type="submit" id="saveBtn" class="btn btn-primary">Save</button>
161
- </div>
162
- </div>
163
  </div>
164
  </div>
165
  </div>
 
 
 
 
 
 
 
 
166
  </form>
167
  </div>
168
  </div>
@@ -170,6 +224,53 @@
170
  <footer class="footer">
171
  {%include 'footer.html'%}
172
  </footer>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  <script>
174
 
175
  document.addEventListener('DOMContentLoaded', function () {
@@ -321,6 +422,8 @@
321
  .then(data => {
322
  if (data.success) {
323
  document.getElementById("schema-table-section").style.display = "block";
 
 
324
  populateSchemaDropdown(data.schemas);
325
  // Set default selection for tables
326
  if (data.schemas.length > 0) {
@@ -373,15 +476,26 @@
373
 
374
  // Set the password value
375
  //document.getElementById("password").value = "root";
 
 
 
 
 
 
 
 
 
376
 
377
  const form = document.getElementById('databaseconnectorForm');
378
  const formData = new FormData(form);
 
379
  formData.append("company_id", document.getElementById('company_id').value);
380
  try {
381
  console.log("inside save", formData);
382
  console.log("comaonyid", document.getElementById('company_id').value);
383
  for (const [key, value] of formData.entries()) {
384
  console.log(`${key}: ${value}`);
 
385
  }
386
  const response = await fetch(form.action, {
387
  method: "POST",
@@ -426,6 +540,9 @@
426
  const messageContainer = document.getElementById('message-container');
427
  if (messageContainer) {
428
  messageContainer.innerHTML = '';
 
 
 
429
  }
430
  }
431
  function handleError() {
 
7
  <title>Data Connectors</title>
8
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
10
+
11
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/adminlte.min.css">
12
  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap4.min.css">
13
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
14
+ <link rel="stylesheet" href="/static/css/Data_Connectors.css">
15
+
16
+
17
  </head>
18
+ <style>
19
+ .btn1 {
20
+ padding: 6px;
21
+ border: 0.5px solid rgba(0, 0, 0, 0.413);
22
+ color: rgba(0, 0, 0, 0.507);
23
+ background-color: white !important;
24
+
25
+ }
26
+
27
+ .paginate_button {
28
+ color: rgba(0, 0, 0, 0.507);
29
+ padding: 5px;
30
+ margin-left: 5px;
31
+ }
32
+ </style>
33
 
 
34
 
35
+ <body>
36
  {% include 'sidepane.html' %}
37
+ <div class="wrapper" style="z-index: 0 !important;">
38
+ <div class="main-header" style="border-bottom: none;">
39
  <!-- Content Header (Page header) -->
40
+ <div class="content-header">
41
  <div class="container-fluid">
42
+ <div class="container mt-2">
43
+ <!-- <div class="form-group left-align">
44
  <label for="company" class="mr-1" style="margin-left:-60px;margin-top:-1px;">Company Name <span class="text-danger">*</span></label>
45
  <select type="text" id="company" name="company" class="form-control "style="width: 20%;margin-left:-60px;margin-bottom:-35px" required>
46
  <option value="" selected>Select</option>
47
  </select>
48
  </div> -->
49
+ <div class="row">
50
  <div id="message-container"
51
  style="padding:10px 10px;margin-left: 150px;width:500px;margin-bottom:-20px; margin-top: -30px;">
52
  </div>
53
  </div>
54
  </div>
55
  </div>
56
+ </div>
57
 
58
  <form id="databaseconnectorForm" class="needs-validation" novalidate action="/save_data_connectors"
59
  method="post">
60
+ <div class="main" id="main">
61
+ <div class="form-group">
62
+ <!-- <label for="company_id">company_id</label>--->
63
+ <input type="hidden" id="company_id" name="company_id" class="form-control" required>
 
 
 
 
 
 
 
 
 
 
 
64
  </div>
65
+ <h4 id="selectedCompany" style="margin-left: 300px;margin-bottom: 50px;margin-top: -50px;"></h4>
66
+ <div class="row">
67
+ <div class="col-md-3">
68
+ <div class="form-group">
69
+ <label for="database">Database Type<span class="text-danger">*</span></label>
70
+ <select type="text" id="database" name="database" class="form-control" required>
71
+ <option value="" selected>Select</option>
72
+ <option value="Postgres">Postgres</option>
73
+ <option value="mysql">mysql</option>
74
+ </select>
75
+ </div>
76
  </div>
77
+ <div class="col-md-3">
78
+ <div class="form-group">
79
+ <label for="server">Server IP <span class="text-danger">*</span></label>
80
+ <input type="text" id="server" name="server" class="form-control" required>
81
+ </div>
82
  </div>
83
+ <div class="col-md-3">
84
+ <div class="form-group">
85
+ <label for="port">Port <span class="text-danger">*</span></label>
86
+ <input type="text" id="port" name="port" class="form-control" required>
87
+ </div>
88
  </div>
89
+ <div class="col-md-3">
90
+ <div class="form-group">
91
+ <label for="databaseName">Database Name <span class="text-danger">*</span></label>
92
+ <input type="text" id="databaseName" name="databaseName" class="form-control" required>
93
+ </div>
 
 
94
  </div>
95
  </div>
96
+ <div class="row">
97
+ <div class="col-md-3">
98
+ <div class="form-group">
99
+ <label for="userame">UserName <span class="text-danger">*</span></label>
100
+ <input type="text" id="username" name="username" class="form-control" required>
101
+ </div>
102
+ </div>
103
+ <div class="col-md-3">
104
+ <div class="form-group">
105
+ <label for="password">Password <span class="text-danger">*</span></label>
106
+ <input type="password" id="password" name="password" class="form-control" required>
107
+ </div>
108
  </div>
 
109
 
110
+ <div class="col-md-6">
111
+ <div class="form-group d-flex justify-content-between">
112
+ <div class="form-group btn-container">
113
+ <button type="button" id="connectBtn" class="btn btn-primary">Connect</button>
114
+ <button type="reset" class="btn btn-primary">Clear</button>
115
+ </div>
116
  </div>
117
  </div>
118
  </div>
119
  </div>
120
 
121
+ <!-- Table -->
122
+ <div class="table"
123
+ style="padding: 50px; box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; margin-left:80px; display:none "
124
+ id="table">
125
+ <h1 style="text-align: center;font-size: 25px;">Selected Tables</h1>
126
+ <table id="adminlte-table" class="table table-bordered table-striped">
127
+ <thead>
128
+ <tr>
129
+ <th>Sno</th>
130
+ <th>Table Name</th>
131
+ </tr>
132
+ </thead>
133
+ <tbody id="table-body">
134
+ <!-- Rows will be appended here -->
135
+ </tbody>
136
+ </table>
137
+ </div>
138
+
139
+
140
+ <div id="schema-table-section" style="margin-left: 30px; display: none; width: 100%;">
141
  <div class="row">
142
  <div class="col-md-3">
143
  <div class="form-group1">
 
152
  </div>
153
 
154
  <div class="col-md-3">
155
+ <div class="form-group">
156
+ <!-- Label with better spacing -->
157
+ <label for="tableschema" class="form-label"
158
+ style="margin-top: 0px; margin-left: 100px;width: 200%;">
159
+ Select Tables <span class="text-danger">*</span>
160
+ </label>
161
+
162
+ <!-- Dropdown container -->
163
+ <div class="dropdown custom-dropdown" style="margin-left: 100px;">
164
+ <!-- Dropdown button -->
165
+ <button class="btn btn-primary dropdown-toggle w-100 text-start mt-3" type="button"
166
+ id="tablesDropdown" data-bs-toggle="dropdown" aria-expanded="false"
167
+ style="text-align: left;">
168
  Select Tables
169
  </button>
170
+
171
+ <!-- Dropdown menu with form styling -->
172
+ <ul class="dropdown-menu p-3 w-100" aria-labelledby="tablesDropdown"
173
+ style="max-height: 200px; overflow-y: auto;">
174
  <li>
175
+ <!-- Multiple select dropdown with custom styles -->
176
+ <select id="tableschema" name="tableschema" class="form-select" multiple
177
+ required
178
+ style="height: 150px; width: 240px; border-radius: .375rem; box-shadow: 0 1px 2px rgba(0,0,0,.1);margin-left: 10px;padding: 5px;">
179
+ <option value="customer_master">Customer Master</option>
180
+ <option value="efs_company_master">EFS Company Master</option>
181
+ <option value="efs_group_company_master">EFS Group Company Master
182
  </option>
183
+ <option value="efs_region_master">EFS Region Master</option>
184
+ <option value="party_address_detail">Party Address Detail</option>
185
+ <option value="wms_warehouse_master">WMS Warehouse Master</option>
186
  </select>
187
  </li>
188
  </ul>
189
  </div>
190
  </div>
191
  </div>
 
 
 
192
  </div>
193
+
194
+
195
+ <div class="row">
196
  <div class="col-md-3">
197
  <div class="form-group1">
198
  <label for="selectedTables" id="labelselected">Selected Tables</label>
 
201
  </div>
202
  </div>
203
 
204
+ </div>
205
+ <div class="col-md-3">
206
+ <div class="btn-container1">
207
+ <button type="button" id="saveBtn" class="btn btn-primary"
208
+ style="width: 600px; margin-top: 10px;">Save</button>
 
209
  </div>
210
  </div>
211
  </div>
212
+ <!-- <div class="col-md-3">
213
+ <div class="form-group">
214
+ <div class="btn-container1">
215
+ <button type="submit" id="saveBtn" class="btn btn-primary">Save</button>
216
+ </div>
217
+ </div>
218
+ </div> -->
219
+
220
  </form>
221
  </div>
222
  </div>
 
224
  <footer class="footer">
225
  {%include 'footer.html'%}
226
  </footer>
227
+ <!-- Include jQuery, DataTables, and AdminLTE Scripts -->
228
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
229
+ <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
230
+ <script src="https://cdn.jsdelivr.net/npm/admin-lte/dist/js/adminlte.min.js"></script>
231
+
232
+ <script>
233
+ // Populate the table body
234
+ const tableNames = localStorage.getItem("tablename"); // Retrieve the string
235
+ const tableBody = document.getElementById("table-body"); // Get the table body element
236
+
237
+ if (tableNames) {
238
+ const tableArray = tableNames.split(','); // Split the string into an array
239
+ tableArray.forEach((table, index) => {
240
+ const row = document.createElement("tr"); // Create a new row
241
+ row.innerHTML = `
242
+ <td>${index + 1}</td>
243
+ <td>${table.trim()}</td>
244
+ `;
245
+ tableBody.appendChild(row); // Append the row to the table
246
+ });
247
+ } else {
248
+ console.error("No table names found in localStorage.");
249
+ }
250
+
251
+ // Initialize DataTable
252
+ $(document).ready(function () {
253
+ $("#adminlte-table").DataTable({
254
+ responsive: true,
255
+ autoWidth: false,
256
+ paging: true,
257
+ lengthChange: true,
258
+ searching: true,
259
+ ordering: true,
260
+ info: true,
261
+ pageLength: 5,
262
+ lengthMenu: [5, 10, 15, 20],
263
+ language: {
264
+ paginate: {
265
+ previous: "<button class='btn1'>Previous</button>",
266
+ next: "<button class='btn1'>Next</button>",
267
+ },
268
+
269
+ },
270
+ });
271
+ });
272
+
273
+ </script>
274
  <script>
275
 
276
  document.addEventListener('DOMContentLoaded', function () {
 
422
  .then(data => {
423
  if (data.success) {
424
  document.getElementById("schema-table-section").style.display = "block";
425
+ document.getElementById("main").style.display = "none"
426
+ document.getElementById("table").style.display = "none"
427
  populateSchemaDropdown(data.schemas);
428
  // Set default selection for tables
429
  if (data.schemas.length > 0) {
 
476
 
477
  // Set the password value
478
  //document.getElementById("password").value = "root";
479
+ tablename = document.getElementById('selectedTables').value
480
+ window.localStorage.setItem("tablename", tablename)
481
+ const tableNames = localStorage.getItem("tablename"); // Retrieve the string
482
+ if (tableNames) {
483
+ const tableArray = tableNames.split(','); // Split the string into an array
484
+ tableArray.forEach((table) => console.error(table.trim())); // Print each table name
485
+ } else {
486
+ console.error("No table names found in localStorage.");
487
+ }
488
 
489
  const form = document.getElementById('databaseconnectorForm');
490
  const formData = new FormData(form);
491
+ console.log(formData)
492
  formData.append("company_id", document.getElementById('company_id').value);
493
  try {
494
  console.log("inside save", formData);
495
  console.log("comaonyid", document.getElementById('company_id').value);
496
  for (const [key, value] of formData.entries()) {
497
  console.log(`${key}: ${value}`);
498
+
499
  }
500
  const response = await fetch(form.action, {
501
  method: "POST",
 
540
  const messageContainer = document.getElementById('message-container');
541
  if (messageContainer) {
542
  messageContainer.innerHTML = '';
543
+ document.getElementById("main").style.display = "block"
544
+ document.getElementById("table").style.display = "block"
545
+ document.getElementById("schema-table-section").style.display = "none"
546
  }
547
  }
548
  function handleError() {
templates/footer.html CHANGED
@@ -1,4 +1,6 @@
1
- <!-- footer
 
 
2
  This is the HTML code for the footer section of a web page.
3
  It displays the version number and copyright information.
4
 
@@ -21,4 +23,4 @@
21
  <div class="container-fluid">
22
  <a href="https://redmindtechnologies.com" target="_blank" style="color: black; text-decoration: none;">Visit Redmind Technologies at https://redmindtechnologies.com</a>
23
  </div>
24
- </footer>
 
1
+ <!-- footer.html -->
2
+
3
+ <!--
4
  This is the HTML code for the footer section of a web page.
5
  It displays the version number and copyright information.
6
 
 
23
  <div class="container-fluid">
24
  <a href="https://redmindtechnologies.com" target="_blank" style="color: black; text-decoration: none;">Visit Redmind Technologies at https://redmindtechnologies.com</a>
25
  </div>
26
+ </footer>-->
templates/index.html CHANGED
@@ -16,39 +16,40 @@
16
  </style>
17
  </head>
18
 
19
- <body class="login-page" style="background-image: url('static/img/AI.jpg'); background-size: cover;">
20
  <main>
21
  <div class="container" id="container">
22
  <div class="form-container sign-up-container">
23
  <form action='/validate-user' name='signUpForm' method="post">
24
- <h1>Create Account</h1>
25
  <div class="social-container">
26
  <a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
27
  <a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
28
  <a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
29
  </div>
30
  <span>or use your email for registration</span>
31
- <input type="text" placeholder="Name" required />
32
- <input type="password" placeholder="Password" required />
33
  <button type="submit">Sign Up</button>
34
  </form>
35
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- <div class="form-container sign-in-container" id="form-container">
38
- <form action='/validate-user' name='loginForm' method="post" onsubmit="return validateForm()">
39
- <h1>Sign in</h1>
40
- <div class="social-container">
41
- <a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
42
- <a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
43
- <a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
44
- </div>
45
- <span>or use your account</span>
46
- <input type="text" name="username" placeholder="Username" required />
47
- <input type="password" name="password" placeholder="Password" required />
48
- <a href="#">Forgot your password?</a>
49
- <button type="submit">Sign In</button>
50
- </form>
51
- </div>
52
 
53
  <div class="overlay-container">
54
  <div class="overlay">
@@ -70,24 +71,24 @@
70
  </div>
71
  </main>
72
 
73
- <footer>
74
  <p>Developed with <i class="fas fa-heart"></i> by <a href="#">RedMind</a></p>
75
- </footer>
76
 
77
  <script>
78
  const signUpButton = document.getElementById('signUp');
79
  const signInButton = document.getElementById('signIn');
 
80
  const container = document.getElementById('container');
81
  const formcontainer = document.getElementById('form-container');
82
 
83
  signUpButton.addEventListener('click', () => {
84
  container.classList.add("right-panel-active");
85
- formcontainer.style.display = 'none'
86
  });
87
 
88
  signInButton.addEventListener('click', () => {
89
  container.classList.remove("right-panel-active");
90
- formcontainer.style.display = 'block'
91
 
92
  });
93
  </script>
 
16
  </style>
17
  </head>
18
 
19
+ <body class="login-page" style="background-image: url('static/img/Brain.PNG'); background-size: cover;">
20
  <main>
21
  <div class="container" id="container">
22
  <div class="form-container sign-up-container">
23
  <form action='/validate-user' name='signUpForm' method="post">
24
+ <h1 id="text">Sign in</h1>
25
  <div class="social-container">
26
  <a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
27
  <a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
28
  <a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
29
  </div>
30
  <span>or use your email for registration</span>
31
+ <input type="text" placeholder="Name" name="username" required />
32
+ <input type="password" placeholder="Password" name="password" required />
33
  <button type="submit">Sign Up</button>
34
  </form>
35
  </div>
36
+ <div class="container" id="container">
37
+ <div class="form-container sign-in-container">
38
+ <form action='/validate-user' name='signUpForm' method="post">
39
+ <h1 id="text">Sign in</h1>
40
+ <div class="social-container">
41
+ <a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
42
+ <a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
43
+ <a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
44
+ </div>
45
+ <span>or use your email for registration</span>
46
+ <input type="text" placeholder="Name" name="username" required />
47
+ <input type="password" placeholder="Password" name="password" required />
48
+ <button type="submit">Sign in</button>
49
+ </form>
50
+ </div>
51
 
52
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  <div class="overlay-container">
55
  <div class="overlay">
 
71
  </div>
72
  </main>
73
 
74
+ <!-- <footer>
75
  <p>Developed with <i class="fas fa-heart"></i> by <a href="#">RedMind</a></p>
76
+ </footer> -->
77
 
78
  <script>
79
  const signUpButton = document.getElementById('signUp');
80
  const signInButton = document.getElementById('signIn');
81
+ const text = document.getElementById('h1');
82
  const container = document.getElementById('container');
83
  const formcontainer = document.getElementById('form-container');
84
 
85
  signUpButton.addEventListener('click', () => {
86
  container.classList.add("right-panel-active");
87
+ text.textContent = 'hello'
88
  });
89
 
90
  signInButton.addEventListener('click', () => {
91
  container.classList.remove("right-panel-active");
 
92
 
93
  });
94
  </script>
templates/knowledgebase.html CHANGED
@@ -15,7 +15,8 @@
15
  <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
16
  <script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
17
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
18
- <link rel="stylesheet" href="/static/css/knowledgebase.css">
 
19
  </head>
20
 
21
  <body>
 
15
  <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
16
  <script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
17
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
18
+ <link rel="stylesheet" href="/static/css/KnowledgeBase.css">
19
+
20
  </head>
21
 
22
  <body>
templates/prompt_template.html CHANGED
@@ -12,7 +12,7 @@
12
  <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
13
  <script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
15
-
16
  </head>
17
 
18
  <body>
 
12
  <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
13
  <script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
15
+ <link rel="stylesheet" href="/static/css/prompt_template.css">
16
  </head>
17
 
18
  <body>
templates/sidepane.html CHANGED
@@ -1,180 +1,257 @@
 
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
 
4
  <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>RedMindGPT - Dashboard</title>
8
-
9
- <!-- Bootstrap CSS -->
10
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
11
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
12
- <link rel="stylesheet" href="/static/css/sidepane.css">
13
 
14
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
 
15
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
16
-
17
  </head>
18
 
19
  <body>
20
- <nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm" style="padding: 15px; z-index: 20;">
 
 
21
  <div class="container-fluid d-flex justify-content-between align-items-center">
22
- <button class="navbar-toggler" type="button" onclick="toggleSidebar()">
23
- <span class="navbar-toggler-icon"></span>
 
24
  </button>
 
 
25
  <div class="d-flex align-items-center">
26
- <img class="logo" src="/static/img/redmindlogo3.jpg" alt="Logo"
27
  style="width: 70px; height: auto; margin-right: 15px;">
28
- <h3 class="title" style="font-weight: 500;text-align: center;"> <span id="title">RedMind</span>
29
- Dashboard</h3>
30
  </div>
31
 
32
- <div class="justify-content-end" id="navbarNav">
33
- <div class="nav-btn d-flex align-items-center">
34
- <button class="btn btn-primary mr-2" id="add" onclick="addCompany()">Add</button>
35
- <button class="btn btn-danger" id="logout" onclick="logout()">Logout</button>
36
- </div>
37
  </div>
38
  </div>
39
  </nav>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
- <aside class="main-sidebar" style="z-index: 10;">
42
- <div class="sidebar-header">
43
- <i class="nav-icon fas fa-building"></i>
44
- <span class="menu-text" id="selectedCompany">Select a company</span>
45
- </div>
46
- <nav class="mt-2">
47
- <ul class="nav nav-pills nav-sidebar flex-column">
48
- <li class="nav-item">
49
- <a href="{{url_for('dashboard')}}" class="nav-link">
50
- <i class="nav-icon fas fa-home"></i>
51
- <p class="menu-text">Dashboard</p>
52
- </a>
53
- </li>
54
- <li class="nav-item">
55
- <a href="{{ url_for('company_profile') }}" class="nav-link">
56
- <i class="nav-icon fas fa-users"></i>
57
- <p class="menu-text">Company Profile</p>
58
- </a>
59
- </li>
60
- <li class="nav-item">
61
- <a href="{{ url_for('knowledgebase') }}" class="nav-link">
62
- <i class="nav-icon fas fa-book"></i>
63
- <p class="menu-text">KnowledgeBase</p>
64
- </a>
65
- </li>
66
- <li class="nav-item">
67
- <a href="{{ url_for('data_connectors') }}" class="nav-link">
68
- <i class="nav-icon fas fa-plug"></i>
69
- <p class="menu-text">Data Connectors</p>
70
- </a>
71
- </li>
72
- <li class="nav-item">
73
- <a href="{{ url_for('API_connectors') }}" class="nav-link">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  <i class="nav-icon fas fa-cogs"></i>
75
- <p class="menu-text">API Connectors</p>
76
- </a>
77
- </li>
78
- <li class="nav-item">
79
- <a href="{{ url_for('prompt_template') }}" class="nav-link">
80
- <i class="nav-icon fas fa-pencil-alt"></i>
81
- <p class="menu-text">Prompt Templates</p>
82
  </a>
83
- </li>
84
- </ul>
85
- </nav>
86
- </aside>
87
-
88
- <!-- Section to toggle -->
89
- <div class="container pt-3" id="addnewcompany">
90
- <div class="toggle-section" id="companySection">
91
- <h4>Add a New Company</h4>
92
- <form>
93
- <div class="form-group">
94
- <label for="companyName">Company Name:</label>
95
- <input type="text" class="form-control" id="companyName" placeholder="Enter company name" >
96
- </div>
97
- <button type="submit" class="btn btn-success">Submit</button>
98
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  </div>
100
  </div>
101
 
 
 
102
  <script>
 
103
  function logout() {
104
  sessionStorage.removeItem('role');
105
  sessionStorage.clear();
106
  window.location.href = '/';
107
  }
108
 
109
- function toggleSidebar() {
110
-
111
 
112
- const sidebar = document.querySelector('.main-sidebar');
113
- if (sidebar) {
114
- const isSidebarVisible = getComputedStyle(sidebar).display !== 'none';
115
- sidebar.style.display = isSidebarVisible ? 'none' : 'block';
116
 
117
- }
118
- }
 
 
119
 
 
 
 
 
 
 
120
 
 
 
121
 
122
- function addCompany() {
123
- const section = document.getElementById("companySection");
124
- // Toggle display style of the company section
125
- if (section.style.display === "none" || section.style.display === "") {
126
- section.style.display = "block"; // Show the section
127
- } else {
128
- section.style.display = "none"; // Hide the section
129
  }
130
- }
131
 
132
- document.addEventListener("DOMContentLoaded", function () {
133
- const companyId = document.getElementById("company_id") ? document.getElementById("company_id").value : null;
134
- const role = document.getElementById("userRole") ? document.getElementById("userRole").value : null;
135
- if (companyId) {
136
- sessionStorage.setItem('sidecompanyId1', companyId);
137
- }
138
- if (role) {
139
- sessionStorage.setItem('siderole1', role);
140
- if (role === 'admin') {
141
- editCompany(companyId, role);
142
- updateLinkVisibility(role);
143
- }
144
- }
145
  });
146
 
147
- async function updateLinkVisibility(role) {
148
- if (role === 'admin') {
 
149
  const displayState = JSON.parse(sessionStorage.getItem('displayState'));
 
 
150
  document.getElementById('api_connectors_link').style.display = displayState.apiConnectors;
151
  document.getElementById('knowledgebase_link').style.display = displayState.knowledgeBase;
152
- document.getElementById('data_connectors_link').style.display = displayState.dataConnectors;
153
  }
154
  }
155
-
156
- async function editCompany(companyId, role) {
157
- $.getJSON(`/api/getcompanydetails/${companyId}`, function (company) {
 
 
158
  $('#llm_tools').val(company.llm_tools.split(',')).trigger('change');
159
- const llmTools = $('#llm_tools').val();
 
 
 
 
 
160
 
161
  if (llmTools && llmTools.length > 0) {
162
- document.getElementById('api_connectors_link').style.display = llmTools.includes('API') ? 'block' : 'none';
163
- document.getElementById('knowledgebase_link').style.display = llmTools.includes('Static Documents') ? 'block' : 'none';
164
- document.getElementById('data_connectors_link').style.display = llmTools.includes('Database') ? 'block' : 'none';
 
 
 
 
165
 
 
 
 
 
 
 
 
 
 
 
 
166
  sessionStorage.setItem('displayState', JSON.stringify({
167
- apiConnectors: document.getElementById('api_connectors_link').style.display,
168
- knowledgeBase: document.getElementById('knowledgebase_link').style.display,
169
- dataConnectors: document.getElementById('data_connectors_link').style.display
 
170
  }));
171
- updateLinkVisibility(role);
172
  }
 
173
  }).fail(function () {
174
- console.error("Error retrieving company details.");
175
  });
 
176
  }
 
 
 
 
 
 
 
 
 
 
177
  </script>
 
178
  </body>
179
 
180
  </html>
 
1
+ <!-- sidepane.html -->
2
+ <!-- This file represents the sidepane component of a web application. It contains the navigation menu and sidebar. -->
3
  <!DOCTYPE html>
4
  <html lang="en">
5
 
6
  <head>
 
 
 
 
 
 
 
 
7
 
8
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
9
+ <!-- Include Bootstrap JS -->
10
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
11
+ <link rel="stylesheet" href="/static/css/sidepane.css">
12
  </head>
13
 
14
  <body>
15
+
16
+
17
+ <nav class="main-header navbar navbar-expand navbar-light bg-white shadow-sm" style="padding: 15px; position: sticky;top: 0%; z-index: 100 !important; ">
18
  <div class="container-fluid d-flex justify-content-between align-items-center">
19
+ <!-- Toggle Sidebar Button -->
20
+ <button class="btn btn-outline-secondary" id="sidebarToggle" style="margin-right: 15px;display: none">
21
+ <i class="fas fa-bars"></i>
22
  </button>
23
+
24
+ <!-- Logo and Title Section -->
25
  <div class="d-flex align-items-center">
26
+ <img src="/static/img/redmindlogo3.jpg" alt="Logo"
27
  style="width: 70px; height: auto; margin-right: 15px;">
28
+ <h3 class="m-0" style="font-weight: 500;">RedMindGPT - {{title}}</h3>
 
29
  </div>
30
 
31
+ <!-- Buttons Section -->
32
+ <div>
33
+ <button class="btn btn-primary me-3" id="add">Add</button>
34
+ <button class="btn btn-primary" onclick="logout()">Logout</button>
 
35
  </div>
36
  </div>
37
  </nav>
38
+ <div id="wrapper">
39
+ <!-- Main Sidebar Container -->
40
+ <aside class="main-sidebar sidebar-custom elevation-4" id="sidebarPanel" style=" position: fixed">
41
+ <!-- Sidebar -->
42
+ <div class="sidebar">
43
+ <!-- Sidebar Menu -->
44
+ <nav class="mt-2">
45
+ <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
46
+ data-accordion="false" id="sidebarMenu">
47
+ <input type="hidden" id="userRole" name="userRole" value={{role}}>
48
+ <input type="hidden" id="company_id" name="company_id" value={{company_id}}>
49
+ <div class="form-group" style="display: none;">
50
+ <label for="llm_tools">LLM Tools<span class="text-danger">*</span></label>
51
+ <select class="form-control" id="llm_tools" name="llm_tools" multiple required
52
+ style="display: none;">
53
+ <option value="Database">Database</option>
54
+ <option value="Static Documents">Static Documents</option>
55
+ <option value="API">API</option>
56
+ </select>
57
+ <div class="invalid-feedback">
58
+ Please select at least one LLM tool.
59
+ </div>
60
+ </div>
61
 
62
+ <li class="nav-item">
63
+ <a href="{{url_for('dashboard')}}" class="nav-link">
64
+ <i class="nav-icon fas fa-home"></i>
65
+ <p>Dashboard</p>
66
+ </a>
67
+ </li>
68
+ <li class="nav-item">
69
+ <div class="sidebar-header">
70
+ <i class="nav-icon fas fa-building"></i>
71
+ <span class="menu-text" id="selectedCompany">Select a company</span>
72
+ <!-- Initial text as fallback -->
73
+ <!-- <span class="menu-text" id="selectedCompany">{{company_name}}</span> -->
74
+ </div>
75
+ </li>
76
+
77
+ <li class="nav-item">
78
+ <a href="{{ url_for('company_profile') }}" class="nav-link">
79
+ <i class="nav-icon fas fa-users"></i>
80
+ <p>Company Profile</p>
81
+ </a>
82
+ </li>
83
+ <li class="nav-item" id="knowledgebase_link">
84
+ <a href="{{ url_for('knowledgebase') }}" class="nav-link">
85
+ <i class="nav-icon fas fa-cogs"></i>
86
+ <p>KnowledgeBase</p>
87
+ </a>
88
+ </li>
89
+ <li class="nav-item" id="data_connectors_link">
90
+ <a href="{{ url_for('data_connectors') }}" class="nav-link">
91
+ <i class="nav-icon fas fa-cogs"></i>
92
+ <p>Data Connectors</p>
93
+ </a>
94
+ </li>
95
+ <li class="nav-item" id="api_connectors_link">
96
+ <a href="{{ url_for('API_connectors') }}" class="nav-link">
97
+ <i class="nav-icon fas fa-cogs"></i>
98
+ <p>API Connectors</p>
99
+ </a>
100
+ </li>
101
+ <li class="nav-item">
102
+ <a href="{{url_for('prompt_template')}}" class="nav-link">
103
+ <i class="nav-icon fas fa-cogs"></i>
104
+ <p>Prompt Templates</p>
105
+ </a>
106
+ </li>
107
+ <!--<li class="nav-item">
108
+ <a href="#" class="nav-link">
109
  <i class="nav-icon fas fa-cogs"></i>
110
+ <p>LLM Settings</p>
 
 
 
 
 
 
111
  </a>
112
+ <ul class="nav nav-treeview">
113
+ <li class="nav-item">
114
+ <a href="#" class="nav-link">
115
+ <i class="far fa-circle nav-icon"></i>
116
+ <p>Sublink 1</p>
117
+ </a>
118
+ </li>
119
+ <li class="nav-item">
120
+ <a href="#" class="nav-link">
121
+ <i class="far fa-circle nav-icon"></i>
122
+ <p>Sublink 2</p>
123
+ </a>
124
+ </li>
125
+
126
+ </ul>
127
+ </li> -->
128
+
129
+ <!-- Add more navigation links here -->
130
+ </ul>
131
+ </nav>
132
+ <!-- /.sidebar-menu -->
133
+ </div>
134
+ <!-- /.sidebar -->
135
+ </aside>
136
+
137
+
138
+ <input type="hidden" id="userRole" name="userRole" value={{role}}>
139
+ <input type="hidden" id="company_id" name="company_id" value={{company_id}}>
140
+ <div class="form-group" style="display: none;">
141
+ <label for="llm_tools">LLM Tools<span class="text-danger">*</span></label>
142
+ <select class="form-control" id="llm_tools" name="llm_tools" multiple required style="display: none;">
143
+ <option value="Database">Database</option>
144
+ <option value="Static Documents">Static Documents</option>
145
+ <option value="API">API</option>
146
+ </select>
147
+ <div class="invalid-feedback">
148
+ Please select at least one LLM tool.
149
+ </div>
150
  </div>
151
  </div>
152
 
153
+ <!-- AdminLTE JS -->
154
+
155
  <script>
156
+
157
  function logout() {
158
  sessionStorage.removeItem('role');
159
  sessionStorage.clear();
160
  window.location.href = '/';
161
  }
162
 
 
 
163
 
164
+ document.addEventListener("DOMContentLoaded", function () {
 
 
 
165
 
166
+ const company_id1 = document.getElementById("company_id").value;
167
+ const role1 = document.getElementById("userRole").value;
168
+ sessionStorage.setItem('siderole1', role1);
169
+ sessionStorage.setItem('sidecompanyId1', company_id1);
170
 
171
+ const sidecompanyId = sessionStorage.getItem('sidecompanyId1');
172
+ const siderole = sessionStorage.getItem('siderole1');
173
+ if (siderole === 'admin') {
174
+ console.log("Company ID inside sidepane:", sidecompanyId);
175
+ console.log("Role inside sidepane:", siderole);
176
+ editCompany(sidecompanyId, siderole);
177
 
178
+ console.log("inside admin after edit");
179
+ updateLinkVisibility(siderole);
180
 
 
 
 
 
 
 
 
181
  }
 
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  });
184
 
185
+ async function updateLinkVisibility(siderole) {
186
+ //const role = sessionStorage.getItem('role');
187
+ if (siderole === 'admin') {
188
  const displayState = JSON.parse(sessionStorage.getItem('displayState'));
189
+
190
+ // Update the visibility of links based on the stored state
191
  document.getElementById('api_connectors_link').style.display = displayState.apiConnectors;
192
  document.getElementById('knowledgebase_link').style.display = displayState.knowledgeBase;
193
+ document.getElementById('data_connectors_link').style.display = displayState.dataConnectors
194
  }
195
  }
196
+ async function editCompany(sidecompanyId, siderole) {
197
+ console.log("inside edit company id", sidecompanyId);
198
+ console.log("inside edit role role", siderole);
199
+ $.getJSON(`/api/getcompanydetails/${sidecompanyId}`, function (company) {
200
+ // Set the value of #llm_tools and trigger change event
201
  $('#llm_tools').val(company.llm_tools.split(',')).trigger('change');
202
+
203
+ // Get the selected values from #llm_tools
204
+ const llmTools = $('#llm_tools').val(); // This is an array
205
+
206
+ console.log("inside sidepane edit llmTools", llmTools);
207
+ //const role =sessionStorage.getItem('role');
208
 
209
  if (llmTools && llmTools.length > 0) {
210
+ console.log("inside if");
211
+
212
+ // Example: Conditionally display some links based on llm_tools
213
+ if (api_connectors_link) {
214
+ api_connectors_link.style.display = llmTools.includes('API') ? 'block' : 'none';
215
+ console.log("state api", api_connectors_link.style.display);
216
+ }
217
 
218
+ if (knowledgebase_link) {
219
+ knowledgebase_link.style.display = llmTools.includes('Static Documents') ? 'block' : 'none';
220
+ console.log("state know", knowledgebase_link.style.display);
221
+ }
222
+
223
+ if (data_connectors_link) {
224
+ data_connectors_link.style.display = llmTools.includes('Database') ? 'block' : 'none';
225
+ console.log("state dataconn", data_connectors_link.style.display);
226
+ }
227
+
228
+ console.log("inside storageadmin");
229
  sessionStorage.setItem('displayState', JSON.stringify({
230
+ apiConnectors: api_connectors_link.style.display,
231
+ knowledgeBase: knowledgebase_link.style.display,
232
+ dataConnectors: data_connectors_link.style.display
233
+
234
  }));
235
+ updateLinkVisibility(siderole);
236
  }
237
+
238
  }).fail(function () {
239
+ alert("Error retrieving company details.");
240
  });
241
+
242
  }
243
+ document.getElementById('sidebarToggle').addEventListener('click', function () {
244
+ const sidebar = document.getElementById('sidebarPanel');
245
+
246
+ if (sidebar.style.display === 'block') {
247
+ sidebar.style.display = 'none';
248
+ } else {
249
+ sidebar.style.display = 'block';
250
+ }
251
+
252
+ });
253
  </script>
254
+
255
  </body>
256
 
257
  </html>