diff --git a/cogs/web/__pycache__/web.cpython-39.pyc b/cogs/web/__pycache__/web.cpython-39.pyc deleted file mode 100644 index 812facb..0000000 Binary files a/cogs/web/__pycache__/web.cpython-39.pyc and /dev/null differ diff --git a/cogs/web/config.toml b/cogs/web/config.toml deleted file mode 100644 index 492958e..0000000 --- a/cogs/web/config.toml +++ /dev/null @@ -1,13 +0,0 @@ -#The webserver plugin cofiguration file. -[webserver] -#This will specify the ip adress of the machine that the server is running on. I would recomend to change it as some pages might 404 if you dont. -ip=0.0.0.0 - -#The port to listen on. -port=5000 - -#Section related to security and .key, .crt file locations. Its really recomended to use ssl if you are exposing the web interface to the internet. -[SSL] -userssl=False -crt="certs/certificate.crt" -key="certs/private.key" diff --git a/cogs/web/static/configuration.css b/cogs/web/static/configuration.css deleted file mode 100644 index fca533e..0000000 --- a/cogs/web/static/configuration.css +++ /dev/null @@ -1,88 +0,0 @@ -body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - background-color: #2c3e50; - color: #fff; -} - -.logo { - width: 25; - height: 25; -} - -header { - background-color: #3e4982; - color: #fff; - padding: 20px; - text-align: center; -} - -header h1 { - margin: 0; -} - -.container { - display: flex; -} - -table { - font-family: Arial, Helvetica, sans-serif; - border-collapse: collapse; - width: 100%; -} - -table td, -#status th { - border: 1px solid #ddd; - padding: 8px; -} - -table tr:nth-child(even) { - background-color: #1c567d; -} - -table tr:hover { - background-color: #2980b9; -} - -table th { - padding-top: 12px; - padding-bottom: 12px; - text-align: left; - background-color: #04AA6D; - color: white; -} - -nav { - background-color: #34495e; - width: 200px; - padding: 20px; - text-align: center; -} - -nav ul { - list-style: none; - margin: 0; - padding: 0; -} - -nav li a { - color: #fff; - text-decoration: none; - padding: 10px 0; - display: block; -} - -nav li a:hover { - background-color: #2980b9; -} - -.selected { - background-color: #2980b9; -} - -main { - padding: 20px; - flex-grow: 1; -} \ No newline at end of file diff --git a/cogs/web/static/dashboard.css b/cogs/web/static/dashboard.css deleted file mode 100644 index b92a2c9..0000000 --- a/cogs/web/static/dashboard.css +++ /dev/null @@ -1,88 +0,0 @@ -body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - background-color: #2c3e50; - color: #fff; -} - -.logo { - width: 25; - height: 25; -} - -header { - background-color: #3e4982; - color: #fff; - padding: 20px; - text-align: center; -} - -header h1 { - margin: 0; -} - -.container { - display: flex; -} - -table { - font-family: Arial, Helvetica, sans-serif; - border-collapse: collapse; - width: 100%; -} - -table td, -#status th { - border: 1px solid #ddd; - padding: 8px; -} - -table tr:nth-child(even) { - background-color: #1c567d; -} - -table tr:hover { - background-color: #2980b9; -} - -table th { - padding-top: 12px; - padding-bottom: 12px; - text-align: left; - background-color: #04AA6D; - color: white; -} - -nav { - background-color: #34495e; - width: 200px; - padding: 20px; - text-align: center; -} - -nav ul { - list-style: none; - margin: 0; - padding: 0; -} - -nav li a { - color: #fff; - text-decoration: none; - padding: 10px 0; - display: block; -} - -nav li a:hover { - background-color: #2980b9; -} - -.selected { - background-color: #2980b9; -} - -main { - padding: 20px; - flex-grow: 1; -} diff --git a/cogs/web/static/index.css b/cogs/web/static/index.css deleted file mode 100644 index 9ac95ae..0000000 --- a/cogs/web/static/index.css +++ /dev/null @@ -1,61 +0,0 @@ -body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - background-color: #2c3e50; - color: #fff; -} -.selected { - background-color: #2980b9; -} -.logo { - width: 25; - height: 25; -} - -header { - background-color: #3e4982; - color: #fff; - padding: 20px; - text-align: center; -} - -header h1 { - margin: 0; -} - -.container { - display: flex; -} - -nav { - background-color: #34495e; - width: 200px; - padding: 20px; - text-align: center; -} - -nav ul { - list-style: none; - margin: 0; - padding: 0; -} - -nav li a { - color: #fff; - text-decoration: none; - padding: 10px 0; - display: block; -} - -nav li a:hover { - background-color: #2980b9; -} - -main { - padding: 20px; - flex-grow: 1; -} - - - diff --git a/cogs/web/static/js/configuration.js b/cogs/web/static/js/configuration.js deleted file mode 100644 index 4aa072e..0000000 --- a/cogs/web/static/js/configuration.js +++ /dev/null @@ -1,66 +0,0 @@ -const form = document.querySelector("form"); -const tokenInput = form.querySelector("#token"); -const nameInput = form.querySelector("#name"); -const statusSelect = form.querySelector("#status"); - -// set the token input as password field -tokenInput.setAttribute("type", "password"); - -// function to get the config values from the server -const getConfigValues = async () => { - try { - const tokenResponse = await fetch('/api/token'); - const tokenValue = await tokenResponse.text(); - tokenInput.value = tokenValue; - - const nameResponse = await fetch('/api/name'); - const nameValue = await nameResponse.text(); - nameInput.value = nameValue; - - const statusResponse = await fetch('/api/status'); - const statusValue = await statusResponse.text(); - statusSelect.value = statusValue; - } catch (error) { - console.error(error); - } -} - -getConfigValues(); - -form.addEventListener("submit", async (event) => { - event.preventDefault(); - const token = tokenInput.value; - const name = nameInput.value; - const status = statusSelect.value; - - try { - // send POST request to /api/token endpoint with token as the body - if (token !== '') { - await fetch('/api/token', { - method: 'POST', - body: token - }); - } - - - // send POST request to /api/name endpoint with name as the body - if (name !== '') { - await fetch('/api/name', { - method: 'POST', - body: name - }); - } - - - // send POST request to /api/status endpoint with status as the body - if (status !== '') { - await fetch('/api/status', { - method: 'POST', - body: status - }); - } - - } catch (error) { - console.error(error); - } -}); \ No newline at end of file diff --git a/cogs/web/static/plugins.css b/cogs/web/static/plugins.css deleted file mode 100644 index fca533e..0000000 --- a/cogs/web/static/plugins.css +++ /dev/null @@ -1,88 +0,0 @@ -body { - font-family: Arial, sans-serif; - margin: 0; - padding: 0; - background-color: #2c3e50; - color: #fff; -} - -.logo { - width: 25; - height: 25; -} - -header { - background-color: #3e4982; - color: #fff; - padding: 20px; - text-align: center; -} - -header h1 { - margin: 0; -} - -.container { - display: flex; -} - -table { - font-family: Arial, Helvetica, sans-serif; - border-collapse: collapse; - width: 100%; -} - -table td, -#status th { - border: 1px solid #ddd; - padding: 8px; -} - -table tr:nth-child(even) { - background-color: #1c567d; -} - -table tr:hover { - background-color: #2980b9; -} - -table th { - padding-top: 12px; - padding-bottom: 12px; - text-align: left; - background-color: #04AA6D; - color: white; -} - -nav { - background-color: #34495e; - width: 200px; - padding: 20px; - text-align: center; -} - -nav ul { - list-style: none; - margin: 0; - padding: 0; -} - -nav li a { - color: #fff; - text-decoration: none; - padding: 10px 0; - display: block; -} - -nav li a:hover { - background-color: #2980b9; -} - -.selected { - background-color: #2980b9; -} - -main { - padding: 20px; - flex-grow: 1; -} \ No newline at end of file diff --git a/cogs/web/templates/configuration.html b/cogs/web/templates/configuration.html deleted file mode 100644 index c416904..0000000 --- a/cogs/web/templates/configuration.html +++ /dev/null @@ -1,47 +0,0 @@ - - - -
-This is the admin dashboard. Here you can see important thing like the uptime, hits per minute, cogs status etc..
-Module | -Status | -Module link | -
---|---|---|
Uptime | -1 Year | -/api/uptime | -
Hits Per Minute | -10 | -/api/hpm | -
Plugin - Fivem | -Online | -/plugins/fivem | -
This bot is designed to help you with various tasks and make your life easier
-Here you can find information about the bot's features, plugins, configuration, and support. All this info is public. If you want you can turn it off in the settings page.
-This is the plugin page here you can disable/enable the individual cogs.
-Plugin | -Status | -Plugin link | -
---|---|---|
Uptime | -1 Year | -/api/uptime | -
Hits Per Minute | -10 | -/api/hpm | -
Plugin - Fivem | -Online | -/plugins/fivem | -