diff --git a/apps/ui/package.json b/apps/ui/package.json index ddff33ffd..cc5fe9009 100644 --- a/apps/ui/package.json +++ b/apps/ui/package.json @@ -38,6 +38,7 @@ "type": "module", "dependencies": { "@sveltejs/adapter-static": "1.0.0-next.39", + "@tailwindcss/typography": "^0.5.4", "cuid": "2.1.8", "daisyui": "2.24.0", "js-cookie": "3.0.1", diff --git a/apps/ui/src/lib/components/Usage.svelte b/apps/ui/src/lib/components/Usage.svelte index 6868322ad..46854145e 100644 --- a/apps/ui/src/lib/components/Usage.svelte +++ b/apps/ui/src/lib/components/Usage.svelte @@ -50,61 +50,70 @@ }); -
-
Hardware Details
-
-
-
+
+

Hardware details

+
+
+
+
Total Memory
{(usage?.memory.totalMemMb).toFixed(0)}MB
-
+ +
Used Memory
{(usage?.memory.usedMemMb).toFixed(0)}MB
-
+ +
Free Memory
{usage?.memory.freeMemPercentage}%
-
-
+ +
+
Total CPUs
{usage?.cpu.count}
-
+ +
CPU Usage
{usage?.cpu.usage}%
-
+ +
Load Average (5,10,30mins)
{usage?.cpu.load}
-
-
+ +
+
Total Disk
{usage?.disk.totalGb}GB
-
+ +
Used Disk
{usage?.disk.usedGb}GB
-
+ +
Free Disk
{usage?.disk.freePercentage}%
diff --git a/apps/ui/src/routes/index.svelte b/apps/ui/src/routes/index.svelte index d6cecacfd..896c029b8 100644 --- a/apps/ui/src/routes/index.svelte +++ b/apps/ui/src/routes/index.svelte @@ -99,256 +99,240 @@ > {/if}
-
-
-
- {#if applications.length > 0} -
-
Resources
-
- - - {#each applications as application} - - - - + {#if $appSession.teamId === '0'} + + {/if} + {#if applications.length > 0} +

Resources

+
+
+ {#each applications as application} +
+ {#await getStatus(application)} + + {:then status} + {#if status === 'Running'}1 + + {:else} + + {/if} + {/await} +
- {/each} - - {#each services as service} - - - - - - - - {/each} - {#each databases as database} - - - - - - - {/each} - -
- {#await getStatus(application)} -
- {:then status} - {#if status === 'Running'} -
- {:else} -
- {/if} - {/await} -
{application.name}
-
- - -
- Application - {#if application.settings.isBot} - | BOT - {/if} -
- {#await getStatus(service)} -
- {:then status} - {#if status === 'Running'} -
- {:else} -
- {/if} - {/await} -
{service.name}
-
- -
- Service -
-
- {#if service.fqdn} - - - - - - - {/if} - - - - - - - - - - - - - - -
- {#await getStatus(database)} -
- {:then status} - {#if status === 'Running'} -
- {:else} -
- {/if} - {/await} -
{database.name}
-
- - -
- Database -
-
- - - - - - - - - - - - - - -
+ + + + + + Website + + {/if} + {#if application.settings.isBot && application.exposePort} + + + + + + + + Server + + {/if} + + + + + + + + + + + + + + Manage + +
+
- {:else if $appSession.teamId !== '0'} -
Nothing is configured yet.
- {/if} - {#if $appSession.teamId === '0'} - - {/if} + {/each}
-
+

Services

+
+
+ {#each services as service} +
+ {#await getStatus(service)} + + {:then status} + {#if status === 'Running'}1 + + {:else} + + {/if} + {/await} +
+ +
+ + Service + +

{service.name}

+ +
+
+ {/each} +
+

Databases

+
+
+ {#each databases as database} +
+ {#await getStatus(database)} + + {:then status} + {#if status === 'Running'}1 + + {:else} + + {/if} + {/await} +
+ +
+ + Service + +

{database.name}

+ +
+
+ {/each} +
+ {:else if $appSession.teamId !== '0'} +
+

Nothing is configured yet.

+
+ {/if}
diff --git a/apps/ui/tailwind.config.cjs b/apps/ui/tailwind.config.cjs index 91cab4bf1..cc36c7115 100644 --- a/apps/ui/tailwind.config.cjs +++ b/apps/ui/tailwind.config.cjs @@ -62,5 +62,5 @@ module.exports = { scrollbar: ['dark'], extend: {} }, - plugins: [require('tailwindcss-scrollbar'), require('daisyui')] + plugins: [require('tailwindcss-scrollbar'), require('daisyui'), require("@tailwindcss/typography")] }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6788e9203..34c431e77 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -122,6 +122,7 @@ importers: '@playwright/test': 1.25.1 '@sveltejs/adapter-static': 1.0.0-next.39 '@sveltejs/kit': 1.0.0-next.405 + '@tailwindcss/typography': ^0.5.4 '@types/js-cookie': 3.0.2 '@typescript-eslint/eslint-plugin': 5.35.1 '@typescript-eslint/parser': 5.35.1 @@ -148,6 +149,7 @@ importers: vite: 3.0.5 dependencies: '@sveltejs/adapter-static': 1.0.0-next.39 + '@tailwindcss/typography': 0.5.4_tailwindcss@3.1.8 cuid: 2.1.8 daisyui: 2.24.0_25hquoklqeoqwmt7fwvvcyxm5e js-cookie: 3.0.1 @@ -170,7 +172,7 @@ importers: svelte: 3.49.0 svelte-check: 2.8.1_vylzxgme5yisu3bsyvcau4hjtq svelte-preprocess: 4.10.7_fje22ktja5v2dh6nbkissncqme - tailwindcss: 3.1.8 + tailwindcss: 3.1.8_postcss@8.4.16_postcss@8.4.16 tailwindcss-scrollbar: 0.1.0_tailwindcss@3.1.8 tslib: 2.4.0 typescript: 4.7.4 @@ -418,8 +420,8 @@ packages: engines: {node: '>=14'} hasBin: true dependencies: - '@types/node': 18.7.13 - playwright-core: 1.25.1 + '@types/node': 18.6.5 + playwright-core: 1.24.2 dev: true /@prisma/client/3.15.2_prisma@3.15.2: @@ -525,6 +527,17 @@ packages: defer-to-connect: 2.0.1 dev: false + /@tailwindcss/typography/0.5.4_tailwindcss@3.1.8: + resolution: {integrity: sha512-QEdg40EmGvE7kKoDei8zr5sf4D1pIayHj4R31bH3lX8x2BtTiR+jNejYPOkhbmy3DXgkMF9jC8xqNiGFAuL9Sg==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + dependencies: + lodash.castarray: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + tailwindcss: 3.1.8_postcss@8.4.16 + dev: false + /@tsconfig/node10/1.0.8: resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==} dev: false @@ -580,8 +593,16 @@ packages: resolution: {integrity: sha512-XwVteWQx/XkfRPyaGkw8dEbrCAkoRZ73pI3XznUYIpzbCfpQB3UnDlR5TnmdhetlT889tUJGF8QWo9xrgTpsiA==} dev: true - /@types/node/18.7.13: - resolution: {integrity: sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==} + /@types/node/18.0.3: + resolution: {integrity: sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==} + dev: true + + /@types/node/18.6.5: + resolution: {integrity: sha512-Xjt5ZGUa5WusGZJ4WJPbOT8QOqp6nDynVFRKcUt32bOgvXEoc6o085WNkYTMO7ifAj2isEfQQ2cseE+wT6jsRw==} + dev: true + + /@types/node/18.7.11: + resolution: {integrity: sha512-KZhFpSLlmK/sdocfSAjqPETTMd0ug6HIMIAwkwUpU79olnZdQtMxpQP+G1wDzCH7na+FltSIhbaZuKdwZ8RDrw==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -680,19 +701,14 @@ packages: /@typescript-eslint/types/5.35.1: resolution: {integrity: sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree/5.35.1_typescript@4.7.4: - resolution: {integrity: sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.35.1 - '@typescript-eslint/visitor-keys': 5.35.1 + '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/visitor-keys': 5.33.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -703,16 +719,55 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.35.1_4rv7y5c6xz3vfxwhbrcxxi73bq: - resolution: {integrity: sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ==} + /@typescript-eslint/typescript-estree/5.34.0_typescript@4.7.4: + resolution: {integrity: sha512-mXHAqapJJDVzxauEkfJI96j3D10sd567LlqroyCeJaHnu42sDbjxotGb3XFtGPYKPD9IyLjhsoULML1oI3M86A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.34.0 + '@typescript-eslint/visitor-keys': 5.34.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.7.4 + typescript: 4.7.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.33.0_qugx7qdu5zevzvxaiqyxfiwquq: + resolution: {integrity: sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.35.1 - '@typescript-eslint/types': 5.35.1 - '@typescript-eslint/typescript-estree': 5.35.1_typescript@4.7.4 + '@typescript-eslint/scope-manager': 5.33.0 + '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/typescript-estree': 5.33.0_typescript@4.7.4 + eslint: 8.21.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.21.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils/5.34.0_4rv7y5c6xz3vfxwhbrcxxi73bq: + resolution: {integrity: sha512-kWRYybU4Rn++7lm9yu8pbuydRyQsHRoBDIo11k7eqBWTldN4xUdVUMCsHBiE7aoEkFzrUEaZy3iH477vr4xHAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.11 + '@typescript-eslint/scope-manager': 5.34.0 + '@typescript-eslint/types': 5.34.0 + '@typescript-eslint/typescript-estree': 5.34.0_typescript@4.7.4 eslint: 8.22.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.22.0 @@ -4066,6 +4121,10 @@ packages: lodash._basetostring: 4.12.0 dev: false + /lodash.castarray/4.4.0: + resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==} + dev: false + /lodash.includes/4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} dev: false @@ -4092,7 +4151,6 @@ packages: /lodash.merge/4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true /lodash.omit/4.5.0: resolution: {integrity: sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==}