@burdenoff/microfe-workspaces 2026.627.2 → 2026.711.1
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/dist/generated/wspace-operations.js +11 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/pages/dashboard/DashboardGrid.js +60 -48
- package/dist/pages/dashboard/DashboardGrid.js.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +107 -82
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/WidgetWrapper.js +2 -2
- package/dist/pages/dashboard/WidgetWrapper.js.map +1 -1
- package/dist/pages/dashboard/config.js +82 -0
- package/dist/pages/dashboard/config.js.map +1 -1
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +66 -23
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/TipsWidget.js +68 -30
- package/dist/pages/dashboard/widgets/TipsWidget.js.map +1 -1
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +139 -0
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +91 -0
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":[],"sources":["../../../src/pages/dashboard/config.ts"],"sourcesContent":["/**\n * Dashboard Widget Registry & Default Configuration\n *\n * Product-aware. Hosts pass `productId` to filter widgets relevant for that\n * product. `availableInProducts` on each definition gates registry visibility;\n * `DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT` controls the default visible/order\n * layout for first-time users.\n */\nimport type { WidgetConfig, WidgetDefinition } from './types';\n\nexport const DEFAULT_PRODUCT_ID = 'workspaces';\n\n// ─── Widget Definitions ───────────────────────────────────────────────────────\n\nexport const WIDGET_DEFINITIONS: Record<string, WidgetDefinition> = {\n welcome: {\n id: 'welcome',\n title: 'Welcome',\n description: 'Greeting and overview statistics',\n icon: 'LayoutDashboard',\n defaultSize: 'large',\n removable: false,\n dataSource: 'global',\n },\n quickActions: {\n id: 'quickActions',\n title: 'Quick Actions',\n description: 'Frequently used actions and shortcuts',\n icon: 'Zap',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'static',\n },\n workspaces: {\n id: 'workspaces',\n title: 'Workspaces',\n description: 'Your workspaces overview and quick access',\n icon: 'Building2',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n },\n projects: {\n id: 'projects',\n title: 'Projects',\n description: 'Recent projects and status breakdown',\n icon: 'FolderKanban',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n },\n activity: {\n id: 'activity',\n title: 'Recent Activity',\n description: 'Timeline of recent activity across modules',\n icon: 'Activity',\n defaultSize: 'large',\n removable: true,\n dataSource: 'workspace',\n },\n calendar: {\n id: 'calendar',\n title: 'Upcoming Events',\n description: 'Next upcoming calendar events',\n icon: 'Calendar',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['workspaces'],\n },\n workflows: {\n id: 'workflows',\n title: 'Workflows',\n description: 'Active workflow stats and recent runs',\n icon: 'GitBranch',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['workspaces'],\n },\n tags: {\n id: 'tags',\n title: 'Tags',\n description: 'Popular tags across your workspace',\n icon: 'Tags',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n storage: {\n id: 'storage',\n title: 'Storage',\n description: 'Storage usage and file statistics',\n icon: 'HardDrive',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n groups: {\n id: 'groups',\n title: 'Groups',\n description: 'Your groups and teams',\n icon: 'Users',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n members: {\n id: 'members',\n title: 'Members',\n description: 'Workspace member overview',\n icon: 'UserPlus',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n tips: {\n id: 'tips',\n title: 'Tips & Resources',\n description: 'Getting started tips and documentation links',\n icon: 'Lightbulb',\n defaultSize: 'small',\n removable: true,\n dataSource: 'static',\n },\n // ── VibeControls-specific widgets ───────────────────────────────────────────\n vibes: {\n id: 'vibes',\n title: 'Recent Vibes',\n description: 'Your most recently active development vibes',\n icon: 'Sparkles',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['vibecontrols'],\n },\n sessions: {\n id: 'sessions',\n title: 'Active Sessions',\n description: 'Running terminal and agent sessions',\n icon: 'Terminal',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['vibecontrols'],\n },\n agents: {\n id: 'agents',\n title: 'Agent Fleet',\n description: 'Online, offline, and degraded agents at a glance',\n icon: 'Bot',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['vibecontrols'],\n },\n};\n\n// ─── Default Widget Layouts ───────────────────────────────────────────────────\n\nconst WORKSPACES_DEFAULT_WIDGETS: WidgetConfig[] = [\n { widgetId: 'welcome', enabled: true, order: 0, size: 'large' },\n { widgetId: 'quickActions', enabled: true, order: 1, size: 'medium' },\n { widgetId: 'workspaces', enabled: true, order: 2, size: 'medium' },\n { widgetId: 'projects', enabled: true, order: 3, size: 'medium' },\n { widgetId: 'activity', enabled: true, order: 4, size: 'large' },\n { widgetId: 'calendar', enabled: true, order: 5, size: 'medium' },\n { widgetId: 'workflows', enabled: true, order: 6, size: 'medium' },\n { widgetId: 'tags', enabled: true, order: 7, size: 'small' },\n { widgetId: 'storage', enabled: true, order: 8, size: 'small' },\n { widgetId: 'groups', enabled: true, order: 9, size: 'small' },\n { widgetId: 'members', enabled: true, order: 10, size: 'small' },\n { widgetId: 'tips', enabled: true, order: 11, size: 'small' },\n];\n\nconst VIBECONTROLS_DEFAULT_WIDGETS: WidgetConfig[] = [\n { widgetId: 'welcome', enabled: true, order: 0, size: 'large' },\n { widgetId: 'quickActions', enabled: true, order: 1, size: 'medium' },\n { widgetId: 'vibes', enabled: true, order: 2, size: 'medium' },\n { widgetId: 'sessions', enabled: true, order: 3, size: 'medium' },\n { widgetId: 'agents', enabled: true, order: 4, size: 'small' },\n { widgetId: 'workspaces', enabled: true, order: 5, size: 'medium' },\n { widgetId: 'projects', enabled: true, order: 6, size: 'medium' },\n { widgetId: 'activity', enabled: true, order: 7, size: 'large' },\n { widgetId: 'storage', enabled: true, order: 8, size: 'small' },\n { widgetId: 'members', enabled: true, order: 9, size: 'small' },\n { widgetId: 'tips', enabled: true, order: 10, size: 'small' },\n];\n\nexport const DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT: Record<string, WidgetConfig[]> = {\n workspaces: WORKSPACES_DEFAULT_WIDGETS,\n vibecontrols: VIBECONTROLS_DEFAULT_WIDGETS,\n};\n\n/** Backwards-compatible export — kept for callers that don't pass productId. */\nexport const DEFAULT_DASHBOARD_WIDGETS: WidgetConfig[] = WORKSPACES_DEFAULT_WIDGETS;\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\nexport function isWidgetAvailable(\n widget: WidgetDefinition,\n productId: string = DEFAULT_PRODUCT_ID\n): boolean {\n if (!widget.availableInProducts || widget.availableInProducts.length === 0) {\n return true;\n }\n return widget.availableInProducts.includes(productId);\n}\n\nexport function getDefinitionsForProduct(\n productId: string = DEFAULT_PRODUCT_ID\n): Record<string, WidgetDefinition> {\n const out: Record<string, WidgetDefinition> = {};\n for (const [key, def] of Object.entries(WIDGET_DEFINITIONS)) {\n if (isWidgetAvailable(def, productId)) {\n out[key] = def;\n }\n }\n return out;\n}\n\n/**\n * Get the effective widget configuration, merging user prefs with defaults.\n * Filters out widgets that are not available for the given product.\n */\nexport function getEffectiveWidgets(\n userPrefs: WidgetConfig[] | null | undefined,\n productId: string = DEFAULT_PRODUCT_ID\n): WidgetConfig[] {\n const productDefaults =\n DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT[productId] ?? WORKSPACES_DEFAULT_WIDGETS;\n const availableDefinitions = getDefinitionsForProduct(productId);\n const availableIds = new Set(Object.keys(availableDefinitions));\n\n if (!userPrefs || userPrefs.length === 0) {\n return productDefaults.filter((w) => availableIds.has(w.widgetId));\n }\n\n // Drop saved prefs for widgets that no longer exist for this product (legacy\n // prefs e.g. systemHealth or workflows on vibecontrols).\n const filteredPrefs = userPrefs.filter((w) => availableIds.has(w.widgetId));\n const userWidgetIds = new Set(filteredPrefs.map((w) => w.widgetId));\n const merged = [...filteredPrefs];\n\n for (const def of Object.values(availableDefinitions)) {\n if (!userWidgetIds.has(def.id)) {\n merged.push({\n widgetId: def.id,\n enabled: false,\n order: merged.length,\n size: def.defaultSize,\n });\n }\n }\n\n return merged.sort((a, b) => a.order - b.order);\n}\n"],"mappings":";AAUA,IAAa,IAAqB,cAIrB,IAAuD;CAClE,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,cAAc;EACZ,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,YAAY;EACV,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACZ,qBAAqB,CAAC,aAAa;EACpC;CACD,WAAW;EACT,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACZ,qBAAqB,CAAC,aAAa;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SAAgB,EACd,IAAoB,GACc;CAClC,IAAM,IAAwC,EAAE;AAChD,MAAK,IAAM,CAAC,GAAK,MAAQ,OAAO,QAAQ,EAAmB,CACzD,CAAI,EAAkB,GAAK,EAAU,KACnC,EAAI,KAAO;AAGf,QAAO;;AAOT,SAAgB,EACd,GACA,IAAoB,GACJ;CAChB,IAAM,IACJ,EAAqC,MAAc,GAC/C,IAAuB,EAAyB,EAAU,EAC1D,IAAe,IAAI,IAAI,OAAO,KAAK,EAAqB,CAAC;AAE/D,KAAI,CAAC,KAAa,EAAU,WAAW,EACrC,QAAO,EAAgB,QAAQ,MAAM,EAAa,IAAI,EAAE,SAAS,CAAC;CAKpE,IAAM,IAAgB,EAAU,QAAQ,MAAM,EAAa,IAAI,EAAE,SAAS,CAAC,EACrE,IAAgB,IAAI,IAAI,EAAc,KAAK,MAAM,EAAE,SAAS,CAAC,EAC7D,IAAS,CAAC,GAAG,EAAc;AAEjC,MAAK,IAAM,KAAO,OAAO,OAAO,EAAqB,CACnD,CAAK,EAAc,IAAI,EAAI,GAAG,IAC5B,EAAO,KAAK;EACV,UAAU,EAAI;EACd,SAAS;EACT,OAAO,EAAO;EACd,MAAM,EAAI;EACX,CAAC;AAIN,QAAO,EAAO,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM"}
|
|
1
|
+
{"version":3,"file":"config.js","names":[],"sources":["../../../src/pages/dashboard/config.ts"],"sourcesContent":["/**\n * Dashboard Widget Registry & Default Configuration\n *\n * Product-aware. Hosts pass `productId` to filter widgets relevant for that\n * product. `availableInProducts` on each definition gates registry visibility;\n * `DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT` controls the default visible/order\n * layout for first-time users.\n */\nimport type { WidgetConfig, WidgetDefinition } from './types';\n\nexport const DEFAULT_PRODUCT_ID = 'workspaces';\n\n// ─── Widget Definitions ───────────────────────────────────────────────────────\n\nexport const WIDGET_DEFINITIONS: Record<string, WidgetDefinition> = {\n welcome: {\n id: 'welcome',\n title: 'Welcome',\n description: 'Greeting and overview statistics',\n icon: 'LayoutDashboard',\n defaultSize: 'large',\n removable: false,\n dataSource: 'global',\n },\n quickActions: {\n id: 'quickActions',\n title: 'Quick Actions',\n description: 'Frequently used actions and shortcuts',\n icon: 'Zap',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'static',\n },\n workspaces: {\n id: 'workspaces',\n title: 'Workspaces',\n description: 'Your workspaces overview and quick access',\n icon: 'Building2',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n },\n projects: {\n id: 'projects',\n title: 'Projects',\n description: 'Recent projects and status breakdown',\n icon: 'FolderKanban',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n },\n activity: {\n id: 'activity',\n title: 'Recent Activity',\n description: 'Timeline of recent activity across modules',\n icon: 'Activity',\n defaultSize: 'large',\n removable: true,\n dataSource: 'workspace',\n },\n calendar: {\n id: 'calendar',\n title: 'Upcoming Events',\n description: 'Next upcoming calendar events',\n icon: 'Calendar',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['workspaces'],\n },\n workflows: {\n id: 'workflows',\n title: 'Workflows',\n description: 'Active workflow stats and recent runs',\n icon: 'GitBranch',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['workspaces'],\n },\n tags: {\n id: 'tags',\n title: 'Tags',\n description: 'Popular tags across your workspace',\n icon: 'Tags',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n storage: {\n id: 'storage',\n title: 'Storage',\n description: 'Storage usage and file statistics',\n icon: 'HardDrive',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n groups: {\n id: 'groups',\n title: 'Groups',\n description: 'Your groups and teams',\n icon: 'Users',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n members: {\n id: 'members',\n title: 'Members',\n description: 'Workspace member overview',\n icon: 'UserPlus',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n },\n tips: {\n id: 'tips',\n title: 'Tips & Resources',\n description: 'Getting started tips and documentation links',\n icon: 'Lightbulb',\n defaultSize: 'small',\n removable: true,\n dataSource: 'static',\n },\n // ── VibeControls-specific widgets ───────────────────────────────────────────\n vibes: {\n id: 'vibes',\n title: 'Recent Vibes',\n description: 'Your most recently active development vibes',\n icon: 'Sparkles',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['vibecontrols'],\n },\n sessions: {\n id: 'sessions',\n title: 'Active Sessions',\n description: 'Running terminal and agent sessions',\n icon: 'Terminal',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['vibecontrols'],\n },\n agents: {\n id: 'agents',\n title: 'Agent Fleet',\n description: 'Online, offline, and degraded agents at a glance',\n icon: 'Bot',\n defaultSize: 'small',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['vibecontrols'],\n },\n // ── FluidGrids-specific widgets ─────────────────────────────────────────────\n workflowsOverview: {\n id: 'workflowsOverview',\n title: 'Workflows',\n description: 'Active/archived workflow counts and recently updated workflows',\n icon: 'GitBranch',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['fluidgrids'],\n },\n workflowRuns: {\n id: 'workflowRuns',\n title: 'Workflow Runs',\n description: 'Run health, success rate, and recent executions',\n icon: 'Activity',\n defaultSize: 'medium',\n removable: true,\n dataSource: 'workspace',\n availableInProducts: ['fluidgrids'],\n },\n};\n\n// ─── Default Widget Layouts ───────────────────────────────────────────────────\n\nconst WORKSPACES_DEFAULT_WIDGETS: WidgetConfig[] = [\n { widgetId: 'welcome', enabled: true, order: 0, size: 'large' },\n { widgetId: 'quickActions', enabled: true, order: 1, size: 'medium' },\n { widgetId: 'workspaces', enabled: true, order: 2, size: 'medium' },\n { widgetId: 'projects', enabled: true, order: 3, size: 'medium' },\n { widgetId: 'activity', enabled: true, order: 4, size: 'large' },\n { widgetId: 'calendar', enabled: true, order: 5, size: 'medium' },\n { widgetId: 'workflows', enabled: true, order: 6, size: 'medium' },\n { widgetId: 'tags', enabled: true, order: 7, size: 'small' },\n { widgetId: 'storage', enabled: true, order: 8, size: 'small' },\n { widgetId: 'groups', enabled: true, order: 9, size: 'small' },\n { widgetId: 'members', enabled: true, order: 10, size: 'small' },\n { widgetId: 'tips', enabled: true, order: 11, size: 'small' },\n];\n\nconst VIBECONTROLS_DEFAULT_WIDGETS: WidgetConfig[] = [\n { widgetId: 'welcome', enabled: true, order: 0, size: 'large' },\n { widgetId: 'quickActions', enabled: true, order: 1, size: 'medium' },\n { widgetId: 'vibes', enabled: true, order: 2, size: 'medium' },\n { widgetId: 'sessions', enabled: true, order: 3, size: 'medium' },\n { widgetId: 'agents', enabled: true, order: 4, size: 'small' },\n { widgetId: 'workspaces', enabled: true, order: 5, size: 'medium' },\n { widgetId: 'projects', enabled: true, order: 6, size: 'medium' },\n { widgetId: 'activity', enabled: true, order: 7, size: 'large' },\n { widgetId: 'storage', enabled: true, order: 8, size: 'small' },\n { widgetId: 'members', enabled: true, order: 9, size: 'small' },\n { widgetId: 'tips', enabled: true, order: 10, size: 'small' },\n];\n\nconst FLUIDGRIDS_DEFAULT_WIDGETS: WidgetConfig[] = [\n { widgetId: 'welcome', enabled: true, order: 0, size: 'large' },\n { widgetId: 'quickActions', enabled: true, order: 1, size: 'medium' },\n { widgetId: 'workflowsOverview', enabled: true, order: 2, size: 'medium' },\n { widgetId: 'workflowRuns', enabled: true, order: 3, size: 'medium' },\n { widgetId: 'workspaces', enabled: true, order: 4, size: 'medium' },\n { widgetId: 'projects', enabled: true, order: 5, size: 'medium' },\n // Small widget placed right after projects so it fills the 1-column gap\n // left in that row (projects is 'medium' = 2 cols on a 3-col grid).\n { widgetId: 'tips', enabled: true, order: 6, size: 'small' },\n { widgetId: 'activity', enabled: true, order: 7, size: 'large' },\n { widgetId: 'groups', enabled: true, order: 8, size: 'small' },\n { widgetId: 'members', enabled: true, order: 9, size: 'small' },\n // tags/storage intentionally omitted from the default layout for FluidGrids\n // (not relevant to the workflow-automation use case) — still toggleable\n // via Customize, since getEffectiveWidgets() auto-appends them disabled.\n];\n\nexport const DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT: Record<string, WidgetConfig[]> = {\n workspaces: WORKSPACES_DEFAULT_WIDGETS,\n vibecontrols: VIBECONTROLS_DEFAULT_WIDGETS,\n fluidgrids: FLUIDGRIDS_DEFAULT_WIDGETS,\n};\n\n/** Backwards-compatible export — kept for callers that don't pass productId. */\nexport const DEFAULT_DASHBOARD_WIDGETS: WidgetConfig[] = WORKSPACES_DEFAULT_WIDGETS;\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\nexport function isWidgetAvailable(\n widget: WidgetDefinition,\n productId: string = DEFAULT_PRODUCT_ID\n): boolean {\n if (!widget.availableInProducts || widget.availableInProducts.length === 0) {\n return true;\n }\n return widget.availableInProducts.includes(productId);\n}\n\nexport function getDefinitionsForProduct(\n productId: string = DEFAULT_PRODUCT_ID\n): Record<string, WidgetDefinition> {\n const out: Record<string, WidgetDefinition> = {};\n for (const [key, def] of Object.entries(WIDGET_DEFINITIONS)) {\n if (isWidgetAvailable(def, productId)) {\n out[key] = def;\n }\n }\n return out;\n}\n\n/**\n * Get the effective widget configuration, merging user prefs with defaults.\n * Filters out widgets that are not available for the given product.\n */\nexport function getEffectiveWidgets(\n userPrefs: WidgetConfig[] | null | undefined,\n productId: string = DEFAULT_PRODUCT_ID\n): WidgetConfig[] {\n const productDefaults =\n DEFAULT_DASHBOARD_WIDGETS_BY_PRODUCT[productId] ?? WORKSPACES_DEFAULT_WIDGETS;\n const availableDefinitions = getDefinitionsForProduct(productId);\n const availableIds = new Set(Object.keys(availableDefinitions));\n\n if (!userPrefs || userPrefs.length === 0) {\n return productDefaults.filter((w) => availableIds.has(w.widgetId));\n }\n\n // Drop saved prefs for widgets that no longer exist for this product (legacy\n // prefs e.g. systemHealth or workflows on vibecontrols).\n const filteredPrefs = userPrefs.filter((w) => availableIds.has(w.widgetId));\n const userWidgetIds = new Set(filteredPrefs.map((w) => w.widgetId));\n const merged = [...filteredPrefs];\n\n for (const def of Object.values(availableDefinitions)) {\n if (!userWidgetIds.has(def.id)) {\n merged.push({\n widgetId: def.id,\n enabled: false,\n order: merged.length,\n size: def.defaultSize,\n });\n }\n }\n\n return merged.sort((a, b) => a.order - b.order);\n}\n"],"mappings":";AAUA,IAAa,IAAqB,cAIrB,IAAuD;CAClE,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,cAAc;EACZ,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,YAAY;EACV,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACZ,qBAAqB,CAAC,aAAa;EACpC;CACD,WAAW;EACT,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACZ,qBAAqB,CAAC,aAAa;EACpC;CACD,MAAM;EACJ,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,aAAa;EACb,W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qB,CACnD,CAAK,EAAc,IAAI,EAAI,GAAG,IAC5B,EAAO,KAAK;EACV,UAAU,EAAI;EACd,SAAS;EACT,OAAO,EAAO;EACd,MAAM,EAAI;EACX,CAAC;AAIN,QAAO,EAAO,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { WidgetWrapper as e } from "../WidgetWrapper.js";
|
|
2
|
-
import { Bot as t, Calendar as n, Cog as r, FileText as i, FolderKanban as a,
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { Button as
|
|
2
|
+
import { Bot as t, Calendar as n, Cog as r, FileText as i, FolderKanban as a, GitBranch as o, LayoutTemplate as s, PlayCircle as c, Plus as l, Sparkles as u, Tags as d, Terminal as f, Upload as p, UserPlus as m, Zap as h } from "lucide-react";
|
|
3
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
4
|
+
import { Button as v } from "@burdenoff/fe-libs/ui";
|
|
5
5
|
//#region src/pages/dashboard/widgets/QuickActionsWidget.tsx
|
|
6
|
-
var
|
|
6
|
+
var y = [
|
|
7
7
|
{
|
|
8
8
|
id: "create-workspace",
|
|
9
9
|
label: "New Workspace",
|
|
10
|
-
icon:
|
|
10
|
+
icon: l,
|
|
11
11
|
path: "/workspaces/list",
|
|
12
12
|
color: "text-accent-blue"
|
|
13
13
|
},
|
|
@@ -21,14 +21,14 @@ var g = [
|
|
|
21
21
|
{
|
|
22
22
|
id: "invite-member",
|
|
23
23
|
label: "Invite Member",
|
|
24
|
-
icon:
|
|
24
|
+
icon: m,
|
|
25
25
|
path: "/workspaces/members",
|
|
26
26
|
color: "text-accent-purple"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
id: "upload-file",
|
|
30
30
|
label: "Upload File",
|
|
31
|
-
icon:
|
|
31
|
+
icon: p,
|
|
32
32
|
path: "/files",
|
|
33
33
|
color: "text-status-warning-text"
|
|
34
34
|
},
|
|
@@ -42,7 +42,7 @@ var g = [
|
|
|
42
42
|
{
|
|
43
43
|
id: "manage-tags",
|
|
44
44
|
label: "Manage Tags",
|
|
45
|
-
icon:
|
|
45
|
+
icon: d,
|
|
46
46
|
path: "/tags",
|
|
47
47
|
color: "text-accent-cyan"
|
|
48
48
|
},
|
|
@@ -60,18 +60,18 @@ var g = [
|
|
|
60
60
|
path: "/settings",
|
|
61
61
|
color: "text-text-secondary"
|
|
62
62
|
}
|
|
63
|
-
],
|
|
63
|
+
], b = [
|
|
64
64
|
{
|
|
65
65
|
id: "new-vibe",
|
|
66
66
|
label: "New Vibe",
|
|
67
|
-
icon:
|
|
67
|
+
icon: u,
|
|
68
68
|
path: "/vibecontrols/vibes/new",
|
|
69
69
|
color: "text-accent-blue"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: "view-sessions",
|
|
73
73
|
label: "Sessions",
|
|
74
|
-
icon:
|
|
74
|
+
icon: f,
|
|
75
75
|
path: "/vibecontrols/sessions",
|
|
76
76
|
color: "text-status-success-text"
|
|
77
77
|
},
|
|
@@ -85,14 +85,57 @@ var g = [
|
|
|
85
85
|
{
|
|
86
86
|
id: "invite-member",
|
|
87
87
|
label: "Invite Member",
|
|
88
|
-
icon:
|
|
88
|
+
icon: m,
|
|
89
89
|
path: "/workspaces/members",
|
|
90
90
|
color: "text-accent-pink"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
id: "upload-file",
|
|
94
94
|
label: "Upload File",
|
|
95
|
-
icon:
|
|
95
|
+
icon: p,
|
|
96
|
+
path: "/files",
|
|
97
|
+
color: "text-status-warning-text"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "settings",
|
|
101
|
+
label: "Settings",
|
|
102
|
+
icon: r,
|
|
103
|
+
path: "/settings",
|
|
104
|
+
color: "text-accent-cyan"
|
|
105
|
+
}
|
|
106
|
+
], x = [
|
|
107
|
+
{
|
|
108
|
+
id: "new-workflow",
|
|
109
|
+
label: "New Workflow",
|
|
110
|
+
icon: o,
|
|
111
|
+
path: "/workflows/new",
|
|
112
|
+
color: "text-accent-blue"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "view-runs",
|
|
116
|
+
label: "View Runs",
|
|
117
|
+
icon: c,
|
|
118
|
+
path: "/workflows/runs",
|
|
119
|
+
color: "text-status-success-text"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "browse-templates",
|
|
123
|
+
label: "Templates",
|
|
124
|
+
icon: s,
|
|
125
|
+
path: "/workflows/templates",
|
|
126
|
+
color: "text-accent-purple"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "invite-member",
|
|
130
|
+
label: "Invite Member",
|
|
131
|
+
icon: m,
|
|
132
|
+
path: "/workspaces/members",
|
|
133
|
+
color: "text-accent-pink"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "upload-file",
|
|
137
|
+
label: "Upload File",
|
|
138
|
+
icon: p,
|
|
96
139
|
path: "/files",
|
|
97
140
|
color: "text-status-warning-text"
|
|
98
141
|
},
|
|
@@ -104,23 +147,23 @@ var g = [
|
|
|
104
147
|
color: "text-accent-cyan"
|
|
105
148
|
}
|
|
106
149
|
];
|
|
107
|
-
function
|
|
108
|
-
return e === "vibecontrols" ?
|
|
150
|
+
function S(e) {
|
|
151
|
+
return e === "vibecontrols" ? b : e === "fluidgrids" ? x : y;
|
|
109
152
|
}
|
|
110
|
-
function
|
|
111
|
-
let i =
|
|
112
|
-
return /* @__PURE__ */
|
|
153
|
+
function C({ navigate: t, isLoading: n, productId: r }) {
|
|
154
|
+
let i = S(r);
|
|
155
|
+
return /* @__PURE__ */ g(e, {
|
|
113
156
|
title: "Quick Actions",
|
|
114
|
-
icon: /* @__PURE__ */
|
|
157
|
+
icon: /* @__PURE__ */ g(h, { className: "size-4" }),
|
|
115
158
|
size: "medium",
|
|
116
159
|
isLoading: n,
|
|
117
|
-
children: /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ g("div", {
|
|
118
161
|
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2",
|
|
119
|
-
children: i.map((e) => /* @__PURE__ */
|
|
162
|
+
children: i.map((e) => /* @__PURE__ */ _(v, {
|
|
120
163
|
variant: "outline",
|
|
121
164
|
className: "flex flex-col items-center gap-1.5 h-auto py-3 px-2 text-xs hover:bg-accent/5 transition-colors",
|
|
122
165
|
onClick: () => t(e.path),
|
|
123
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ g(e.icon, { className: `size-5 ${e.color}` }), /* @__PURE__ */ g("span", {
|
|
124
167
|
className: "text-text-secondary font-medium",
|
|
125
168
|
children: e.label
|
|
126
169
|
})]
|
|
@@ -129,6 +172,6 @@ function y({ navigate: t, isLoading: n, productId: r }) {
|
|
|
129
172
|
});
|
|
130
173
|
}
|
|
131
174
|
//#endregion
|
|
132
|
-
export {
|
|
175
|
+
export { C as QuickActionsWidget };
|
|
133
176
|
|
|
134
177
|
//# sourceMappingURL=QuickActionsWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickActionsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/QuickActionsWidget.tsx"],"sourcesContent":["import type { LucideIcon } from 'lucide-react';\nimport {\n Zap,\n Plus,\n Upload,\n UserPlus,\n FolderKanban,\n Calendar,\n FileText,\n Tags,\n Bot,\n Terminal,\n Sparkles,\n Cog,\n} from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\ninterface QuickAction {\n id: string;\n label: string;\n icon: LucideIcon;\n path: string;\n color: string;\n}\n\nconst WORKSPACES_QUICK_ACTIONS: QuickAction[] = [\n {\n id: 'create-workspace',\n label: 'New Workspace',\n icon: Plus,\n path: '/workspaces/list',\n color: 'text-accent-blue',\n },\n {\n id: 'create-project',\n label: 'New Project',\n icon: FolderKanban,\n path: '/workspaces/projects',\n color: 'text-status-success-text',\n },\n {\n id: 'invite-member',\n label: 'Invite Member',\n icon: UserPlus,\n path: '/workspaces/members',\n color: 'text-accent-purple',\n },\n {\n id: 'upload-file',\n label: 'Upload File',\n icon: Upload,\n path: '/files',\n color: 'text-status-warning-text',\n },\n {\n id: 'new-event',\n label: 'New Event',\n icon: Calendar,\n path: '/calendar',\n color: 'text-accent-pink',\n },\n {\n id: 'manage-tags',\n label: 'Manage Tags',\n icon: Tags,\n path: '/tags',\n color: 'text-accent-cyan',\n },\n {\n id: 'view-workflows',\n label: 'Workflows',\n icon: FileText,\n path: '/workflows',\n color: 'text-accent-orange',\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: Cog,\n path: '/settings',\n color: 'text-text-secondary',\n },\n];\n\nconst VIBECONTROLS_QUICK_ACTIONS: QuickAction[] = [\n {\n id: 'new-vibe',\n label: 'New Vibe',\n icon: Sparkles,\n path: '/vibecontrols/vibes/new',\n color: 'text-accent-blue',\n },\n {\n id: 'view-sessions',\n label: 'Sessions',\n icon: Terminal,\n path: '/vibecontrols/sessions',\n color: 'text-status-success-text',\n },\n {\n id: 'connect-agent',\n label: 'Connect Agent',\n icon: Bot,\n path: '/vibecontrols/agents/new',\n color: 'text-accent-purple',\n },\n {\n id: 'invite-member',\n label: 'Invite Member',\n icon: UserPlus,\n path: '/workspaces/members',\n color: 'text-accent-pink',\n },\n {\n id: 'upload-file',\n label: 'Upload File',\n icon: Upload,\n path: '/files',\n color: 'text-status-warning-text',\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: Cog,\n path: '/settings',\n color: 'text-accent-cyan',\n },\n];\n\nfunction pickActions(productId?: string): QuickAction[] {\n if (productId === 'vibecontrols') return VIBECONTROLS_QUICK_ACTIONS;\n return WORKSPACES_QUICK_ACTIONS;\n}\n\nexport function QuickActionsWidget({ navigate, isLoading, productId }: WidgetProps) {\n const actions = pickActions(productId);\n return (\n <WidgetWrapper\n title=\"Quick Actions\"\n icon={<Zap className=\"size-4\" />}\n size=\"medium\"\n isLoading={isLoading}\n >\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2\">\n {actions.map((action) => (\n <Button\n key={action.id}\n variant=\"outline\"\n className=\"flex flex-col items-center gap-1.5 h-auto py-3 px-2 text-xs hover:bg-accent/5 transition-colors\"\n onClick={() => navigate(action.path)}\n >\n <action.icon className={`size-5 ${action.color}`} />\n <span className=\"text-text-secondary font-medium\">{action.label}</span>\n </Button>\n ))}\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"QuickActionsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/QuickActionsWidget.tsx"],"sourcesContent":["import type { LucideIcon } from 'lucide-react';\nimport {\n Zap,\n Plus,\n Upload,\n UserPlus,\n FolderKanban,\n Calendar,\n FileText,\n Tags,\n Bot,\n Terminal,\n Sparkles,\n Cog,\n GitBranch,\n PlayCircle,\n LayoutTemplate,\n} from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\ninterface QuickAction {\n id: string;\n label: string;\n icon: LucideIcon;\n path: string;\n color: string;\n}\n\nconst WORKSPACES_QUICK_ACTIONS: QuickAction[] = [\n {\n id: 'create-workspace',\n label: 'New Workspace',\n icon: Plus,\n path: '/workspaces/list',\n color: 'text-accent-blue',\n },\n {\n id: 'create-project',\n label: 'New Project',\n icon: FolderKanban,\n path: '/workspaces/projects',\n color: 'text-status-success-text',\n },\n {\n id: 'invite-member',\n label: 'Invite Member',\n icon: UserPlus,\n path: '/workspaces/members',\n color: 'text-accent-purple',\n },\n {\n id: 'upload-file',\n label: 'Upload File',\n icon: Upload,\n path: '/files',\n color: 'text-status-warning-text',\n },\n {\n id: 'new-event',\n label: 'New Event',\n icon: Calendar,\n path: '/calendar',\n color: 'text-accent-pink',\n },\n {\n id: 'manage-tags',\n label: 'Manage Tags',\n icon: Tags,\n path: '/tags',\n color: 'text-accent-cyan',\n },\n {\n id: 'view-workflows',\n label: 'Workflows',\n icon: FileText,\n path: '/workflows',\n color: 'text-accent-orange',\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: Cog,\n path: '/settings',\n color: 'text-text-secondary',\n },\n];\n\nconst VIBECONTROLS_QUICK_ACTIONS: QuickAction[] = [\n {\n id: 'new-vibe',\n label: 'New Vibe',\n icon: Sparkles,\n path: '/vibecontrols/vibes/new',\n color: 'text-accent-blue',\n },\n {\n id: 'view-sessions',\n label: 'Sessions',\n icon: Terminal,\n path: '/vibecontrols/sessions',\n color: 'text-status-success-text',\n },\n {\n id: 'connect-agent',\n label: 'Connect Agent',\n icon: Bot,\n path: '/vibecontrols/agents/new',\n color: 'text-accent-purple',\n },\n {\n id: 'invite-member',\n label: 'Invite Member',\n icon: UserPlus,\n path: '/workspaces/members',\n color: 'text-accent-pink',\n },\n {\n id: 'upload-file',\n label: 'Upload File',\n icon: Upload,\n path: '/files',\n color: 'text-status-warning-text',\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: Cog,\n path: '/settings',\n color: 'text-accent-cyan',\n },\n];\n\nconst FLUIDGRIDS_QUICK_ACTIONS: QuickAction[] = [\n {\n id: 'new-workflow',\n label: 'New Workflow',\n icon: GitBranch,\n path: '/workflows/new',\n color: 'text-accent-blue',\n },\n {\n id: 'view-runs',\n label: 'View Runs',\n icon: PlayCircle,\n path: '/workflows/runs',\n color: 'text-status-success-text',\n },\n {\n id: 'browse-templates',\n label: 'Templates',\n icon: LayoutTemplate,\n path: '/workflows/templates',\n color: 'text-accent-purple',\n },\n {\n id: 'invite-member',\n label: 'Invite Member',\n icon: UserPlus,\n path: '/workspaces/members',\n color: 'text-accent-pink',\n },\n {\n id: 'upload-file',\n label: 'Upload File',\n icon: Upload,\n path: '/files',\n color: 'text-status-warning-text',\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: Cog,\n path: '/settings',\n color: 'text-accent-cyan',\n },\n];\n\nfunction pickActions(productId?: string): QuickAction[] {\n if (productId === 'vibecontrols') return VIBECONTROLS_QUICK_ACTIONS;\n if (productId === 'fluidgrids') return FLUIDGRIDS_QUICK_ACTIONS;\n return WORKSPACES_QUICK_ACTIONS;\n}\n\nexport function QuickActionsWidget({ navigate, isLoading, productId }: WidgetProps) {\n const actions = pickActions(productId);\n return (\n <WidgetWrapper\n title=\"Quick Actions\"\n icon={<Zap className=\"size-4\" />}\n size=\"medium\"\n isLoading={isLoading}\n >\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2\">\n {actions.map((action) => (\n <Button\n key={action.id}\n variant=\"outline\"\n className=\"flex flex-col items-center gap-1.5 h-auto py-3 px-2 text-xs hover:bg-accent/5 transition-colors\"\n onClick={() => navigate(action.path)}\n >\n <action.icon className={`size-5 ${action.color}`} />\n <span className=\"text-text-secondary font-medium\">{action.label}</span>\n </Button>\n ))}\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;;AA8BA,IAAM,IAA0C;CAC9C;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACF,EAEK,IAA4C;CAChD;EACE,IAAI;EACJ,OAAO;EACP,MAAM;EACN,M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AAU;eAAmC,EAAO;KAAa,CAAA,CAChE;MAPF,EAAO,GAOL,CACT;GACE,CAAA;EACQ,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WidgetWrapper as e } from "../WidgetWrapper.js";
|
|
2
|
-
import { BookOpen as t, ExternalLink as n,
|
|
3
|
-
import { jsx as
|
|
2
|
+
import { BookOpen as t, ExternalLink as n, GitBranch as r, LayoutTemplate as i, Lightbulb as a, Newspaper as o, Puzzle as s, Rocket as c, ScrollText as l, Shield as u, Sparkles as d, Users as f, Workflow as p } from "lucide-react";
|
|
3
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
4
|
//#region src/pages/dashboard/widgets/TipsWidget.tsx
|
|
5
|
-
var
|
|
5
|
+
var g = [
|
|
6
6
|
{
|
|
7
7
|
icon: t,
|
|
8
8
|
title: "Read the docs",
|
|
@@ -12,7 +12,7 @@ var p = [
|
|
|
12
12
|
color: "text-accent-blue"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
icon:
|
|
15
|
+
icon: f,
|
|
16
16
|
title: "Join the community",
|
|
17
17
|
description: "Ask questions, share workflows, and chat with the team.",
|
|
18
18
|
href: "https://community.vibecontrols.com",
|
|
@@ -20,14 +20,14 @@ var p = [
|
|
|
20
20
|
color: "text-accent-purple"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
icon:
|
|
23
|
+
icon: s,
|
|
24
24
|
title: "Browse plugins",
|
|
25
25
|
description: "50+ plugins for terminals, AI, tunnels, sandboxes, and more.",
|
|
26
26
|
href: "/vibecontrols/plugins",
|
|
27
27
|
color: "text-status-success-text"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
icon:
|
|
30
|
+
icon: o,
|
|
31
31
|
title: "Latest from the blog",
|
|
32
32
|
description: "Product updates, deep dives, and engineering posts.",
|
|
33
33
|
href: "https://vibecontrols.com/blog",
|
|
@@ -35,29 +35,29 @@ var p = [
|
|
|
35
35
|
color: "text-status-warning-text"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
icon:
|
|
38
|
+
icon: d,
|
|
39
39
|
title: "Feature previews",
|
|
40
40
|
description: "Try opt-in features before they ship to everyone.",
|
|
41
41
|
href: "/feature-previews",
|
|
42
42
|
color: "text-accent-pink"
|
|
43
43
|
}
|
|
44
|
-
],
|
|
44
|
+
], _ = [
|
|
45
45
|
{
|
|
46
|
-
icon:
|
|
46
|
+
icon: c,
|
|
47
47
|
title: "Create your first workspace",
|
|
48
48
|
description: "Organize your team with a dedicated workspace.",
|
|
49
49
|
href: "/workspaces/list",
|
|
50
50
|
color: "text-accent-blue"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
icon:
|
|
53
|
+
icon: p,
|
|
54
54
|
title: "Automate with workflows",
|
|
55
55
|
description: "Build automation workflows to streamline your processes.",
|
|
56
56
|
href: "/workflows",
|
|
57
57
|
color: "text-status-success-text"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
icon:
|
|
60
|
+
icon: u,
|
|
61
61
|
title: "Set up permissions",
|
|
62
62
|
description: "Configure role-based access for your workspace members.",
|
|
63
63
|
href: "/rbac",
|
|
@@ -70,48 +70,86 @@ var p = [
|
|
|
70
70
|
href: "/devportal",
|
|
71
71
|
color: "text-status-warning-text"
|
|
72
72
|
}
|
|
73
|
+
], v = [
|
|
74
|
+
{
|
|
75
|
+
icon: r,
|
|
76
|
+
title: "Build your first workflow",
|
|
77
|
+
description: "Drag nodes onto the canvas to automate a process end to end.",
|
|
78
|
+
href: "/workflows/new",
|
|
79
|
+
color: "text-accent-blue"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
icon: i,
|
|
83
|
+
title: "Start from a template",
|
|
84
|
+
description: "Skip the blank canvas with a ready-made workflow template.",
|
|
85
|
+
href: "/workflows/templates",
|
|
86
|
+
color: "text-status-success-text"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
icon: l,
|
|
90
|
+
title: "Debug a failed run",
|
|
91
|
+
description: "Inspect node-by-node execution logs for any workflow run.",
|
|
92
|
+
href: "/workflows/runs",
|
|
93
|
+
color: "text-accent-purple"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
icon: t,
|
|
97
|
+
title: "Read the docs",
|
|
98
|
+
description: "Guides and node reference at docs.fluidgrids.com.",
|
|
99
|
+
href: "https://docs.fluidgrids.com",
|
|
100
|
+
external: !0,
|
|
101
|
+
color: "text-status-warning-text"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
icon: f,
|
|
105
|
+
title: "Join the community",
|
|
106
|
+
description: "Share workflows and get help from other builders.",
|
|
107
|
+
href: "https://community.fluidgrids.com",
|
|
108
|
+
external: !0,
|
|
109
|
+
color: "text-accent-pink"
|
|
110
|
+
}
|
|
73
111
|
];
|
|
74
|
-
function
|
|
75
|
-
return e === "vibecontrols" ?
|
|
112
|
+
function y(e) {
|
|
113
|
+
return e === "vibecontrols" ? g : e === "fluidgrids" ? v : _;
|
|
76
114
|
}
|
|
77
|
-
function
|
|
78
|
-
let o =
|
|
79
|
-
return /* @__PURE__ */
|
|
115
|
+
function b({ navigate: t, isLoading: r, productId: i }) {
|
|
116
|
+
let o = y(i);
|
|
117
|
+
return /* @__PURE__ */ m(e, {
|
|
80
118
|
title: "Tips & Resources",
|
|
81
|
-
icon: /* @__PURE__ */
|
|
119
|
+
icon: /* @__PURE__ */ m(a, { className: "size-4" }),
|
|
82
120
|
size: "small",
|
|
83
|
-
isLoading:
|
|
84
|
-
children: /* @__PURE__ */
|
|
121
|
+
isLoading: r,
|
|
122
|
+
children: /* @__PURE__ */ m("div", {
|
|
85
123
|
className: "space-y-2",
|
|
86
|
-
children: o.map((e) => e.external ? /* @__PURE__ */
|
|
124
|
+
children: o.map((e) => e.external ? /* @__PURE__ */ h("a", {
|
|
87
125
|
href: e.href,
|
|
88
126
|
target: "_blank",
|
|
89
127
|
rel: "noopener noreferrer",
|
|
90
128
|
className: "w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 transition-colors text-left",
|
|
91
129
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ m(e.icon, { className: `size-4 mt-0.5 shrink-0 ${e.color}` }),
|
|
131
|
+
/* @__PURE__ */ h("div", {
|
|
94
132
|
className: "min-w-0",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ m("p", {
|
|
96
134
|
className: "text-xs font-medium text-text-primary leading-tight",
|
|
97
135
|
children: e.title
|
|
98
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ m("p", {
|
|
99
137
|
className: "text-[11px] text-text-secondary leading-tight mt-0.5",
|
|
100
138
|
children: e.description
|
|
101
139
|
})]
|
|
102
140
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ m(n, { className: "size-3 text-text-secondary shrink-0 mt-0.5" })
|
|
104
142
|
]
|
|
105
|
-
}, e.title) : /* @__PURE__ */
|
|
143
|
+
}, e.title) : /* @__PURE__ */ h("button", {
|
|
106
144
|
type: "button",
|
|
107
145
|
className: "w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 cursor-pointer transition-colors text-left",
|
|
108
146
|
onClick: () => t(e.href),
|
|
109
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ m(e.icon, { className: `size-4 mt-0.5 shrink-0 ${e.color}` }), /* @__PURE__ */ h("div", {
|
|
110
148
|
className: "min-w-0",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ m("p", {
|
|
112
150
|
className: "text-xs font-medium text-text-primary leading-tight",
|
|
113
151
|
children: e.title
|
|
114
|
-
}), /* @__PURE__ */
|
|
152
|
+
}), /* @__PURE__ */ m("p", {
|
|
115
153
|
className: "text-[11px] text-text-secondary leading-tight mt-0.5",
|
|
116
154
|
children: e.description
|
|
117
155
|
})]
|
|
@@ -121,6 +159,6 @@ function g({ navigate: t, isLoading: i, productId: a }) {
|
|
|
121
159
|
});
|
|
122
160
|
}
|
|
123
161
|
//#endregion
|
|
124
|
-
export {
|
|
162
|
+
export { b as TipsWidget };
|
|
125
163
|
|
|
126
164
|
//# sourceMappingURL=TipsWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TipsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/TipsWidget.tsx"],"sourcesContent":["import type { LucideIcon } from 'lucide-react';\nimport {\n Lightbulb,\n ExternalLink,\n BookOpen,\n Rocket,\n Shield,\n Workflow,\n Users,\n Puzzle,\n Newspaper,\n Sparkles,\n} from 'lucide-react';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\ninterface Tip {\n icon: LucideIcon;\n title: string;\n description: string;\n href: string;\n external?: boolean;\n color: string;\n}\n\nconst VIBECONTROLS_TIPS: Tip[] = [\n {\n icon: BookOpen,\n title: 'Read the docs',\n description: 'Guides, references, and tutorials at docs.vibecontrols.com.',\n href: 'https://docs.vibecontrols.com',\n external: true,\n color: 'text-accent-blue',\n },\n {\n icon: Users,\n title: 'Join the community',\n description: 'Ask questions, share workflows, and chat with the team.',\n href: 'https://community.vibecontrols.com',\n external: true,\n color: 'text-accent-purple',\n },\n {\n icon: Puzzle,\n title: 'Browse plugins',\n description: '50+ plugins for terminals, AI, tunnels, sandboxes, and more.',\n href: '/vibecontrols/plugins',\n color: 'text-status-success-text',\n },\n {\n icon: Newspaper,\n title: 'Latest from the blog',\n description: 'Product updates, deep dives, and engineering posts.',\n href: 'https://vibecontrols.com/blog',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Sparkles,\n title: 'Feature previews',\n description: 'Try opt-in features before they ship to everyone.',\n href: '/feature-previews',\n color: 'text-accent-pink',\n },\n];\n\nconst WORKSPACES_TIPS: Tip[] = [\n {\n icon: Rocket,\n title: 'Create your first workspace',\n description: 'Organize your team with a dedicated workspace.',\n href: '/workspaces/list',\n color: 'text-accent-blue',\n },\n {\n icon: Workflow,\n title: 'Automate with workflows',\n description: 'Build automation workflows to streamline your processes.',\n href: '/workflows',\n color: 'text-status-success-text',\n },\n {\n icon: Shield,\n title: 'Set up permissions',\n description: 'Configure role-based access for your workspace members.',\n href: '/rbac',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: 'Explore the API',\n description: 'Check out our developer portal for API documentation.',\n href: '/devportal',\n color: 'text-status-warning-text',\n },\n];\n\nfunction pickTips(productId?: string): Tip[] {\n if (productId === 'vibecontrols') return VIBECONTROLS_TIPS;\n return WORKSPACES_TIPS;\n}\n\nexport function TipsWidget({ navigate, isLoading, productId }: WidgetProps) {\n const tips = pickTips(productId);\n\n return (\n <WidgetWrapper\n title=\"Tips & Resources\"\n icon={<Lightbulb className=\"size-4\" />}\n size=\"small\"\n isLoading={isLoading}\n >\n <div className=\"space-y-2\">\n {tips.map((tip) =>\n tip.external ? (\n <a\n key={tip.title}\n href={tip.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 transition-colors text-left\"\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n <ExternalLink className=\"size-3 text-text-secondary shrink-0 mt-0.5\" />\n </a>\n ) : (\n <button\n key={tip.title}\n type=\"button\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 cursor-pointer transition-colors text-left\"\n onClick={() => navigate(tip.href)}\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n </button>\n )\n )}\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"TipsWidget.js","names":[],"sources":["../../../../src/pages/dashboard/widgets/TipsWidget.tsx"],"sourcesContent":["import type { LucideIcon } from 'lucide-react';\nimport {\n Lightbulb,\n ExternalLink,\n BookOpen,\n Rocket,\n Shield,\n Workflow,\n Users,\n Puzzle,\n Newspaper,\n Sparkles,\n GitBranch,\n LayoutTemplate,\n ScrollText,\n} from 'lucide-react';\nimport { WidgetWrapper } from '../WidgetWrapper';\nimport type { WidgetProps } from '../types';\n\ninterface Tip {\n icon: LucideIcon;\n title: string;\n description: string;\n href: string;\n external?: boolean;\n color: string;\n}\n\nconst VIBECONTROLS_TIPS: Tip[] = [\n {\n icon: BookOpen,\n title: 'Read the docs',\n description: 'Guides, references, and tutorials at docs.vibecontrols.com.',\n href: 'https://docs.vibecontrols.com',\n external: true,\n color: 'text-accent-blue',\n },\n {\n icon: Users,\n title: 'Join the community',\n description: 'Ask questions, share workflows, and chat with the team.',\n href: 'https://community.vibecontrols.com',\n external: true,\n color: 'text-accent-purple',\n },\n {\n icon: Puzzle,\n title: 'Browse plugins',\n description: '50+ plugins for terminals, AI, tunnels, sandboxes, and more.',\n href: '/vibecontrols/plugins',\n color: 'text-status-success-text',\n },\n {\n icon: Newspaper,\n title: 'Latest from the blog',\n description: 'Product updates, deep dives, and engineering posts.',\n href: 'https://vibecontrols.com/blog',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Sparkles,\n title: 'Feature previews',\n description: 'Try opt-in features before they ship to everyone.',\n href: '/feature-previews',\n color: 'text-accent-pink',\n },\n];\n\nconst WORKSPACES_TIPS: Tip[] = [\n {\n icon: Rocket,\n title: 'Create your first workspace',\n description: 'Organize your team with a dedicated workspace.',\n href: '/workspaces/list',\n color: 'text-accent-blue',\n },\n {\n icon: Workflow,\n title: 'Automate with workflows',\n description: 'Build automation workflows to streamline your processes.',\n href: '/workflows',\n color: 'text-status-success-text',\n },\n {\n icon: Shield,\n title: 'Set up permissions',\n description: 'Configure role-based access for your workspace members.',\n href: '/rbac',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: 'Explore the API',\n description: 'Check out our developer portal for API documentation.',\n href: '/devportal',\n color: 'text-status-warning-text',\n },\n];\n\nconst FLUIDGRIDS_TIPS: Tip[] = [\n {\n icon: GitBranch,\n title: 'Build your first workflow',\n description: 'Drag nodes onto the canvas to automate a process end to end.',\n href: '/workflows/new',\n color: 'text-accent-blue',\n },\n {\n icon: LayoutTemplate,\n title: 'Start from a template',\n description: 'Skip the blank canvas with a ready-made workflow template.',\n href: '/workflows/templates',\n color: 'text-status-success-text',\n },\n {\n icon: ScrollText,\n title: 'Debug a failed run',\n description: 'Inspect node-by-node execution logs for any workflow run.',\n href: '/workflows/runs',\n color: 'text-accent-purple',\n },\n {\n icon: BookOpen,\n title: 'Read the docs',\n description: 'Guides and node reference at docs.fluidgrids.com.',\n href: 'https://docs.fluidgrids.com',\n external: true,\n color: 'text-status-warning-text',\n },\n {\n icon: Users,\n title: 'Join the community',\n description: 'Share workflows and get help from other builders.',\n href: 'https://community.fluidgrids.com',\n external: true,\n color: 'text-accent-pink',\n },\n];\n\nfunction pickTips(productId?: string): Tip[] {\n if (productId === 'vibecontrols') return VIBECONTROLS_TIPS;\n if (productId === 'fluidgrids') return FLUIDGRIDS_TIPS;\n return WORKSPACES_TIPS;\n}\n\nexport function TipsWidget({ navigate, isLoading, productId }: WidgetProps) {\n const tips = pickTips(productId);\n\n return (\n <WidgetWrapper\n title=\"Tips & Resources\"\n icon={<Lightbulb className=\"size-4\" />}\n size=\"small\"\n isLoading={isLoading}\n >\n <div className=\"space-y-2\">\n {tips.map((tip) =>\n tip.external ? (\n <a\n key={tip.title}\n href={tip.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 transition-colors text-left\"\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n <ExternalLink className=\"size-3 text-text-secondary shrink-0 mt-0.5\" />\n </a>\n ) : (\n <button\n key={tip.title}\n type=\"button\"\n className=\"w-full flex items-start gap-2 p-1.5 rounded hover:bg-accent/5 cursor-pointer transition-colors text-left\"\n onClick={() => navigate(tip.href)}\n >\n <tip.icon className={`size-4 mt-0.5 shrink-0 ${tip.color}`} />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-medium text-text-primary leading-tight\">{tip.title}</p>\n <p className=\"text-[11px] text-text-secondary leading-tight mt-0.5\">\n {tip.description}\n </p>\n </div>\n </button>\n )\n )}\n </div>\n </WidgetWrapper>\n );\n}\n"],"mappings":";;;;AA4BA,IAAM,IAA2B;CAC/B;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACF,EAEK,IAAyB;CAC7B;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,OAAO;EACP,aAAa;EACb,MA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K,WAAU;eAAf,CACE,kBAAC,KAAD;MAAG,WAAU;gBAAuD,EAAI;MAAU,CAAA,EAClF,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAI;MACH,CAAA,CACA;OACC;MAZF,EAAI,MAYF,CAEZ;GACG,CAAA;EACQ,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { WidgetWrapper as e } from "../WidgetWrapper.js";
|
|
2
|
+
import { Activity as t, ArrowRight as n, CheckCircle2 as r, Clock as i, Play as a, XCircle as o } from "lucide-react";
|
|
3
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { Badge as l, Button as u, IllustratedEmptyState as d } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
//#region src/pages/dashboard/widgets/WorkflowRunsWidget.tsx
|
|
6
|
+
var f = {
|
|
7
|
+
RUNNING: {
|
|
8
|
+
icon: a,
|
|
9
|
+
color: "text-accent-blue"
|
|
10
|
+
},
|
|
11
|
+
PENDING: {
|
|
12
|
+
icon: i,
|
|
13
|
+
color: "text-status-warning-text"
|
|
14
|
+
},
|
|
15
|
+
WAITING: {
|
|
16
|
+
icon: i,
|
|
17
|
+
color: "text-status-warning-text"
|
|
18
|
+
},
|
|
19
|
+
COMPLETED: {
|
|
20
|
+
icon: r,
|
|
21
|
+
color: "text-status-success-text"
|
|
22
|
+
},
|
|
23
|
+
FAILED: {
|
|
24
|
+
icon: o,
|
|
25
|
+
color: "text-status-error-text"
|
|
26
|
+
},
|
|
27
|
+
CANCELLED: {
|
|
28
|
+
icon: o,
|
|
29
|
+
color: "text-text-tertiary"
|
|
30
|
+
},
|
|
31
|
+
TERMINATED: {
|
|
32
|
+
icon: o,
|
|
33
|
+
color: "text-text-tertiary"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
function p(e) {
|
|
37
|
+
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
|
|
38
|
+
if (n < 1) return "just now";
|
|
39
|
+
if (n < 60) return `${n}m ago`;
|
|
40
|
+
let r = Math.floor(n / 60);
|
|
41
|
+
return r < 24 ? `${r}h ago` : new Date(e).toLocaleDateString(void 0, {
|
|
42
|
+
month: "short",
|
|
43
|
+
day: "numeric"
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function m({ workspaceData: r, isLoading: i, navigate: a }) {
|
|
47
|
+
let o = r?.workflowStats, m = o?.recentRuns ?? [], h = o?.workflowSuccessRate;
|
|
48
|
+
return /* @__PURE__ */ s(e, {
|
|
49
|
+
title: "Workflow Runs",
|
|
50
|
+
icon: /* @__PURE__ */ s(t, { className: "size-4" }),
|
|
51
|
+
size: "medium",
|
|
52
|
+
isLoading: i,
|
|
53
|
+
unavailable: !r,
|
|
54
|
+
headerAction: /* @__PURE__ */ c(u, {
|
|
55
|
+
variant: "ghost",
|
|
56
|
+
size: "sm",
|
|
57
|
+
className: "text-xs",
|
|
58
|
+
onClick: () => a("/workflows/runs"),
|
|
59
|
+
children: ["View all ", /* @__PURE__ */ s(n, { className: "ml-1 size-3" })]
|
|
60
|
+
}),
|
|
61
|
+
children: o ? /* @__PURE__ */ c("div", {
|
|
62
|
+
className: "space-y-3",
|
|
63
|
+
children: [/* @__PURE__ */ c("div", {
|
|
64
|
+
className: "grid grid-cols-3 gap-2",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ c("div", {
|
|
67
|
+
className: "rounded-lg bg-bg-canvas p-2.5 border border-border-default text-center",
|
|
68
|
+
children: [/* @__PURE__ */ s("p", {
|
|
69
|
+
className: "text-xl font-bold text-text-primary tabular-nums",
|
|
70
|
+
children: o.runsRunningCount ?? 0
|
|
71
|
+
}), /* @__PURE__ */ s("p", {
|
|
72
|
+
className: "text-[11px] text-text-secondary",
|
|
73
|
+
children: "Running"
|
|
74
|
+
})]
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ c("div", {
|
|
77
|
+
className: "rounded-lg bg-bg-canvas p-2.5 border border-border-default text-center",
|
|
78
|
+
children: [/* @__PURE__ */ s("p", {
|
|
79
|
+
className: "text-xl font-bold text-status-error-text tabular-nums",
|
|
80
|
+
children: o.runsFailedLast24h ?? 0
|
|
81
|
+
}), /* @__PURE__ */ s("p", {
|
|
82
|
+
className: "text-[11px] text-text-secondary",
|
|
83
|
+
children: "Failed (24h)"
|
|
84
|
+
})]
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ c("div", {
|
|
87
|
+
className: "rounded-lg bg-bg-canvas p-2.5 border border-border-default text-center",
|
|
88
|
+
children: [/* @__PURE__ */ s("p", {
|
|
89
|
+
className: "text-xl font-bold text-status-success-text tabular-nums",
|
|
90
|
+
children: h == null ? "—" : `${Math.round(h)}%`
|
|
91
|
+
}), /* @__PURE__ */ s("p", {
|
|
92
|
+
className: "text-[11px] text-text-secondary",
|
|
93
|
+
children: "Success rate"
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}), m.length > 0 && /* @__PURE__ */ c("div", {
|
|
98
|
+
className: "space-y-1.5",
|
|
99
|
+
children: [/* @__PURE__ */ s("p", {
|
|
100
|
+
className: "text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
101
|
+
children: "Recent Runs"
|
|
102
|
+
}), m.slice(0, 4).map((e) => {
|
|
103
|
+
let t = f[e.status] ?? f.RUNNING, n = t.icon;
|
|
104
|
+
return /* @__PURE__ */ c("button", {
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: () => a(`/workflows/runs/${e.id}`),
|
|
107
|
+
className: "flex w-full items-center justify-between gap-2 rounded-md p-1.5 text-left transition-colors hover:bg-accent/5",
|
|
108
|
+
children: [/* @__PURE__ */ c("div", {
|
|
109
|
+
className: "flex items-center gap-2 min-w-0",
|
|
110
|
+
children: [/* @__PURE__ */ s(n, { className: `size-3.5 shrink-0 ${t.color}` }), /* @__PURE__ */ s("span", {
|
|
111
|
+
className: "truncate text-sm text-text-primary",
|
|
112
|
+
children: e.workflowKey
|
|
113
|
+
})]
|
|
114
|
+
}), /* @__PURE__ */ c("div", {
|
|
115
|
+
className: "flex items-center gap-2 shrink-0",
|
|
116
|
+
children: [/* @__PURE__ */ s(l, {
|
|
117
|
+
variant: "outline",
|
|
118
|
+
className: "text-[10px]",
|
|
119
|
+
children: e.status.toLowerCase()
|
|
120
|
+
}), /* @__PURE__ */ s("span", {
|
|
121
|
+
className: "text-[11px] text-text-secondary",
|
|
122
|
+
children: p(e.startedAt)
|
|
123
|
+
})]
|
|
124
|
+
})]
|
|
125
|
+
}, e.id);
|
|
126
|
+
})]
|
|
127
|
+
})]
|
|
128
|
+
}) : /* @__PURE__ */ s(d, {
|
|
129
|
+
illustration: "empty-data",
|
|
130
|
+
title: "No runs yet",
|
|
131
|
+
description: "Trigger a workflow to see its execution history here.",
|
|
132
|
+
className: "py-4"
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
export { m as WorkflowRunsWidget };
|
|
138
|
+
|
|
139
|
+
//# sourceMappingURL=WorkflowRunsWidget.js.map
|