@stacksjs/defaults 0.70.207 → 0.70.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TODO.md +21 -0
- package/ai/AGENTS.md +79 -0
- package/ai/README.md +45 -0
- package/ai/claude/launch.json +12 -0
- package/ai/skills/stacks-actions/SKILL.md +128 -0
- package/ai/skills/stacks-ai/SKILL.md +276 -0
- package/ai/skills/stacks-alias/SKILL.md +94 -0
- package/ai/skills/stacks-analytics/SKILL.md +91 -0
- package/ai/skills/stacks-api/SKILL.md +738 -0
- package/ai/skills/stacks-arrays/SKILL.md +277 -0
- package/ai/skills/stacks-auth/SKILL.md +422 -0
- package/ai/skills/stacks-auto-imports/SKILL.md +138 -0
- package/ai/skills/stacks-brandkit/SKILL.md +811 -0
- package/ai/skills/stacks-browse/SKILL.md +127 -0
- package/ai/skills/stacks-browse/scripts/browse.ts +492 -0
- package/ai/skills/stacks-browser/SKILL.md +145 -0
- package/ai/skills/stacks-buddy/SKILL.md +676 -0
- package/ai/skills/stacks-build/SKILL.md +163 -0
- package/ai/skills/stacks-cache/SKILL.md +125 -0
- package/ai/skills/stacks-calendar/SKILL.md +113 -0
- package/ai/skills/stacks-chat/SKILL.md +371 -0
- package/ai/skills/stacks-cli/SKILL.md +112 -0
- package/ai/skills/stacks-cloud/SKILL.md +192 -0
- package/ai/skills/stacks-cms/SKILL.md +217 -0
- package/ai/skills/stacks-collections/SKILL.md +82 -0
- package/ai/skills/stacks-commerce/SKILL.md +114 -0
- package/ai/skills/stacks-composables/SKILL.md +161 -0
- package/ai/skills/stacks-config/SKILL.md +144 -0
- package/ai/skills/stacks-configuration/SKILL.md +154 -0
- package/ai/skills/stacks-cron/SKILL.md +123 -0
- package/ai/skills/stacks-crosswind/SKILL.md +190 -0
- package/ai/skills/stacks-dashboard/SKILL.md +173 -0
- package/ai/skills/stacks-database/SKILL.md +286 -0
- package/ai/skills/stacks-datetime/SKILL.md +269 -0
- package/ai/skills/stacks-dependencies/SKILL.md +111 -0
- package/ai/skills/stacks-deploy/SKILL.md +102 -0
- package/ai/skills/stacks-design-brutalist/SKILL.md +110 -0
- package/ai/skills/stacks-design-minimalist/SKILL.md +115 -0
- package/ai/skills/stacks-design-output/SKILL.md +55 -0
- package/ai/skills/stacks-design-soft/SKILL.md +156 -0
- package/ai/skills/stacks-design-taste/SKILL.md +1012 -0
- package/ai/skills/stacks-design-taste-codex/SKILL.md +294 -0
- package/ai/skills/stacks-desktop/SKILL.md +78 -0
- package/ai/skills/stacks-development/SKILL.md +298 -0
- package/ai/skills/stacks-dns/SKILL.md +149 -0
- package/ai/skills/stacks-docs/SKILL.md +109 -0
- package/ai/skills/stacks-email/SKILL.md +236 -0
- package/ai/skills/stacks-enums/SKILL.md +100 -0
- package/ai/skills/stacks-env/SKILL.md +181 -0
- package/ai/skills/stacks-error-handling/SKILL.md +137 -0
- package/ai/skills/stacks-events/SKILL.md +228 -0
- package/ai/skills/stacks-faker/SKILL.md +158 -0
- package/ai/skills/stacks-git/SKILL.md +158 -0
- package/ai/skills/stacks-guard/SKILL.md +98 -0
- package/ai/skills/stacks-health/SKILL.md +75 -0
- package/ai/skills/stacks-http/SKILL.md +316 -0
- package/ai/skills/stacks-i18n/SKILL.md +198 -0
- package/ai/skills/stacks-image-to-code/SKILL.md +629 -0
- package/ai/skills/stacks-imagegen-mobile/SKILL.md +1474 -0
- package/ai/skills/stacks-imagegen-web/SKILL.md +998 -0
- package/ai/skills/stacks-investigate/SKILL.md +119 -0
- package/ai/skills/stacks-jobs/SKILL.md +136 -0
- package/ai/skills/stacks-lint/SKILL.md +184 -0
- package/ai/skills/stacks-listeners/SKILL.md +99 -0
- package/ai/skills/stacks-logging/SKILL.md +78 -0
- package/ai/skills/stacks-mail/SKILL.md +120 -0
- package/ai/skills/stacks-middleware/SKILL.md +249 -0
- package/ai/skills/stacks-migrations/SKILL.md +105 -0
- package/ai/skills/stacks-models/SKILL.md +267 -0
- package/ai/skills/stacks-new-feature/SKILL.md +206 -0
- package/ai/skills/stacks-notifications/SKILL.md +210 -0
- package/ai/skills/stacks-objects/SKILL.md +205 -0
- package/ai/skills/stacks-office-hours/SKILL.md +134 -0
- package/ai/skills/stacks-orm/SKILL.md +342 -0
- package/ai/skills/stacks-path/SKILL.md +118 -0
- package/ai/skills/stacks-payments/SKILL.md +373 -0
- package/ai/skills/stacks-plan-review/SKILL.md +152 -0
- package/ai/skills/stacks-plugins/SKILL.md +149 -0
- package/ai/skills/stacks-push/SKILL.md +376 -0
- package/ai/skills/stacks-query-builder/SKILL.md +128 -0
- package/ai/skills/stacks-queue/SKILL.md +559 -0
- package/ai/skills/stacks-realtime/SKILL.md +442 -0
- package/ai/skills/stacks-redesign/SKILL.md +182 -0
- package/ai/skills/stacks-registry/SKILL.md +58 -0
- package/ai/skills/stacks-repl/SKILL.md +80 -0
- package/ai/skills/stacks-retro/SKILL.md +122 -0
- package/ai/skills/stacks-review/SKILL.md +135 -0
- package/ai/skills/stacks-router/SKILL.md +231 -0
- package/ai/skills/stacks-routes/SKILL.md +105 -0
- package/ai/skills/stacks-scaffolding/SKILL.md +162 -0
- package/ai/skills/stacks-scheduler/SKILL.md +363 -0
- package/ai/skills/stacks-search-engine/SKILL.md +112 -0
- package/ai/skills/stacks-security/SKILL.md +129 -0
- package/ai/skills/stacks-security-audit/SKILL.md +128 -0
- package/ai/skills/stacks-server/SKILL.md +458 -0
- package/ai/skills/stacks-shell/SKILL.md +62 -0
- package/ai/skills/stacks-slug/SKILL.md +87 -0
- package/ai/skills/stacks-sms/SKILL.md +385 -0
- package/ai/skills/stacks-socials/SKILL.md +303 -0
- package/ai/skills/stacks-storage/SKILL.md +576 -0
- package/ai/skills/stacks-strings/SKILL.md +416 -0
- package/ai/skills/stacks-stx/SKILL.md +176 -0
- package/ai/skills/stacks-technical-diagrams/LICENSE +22 -0
- package/ai/skills/stacks-technical-diagrams/SKILL.md +290 -0
- package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +4 -0
- package/ai/skills/stacks-technical-diagrams/assets/template.html +1252 -0
- package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +289 -0
- package/ai/skills/stacks-technical-diagrams/bunfig.toml +1 -0
- package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +64 -0
- package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +88 -0
- package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +75 -0
- package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +70 -0
- package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +41 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +62 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +371 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +82 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +295 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +91 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +384 -0
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +84 -0
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +257 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +42 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +13 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +230 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +40 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +88 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +40 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +103 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +481 -0
- package/ai/skills/stacks-technical-diagrams/schemas/README.md +68 -0
- package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +121 -0
- package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +43 -0
- package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +221 -0
- package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +241 -0
- package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +186 -0
- package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +332 -0
- package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +297 -0
- package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +28 -0
- package/ai/skills/stacks-testing/SKILL.md +129 -0
- package/ai/skills/stacks-tunnel/SKILL.md +125 -0
- package/ai/skills/stacks-types/SKILL.md +178 -0
- package/ai/skills/stacks-ui/SKILL.md +246 -0
- package/ai/skills/stacks-utils/SKILL.md +444 -0
- package/ai/skills/stacks-validation/SKILL.md +371 -0
- package/ai/skills/stacks-whois/SKILL.md +315 -0
- package/assets/world-map-data.ts +121 -0
- package/bootstrap.ts +114 -0
- package/docs/api-examples.md +46 -0
- package/docs/index.md +24 -0
- package/docs/markdown-examples.md +87 -0
- package/functions/analytics.ts +97 -0
- package/functions/api.ts +143 -0
- package/functions/auth.ts +208 -0
- package/functions/billing/payments.ts +149 -0
- package/functions/blog.ts +120 -0
- package/functions/cms/categorizables.ts +107 -0
- package/functions/cms/pages.ts +108 -0
- package/functions/cms/posts.ts +100 -0
- package/functions/cms/taggables.ts +102 -0
- package/functions/commerce/coupons.ts +128 -0
- package/functions/commerce/customers.ts +128 -0
- package/functions/commerce/gift-cards.ts +119 -0
- package/functions/commerce/orders.ts +112 -0
- package/functions/commerce/payments.ts +119 -0
- package/functions/commerce/products/categories.ts +123 -0
- package/functions/commerce/products/manufacturers.ts +123 -0
- package/functions/commerce/products/products.ts +123 -0
- package/functions/commerce/products/reviews.ts +123 -0
- package/functions/commerce/products/units.ts +123 -0
- package/functions/commerce/products/variants.ts +123 -0
- package/functions/commerce/shippings/delivery-routes.ts +123 -0
- package/functions/commerce/shippings/digital-deliveries.ts +119 -0
- package/functions/commerce/shippings/drivers.ts +123 -0
- package/functions/commerce/shippings/license-keys.ts +123 -0
- package/functions/commerce/shippings/shipping-methods.ts +123 -0
- package/functions/commerce/shippings/shipping-rates.ts +119 -0
- package/functions/commerce/shippings/shipping-zones.ts +119 -0
- package/functions/commerce/taxes.ts +119 -0
- package/functions/commerce/waitlist/products.ts +123 -0
- package/functions/commerce/waitlist/restaurants.ts +123 -0
- package/functions/craft.ts +107 -0
- package/functions/dashboard.ts +153 -0
- package/functions/inbox.ts +95 -0
- package/functions/jobs.ts +86 -0
- package/functions/monitoring/errors.ts +295 -0
- package/functions/queue.ts +111 -0
- package/functions/realtime/websockets.ts +96 -0
- package/functions/realtime.ts +52 -0
- package/functions/releases.ts +49 -0
- package/functions/search.ts +126 -0
- package/functions/toasts.ts +95 -0
- package/functions/uploads.ts +216 -0
- package/ide/.gitignore +4 -0
- package/ide/cursor/rules/auto-imports.mdc +574 -0
- package/ide/cursor/rules/code-style.mdc +12 -0
- package/ide/cursor/rules/documentation.mdc +9 -0
- package/ide/cursor/rules/error-handling-validation.mdc +11 -0
- package/ide/cursor/rules/key-conventions.mdc +11 -0
- package/ide/cursor/rules/project-structure.mdc +169 -0
- package/ide/cursor/rules/readme.mdc +318 -0
- package/ide/cursor/rules/syntax-formatting.mdc +9 -0
- package/ide/cursor/rules/testing.mdc +10 -0
- package/ide/cursor/rules/typescript.mdc +9 -0
- package/ide/cursor/rules/ui-styling.mdc +0 -0
- package/ide/dictionary.txt +397 -0
- package/ide/jetbrains/.fleet/settings.json +4 -0
- package/ide/jetbrains/.idea/.gitignore +5 -0
- package/ide/jetbrains/.idea/.name +1 -0
- package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/ide/jetbrains/.idea/jsLinters/eslint.xml +7 -0
- package/ide/jetbrains/.idea/modules.xml +8 -0
- package/ide/jetbrains/.idea/stacks.iml +22 -0
- package/ide/jetbrains/.idea/vcs.xml +6 -0
- package/ide/jetbrains/.idea/webResources.xml +14 -0
- package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
- package/ide/jetbrains/installed.txt +4 -0
- package/ide/jetbrains/options/github-copilot.xml +5 -0
- package/ide/jetbrains/options/nodejs.xml +7 -0
- package/ide/jetbrains/options/templates.xml +124 -0
- package/ide/jetbrains/templates/JavaScript.xml +6 -0
- package/ide/jetbrains/templates/Stacks.xml +8 -0
- package/ide/vscode/.vscode/README.md +23 -0
- package/ide/vscode/.vscode/extensions.json +5 -0
- package/ide/vscode/.vscode/settings.json +176 -0
- package/ide/vscode/.vscode/stacks.code-snippets +181 -0
- package/ide/vscode/LICENSE.md +21 -0
- package/ide/vscode/README.md +36 -0
- package/ide/vscode/logo.png +0 -0
- package/ide/vscode/package.json +79 -0
- package/ide/zed/.zed/settings.json +139 -0
- package/lang/README.md +28 -0
- package/lang/de.yml +14 -0
- package/lang/en.yml +15 -0
- package/package.json +19 -3
- package/project/bootstrap +161 -0
- package/project/buddy +175 -0
- package/project/storage/framework/tsconfig.app.json +50 -0
- package/project/storage/framework/tsconfig.base.json +58 -0
- package/routes/core.ts +78 -0
- package/routes/dashboard-api.ts +233 -0
- package/routes/dashboard.ts +739 -0
- package/routes/email.ts +129 -0
- package/stores/[name].stx +16 -0
- package/stores/git.ts +71 -0
- package/stores/payment.ts +474 -0
- package/stores/queue.ts +43 -0
- package/stores/user.ts +29 -0
- package/stx-components-plugin.ts +25 -0
- package/styles/design-tokens.css +597 -0
- package/types/dashboard.ts +70 -0
- package/types/defaults.ts +438 -0
- package/vcs/github/CODE_OF_CONDUCT.md +83 -0
- package/vcs/github/CONTRIBUTING.md +187 -0
- package/vcs/github/EXPLANATIONS.md +41 -0
- package/vcs/github/FUNDING.yml +1 -0
- package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +49 -0
- package/vcs/github/ISSUE_TEMPLATE/config.yml +10 -0
- package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +44 -0
- package/vcs/github/SECURITY.md +70 -0
- package/vcs/github/renovate.json +5 -0
- package/vcs/github/stale.yml +14 -0
- package/vcs/github/workflows/README.md +16 -0
- package/vcs/github/workflows/ci.yml +114 -0
- package/vcs/github/workflows/export-size.yml +25 -0
- package/vcs/github/workflows/labeler.yml +13 -0
- package/vcs/github/workflows/release.yml +219 -0
- package/views/[...all].stx +8 -0
- package/views/about.md +3 -0
- package/views/auth/login.stx +1 -0
- package/views/auth/signup.stx +85 -0
- package/views/dashboard/.discovered-models.json +542 -0
- package/views/dashboard/AUDIT.md +904 -0
- package/views/dashboard/[...all].stx +89 -0
- package/views/dashboard/access-tokens/index.stx +177 -0
- package/views/dashboard/actions/index.stx +129 -0
- package/views/dashboard/analytics/blog/index.stx +356 -0
- package/views/dashboard/analytics/browsers/index.stx +263 -0
- package/views/dashboard/analytics/commerce/sales/index.stx +329 -0
- package/views/dashboard/analytics/commerce/web/index.stx +379 -0
- package/views/dashboard/analytics/countries/index.stx +289 -0
- package/views/dashboard/analytics/devices/index.stx +305 -0
- package/views/dashboard/analytics/events/index.stx +536 -0
- package/views/dashboard/analytics/index.stx +88 -0
- package/views/dashboard/analytics/marketing/index.stx +315 -0
- package/views/dashboard/analytics/pages/index.stx +271 -0
- package/views/dashboard/analytics/referrers/index.stx +319 -0
- package/views/dashboard/analytics/web/index.stx +356 -0
- package/views/dashboard/buddy/index.stx +198 -0
- package/views/dashboard/ci/index.stx +462 -0
- package/views/dashboard/cloud/index.stx +452 -0
- package/views/dashboard/commands/index.stx +295 -0
- package/views/dashboard/commerce/categories/index.stx +406 -0
- package/views/dashboard/commerce/coupons/index.stx +485 -0
- package/views/dashboard/commerce/customers/index.stx +410 -0
- package/views/dashboard/commerce/dashboard/index.stx +287 -0
- package/views/dashboard/commerce/delivery/delivery-routes.stx +305 -0
- package/views/dashboard/commerce/delivery/digital-delivery.stx +332 -0
- package/views/dashboard/commerce/delivery/drivers.stx +397 -0
- package/views/dashboard/commerce/delivery/index.stx +18 -0
- package/views/dashboard/commerce/delivery/license-keys.stx +380 -0
- package/views/dashboard/commerce/delivery/shipping-methods.stx +346 -0
- package/views/dashboard/commerce/delivery/shipping-rates.stx +338 -0
- package/views/dashboard/commerce/delivery/shipping-zones.stx +302 -0
- package/views/dashboard/commerce/delivery/tabs.ts +25 -0
- package/views/dashboard/commerce/gift-cards/index.stx +561 -0
- package/views/dashboard/commerce/manufacturers/index.stx +308 -0
- package/views/dashboard/commerce/orders/index.stx +247 -0
- package/views/dashboard/commerce/payments/index.stx +535 -0
- package/views/dashboard/commerce/pos/index.stx +653 -0
- package/views/dashboard/commerce/printers/devices/index.stx +273 -0
- package/views/dashboard/commerce/printers/receipts/index.stx +308 -0
- package/views/dashboard/commerce/products/detail.stx +563 -0
- package/views/dashboard/commerce/products/index.stx +370 -0
- package/views/dashboard/commerce/reviews/index.stx +656 -0
- package/views/dashboard/commerce/reviews/index.ts +0 -0
- package/views/dashboard/commerce/taxes/index.stx +377 -0
- package/views/dashboard/commerce/units/index.stx +317 -0
- package/views/dashboard/commerce/variants/index.stx +319 -0
- package/views/dashboard/commerce/waitlist/products.stx +942 -0
- package/views/dashboard/commerce/waitlist/restaurant.stx +1024 -0
- package/views/dashboard/components/index.stx +330 -0
- package/views/dashboard/composables/index.ts +19 -0
- package/views/dashboard/composables/useChart.ts +77 -0
- package/views/dashboard/composables/useNavigation.ts +99 -0
- package/views/dashboard/composables/useRole.ts +58 -0
- package/views/dashboard/composables/useTheme.ts +74 -0
- package/views/dashboard/content/authors/index.stx +171 -0
- package/views/dashboard/content/blog/index.stx +493 -0
- package/views/dashboard/content/categories/index.stx +169 -0
- package/views/dashboard/content/comments/index.stx +189 -0
- package/views/dashboard/content/dashboard.stx +383 -0
- package/views/dashboard/content/files/index.stx +706 -0
- package/views/dashboard/content/pages/index.stx +174 -0
- package/views/dashboard/content/posts/index.stx +269 -0
- package/views/dashboard/content/seo/index.stx +240 -0
- package/views/dashboard/content/tags/index.stx +167 -0
- package/views/dashboard/data/activity/index.stx +261 -0
- package/views/dashboard/data/dashboard/index.stx +116 -0
- package/views/dashboard/data/subscribers.stx +270 -0
- package/views/dashboard/data/teams.stx +275 -0
- package/views/dashboard/data/users.stx +279 -0
- package/views/dashboard/dependencies/index.stx +178 -0
- package/views/dashboard/deployments/[id].stx +234 -0
- package/views/dashboard/deployments/index.stx +9 -0
- package/views/dashboard/dns/index.stx +163 -0
- package/views/dashboard/environment/index.stx +283 -0
- package/views/dashboard/errors/index.stx +274 -0
- package/views/dashboard/forgot-password.stx +57 -0
- package/views/dashboard/functions/index.stx +159 -0
- package/views/dashboard/health/index.stx +248 -0
- package/views/dashboard/inbox/activity.stx +350 -0
- package/views/dashboard/inbox/index.stx +452 -0
- package/views/dashboard/inbox/settings.stx +290 -0
- package/views/dashboard/index.stx +252 -0
- package/views/dashboard/insights/index.stx +529 -0
- package/views/dashboard/jobs/[id].stx +430 -0
- package/views/dashboard/jobs/history.stx +222 -0
- package/views/dashboard/jobs/index.stx +214 -0
- package/views/dashboard/kanban/[id].stx +899 -0
- package/views/dashboard/kanban/index.stx +260 -0
- package/views/dashboard/layouts/default.stx +565 -0
- package/views/dashboard/layouts/guest.stx +10 -0
- package/views/dashboard/login.stx +48 -0
- package/views/dashboard/logs/index.stx +540 -0
- package/views/dashboard/mailboxes/index.stx +149 -0
- package/views/dashboard/management/permissions/index.stx +490 -0
- package/views/dashboard/marketing/campaigns/index.stx +604 -0
- package/views/dashboard/marketing/lists/index.stx +514 -0
- package/views/dashboard/marketing/reviews/index.stx +475 -0
- package/views/dashboard/marketing/social-posts/index.stx +560 -0
- package/views/dashboard/models/[model].stx +195 -0
- package/views/dashboard/models/index.stx +159 -0
- package/views/dashboard/monitoring/errors/index.stx +415 -0
- package/views/dashboard/notifications/dashboard.stx +383 -0
- package/views/dashboard/notifications/email.stx +336 -0
- package/views/dashboard/notifications/history.stx +373 -0
- package/views/dashboard/notifications/sms.stx +332 -0
- package/views/dashboard/packages/index.stx +195 -0
- package/views/dashboard/queries/[id].stx +381 -0
- package/views/dashboard/queries/history.stx +227 -0
- package/views/dashboard/queries/index.stx +335 -0
- package/views/dashboard/queries/slow.stx +318 -0
- package/views/dashboard/queue/index.stx +427 -0
- package/views/dashboard/realtime/index.stx +429 -0
- package/views/dashboard/register.stx +46 -0
- package/views/dashboard/releases/index.stx +389 -0
- package/views/dashboard/requests/index.stx +462 -0
- package/views/dashboard/serverless/index.stx +475 -0
- package/views/dashboard/servers/[id].stx +299 -0
- package/views/dashboard/servers/index.stx +483 -0
- package/views/dashboard/settings/billing.stx +50 -0
- package/views/dashboard/settings/index.stx +256 -0
- package/views/dashboard/settings/mail.stx +252 -0
- package/views/dashboard/stores/auth.ts +123 -0
- package/views/dashboard/stores/ci.ts +342 -0
- package/views/dashboard/stores/index.ts +129 -0
- package/views/dashboard/stores/kanban.ts +723 -0
- package/views/dashboard/stores/rbac.ts +350 -0
- package/views/dashboard/stx.config.ts +34 -0
- package/views/dashboard/teams/[id].stx +170 -0
- package/views/forum/category.stx +92 -0
- package/views/forum/index.stx +209 -0
- package/views/forum/new-topic.stx +113 -0
- package/views/forum/profile.stx +1 -0
- package/views/forum/topic.stx +143 -0
- package/views/hello-world/[name].stx +47 -0
- package/views/index.stx +21 -0
- package/views/system-tray/index.stx +147 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
@extends('layouts/default')
|
|
2
|
+
|
|
3
|
+
@section('content')
|
|
4
|
+
@title('Dashboard - Insights')
|
|
5
|
+
<div class="py-4 lg:py-8 min-h-screen dark:bg-neutral-800">
|
|
6
|
+
<div class="mb-8 px-4 sm:px-6 lg:px-8">
|
|
7
|
+
<div>
|
|
8
|
+
<h3 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">System Overview</h3>
|
|
9
|
+
|
|
10
|
+
<dl class="grid gap-5 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 mt-5">
|
|
11
|
+
<template :for="stat in statsCards">
|
|
12
|
+
<div class="overflow-hidden relative pt-5 px-4 sm:pt-6 sm:px-6 bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
13
|
+
<dt>
|
|
14
|
+
<div class="absolute p-3 bg-blue-500 rounded-md">
|
|
15
|
+
<div :class="stat.icon" class="h-6 w-6 text-white"></div>
|
|
16
|
+
</div>
|
|
17
|
+
<p class="ml-16 font-medium text-gray-500 text-sm truncate dark:text-neutral-300">{{ stat.title }}</p>
|
|
18
|
+
</dt>
|
|
19
|
+
<dd class="flex items-baseline ml-16 pb-6 sm:pb-7">
|
|
20
|
+
<p class="font-semibold text-2xl text-gray-900 dark:text-neutral-100">{{ stat.value }}</p>
|
|
21
|
+
<p :class="'ml-2 flex items-baseline text-sm font-semibold ' + (stat.changeType === 'increase' ? 'text-green-600' : 'text-red-600')">
|
|
22
|
+
<span :if="stat.changeType === 'increase'" class="flex-shrink-0 self-center h-5 w-5 text-green-500 i-hugeicons-arrow-up"></span>
|
|
23
|
+
<span :if="stat.changeType !== 'increase'" class="flex-shrink-0 self-center h-5 w-5 text-red-500 i-hugeicons-arrow-down-02"></span>
|
|
24
|
+
{{ stat.change }}
|
|
25
|
+
</p>
|
|
26
|
+
</dd>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
</dl>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="px-4 sm:px-6 lg:px-8">
|
|
34
|
+
<div class="sm:flex sm:items-center">
|
|
35
|
+
<div class="sm:flex-auto">
|
|
36
|
+
<h1 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">System Metrics</h1>
|
|
37
|
+
<p class="mt-2 text-gray-700 text-sm dark:text-neutral-300">Real-time monitoring of your system's performance and resource usage.</p>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div class="grid gap-6 grid-cols-1 lg:grid-cols-3 mt-8">
|
|
42
|
+
<div class="overflow-hidden bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
43
|
+
<div class="p-6">
|
|
44
|
+
<div class="flex items-center justify-between">
|
|
45
|
+
<h3 class="font-medium text-gray-900 text-sm dark:text-neutral-100">CPU Usage</h3>
|
|
46
|
+
<span class="font-mono text-gray-500 text-sm dark:text-neutral-400">{{ systemMetrics.cpu }}%</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="mt-2 h-2 bg-gray-200 dark:bg-neutral-600 rounded-full">
|
|
49
|
+
<div class="h-2 bg-blue-500 rounded-full" style="width: {{ systemMetrics.cpu }}%"></div>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="mt-4 h-32"><canvas id="insights_cpu_chart"></canvas></div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="overflow-hidden bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
56
|
+
<div class="p-6">
|
|
57
|
+
<div class="flex items-center justify-between">
|
|
58
|
+
<h3 class="font-medium text-gray-900 text-sm dark:text-neutral-100">Memory</h3>
|
|
59
|
+
<span class="font-mono text-gray-500 text-sm dark:text-neutral-400">{{ systemMetrics.memory.used }}MB / {{ systemMetrics.memory.total }}MB</span>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="mt-2 h-2 bg-gray-200 dark:bg-neutral-600 rounded-full">
|
|
62
|
+
<div class="h-2 bg-blue-500 rounded-full" style="width: {{ memoryPct }}%"></div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="mt-4 h-32"><canvas id="insights_memory_chart"></canvas></div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="overflow-hidden bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
69
|
+
<div class="p-6">
|
|
70
|
+
<div class="flex items-center justify-between">
|
|
71
|
+
<h3 class="font-medium text-gray-900 text-sm dark:text-neutral-100">Storage</h3>
|
|
72
|
+
<span class="font-mono text-gray-500 text-sm dark:text-neutral-400">{{ systemMetrics.storage.used }}GB / {{ systemMetrics.storage.total }}GB</span>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="mt-4 h-32"><canvas id="insights_storage_chart"></canvas></div>
|
|
75
|
+
<div class="flex justify-center mt-4 space-x-4">
|
|
76
|
+
<div class="flex items-center">
|
|
77
|
+
<div class="mr-2 h-3 w-3 bg-blue-500 rounded-full"></div>
|
|
78
|
+
<span class="font-mono text-gray-500 text-xs dark:text-neutral-400">Used ({{ systemMetrics.storage.used }}GB)</span>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="flex items-center">
|
|
81
|
+
<div class="mr-2 h-3 w-3 bg-gray-200 dark:bg-neutral-600 rounded-full"></div>
|
|
82
|
+
<span class="font-mono text-gray-500 text-xs dark:text-neutral-400">Available ({{ systemMetrics.storage.total - systemMetrics.storage.used }}GB)</span>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div class="mt-8 px-4 sm:px-6 lg:px-8">
|
|
91
|
+
<div class="grid gap-6 grid-cols-1 lg:grid-cols-2">
|
|
92
|
+
<div>
|
|
93
|
+
<div class="sm:flex sm:items-center">
|
|
94
|
+
<div class="sm:flex-auto">
|
|
95
|
+
<h1 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">Queue Monitoring</h1>
|
|
96
|
+
<p class="mt-2 text-gray-700 text-sm dark:text-neutral-300">Real-time monitoring of your application's queue processing.</p>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div class="overflow-hidden mt-8 bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
101
|
+
<div class="p-6">
|
|
102
|
+
<div class="space-y-8">
|
|
103
|
+
<template :for="queue in queuesRaw">
|
|
104
|
+
<div class="space-y-4">
|
|
105
|
+
<div class="flex items-center justify-between">
|
|
106
|
+
<div class="flex items-center space-x-2">
|
|
107
|
+
<h4 class="inline-flex items-center px-2.5 py-0.5 font-medium text-gray-800 text-xs dark:text-neutral-200 bg-gray-100 dark:bg-neutral-600 rounded-full">{{ queue.name }}</h4>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="flex items-center space-x-3">
|
|
110
|
+
<div class="flex items-center space-x-2"><div class="h-2.5 w-2.5 bg-blue-500 rounded-full"></div><span class="font-mono text-blue-700 text-xs dark:text-blue-300">{{ queue.stats.queued }}</span></div>
|
|
111
|
+
<div class="flex items-center space-x-2"><div class="h-2.5 w-2.5 bg-yellow-500 rounded-full"></div><span class="font-mono text-xs text-yellow-700 dark:text-yellow-300">{{ queue.stats.processing }}</span></div>
|
|
112
|
+
<div class="flex items-center space-x-2"><div class="h-2.5 w-2.5 bg-green-500 rounded-full"></div><span class="font-mono text-green-700 text-xs dark:text-green-300">{{ queue.stats.processed }}</span></div>
|
|
113
|
+
<div class="flex items-center space-x-2"><div class="h-2.5 w-2.5 bg-purple-500 rounded-full"></div><span class="font-mono text-purple-700 text-xs dark:text-purple-300">{{ queue.stats.released }}</span></div>
|
|
114
|
+
<div class="flex items-center space-x-2"><div class="h-2.5 w-2.5 bg-red-500 rounded-full"></div><span class="font-mono text-red-700 text-xs dark:text-red-300">{{ queue.stats.failed }}</span></div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<div>
|
|
119
|
+
<div class="flex items-center mb-2 space-x-4">
|
|
120
|
+
<div class="flex items-center space-x-2">
|
|
121
|
+
<div class="h-1 w-4 bg-green-500 rounded"></div>
|
|
122
|
+
<span class="font-medium text-gray-500 text-xs dark:text-neutral-400">Processed</span>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="flex items-center space-x-2">
|
|
125
|
+
<div class="h-1 w-4 bg-red-500 rounded"></div>
|
|
126
|
+
<span class="font-medium text-gray-500 text-xs dark:text-neutral-400">Failed</span>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="h-48"><canvas :id="'insights_queue_' + queue.name + '_chart'"></canvas></div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</template>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div>
|
|
139
|
+
<div class="sm:flex sm:items-center">
|
|
140
|
+
<div class="sm:flex-auto">
|
|
141
|
+
<h1 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">Cache Performance</h1>
|
|
142
|
+
<p class="mt-2 text-gray-700 text-sm dark:text-neutral-300">Real-time monitoring of your application's cache performance and hit rates.</p>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div class="overflow-hidden mt-8 bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
147
|
+
<div class="p-6">
|
|
148
|
+
<div class="grid gap-8 grid-cols-3">
|
|
149
|
+
<div class="text-center">
|
|
150
|
+
<p class="font-mono font-semibold text-3xl text-gray-900 dark:text-neutral-100">{{ cacheRaw.hits }}</p>
|
|
151
|
+
<p class="mt-1.5 font-medium text-gray-500 text-sm dark:text-neutral-400">Hits</p>
|
|
152
|
+
</div>
|
|
153
|
+
<div class="text-center">
|
|
154
|
+
<p class="font-mono font-semibold text-3xl text-gray-900 dark:text-neutral-100">{{ cacheRaw.misses }}</p>
|
|
155
|
+
<p class="mt-1.5 font-medium text-gray-500 text-sm dark:text-neutral-400">Misses</p>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="text-center">
|
|
158
|
+
<p class="font-mono font-semibold text-3xl text-gray-900 dark:text-neutral-100">{{ cacheRaw.hitRate }}%</p>
|
|
159
|
+
<p class="mt-1.5 font-medium text-gray-500 text-sm dark:text-neutral-400">Hit Rate</p>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div class="mt-8">
|
|
164
|
+
<div class="space-y-4">
|
|
165
|
+
<template :for="key in cacheRaw.keys">
|
|
166
|
+
<div class="p-4 border border-gray-100 rounded-lg dark:border-neutral-600 hover:border-blue-500 dark:hover:border-blue-400 duration-150 transition-colors">
|
|
167
|
+
<div class="flex items-center justify-between mb-3">
|
|
168
|
+
<div class="flex items-center space-x-3">
|
|
169
|
+
<div class="h-2 w-2 bg-blue-500 rounded-full"></div>
|
|
170
|
+
<span class="font-medium font-mono text-gray-900 text-sm dark:text-neutral-100">{{ key.name }}</span>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="flex items-center space-x-2">
|
|
173
|
+
<span class="font-mono text-gray-500 text-xs dark:text-neutral-400">TTL: {{ key.ttl }}s</span>
|
|
174
|
+
<span class="font-mono text-gray-400 text-xs">|</span>
|
|
175
|
+
<span class="font-mono text-gray-500 text-xs dark:text-neutral-400">{{ key.lastAccessed }}</span>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div class="flex items-center space-x-3">
|
|
180
|
+
<div class="overflow-hidden flex-1 h-2 bg-gray-200 dark:bg-neutral-600 rounded-full">
|
|
181
|
+
<div class="h-full bg-blue-500 rounded-full" :style="'width: ' + key.hitRate + '%'"></div>
|
|
182
|
+
</div>
|
|
183
|
+
<span class="font-medium font-mono text-gray-900 text-sm dark:text-neutral-100">{{ key.hitRate }}%</span>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div class="flex items-center mt-3 space-x-4 text-xs">
|
|
187
|
+
<div class="flex items-center space-x-1">
|
|
188
|
+
<div class="h-4 w-4 text-green-500 i-hugeicons-checkmark-circle-02"></div>
|
|
189
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ key.hits }} hits</span>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="flex items-center space-x-1">
|
|
192
|
+
<div class="h-4 w-4 text-red-500 i-hugeicons-x-circle"></div>
|
|
193
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ key.misses }} misses</span>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
</template>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<div class="mt-8 px-4 sm:px-6 lg:px-8">
|
|
207
|
+
<div class="grid gap-6 grid-cols-1 lg:grid-cols-2">
|
|
208
|
+
<div>
|
|
209
|
+
<div class="sm:flex sm:items-center">
|
|
210
|
+
<div class="sm:flex-auto">
|
|
211
|
+
<h1 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">Exceptions</h1>
|
|
212
|
+
<p class="mt-2 text-gray-700 text-sm dark:text-neutral-300">Recent application exceptions and their occurrence rates.</p>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<div class="overflow-hidden mt-8 bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
217
|
+
<div class="p-6">
|
|
218
|
+
<div class="space-y-4">
|
|
219
|
+
<template :for="exception in exceptionsRaw">
|
|
220
|
+
<div class="relative p-4 border border-gray-200 rounded-lg dark:border-neutral-600 hover:border-blue-500 dark:hover:border-blue-400 duration-150 transition-colors group">
|
|
221
|
+
<div class="mb-3">
|
|
222
|
+
<div class="break-all font-mono leading-relaxed text-gray-900 text-sm dark:text-neutral-100">{{ exception.type }}</div>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="flex items-center justify-between pt-3 text-sm border-gray-100 border-t dark:border-neutral-600">
|
|
225
|
+
<div class="flex items-center space-x-2">
|
|
226
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-code-bracket-square"></div>
|
|
227
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ exception.location }}</span>
|
|
228
|
+
</div>
|
|
229
|
+
<div class="flex items-center space-x-4">
|
|
230
|
+
<div class="flex items-center space-x-1">
|
|
231
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-clock-01"></div>
|
|
232
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ exception.latest }}</span>
|
|
233
|
+
</div>
|
|
234
|
+
<div class="flex items-center space-x-1">
|
|
235
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-energy"></div>
|
|
236
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ exception.count }}</span>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="absolute left-0 top-0 h-full w-1 bg-red-500 rounded-l-lg"></div>
|
|
241
|
+
</div>
|
|
242
|
+
</template>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<div>
|
|
249
|
+
<div class="sm:flex sm:items-center">
|
|
250
|
+
<div class="sm:flex-auto">
|
|
251
|
+
<h1 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">Slow Queries</h1>
|
|
252
|
+
<p class="mt-2 text-gray-700 text-sm dark:text-neutral-300">Database queries that are taking longer than expected to execute.</p>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
<div class="overflow-hidden mt-8 bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
257
|
+
<div class="p-6">
|
|
258
|
+
<div class="space-y-4">
|
|
259
|
+
<template :for="query in slowQueriesRaw">
|
|
260
|
+
<div class="p-4 border border-gray-200 rounded-lg dark:border-neutral-600 hover:border-blue-500 dark:hover:border-blue-400 duration-150 transition-colors group">
|
|
261
|
+
<div class="mb-3">
|
|
262
|
+
<div class="break-all font-mono leading-relaxed text-gray-900 text-sm dark:text-neutral-100">{{ query.query }}</div>
|
|
263
|
+
</div>
|
|
264
|
+
<div class="flex items-center justify-between pt-3 text-sm border-gray-100 border-t dark:border-neutral-600">
|
|
265
|
+
<div class="flex items-center space-x-2">
|
|
266
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-code-bracket-square"></div>
|
|
267
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ query.location }}</span>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="flex items-center space-x-4">
|
|
270
|
+
<div class="flex items-center space-x-1">
|
|
271
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-clock-01"></div>
|
|
272
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ query.count }}</span>
|
|
273
|
+
</div>
|
|
274
|
+
<div class="flex items-center space-x-1">
|
|
275
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-energy"></div>
|
|
276
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ query.slowest }}ms</span>
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</template>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<div class="mt-6">
|
|
289
|
+
<div class="grid gap-6 grid-cols-1 lg:grid-cols-2">
|
|
290
|
+
<div>
|
|
291
|
+
<div class="sm:flex sm:items-center">
|
|
292
|
+
<div class="sm:flex-auto">
|
|
293
|
+
<h1 class="font-semibold leading-6 text-base text-gray-900 dark:text-neutral-100">Slow Routes</h1>
|
|
294
|
+
<p class="mt-2 text-gray-700 text-sm dark:text-neutral-300">Routes that are taking longer than expected to respond (>1000ms).</p>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<div class="overflow-hidden mt-8 bg-white dark:bg-neutral-700 rounded-lg shadow">
|
|
299
|
+
<div class="p-6">
|
|
300
|
+
<div class="space-y-4">
|
|
301
|
+
<template :for="route in slowRoutesRaw">
|
|
302
|
+
<div class="p-4 border border-gray-200 rounded-lg dark:border-neutral-600 hover:border-blue-500 dark:hover:border-blue-400 duration-150 transition-colors group">
|
|
303
|
+
<div class="mb-3">
|
|
304
|
+
<div class="flex items-center space-x-3">
|
|
305
|
+
<span :class="'px-2 py-1 font-medium text-xs rounded-md ' + routeMethodBadge(route.method)">{{ route.method }}</span>
|
|
306
|
+
<span class="font-mono text-gray-900 text-sm dark:text-neutral-100">{{ route.route }}</span>
|
|
307
|
+
</div>
|
|
308
|
+
<div :if="route.action" class="flex items-center mt-2 space-x-2">
|
|
309
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-code-bracket-square"></div>
|
|
310
|
+
<span class="font-mono text-gray-500 text-xs dark:text-neutral-400">{{ route.action }}</span>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
<div class="flex items-center justify-between pt-3 text-sm border-gray-100 border-t dark:border-neutral-600">
|
|
314
|
+
<div class="flex items-center space-x-4">
|
|
315
|
+
<div class="flex items-center space-x-1">
|
|
316
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-clock-01"></div>
|
|
317
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ route.count }} requests</span>
|
|
318
|
+
</div>
|
|
319
|
+
<div class="flex items-center space-x-1">
|
|
320
|
+
<div class="h-4 w-4 text-gray-400 i-hugeicons-energy"></div>
|
|
321
|
+
<span class="font-mono text-gray-500 dark:text-neutral-400">{{ route.slowest }}ms</span>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
</template>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
<div>
|
|
333
|
+
<div class="flex overflow-hidden items-center justify-center h-full dark:bg-neutral-700 rounded-lg">
|
|
334
|
+
<div class="p-6">
|
|
335
|
+
<div class="flex flex-col items-center text-center">
|
|
336
|
+
<div class="mb-4 h-12 w-12 text-blue-500 i-hugeicons-puzzle-piece"></div>
|
|
337
|
+
<h3 class="mb-2 font-medium text-gray-900 text-lg dark:text-neutral-100">Extend Your Dashboard</h3>
|
|
338
|
+
<p class="mb-6 max-w-sm text-gray-500 text-sm dark:text-neutral-400">Create custom insight cards to monitor your application's performance, user behavior, or any other metrics that matter to you.</p>
|
|
339
|
+
<a href="https://stacksjs.com/docs/insights" class="inline-flex items-center px-4 py-2 font-medium text-sm text-white bg-blue-600 hover:bg-blue-700 border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-neutral-800 shadow-sm">
|
|
340
|
+
<div class="mr-2 h-5 w-5 i-hugeicons-book-open"></div>
|
|
341
|
+
Read the Documentation
|
|
342
|
+
</a>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
|
|
352
|
+
<script client>
|
|
353
|
+
|
|
354
|
+
interface ChartLike { destroy: () => void }
|
|
355
|
+
type ChartCtor = new (canvas: HTMLElement, config: { type: string, data: unknown, options?: unknown }) => ChartLike
|
|
356
|
+
|
|
357
|
+
// Static demo data + view helpers — moved out of the former
|
|
358
|
+
// `<script server>` block (stacksjs/stacks#1838).
|
|
359
|
+
const statsCards = [
|
|
360
|
+
{ title: 'Total Requests', value: '71,897', change: '+122', changeType: 'increase', icon: 'i-hugeicons-arrow-up-01' },
|
|
361
|
+
{ title: 'Average Response Time', value: '235ms', change: '-12ms', changeType: 'decrease', icon: 'i-hugeicons-clock-01' },
|
|
362
|
+
{ title: 'Success Rate', value: '99.95%', change: '+0.2%', changeType: 'increase', icon: 'i-hugeicons-check-circle' },
|
|
363
|
+
]
|
|
364
|
+
|
|
365
|
+
const systemMetrics = {
|
|
366
|
+
cpu: 6,
|
|
367
|
+
memory: { used: 786, total: 969 },
|
|
368
|
+
storage: { used: 6, total: 10 },
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const memoryPct = (systemMetrics.memory.used / systemMetrics.memory.total) * 100
|
|
372
|
+
|
|
373
|
+
const queuesRaw = [
|
|
374
|
+
{ name: 'default', stats: { queued: 70, processing: 15, processed: 250, released: 5, failed: 2 } },
|
|
375
|
+
{ name: 'high', stats: { queued: 23, processing: 8, processed: 180, released: 3, failed: 1 } },
|
|
376
|
+
]
|
|
377
|
+
|
|
378
|
+
const exceptionsRaw = [
|
|
379
|
+
{ type: 'App\\Exceptions\\FlightOverbookedException', location: 'app/Jobs/ProcessBooking.ts:33', count: 36, latest: '2 minutes ago' },
|
|
380
|
+
{ type: 'Illuminate\\Http\\Client\\RequestException', location: 'app/Actions/FlightAction.ts:91', count: 22, latest: '5 minutes ago' },
|
|
381
|
+
]
|
|
382
|
+
|
|
383
|
+
const cacheRaw = {
|
|
384
|
+
hits: 1675,
|
|
385
|
+
misses: 284,
|
|
386
|
+
hitRate: 85.5,
|
|
387
|
+
keys: [
|
|
388
|
+
{ name: 'flight:2', hits: 137, misses: 14, hitRate: 90.73, lastAccessed: '2 minutes ago', ttl: 3600 },
|
|
389
|
+
{ name: 'flight:3', hits: 132, misses: 15, hitRate: 89.8, lastAccessed: '5 minutes ago', ttl: 3600 },
|
|
390
|
+
{ name: 'flight:8', hits: 138, misses: 7, hitRate: 95.17, lastAccessed: '1 minute ago', ttl: 3600 },
|
|
391
|
+
],
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const slowQueriesRaw = [
|
|
395
|
+
{ query: 'insert into `tickets` (`flight_id`, `user_id`, `price`, `created_at`, `updated_at`) values (?, ?, ?, ?, ?)', location: 'app/Actions/FlightAction.ts:26', count: 347, slowest: 3099 },
|
|
396
|
+
{ query: 'select `id`, `departs_at` from `flights` where `departs_at` > ? order by `departs_at` asc', location: 'app/Actions/FlightAction.ts:91', count: 363, slowest: 3088 },
|
|
397
|
+
]
|
|
398
|
+
|
|
399
|
+
const slowRoutesRaw = [
|
|
400
|
+
{ method: 'DELETE', route: '/flights/{flight}', count: 520, slowest: 2997, action: 'app/Actions/FlightAction.ts:destroy' },
|
|
401
|
+
{ method: 'POST', route: '/flights/{flight}/tickets', count: 543, slowest: 2996, action: 'app/Actions/FlightAction.ts:createTicket' },
|
|
402
|
+
]
|
|
403
|
+
|
|
404
|
+
function queueStatusDot(status: string): string {
|
|
405
|
+
switch (status) {
|
|
406
|
+
case 'queued': return 'bg-blue-500'
|
|
407
|
+
case 'processing': return 'bg-yellow-500'
|
|
408
|
+
case 'processed': return 'bg-green-500'
|
|
409
|
+
case 'released': return 'bg-purple-500'
|
|
410
|
+
case 'failed': return 'bg-red-500'
|
|
411
|
+
default: return 'bg-gray-500'
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function queueStatusText(status: string): string {
|
|
416
|
+
switch (status) {
|
|
417
|
+
case 'queued': return 'text-blue-700 dark:text-blue-300'
|
|
418
|
+
case 'processing': return 'text-yellow-700 dark:text-yellow-300'
|
|
419
|
+
case 'processed': return 'text-green-700 dark:text-green-300'
|
|
420
|
+
case 'released': return 'text-purple-700 dark:text-purple-300'
|
|
421
|
+
case 'failed': return 'text-red-700 dark:text-red-300'
|
|
422
|
+
default: return 'text-gray-700 dark:text-gray-300'
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
function routeMethodBadge(method: string): string {
|
|
427
|
+
switch (method) {
|
|
428
|
+
case 'GET': return 'bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-100'
|
|
429
|
+
case 'POST': return 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-100'
|
|
430
|
+
case 'PUT': return 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-100'
|
|
431
|
+
case 'PATCH': return 'bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-100'
|
|
432
|
+
case 'DELETE': return 'bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-100'
|
|
433
|
+
default: return 'bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-100'
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function statusLabel(status: string): string {
|
|
438
|
+
return status.charAt(0).toUpperCase() + status.slice(1)
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
const labels = ['12am', '1am', '2am', '3am', '4am', '5am', '6am']
|
|
442
|
+
|
|
443
|
+
const cpuData = {
|
|
444
|
+
labels,
|
|
445
|
+
datasets: [{ label: 'CPU Usage', data: [4, 8, 15, 3, 7, 6, 5], borderColor: 'rgb(59, 130, 246)', backgroundColor: 'rgba(59, 130, 246, 0.1)', fill: true }],
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const memoryData = {
|
|
449
|
+
labels,
|
|
450
|
+
datasets: [{ label: 'Memory Usage', data: [750, 800, 850, 786, 820, 880, 786], borderColor: 'rgb(59, 130, 246)', backgroundColor: 'rgba(59, 130, 246, 0.1)', fill: true }],
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const storageData = {
|
|
454
|
+
labels: ['Used', 'Available'],
|
|
455
|
+
datasets: [{ data: [6, 4], backgroundColor: ['rgb(59, 130, 246)', 'rgba(200, 200, 200, 0.2)'], borderColor: ['rgb(59, 130, 246)', 'rgba(200, 200, 200, 0.2)'], borderWidth: 1 }],
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
const queueDatasets: Record<string, { processed: number[], failed: number[] }> = {
|
|
459
|
+
default: { processed: [150, 220, 180, 200, 250, 230, 180], failed: [5, 8, 3, 4, 2, 5, 3] },
|
|
460
|
+
high: { processed: [120, 180, 150, 170, 220, 200, 150], failed: [3, 5, 2, 3, 1, 4, 2] },
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
function queueDataFor(name: string) {
|
|
464
|
+
const series = queueDatasets[name] ?? queueDatasets.default
|
|
465
|
+
return {
|
|
466
|
+
labels,
|
|
467
|
+
datasets: [
|
|
468
|
+
{ label: 'Processed', data: series.processed, borderColor: 'rgb(16, 185, 129)', backgroundColor: 'rgba(16, 185, 129, 0.1)', fill: true },
|
|
469
|
+
{ label: 'Failed', data: series.failed, borderColor: 'rgb(239, 68, 68)', backgroundColor: 'rgba(239, 68, 68, 0.1)', fill: true },
|
|
470
|
+
],
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
const baseChartOptions = {
|
|
475
|
+
responsive: true,
|
|
476
|
+
maintainAspectRatio: false,
|
|
477
|
+
scales: {
|
|
478
|
+
y: { beginAtZero: true, grid: { color: 'rgba(200, 200, 200, 0.1)' }, ticks: { color: 'rgb(156, 163, 175)', font: { family: "'JetBrains Mono', monospace" } } },
|
|
479
|
+
x: { grid: { display: false }, ticks: { color: 'rgb(156, 163, 175)', font: { family: "'JetBrains Mono', monospace" } } },
|
|
480
|
+
},
|
|
481
|
+
plugins: {
|
|
482
|
+
legend: { display: true, labels: { color: 'rgb(156, 163, 175)', font: { family: "'JetBrains Mono', monospace" } } },
|
|
483
|
+
},
|
|
484
|
+
elements: { line: { tension: 0.4 } },
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const pieChartOptions = {
|
|
488
|
+
responsive: true,
|
|
489
|
+
maintainAspectRatio: false,
|
|
490
|
+
plugins: {
|
|
491
|
+
legend: { position: 'bottom', labels: { color: 'rgb(156, 163, 175)', font: { family: "'JetBrains Mono', monospace" }, padding: 20 } },
|
|
492
|
+
},
|
|
493
|
+
cutout: '65%',
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const queueChartOptions = {
|
|
497
|
+
responsive: true,
|
|
498
|
+
maintainAspectRatio: false,
|
|
499
|
+
scales: {
|
|
500
|
+
y: { beginAtZero: true, max: 300, grid: { color: 'rgba(200, 200, 200, 0.1)' }, ticks: { color: 'rgb(156, 163, 175)', font: { family: "'JetBrains Mono', monospace" }, stepSize: 50 } },
|
|
501
|
+
x: { grid: { display: false }, ticks: { color: 'rgb(156, 163, 175)', font: { family: "'JetBrains Mono', monospace" } } },
|
|
502
|
+
},
|
|
503
|
+
plugins: { legend: { display: false } },
|
|
504
|
+
elements: { line: { tension: 0.4 } },
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const handles: Array<{ destroy: () => void } | null> = []
|
|
508
|
+
|
|
509
|
+
onMount(async () => {
|
|
510
|
+
const { Chart, registerables } = await import('@stacksjs/charts')
|
|
511
|
+
Chart.register(...registerables)
|
|
512
|
+
const Ctor = Chart as unknown as ChartCtor
|
|
513
|
+
|
|
514
|
+
handles.push(useChart({ Chart: Ctor, id: 'insights_cpu_chart', type: 'line', data: cpuData, options: baseChartOptions }))
|
|
515
|
+
handles.push(useChart({ Chart: Ctor, id: 'insights_memory_chart', type: 'line', data: memoryData, options: baseChartOptions }))
|
|
516
|
+
handles.push(useChart({ Chart: Ctor, id: 'insights_storage_chart', type: 'doughnut', data: storageData, options: pieChartOptions }))
|
|
517
|
+
|
|
518
|
+
for (const name of Object.keys(queueDatasets))
|
|
519
|
+
handles.push(useChart({ Chart: Ctor, id: `insights_queue_${name}_chart`, type: 'line', data: queueDataFor(name), options: queueChartOptions }))
|
|
520
|
+
})
|
|
521
|
+
|
|
522
|
+
onDestroy(() => {
|
|
523
|
+
for (const handle of handles)
|
|
524
|
+
handle?.destroy()
|
|
525
|
+
handles.length = 0
|
|
526
|
+
})
|
|
527
|
+
</script>
|
|
528
|
+
|
|
529
|
+
@endsection
|