An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
feat: Basic server usage on dashboard
Andras Bacsaia4d53a28eb51
diff --git a/package.json b/package.jsonindex 6810e62a27..41ed1e73dd 100644--- a/package.json+++ b/package.json@@ -30,61 +30,62 @@},"devDependencies": {"@sveltejs/adapter-node": "1.0.0-next.73",- "@sveltejs/kit": "1.0.0-next.316",- "@types/js-cookie": "3.0.1",+ "@sveltejs/kit": "1.0.0-next.326",+ "@types/js-cookie": "3.0.2","@types/js-yaml": "4.0.5",- "@types/node": "17.0.25",- "@types/node-forge": "1.0.1",+ "@types/node": "17.0.31",+ "@types/node-forge": "1.0.2","@typescript-eslint/eslint-plugin": "4.31.1","@typescript-eslint/parser": "4.31.1","@zerodevx/svelte-toast": "0.7.1",- "autoprefixer": "10.4.4",+ "autoprefixer": "10.4.7","cross-env": "7.0.3","cross-var": "1.1.0","eslint": "7.32.0","eslint-config-prettier": "8.5.0","eslint-plugin-svelte3": "3.4.1","husky": "7.0.4",- "lint-staged": "12.4.0",- "postcss": "8.4.12",+ "lint-staged": "12.4.1",+ "postcss": "8.4.13","prettier": "2.6.2","prettier-plugin-svelte": "2.7.0","prettier-plugin-tailwindcss": "0.1.10","prisma": "3.11.1",- "svelte": "3.47.0",+ "svelte": "3.48.0","svelte-check": "2.7.0","svelte-preprocess": "4.10.6","svelte-select": "4.4.7",- "sveltekit-i18n": "2.1.2",+ "sveltekit-i18n": "2.2.1","tailwindcss": "3.0.24","ts-node": "10.7.0",- "tslib": "2.3.1",- "typescript": "4.6.3"+ "tslib": "2.4.0",+ "typescript": "4.6.4"},"type": "module","dependencies": {"@iarna/toml": "2.2.5","@prisma/client": "3.11.1",- "@sentry/node": "6.19.6",+ "@sentry/node": "6.19.7","bcryptjs": "2.4.3",- "bullmq": "1.80.4",+ "bullmq": "1.81.4","compare-versions": "4.1.3","cookie": "0.5.0","cuid": "2.1.8",- "dayjs": "1.11.1",+ "dayjs": "1.11.2","dockerode": "3.3.1","dotenv-extended": "2.9.0","generate-password": "1.7.0","get-port": "6.1.2",- "got": "12.0.3",- "is-ip": "^4.0.0",+ "got": "12.0.4",+ "is-ip": "4.0.0","js-cookie": "3.0.1","js-yaml": "4.1.0","jsonwebtoken": "8.5.1","mustache": "4.2.0","node-forge": "1.3.1",+ "node-os-utils": "1.3.6","p-limit": "4.0.0",- "svelte-kit-cookie-session": "2.1.3",+ "svelte-kit-cookie-session": "2.1.4","tailwindcss-scrollbar": "0.1.0","unique-names-generator": "4.7.1"},diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 10f21d2f81..e98d0f2e8f 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -3,25 +3,25 @@ lockfileVersion: 5.4specifiers:'@iarna/toml': 2.2.5'@prisma/client': 3.11.1- '@sentry/node': 6.19.6+ '@sentry/node': 6.19.7'@sveltejs/adapter-node': 1.0.0-next.73- '@sveltejs/kit': 1.0.0-next.316- '@types/js-cookie': 3.0.1+ '@sveltejs/kit': 1.0.0-next.326+ '@types/js-cookie': 3.0.2'@types/js-yaml': 4.0.5- '@types/node': 17.0.25- '@types/node-forge': 1.0.1+ '@types/node': 17.0.31+ '@types/node-forge': 1.0.2'@typescript-eslint/eslint-plugin': 4.31.1'@typescript-eslint/parser': 4.31.1'@zerodevx/svelte-toast': 0.7.1- autoprefixer: 10.4.4+ autoprefixer: 10.4.7bcryptjs: 2.4.3- bullmq: 1.80.4+ bullmq: 1.81.4compare-versions: 4.1.3cookie: 0.5.0cross-env: 7.0.3cross-var: 1.1.0cuid: 2.1.8- dayjs: 1.11.1+ dayjs: 1.11.2dockerode: 3.3.1dotenv-extended: 2.9.0eslint: 7.32.0@@ -29,92 +29,94 @@ specifiers:eslint-plugin-svelte3: 3.4.1generate-password: 1.7.0get-port: 6.1.2- got: 12.0.3+ got: 12.0.4husky: 7.0.4- is-ip: ^4.0.0+ is-ip: 4.0.0js-cookie: 3.0.1js-yaml: 4.1.0jsonwebtoken: 8.5.1- lint-staged: 12.4.0+ lint-staged: 12.4.1mustache: 4.2.0node-forge: 1.3.1+ node-os-utils: 1.3.6p-limit: 4.0.0- postcss: 8.4.12+ postcss: 8.4.13prettier: 2.6.2prettier-plugin-svelte: 2.7.0prettier-plugin-tailwindcss: 0.1.10prisma: 3.11.1- svelte: 3.47.0+ svelte: 3.48.0svelte-check: 2.7.0- svelte-kit-cookie-session: 2.1.3+ svelte-kit-cookie-session: 2.1.4svelte-preprocess: 4.10.6svelte-select: 4.4.7- sveltekit-i18n: 2.1.2+ sveltekit-i18n: 2.2.1tailwindcss: 3.0.24tailwindcss-scrollbar: 0.1.0ts-node: 10.7.0- tslib: 2.3.1- typescript: 4.6.3+ tslib: 2.4.0+ typescript: 4.6.4unique-names-generator: 4.7.1dependencies:'@iarna/toml': 2.2.5'@prisma/client': [email protected]- '@sentry/node': 6.19.6+ '@sentry/node': 6.19.7bcryptjs: 2.4.3- bullmq: 1.80.4+ bullmq: 1.81.4compare-versions: 4.1.3cookie: 0.5.0cuid: 2.1.8- dayjs: 1.11.1+ dayjs: 1.11.2dockerode: 3.3.1dotenv-extended: 2.9.0generate-password: 1.7.0get-port: 6.1.2- got: 12.0.3+ got: 12.0.4is-ip: 4.0.0js-cookie: 3.0.1js-yaml: 4.1.0jsonwebtoken: 8.5.1mustache: 4.2.0node-forge: 1.3.1+ node-os-utils: 1.3.6p-limit: 4.0.0- svelte-kit-cookie-session: 2.1.3+ svelte-kit-cookie-session: 2.1.4tailwindcss-scrollbar: [email protected]unique-names-generator: 4.7.1devDependencies:'@sveltejs/adapter-node': 1.0.0-next.73- '@sveltejs/kit': [email protected]- '@types/js-cookie': 3.0.1+ '@sveltejs/kit': [email protected]+ '@types/js-cookie': 3.0.2'@types/js-yaml': 4.0.5- '@types/node': 17.0.25- '@types/node-forge': 1.0.1- '@typescript-eslint/eslint-plugin': 4.31.1_r3ph5xlwsrsg4ewthrjemd3cfq- '@typescript-eslint/parser': 4.31.1_hrkuebk64jiu2ut2d2sm4oylnu+ '@types/node': 17.0.31+ '@types/node-forge': 1.0.2+ '@typescript-eslint/eslint-plugin': 4.31.1_lii63oz3usekbu5ehvrcuwn5jy+ '@typescript-eslint/parser': 4.31.1_e4zyhrvfnqudwdx5bevnvkluy4'@zerodevx/svelte-toast': 0.7.1- autoprefixer: [email protected]+ autoprefixer: [email protected]cross-env: 7.0.3cross-var: 1.1.0eslint: 7.32.0eslint-config-prettier: [email protected]- eslint-plugin-svelte3: 3.4.1_4oxeyilw5mxcaksmcxtpjddhfe+ eslint-plugin-svelte3: 3.4.1_6wevxxng4y4ff26nzlndg2wnpahusky: 7.0.4- lint-staged: 12.4.0- postcss: 8.4.12+ lint-staged: 12.4.1+ postcss: 8.4.13prettier: 2.6.2- prettier-plugin-svelte: 2.7.0_sqtt6dzjlskmywoml5ykunxlce+ prettier-plugin-svelte: 2.7.0_kkjbqzpydplecjtkxrgomroeruprettier-plugin-tailwindcss: [email protected]prisma: 3.11.1- svelte: 3.47.0- svelte-check: 2.7.0_cp6olp7pwsfaq5mjijwt65d6uy- svelte-preprocess: 4.10.6_igaqrb5onrwvsmrrc32h4m72ha+ svelte: 3.48.0+ svelte-check: 2.7.0_f2ke6qjyzu5axsjd6yk3u4tn7a+ svelte-preprocess: 4.10.6_nq4dx2skq5drra53vttuo4lltusvelte-select: 4.4.7- sveltekit-i18n: [email protected]+ sveltekit-i18n: [email protected]tailwindcss: [email protected]- ts-node: 10.7.0_3z6inmgn4ud4moqealnfxgbl2m- tslib: 2.3.1- typescript: 4.6.3+ ts-node: 10.7.0_l47be6km5p57gglrggidw5gsgm+ tslib: 2.4.0+ typescript: 4.6.4packages:/@babel/code-frame/7.12.11:@@ -285,55 +287,55 @@ packages:picomatch: 2.3.0dev: true- /@sentry/core/6.19.6:+ /@sentry/core/6.19.7:resolution:{- integrity: sha512-biEotGRr44/vBCOegkTfC9rwqaqRKIpFljKGyYU6/NtzMRooktqOhjmjmItNCMRknArdeaQwA8lk2jcZDXX3Og==+ integrity: sha512-tOfZ/umqB2AcHPGbIrsFLcvApdTm9ggpi/kQZFkej7kMphjT+SGBiQfYtjyg9jcRW+ilAR4JXC9BGKsdEQ+8Vw==}engines: { node: '>=6' }dependencies:- '@sentry/hub': 6.19.6- '@sentry/minimal': 6.19.6- '@sentry/types': 6.19.6- '@sentry/utils': 6.19.6+ '@sentry/hub': 6.19.7+ '@sentry/minimal': 6.19.7+ '@sentry/types': 6.19.7+ '@sentry/utils': 6.19.7tslib: 1.14.1dev: false- /@sentry/hub/6.19.6:+ /@sentry/hub/6.19.7:resolution:{- integrity: sha512-PuEOBZxvx3bjxcXmWWZfWXG+orojQiWzv9LQXjIgroVMKM/GG4QtZbnWl1hOckUj7WtKNl4hEGO2g/6PyCV/vA==+ integrity: sha512-y3OtbYFAqKHCWezF0EGGr5lcyI2KbaXW2Ik7Xp8Mu9TxbSTuwTe4rTntwg8ngPjUQU3SUHzgjqVB8qjiGqFXCA==}engines: { node: '>=6' }dependencies:- '@sentry/types': 6.19.6- '@sentry/utils': 6.19.6+ '@sentry/types': 6.19.7+ '@sentry/utils': 6.19.7tslib: 1.14.1dev: false- /@sentry/minimal/6.19.6:+ /@sentry/minimal/6.19.7:resolution:{- integrity: sha512-T1NKcv+HTlmd8EbzUgnGPl4ySQGHWMCyZ8a8kXVMZOPDzphN3fVIzkYzWmSftCWp0rpabXPt9aRF2mfBKU+mAQ==+ integrity: sha512-wcYmSJOdvk6VAPx8IcmZgN08XTXRwRtB1aOLZm+MVHjIZIhHoBGZJYTVQS/BWjldsamj2cX3YGbGXNunaCfYJQ==}engines: { node: '>=6' }dependencies:- '@sentry/hub': 6.19.6- '@sentry/types': 6.19.6+ '@sentry/hub': 6.19.7+ '@sentry/types': 6.19.7tslib: 1.14.1dev: false- /@sentry/node/6.19.6:+ /@sentry/node/6.19.7:resolution:{- integrity: sha512-kHQMfsy40ZxxdS9zMPmXCOOLWOJbQj6/aVSHt/L1QthYcgkAi7NJQNXnQIPWQDe8eP3DfNIWM7dc446coqjXrQ==+ integrity: sha512-gtmRC4dAXKODMpHXKfrkfvyBL3cI8y64vEi3fDD046uqYcrWdgoQsffuBbxMAizc6Ez1ia+f0Flue6p15Qaltg==}engines: { node: '>=6' }dependencies:- '@sentry/core': 6.19.6- '@sentry/hub': 6.19.6- '@sentry/types': 6.19.6- '@sentry/utils': 6.19.6+ '@sentry/core': 6.19.7+ '@sentry/hub': 6.19.7+ '@sentry/types': 6.19.7+ '@sentry/utils': 6.19.7cookie: 0.4.2https-proxy-agent: 5.0.0lru_map: 0.3.3@@ -342,22 +344,22 @@ packages:- supports-colordev: false- /@sentry/types/6.19.6:+ /@sentry/types/6.19.7:resolution:{- integrity: sha512-QH34LMJidEUPZK78l+Frt3AaVFJhEmIi05Zf8WHd9/iTt+OqvCHBgq49DDr1FWFqyYWm/QgW/3bIoikFpfsXyQ==+ integrity: sha512-jH84pDYE+hHIbVnab3Hr+ZXr1v8QABfhx39KknxqKWr2l0oEItzepV0URvbEhB446lk/S/59230dlUUIBGsXbg==}engines: { node: '>=6' }dev: false- /@sentry/utils/6.19.6:+ /@sentry/utils/6.19.7:resolution:{- integrity: sha512-fAMWcsguL0632eWrROp/vhPgI7sBj/JROWVPzpabwVkm9z3m1rQm6iLFn4qfkZL8Ozy6NVZPXOQ7EXmeU24byg==+ integrity: sha512-z95ECmE3i9pbWoXQrD/7PgkBAzJYR+iXtPuTkpBjDKs86O3mT+PXOT3BAn79w2wkn7/i3vOGD2xVr1uiMl26dA==}engines: { node: '>=6' }dependencies:- '@sentry/types': 6.19.6+ '@sentry/types': 6.19.7tslib: 1.14.1dev: false@@ -378,19 +380,20 @@ packages:tiny-glob: 0.2.9dev: true- /@sveltejs/kit/[email protected]:+ /@sveltejs/kit/[email protected]:resolution:{- integrity: sha512-oLjWOWzjriJD2t210r7ALuH/8ZADrJGsOODzRCRSJvRBCt0Q7VKVLqwKbM/RlZzD1k8Af2uRodQT11kP98hAIA==+ integrity: sha512-prJqmXZ2H1wmFfnMw7wDujfbkcA8vuubuqUkpVVmXhfh2+SEzQscPTNwxoE5EJxb5sywtLWEvYx3hv1gPS4Lvg==}engines: { node: '>=14.13' }hasBin: truepeerDependencies:svelte: ^3.44.0dependencies:- '@sveltejs/vite-plugin-svelte': [email protected][email protected]+ '@sveltejs/vite-plugin-svelte': [email protected][email protected]+ chokidar: 3.5.3sade: 1.7.4- svelte: 3.47.0+ svelte: 3.48.0vite: 2.9.1transitivePeerDependencies:- diff-match-patch@@ -400,7 +403,7 @@ packages:- supports-colordev: true- /@sveltejs/vite-plugin-svelte/[email protected][email protected]:+ /@sveltejs/vite-plugin-svelte/[email protected][email protected]:resolution:{integrity: sha512-aj0h2+ZixgT+yoJFIs8dRRw/Cj9tgNu3+hY4CJikpa04mfhR61wXqJFfi2ZEFMUvFda5nCxKYIChFkc6wq5fJA==@@ -419,22 +422,22 @@ packages:kleur: 4.1.4magic-string: 0.25.7require-relative: 0.8.7- svelte: 3.47.0- svelte-hmr: [email protected]+ svelte: 3.48.0+ svelte-hmr: [email protected]vite: 2.9.1transitivePeerDependencies:- supports-colordev: true- /@sveltekit-i18n/base/[email protected]:+ /@sveltekit-i18n/base/[email protected]:resolution:{- integrity: sha512-J/sMU0OwS3dCLOuilHMBqu8vZHuuXiNV9vFJx8Nb4/b5BlR/KCZ4bCXI8wZR02GHeCOYKZxWus07CM1scxa/jw==+ integrity: sha512-F8gqG2+KAOeT0o2wYlUrW3TRCX7zaD7rBy/1CEVNw0irfw9TgFf/ODmhubkHHT3+6Zk+SMz8RNgeuffBfAMbJw==}peerDependencies:svelte: ^3.xdependencies:- svelte: 3.47.0+ svelte: 3.48.0optionalDependencies:'@sveltekit-i18n/parser-default': 1.0.3dev: true@@ -492,7 +495,7 @@ packages:dependencies:'@types/http-cache-semantics': 4.0.1'@types/keyv': 3.1.3- '@types/node': 17.0.25+ '@types/node': 17.0.31'@types/responselike': 1.0.0dev: false@@ -503,10 +506,10 @@ packages:}dev: false- /@types/js-cookie/3.0.1:+ /@types/js-cookie/3.0.2:resolution:{- integrity: sha512-7wg/8gfHltklehP+oyJnZrz9XBuX5ZPP4zB6UsI84utdlkRYLnOm2HfpLXazTwZA+fpGn0ir8tGNgVnMEleBGQ==+ integrity: sha512-6+0ekgfusHftJNYpihfkMu8BWdeHs9EOJuGcSofErjstGPfPGEu9yTu4t460lTzzAMl2cM5zngQJqPMHbbnvYA==}dev: true@@ -530,22 +533,22 @@ packages:integrity: sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==}dependencies:- '@types/node': 17.0.25+ '@types/node': 17.0.31dev: false- /@types/node-forge/1.0.1:+ /@types/node-forge/1.0.2:resolution:{- integrity: sha512-96ELNKv9tQJ19afdBUiM5iDw7OYEc53iUc51gAPR2aGaqRsO1DBROjqgZRjZa1tkPj7TnEOR0EnyAX6iryGkzA==+ integrity: sha512-J1OkeZGaW0y9Y7xD49Ja8O82B9l5nZDeoYuGWqIOYPAf9LR+xF23k9ILdzv8dH+2H033fx3D5oiA0GlmicI+sg==}dependencies:- '@types/node': 17.0.25+ '@types/node': 17.0.31dev: true- /@types/node/17.0.25:+ /@types/node/17.0.31:resolution:{- integrity: sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==+ integrity: sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==}/@types/pug/2.0.5:@@ -561,7 +564,7 @@ packages:integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}dependencies:- '@types/node': 17.0.25+ '@types/node': 17.0.31dev: false/@types/sass/1.16.1:@@ -570,10 +573,10 @@ packages:integrity: sha512-iZUcRrGuz/Tbg3loODpW7vrQJkUtpY2fFSf4ELqqkApcS2TkZ1msk7ie8iZPB86lDOP8QOTTmuvWjc5S0R9OjQ==}dependencies:- '@types/node': 17.0.25+ '@types/node': 17.0.31dev: true- /@typescript-eslint/eslint-plugin/4.31.1_r3ph5xlwsrsg4ewthrjemd3cfq:+ /@typescript-eslint/eslint-plugin/4.31.1_lii63oz3usekbu5ehvrcuwn5jy:resolution:{integrity: sha512-UDqhWmd5i0TvPLmbK5xY3UZB0zEGseF+DHPghZ37Sb83Qd3p8ujhvAtkU4OF46Ka5Pm5kWvFIx0cCTBFKo0alA==@@ -587,21 +590,21 @@ packages:typescript:optional: truedependencies:- '@typescript-eslint/experimental-utils': 4.31.1_hrkuebk64jiu2ut2d2sm4oylnu- '@typescript-eslint/parser': 4.31.1_hrkuebk64jiu2ut2d2sm4oylnu+ '@typescript-eslint/experimental-utils': 4.31.1_e4zyhrvfnqudwdx5bevnvkluy4+ '@typescript-eslint/parser': 4.31.1_e4zyhrvfnqudwdx5bevnvkluy4'@typescript-eslint/scope-manager': 4.31.1debug: 4.3.3eslint: 7.32.0functional-red-black-tree: 1.0.1regexpp: 3.2.0semver: 7.3.5- tsutils: [email protected]- typescript: 4.6.3+ tsutils: [email protected]+ typescript: 4.6.4transitivePeerDependencies:- supports-colordev: true- /@typescript-eslint/experimental-utils/4.31.1_hrkuebk64jiu2ut2d2sm4oylnu:+ /@typescript-eslint/experimental-utils/4.31.1_e4zyhrvfnqudwdx5bevnvkluy4:resolution:{integrity: sha512-NtoPsqmcSsWty0mcL5nTZXMf7Ei0Xr2MT8jWjXMVgRK0/1qeQ2jZzLFUh4QtyJ4+/lPUyMw5cSfeeME+Zrtp9Q==@@ -613,7 +616,7 @@ packages:'@types/json-schema': 7.0.9'@typescript-eslint/scope-manager': 4.31.1'@typescript-eslint/types': 4.31.1- '@typescript-eslint/typescript-estree': [email protected]+ '@typescript-eslint/typescript-estree': [email protected]eslint: 7.32.0eslint-scope: 5.1.1eslint-utils: [email protected]@@ -622,7 +625,7 @@ packages:- typescriptdev: true- /@typescript-eslint/parser/4.31.1_hrkuebk64jiu2ut2d2sm4oylnu:+ /@typescript-eslint/parser/4.31.1_e4zyhrvfnqudwdx5bevnvkluy4:resolution:{integrity: sha512-dnVZDB6FhpIby6yVbHkwTKkn2ypjVIfAR9nh+kYsA/ZL0JlTsd22BiDjouotisY3Irmd3OW1qlk9EI5R8GrvRQ==@@ -637,10 +640,10 @@ packages:dependencies:'@typescript-eslint/scope-manager': 4.31.1'@typescript-eslint/types': 4.31.1- '@typescript-eslint/typescript-estree': [email protected]+ '@typescript-eslint/typescript-estree': [email protected]debug: 4.3.3eslint: 7.32.0- typescript: 4.6.3+ typescript: 4.6.4transitivePeerDependencies:- supports-colordev: true@@ -664,7 +667,7 @@ packages:engines: { node: ^8.10.0 || ^10.13.0 || >=11.10.1 }dev: true- /@typescript-eslint/typescript-estree/[email protected]:+ /@typescript-eslint/typescript-estree/[email protected]:resolution:{integrity: sha512-EGHkbsUvjFrvRnusk6yFGqrqMBTue5E5ROnS5puj3laGQPasVUgwhrxfcgkdHNFECHAewpvELE1Gjv0XO3mdWg==@@ -682,8 +685,8 @@ packages:globby: 11.0.4is-glob: 4.0.3semver: 7.3.5- tsutils: [email protected]- typescript: 4.6.3+ tsutils: [email protected]+ typescript: 4.6.4transitivePeerDependencies:- supports-colordev: true@@ -956,22 +959,22 @@ packages:typpy: 2.3.11dev: false- /autoprefixer/[email protected]:+ /autoprefixer/[email protected]:resolution:{- integrity: sha512-Tm8JxsB286VweiZ5F0anmbyGiNI3v3wGv3mz9W+cxEDYB/6jbnj6GM9H9mK3wIL8ftgl+C07Lcwb8PG5PCCPzA==+ integrity: sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==}engines: { node: ^10 || ^12 || >=14 }hasBin: truepeerDependencies:postcss: ^8.1.0dependencies:- browserslist: 4.20.2- caniuse-lite: 1.0.30001320+ browserslist: 4.20.3+ caniuse-lite: 1.0.30001338fraction.js: 4.2.0normalize-range: 0.1.2picocolors: 1.0.0- postcss: 8.4.12+ postcss: 8.4.13postcss-value-parser: 4.2.0dev: true@@ -1653,18 +1656,18 @@ packages:fill-range: 7.0.1dev: true- /browserslist/4.20.2:+ /browserslist/4.20.3:resolution:{- integrity: sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==+ integrity: sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==}engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 }hasBin: truedependencies:- caniuse-lite: 1.0.30001320- electron-to-chromium: 1.4.93+ caniuse-lite: 1.0.30001338+ electron-to-chromium: 1.4.137escalade: 3.1.1- node-releases: 2.0.2+ node-releases: 2.0.4picocolors: 1.0.0dev: true@@ -1686,10 +1689,10 @@ packages:ieee754: 1.2.1dev: false- /bullmq/1.80.4:+ /bullmq/1.81.4:resolution:{- integrity: sha512-j3PyjU16gqmb3Md9QjMInJdbMvxIlSJx7mojtoP06LV9MfhzW75DkDrpSuJlF0H+0+u6MViV4hhaGTxky5OJWw==+ integrity: sha512-sUEWOMKZnWlh1/XNqYAoSwXW6P8nZN7uJiHKZ8XlZCiIxWlEGjFtlugkkiCZ0lsTI2nNRHdxfpn78x9K3L1utQ==}dependencies:cron-parser: 4.2.1@@ -1753,10 +1756,10 @@ packages:engines: { node: '>=6' }dev: false- /caniuse-lite/1.0.30001320:+ /caniuse-lite/1.0.30001338:resolution:{- integrity: sha512-MWPzG54AGdo3nWx7zHZTefseM5Y1ccM7hlQKHRqJkPozUaw3hNbBTMmLn16GG2FUzjR13Cr3NPfhIieX5PzXDA==+ integrity: sha512-1gLHWyfVoRDsHieO+CaeYe7jSo/MT7D7lhaXUiwwbuR5BwQxORs0f1tAwUSQr3YbxRXJvxHM/PA5FfPQRnsPeQ==}dev: true@@ -2048,10 +2051,10 @@ packages:}dev: false- /dayjs/1.11.1:+ /dayjs/1.11.2:resolution:{- integrity: sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA==+ integrity: sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw==}dev: false@@ -2267,10 +2270,10 @@ packages:safe-buffer: 5.2.1dev: false- /electron-to-chromium/1.4.93:+ /electron-to-chromium/1.4.137:resolution:{- integrity: sha512-ywq9Pc5Gwwpv7NG767CtoU8xF3aAUQJjH9//Wy3MBCg4w5JSLbJUq2L8IsCdzPMjvSgxuue9WcVaTOyyxCL0aQ==+ integrity: sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==}dev: true@@ -2615,7 +2618,7 @@ packages:eslint: 7.32.0dev: true- /eslint-plugin-svelte3/3.4.1_4oxeyilw5mxcaksmcxtpjddhfe:+ /eslint-plugin-svelte3/3.4.1_6wevxxng4y4ff26nzlndg2wnpa:resolution:{integrity: sha512-7p59WG8qV8L6wLdl4d/c3mdjkgVglQCdv5XOTk/iNPBKXuuV+Q0eFP5Wa6iJd/G2M1qR3BkLPEzaANOqKAZczw==@@ -2626,7 +2629,7 @@ packages:svelte: ^3.2.0dependencies:eslint: 7.32.0- svelte: 3.47.0+ svelte: 3.48.0dev: true/eslint-scope/5.1.1:@@ -3080,10 +3083,10 @@ packages:}dev: true- /got/12.0.3:+ /got/12.0.4:resolution:{- integrity: sha512-hmdcXi/S0gcAtDg4P8j/rM7+j3o1Aq6bXhjxkDhRY2ipe7PHpvx/14DgTY2czHOLaGeU8VRvRecidwfu9qdFug==+ integrity: sha512-2Eyz4iU/ktq7wtMFXxzK7g5p35uNYLLdiZarZ5/Yn3IJlNEpBd5+dCgcAyxN8/8guZLszffwe3wVyw+DEVrpBg==}engines: { node: '>=14.16' }dependencies:@@ -3544,10 +3547,10 @@ packages:engines: { node: '>=10' }dev: true- /lint-staged/12.4.0:+ /lint-staged/12.4.1:resolution:{- integrity: sha512-3X7MR0h9b7qf4iXf/1n7RlVAx+EzpAZXoCEMhVSpaBlgKDfH2ewf+QUm7BddFyq29v4dgPP+8+uYpWuSWx035A==+ integrity: sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==}engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 }hasBin: true@@ -3884,10 +3887,10 @@ packages:dev: falseoptional: true- /nanoid/3.3.1:+ /nanoid/3.3.4:resolution:{- integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==+ integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==}engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 }hasBin: true@@ -3914,10 +3917,17 @@ packages:dev: falseoptional: true- /node-releases/2.0.2:+ /node-os-utils/1.3.6:+ resolution:+ {+ integrity: sha512-WympE9ELtdOzNak/rAuuIV5DwvX/PTJtN0LjyWeGyTTR2Kt0sY56ldLoGbVBnfM1dz46VeO3sHcNZI5BZ+EB+w==+ }+ dev: false++ /node-releases/2.0.4:resolution:{- integrity: sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==+ integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==}dev: true@@ -4110,7 +4120,7 @@ packages:hasBin: truedev: true- /postcss-js/[email protected]:+ /postcss-js/[email protected]:resolution:{integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==@@ -4120,10 +4130,10 @@ packages:postcss: ^8.3.3dependencies:camelcase-css: 2.0.1- postcss: 8.4.12+ postcss: 8.4.13dev: true- /postcss-load-config/3.1.4_ysmyu6g5dtd6yanj6zrab4uqoy:+ /postcss-load-config/3.1.4_4jqnslpwnj4ifyjfqbkuebd4fy:resolution:{integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==@@ -4139,12 +4149,12 @@ packages:optional: truedependencies:lilconfig: 2.0.5- postcss: 8.4.12- ts-node: 10.7.0_3z6inmgn4ud4moqealnfxgbl2m+ postcss: 8.4.13+ ts-node: 10.7.0_l47be6km5p57gglrggidw5gsgmyaml: 1.10.2dev: true- /postcss-nested/[email protected]:+ /postcss-nested/[email protected]:resolution:{integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==@@ -4153,7 +4163,7 @@ packages:peerDependencies:postcss: ^8.2.14dependencies:- postcss: 8.4.12+ postcss: 8.4.13postcss-selector-parser: 6.0.10dev: true@@ -4175,14 +4185,14 @@ packages:}dev: true- /postcss/8.4.12:+ /postcss/8.4.13:resolution:{- integrity: sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==+ integrity: sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA==}engines: { node: ^10 || ^12 || >=14 }dependencies:- nanoid: 3.3.1+ nanoid: 3.3.4picocolors: 1.0.0source-map-js: 1.0.2dev: true@@ -4195,7 +4205,7 @@ packages:engines: { node: '>= 0.8.0' }dev: true- /prettier-plugin-svelte/2.7.0_sqtt6dzjlskmywoml5ykunxlce:+ /prettier-plugin-svelte/2.7.0_kkjbqzpydplecjtkxrgomroeru:resolution:{integrity: sha512-fQhhZICprZot2IqEyoiUYLTRdumULGRvw0o4dzl5jt0jfzVWdGqeYW27QTWAeXhoupEZJULmNoH3ueJwUWFLIA==@@ -4205,7 +4215,7 @@ packages:svelte: ^3.2.0dependencies:prettier: 2.6.2- svelte: 3.47.0+ svelte: 3.48.0dev: true/prettier-plugin-tailwindcss/[email protected]:@@ -4513,7 +4523,7 @@ packages:integrity: sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==}dependencies:- tslib: 2.3.1+ tslib: 2.4.0dev: true/sade/1.7.4:@@ -4878,7 +4888,7 @@ packages:engines: { node: '>= 0.4' }dev: true- /svelte-check/2.7.0_cp6olp7pwsfaq5mjijwt65d6uy:+ /svelte-check/2.7.0_f2ke6qjyzu5axsjd6yk3u4tn7a:resolution:{integrity: sha512-GrvG24j0+i8AOm0k0KyJ6Dqc+TAR2yzB7rtS4nljHStunVxCTr/1KYlv4EsOeoqtHLzeWMOd5D2O6nDdP/yw4A==@@ -4893,9 +4903,9 @@ packages:picocolors: 1.0.0sade: 1.7.4source-map: 0.7.3- svelte: 3.47.0- svelte-preprocess: 4.10.6_igaqrb5onrwvsmrrc32h4m72ha- typescript: 4.6.3+ svelte: 3.48.0+ svelte-preprocess: 4.10.6_nq4dx2skq5drra53vttuo4lltu+ typescript: 4.6.4transitivePeerDependencies:- '@babel/core'- coffeescript@@ -4909,7 +4919,7 @@ packages:- sugarssdev: true- /svelte-hmr/[email protected]:+ /svelte-hmr/[email protected]:resolution:{integrity: sha512-bKE9+4qb4sAnA+TKHiYurUl970rjA0XmlP9TEP7K/ncyWz3m81kA4HOgmlZK/7irGK7gzZlaPDI3cmf8fp/+tg==@@ -4917,17 +4927,17 @@ packages:peerDependencies:svelte: '>=3.19.0'dependencies:- svelte: 3.47.0+ svelte: 3.48.0dev: true- /svelte-kit-cookie-session/2.1.3:+ /svelte-kit-cookie-session/2.1.4:resolution:{- integrity: sha512-7Xk3CNbpLAi1KodlsV5W5jULQ2NxQunaXtAYqAuzIEXIq2EwC4oDa25kdmHjNe33epV0t4r0WwxZOuSdJPsapg==+ integrity: sha512-z/ckxHWguYyy66UqfId4Lu+A77ft/3mV5oozbRTI9bnQY0tyJfns/SM0ikdkj7OV5GiI8kq7GSOGvajWwyGeZw==}dev: false- /svelte-preprocess/4.10.6_igaqrb5onrwvsmrrc32h4m72ha:+ /svelte-preprocess/4.10.6_nq4dx2skq5drra53vttuo4lltu:resolution:{integrity: sha512-I2SV1w/AveMvgIQlUF/ZOO3PYVnhxfcpNyGt8pxpUVhPfyfL/CZBkkw/KPfuFix5FJ9TnnNYMhACK3DtSaYVVQ==@@ -4975,11 +4985,11 @@ packages:'@types/sass': 1.16.1detect-indent: 6.1.0magic-string: 0.25.7- postcss: 8.4.12+ postcss: 8.4.13sorcery: 0.10.0strip-indent: 3.0.0- svelte: 3.47.0- typescript: 4.6.3+ svelte: 3.48.0+ typescript: 4.6.4dev: true/svelte-select/4.4.7:@@ -4989,25 +4999,25 @@ packages:}dev: true- /svelte/3.47.0:+ /svelte/3.48.0:resolution:{- integrity: sha512-4JaJp3HEoTCGARRWZQIZDUanhYv0iyoHikklVHVLH9xFE9db22g4TDv7CPeNA8HD1JgjXI1vlhR1JZvvhaTu2Q==+ integrity: sha512-fN2YRm/bGumvjUpu6yI3BpvZnpIm9I6A7HR4oUNYd7ggYyIwSA/BX7DJ+UXXffLp6XNcUijyLvttbPVCYa/3xQ==}engines: { node: '>= 8' }dev: true- /sveltekit-i18n/[email protected]:+ /sveltekit-i18n/[email protected]:resolution:{- integrity: sha512-s5YxcbNd2EWNZaZR1A4Drt8s53E4fpUkN4XIWd3VRpw1pihZVWssqmBW1qkjQ6AB0kiu1Qwule+vt1HkbQOjrg==+ integrity: sha512-1CyaRN6dBvp467JjBdji+nJf+7pZ3myFu+2YaCuGSAt09Cvt5ndfRbzy+aAd5WJdk6Lu/hnPEE7ZZFauTbDRNw==}peerDependencies:svelte: ^3.xdependencies:- '@sveltekit-i18n/base': [email protected]+ '@sveltekit-i18n/base': [email protected]'@sveltekit-i18n/parser-default': 1.0.3- svelte: 3.47.0+ svelte: 3.48.0dev: true/table/6.7.2:@@ -5057,10 +5067,10 @@ packages:normalize-path: 3.0.0object-hash: 3.0.0picocolors: 1.0.0- postcss: 8.4.12- postcss-js: [email protected]- postcss-load-config: 3.1.4_ysmyu6g5dtd6yanj6zrab4uqoy- postcss-nested: [email protected]+ postcss: 8.4.13+ postcss-js: [email protected]+ postcss-load-config: 3.1.4_4jqnslpwnj4ifyjfqbkuebd4fy+ postcss-nested: [email protected]postcss-selector-parser: 6.0.10postcss-value-parser: 4.2.0quick-lru: 5.1.1@@ -5133,7 +5143,7 @@ packages:engines: { node: '>=0.10.0' }dev: true- /ts-node/10.7.0_3z6inmgn4ud4moqealnfxgbl2m:+ /ts-node/10.7.0_l47be6km5p57gglrggidw5gsgm:resolution:{integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==@@ -5155,14 +5165,14 @@ packages:'@tsconfig/node12': 1.0.9'@tsconfig/node14': 1.0.1'@tsconfig/node16': 1.0.2- '@types/node': 17.0.25+ '@types/node': 17.0.31acorn: 8.5.0acorn-walk: 8.2.0arg: 4.1.3create-require: 1.1.1diff: 4.0.2make-error: 1.3.6- typescript: 4.6.3+ typescript: 4.6.4v8-compile-cache-lib: 3.0.0yn: 3.1.1dev: true@@ -5173,14 +5183,14 @@ packages:integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}- /tslib/2.3.1:+ /tslib/2.4.0:resolution:{- integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==+ integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}dev: true- /tsutils/[email protected]:+ /tsutils/[email protected]:resolution:{integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==@@ -5190,7 +5200,7 @@ packages:typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'dependencies:tslib: 1.14.1- typescript: 4.6.3+ typescript: 4.6.4dev: true/tweetnacl/0.14.5:@@ -5223,10 +5233,10 @@ packages:engines: { node: '>=10' }dev: true- /typescript/4.6.3:+ /typescript/4.6.4:resolution:{- integrity: sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==+ integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==}engines: { node: '>=4.2.0' }hasBin: true@@ -5303,7 +5313,7 @@ packages:optional: truedependencies:esbuild: 0.14.34- postcss: 8.4.12+ postcss: 8.4.13resolve: 1.22.0rollup: 2.61.1optionalDependencies:diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelteindex 5952073e01..67aa445fb1 100644--- a/src/routes/__layout.svelte+++ b/src/routes/__layout.svelte@@ -78,6 +78,7 @@}}});+async function logout() {try {await del(`/logout.json`, {});diff --git a/src/routes/dashboard.json.ts b/src/routes/dashboard.json.tsindex ff01dbfd8d..297ce1a148 100644--- a/src/routes/dashboard.json.ts+++ b/src/routes/dashboard.json.ts@@ -2,45 +2,67 @@ import { getUserDetails } from '$lib/common';import * as db from '$lib/database';import { ErrorHandler } from '$lib/database';import type { RequestHandler } from '@sveltejs/kit';+import os from 'node:os';+import osu from 'node-os-utils';export const get: RequestHandler = async (event) => {const { userId, teamId, status, body } = await getUserDetails(event);if (status === 401) return { status, body };-- try {- const applicationsCount = await db.prisma.application.count({- where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }- });- const sourcesCount = await db.prisma.gitSource.count({- where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }- });- const destinationsCount = await db.prisma.destinationDocker.count({- where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }- });- const teamsCount = await db.prisma.permission.count({ where: { userId } });- const databasesCount = await db.prisma.database.count({- where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }- });- const servicesCount = await db.prisma.service.count({- where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }- });- const teams = await db.prisma.permission.findMany({- where: { userId },- include: { team: { include: { _count: { select: { users: true } } } } }- });- return {- body: {- teams,- applicationsCount,- sourcesCount,- destinationsCount,- teamsCount,- databasesCount,- servicesCount- }- };- } catch (error) {- return ErrorHandler(error);+ const usage = event.url.searchParams.get('usage');+ if (usage) {+ try {+ return {+ status: 200,+ body: {+ uptime: os.uptime(),+ memory: await osu.mem.info(),+ cpu: {+ load: os.loadavg(),+ usage: await osu.cpu.usage(),+ count: os.cpus().length+ },+ disk: await osu.drive.info()+ }+ };+ } catch (error) {+ return ErrorHandler(error);+ }+ } else {+ try {+ const applicationsCount = await db.prisma.application.count({+ where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }+ });+ const sourcesCount = await db.prisma.gitSource.count({+ where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }+ });+ const destinationsCount = await db.prisma.destinationDocker.count({+ where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }+ });+ const teamsCount = await db.prisma.permission.count({ where: { userId } });+ const databasesCount = await db.prisma.database.count({+ where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }+ });+ const servicesCount = await db.prisma.service.count({+ where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } }+ });+ const teams = await db.prisma.permission.findMany({+ where: { userId },+ include: { team: { include: { _count: { select: { users: true } } } } }+ });+ return {+ body: {+ teams,+ applicationsCount,+ sourcesCount,+ destinationsCount,+ teamsCount,+ databasesCount,+ servicesCount+ }+ };+ } catch (error) {+ return ErrorHandler(error);+ }}};diff --git a/src/routes/index.svelte b/src/routes/index.svelteindex 1eaabbd5c9..73cad38326 100644--- a/src/routes/index.svelte+++ b/src/routes/index.svelte@@ -21,6 +21,9 @@<script lang="ts">import { t } from '$lib/translations';+ import { get } from '$lib/api';+ import { onDestroy, onMount } from 'svelte';+ import Loading from './applications/[id]/logs/_Loading.svelte';export let applicationsCount: number;export let sourcesCount: number;@@ -28,89 +31,206 @@export let teamsCount: number;export let databasesCount: number;export let servicesCount: number;+ let loading = {+ usage: false+ };+ let usageInterval = null;+ let memoryWarning = false;+ let cpuWarning = false;+ let diskWarning = false;++ let usage = {+ cpu: {+ load: [0, 0, 0],+ count: 0,+ usage: 0+ },+ memory: {+ totalMemMb: 0,+ freeMemMb: 0,+ usedMemMb: 0,+ freeMemPercentage: 0+ },+ disk: {+ freePercentage: 0,+ totalGb: 0,+ usedGb: 0+ }+ };+ async function getStatus() {+ if (loading.usage) return;+ try {+ loading.usage = true;+ const data = await get(`/dashboard.json?usage=true`);+ usage = data;+ if (usage.memory.freeMemPercentage < 15) {+ memoryWarning = true;+ } else {+ memoryWarning = false;+ }+ if (usage.cpu.usage > 90) {+ cpuWarning = true;+ } else {+ cpuWarning = false;+ }+ if (usage.disk.freePercentage < 10) {+ diskWarning = true;+ } else {+ diskWarning = false;+ }+ } catch (error) {+ } finally {+ loading.usage = false;+ }+ }+ onDestroy(() => {+ clearInterval(usageInterval);+ });+ onMount(async () => {+ await getStatus();+ usageInterval = setInterval(async () => {+ await getStatus();+ }, 1000);+ });</script><div class="flex space-x-1 p-6 font-bold"><div class="mr-4 text-2xl tracking-tight">{$t('index.dashboard')}</div></div>-<div class="mt-10 pb-12 tracking-tight sm:pb-16">- <div class="relative">- <div class="absolute inset-0 h-1/2" />- <div class="relative mx-auto px-4 sm:px-6 lg:px-8">- <div class="mx-auto max-w-4xl">- <dl class="gap-5 gap-y-16 sm:grid sm:grid-cols-3">- <a- href="/applications"- sveltekit:prefetch- class="flex cursor-pointer flex-col rounded p-6 text-center text-green-500 no-underline transition duration-150 hover:bg-green-500 hover:text-white"- >- <dt class="order-2 mt-2 text-sm font-bold uppercase leading-6 text-white">- {$t('index.applications')}- </dt>- <dd class="order-1 text-5xl font-extrabold ">- {applicationsCount}- </dd>- </a>- <a- href="/destinations"- sveltekit:prefetch- class="flex cursor-pointer flex-col rounded p-6 text-center text-sky-500 no-underline transition duration-150 hover:bg-sky-500 hover:text-white"- >- <dt class="order-2 mt-2 text-sm font-bold uppercase leading-6 text-white">- {$t('index.destinations')}- </dt>- <dd class="order-1 text-5xl font-extrabold ">- {destinationsCount}- </dd>- </a>- <a- href="/sources"- sveltekit:prefetch- class="flex cursor-pointer flex-col rounded p-6 text-center text-orange-500 no-underline transition duration-150 hover:bg-orange-500 hover:text-white"- >- <dt class="order-2 mt-2 text-sm font-bold uppercase leading-6 text-white">- {$t('index.git_sources')}- </dt>- <dd class="order-1 text-5xl font-extrabold ">- {sourcesCount}- </dd>- </a>- <a- href="/databases"- sveltekit:prefetch- class="flex cursor-pointer flex-col rounded p-6 text-center text-purple-500 no-underline transition duration-150 hover:bg-purple-500 hover:text-white"- >- <dt class="order-2 mt-2 text-sm font-bold uppercase leading-6 text-white">- {$t('index.databases')}- </dt>- <dd class="order-1 text-5xl font-extrabold ">{databasesCount}</dd>- </a>- <a- href="/services"- sveltekit:prefetch- class="flex cursor-pointer flex-col rounded p-6 text-center text-pink-500 no-underline transition duration-150 hover:bg-pink-500 hover:text-white"- >- <dt class="order-2 mt-2 text-sm font-bold uppercase leading-6 text-white">- {$t('index.services')}- </dt>- <dd class="order-1 text-5xl font-extrabold ">{servicesCount}</dd>- </a>+ <div class="mx-auto max-w-4xl">+ <div class="title font-bold">Server Usage</div>++ <dl class="relative mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">+ <Loading />+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6">+ <dt class="truncate text-sm font-medium text-white">Total Memory</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {(usage?.memory.totalMemMb).toFixed(0)}+ </dd>+ </div>++ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6">+ <dt class="truncate text-sm font-medium text-white">Used Memory</dt>+ <dd class="mt-1 text-3xl font-semibold text-white ">+ {(usage?.memory.usedMemMb).toFixed(0)}+ </dd>+ </div>- <a- href="/iam"- sveltekit:prefetch- class="flex cursor-pointer flex-col rounded p-6 text-center text-cyan-500 no-underline transition duration-150 hover:bg-cyan-500 hover:text-white"- >- <dt class="order-2 mt-2 text-sm font-bold uppercase leading-6 text-white">- {$t('index.teams')}- </dt>- <dd class="order-1 text-5xl font-extrabold ">- {teamsCount}- </dd>- </a>- </dl>+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6" class:bg-red-500={memoryWarning}>+ <dt class="truncate text-sm font-medium text-white">Free Memory</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {usage?.memory.freeMemPercentage}%+ </dd></div>- </div>+ </dl>+ <dl class="relative mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6">+ <dt class="truncate text-sm font-medium text-white">Total CPUs</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {(usage?.cpu.count).toFixed(0)}+ </dd>+ </div>+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6">+ <dt class="truncate text-sm font-medium text-white">Load Average</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {usage?.cpu.load}+ </dd>+ </div>+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6" class:bg-red-500={cpuWarning}>+ <dt class="truncate text-sm font-medium text-white">CPU Usage</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {(usage?.cpu.usage).toFixed(0)}%+ </dd>+ </div>+ </dl>+ <dl class="relative mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6">+ <dt class="truncate text-sm font-medium text-white">Total Disk</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {usage?.disk.totalGb}GB+ </dd>+ </div>+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6">+ <dt class="truncate text-sm font-medium text-white">Used Disk</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {usage?.disk.usedGb}GB+ </dd>+ </div>+ <div class="overflow-hidden rounded-lg px-4 py-5 sm:p-6" class:bg-red-500={diskWarning}>+ <dt class="truncate text-sm font-medium text-white">Free Disk</dt>+ <dd class="mt-1 text-3xl font-semibold text-white">+ {usage?.disk.freePercentage}%+ </dd>+ </div>+ </dl>+ <div class="title pt-20 font-bold">Resources</div>+ <dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">+ <a+ href="/applications"+ sveltekit:prefetch+ class="overflow-hidden rounded-lg px-4 py-5 text-green-500 no-underline transition-all duration-100 hover:bg-green-500 hover:text-white sm:p-6"+ >+ <dt class="truncate text-sm font-medium text-white">{$t('index.applications')}</dt>+ <dd class="mt-1 text-3xl font-semibold ">+ {applicationsCount}+ </dd>+ </a>+ <a+ href="/destinations"+ sveltekit:prefetch+ class="overflow-hidden rounded-lg px-4 py-5 text-sky-500 no-underline transition-all duration-100 hover:bg-sky-500 hover:text-white sm:p-6"+ >+ <dt class="truncate text-sm font-medium text-white">{$t('index.destinations')}</dt>+ <dd class="mt-1 text-3xl font-semibold ">+ {destinationsCount}+ </dd>+ </a>++ <a+ href="/sources"+ sveltekit:prefetch+ class="overflow-hidden rounded-lg px-4 py-5 text-orange-500 no-underline transition-all duration-100 hover:bg-orange-500 hover:text-white sm:p-6"+ >+ <dt class="truncate text-sm font-medium text-white">{$t('index.git_sources')}</dt>+ <dd class="mt-1 text-3xl font-semibold">+ {sourcesCount}+ </dd>+ </a>+ </dl>+ <dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">+ <a+ href="/databases"+ sveltekit:prefetch+ class="overflow-hidden rounded-lg px-4 py-5 text-purple-500 no-underline transition-all duration-100 hover:bg-purple-500 hover:text-white sm:p-6"+ >+ <dt class="truncate text-sm font-medium text-white">{$t('index.databases')}</dt>+ <dd class="mt-1 text-3xl font-semibold ">+ {databasesCount}+ </dd>+ </a>++ <a+ href="/services"+ sveltekit:prefetch+ class="overflow-hidden rounded-lg px-4 py-5 text-pink-500 no-underline transition-all duration-100 hover:bg-pink-500 hover:text-white sm:p-6"+ >+ <dt class="truncate text-sm font-medium text-white">{$t('index.services')}</dt>+ <dd class="mt-1 text-3xl font-semibold ">+ {servicesCount}+ </dd>+ </a>++ <a+ href="/iam"+ sveltekit:prefetch+ class="overflow-hidden rounded-lg px-4 py-5 text-cyan-500 no-underline transition-all duration-100 hover:bg-cyan-500 hover:text-white sm:p-6"+ >+ <dt class="truncate text-sm font-medium text-white">{$t('index.teams')}</dt>+ <dd class="mt-1 text-3xl font-semibold ">+ {teamsCount}+ </dd>+ </a>+ </dl></div></div>