@eventcatalog/core 2.26.0 → 2.27.0
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/README.md +7 -3
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/catalog-to-astro-content-directory.cjs +1 -7
- package/dist/catalog-to-astro-content-directory.js +2 -2
- package/dist/{chunk-3EOBEGSB.js → chunk-2VGR4HMJ.js} +1 -1
- package/dist/{chunk-TFBAK5C5.js → chunk-CTL6CH3C.js} +1 -1
- package/dist/{chunk-7JDTB3U5.js → chunk-FIY5JLSQ.js} +0 -2
- package/dist/{chunk-IY5HYH2G.js → chunk-LMNJPHFP.js} +1 -1
- package/dist/{chunk-VCR3LHZR.js → chunk-R2NILSWL.js} +2 -6
- package/dist/{chunk-OW2FQPYP.js → chunk-WUCY3QHK.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +2 -8
- package/dist/eventcatalog.js +6 -6
- package/dist/map-catalog-to-astro.cjs +0 -2
- package/dist/map-catalog-to-astro.js +1 -1
- package/dist/watcher.cjs +0 -2
- package/dist/watcher.js +2 -2
- package/eventcatalog/astro.config.mjs +0 -3
- package/eventcatalog/src/components/Grids/DomainGrid.tsx +233 -0
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +457 -0
- package/eventcatalog/src/components/Grids/ServiceGrid.tsx +364 -0
- package/eventcatalog/src/components/Grids/components.tsx +170 -0
- package/eventcatalog/src/components/Grids/utils.tsx +38 -0
- package/eventcatalog/src/{content/config.ts → content.config.ts} +12 -2
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +29 -17
- package/eventcatalog/src/pages/architecture/[type]/index.astro +88 -0
- package/eventcatalog/src/pages/chat/index.astro +1 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +6 -13
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +7 -13
- package/eventcatalog/src/pages/index.astro +237 -72
- package/eventcatalog/src/utils/url-builder.ts +20 -0
- package/eventcatalog/src/utils/users.ts +2 -2
- package/eventcatalog/tailwind.config.mjs +11 -0
- package/package.json +2 -1
- package/default-files-for-collections/teams.md +0 -11
- package/default-files-for-collections/users.md +0 -11
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<h4>Features: Documentation generator for Event Driven Architectures, Integration with any broker, Docs and Code, Markdown driven, Document Domains/Services/Messages/Schemas and more, Content versioning, Assign Owners, Schemas, OpenAPI, MDX Components and more...</h4>
|
|
33
33
|
|
|
34
34
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
35
|
-
[](#contributors-)
|
|
36
36
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
37
37
|
|
|
38
38
|
[Read the Docs](https://www.eventcatalog.dev/product/documentation) | [View Demo](https://demo.eventcatalog.dev/docs)
|
|
@@ -128,9 +128,12 @@ Thank you to our project sponsors.
|
|
|
128
128
|
</div> -->
|
|
129
129
|
|
|
130
130
|
<div align="center">
|
|
131
|
-
<
|
|
131
|
+
<picture>
|
|
132
|
+
<source srcset="./images/sponsors/gravitee-logo-white.webp" media="(prefers-color-scheme: dark)" />
|
|
133
|
+
<img alt="hookdeck" src="./images/sponsors/gravitee-logo-black.svg" width="50%" />
|
|
134
|
+
</picture>
|
|
132
135
|
<p style="margin: 0; padding: 0;">Manage, secure, and govern every API in your organization</p>
|
|
133
|
-
<a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank"
|
|
136
|
+
<a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank">Learn more</a>
|
|
134
137
|
</div>
|
|
135
138
|
|
|
136
139
|
<hr />
|
|
@@ -252,6 +255,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
252
255
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SebasRendon12"><img src="https://avatars.githubusercontent.com/u/69688183?v=4?s=100" width="100px;" alt="Sebastian Rendon"/><br /><sub><b>Sebastian Rendon</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=SebasRendon12" title="Code">💻</a></td>
|
|
253
256
|
<td align="center" valign="top" width="14.28%"><a href="http://craig0990.co.uk"><img src="https://avatars.githubusercontent.com/u/461897?v=4?s=100" width="100px;" alt="Craig Roberts"/><br /><sub><b>Craig Roberts</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=craig0990" title="Code">💻</a></td>
|
|
254
257
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Vertygo"><img src="https://avatars.githubusercontent.com/u/1658326?v=4?s=100" width="100px;" alt="Ivan Milosavljevic"/><br /><sub><b>Ivan Milosavljevic</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Vertygo" title="Documentation">📖</a></td>
|
|
258
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mezzle"><img src="https://avatars.githubusercontent.com/u/570639?v=4?s=100" width="100px;" alt="Martin Meredith"/><br /><sub><b>Martin Meredith</b></sub></a><br /><a href="https://github.com/event-catalog/eventcatalog/commits?author=Mezzle" title="Code">💻</a></td>
|
|
255
259
|
</tr>
|
|
256
260
|
</tbody>
|
|
257
261
|
</table>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-CTL6CH3C.js";
|
|
4
|
+
import "../chunk-2VGR4HMJ.js";
|
|
5
|
+
import "../chunk-LMNJPHFP.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
|
@@ -122,8 +122,6 @@ var COLLECTION_KEYS = [
|
|
|
122
122
|
"events",
|
|
123
123
|
"commands",
|
|
124
124
|
"services",
|
|
125
|
-
"users",
|
|
126
|
-
"teams",
|
|
127
125
|
"domains",
|
|
128
126
|
"flows",
|
|
129
127
|
"pages",
|
|
@@ -243,8 +241,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
243
241
|
"events",
|
|
244
242
|
"commands",
|
|
245
243
|
"services",
|
|
246
|
-
"users",
|
|
247
|
-
"teams",
|
|
248
244
|
"domains",
|
|
249
245
|
"flows",
|
|
250
246
|
"changelogs",
|
|
@@ -272,10 +268,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
272
268
|
};
|
|
273
269
|
var catalogToAstro = async (source, astroDir) => {
|
|
274
270
|
const astroContentDir = path3.join(astroDir, "src/content/");
|
|
275
|
-
|
|
276
|
-
import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
271
|
+
if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
277
272
|
import_fs.default.mkdirSync(astroContentDir);
|
|
278
|
-
import_fs.default.writeFileSync(path3.join(astroContentDir, "config.ts"), astroConfigFile);
|
|
279
273
|
await verifyRequiredFieldsAreInCatalogConfigFile(source);
|
|
280
274
|
await copyFiles(source, astroDir);
|
|
281
275
|
await ensureAstroCollectionNotEmpty(astroDir);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-E7TXTI7G.js";
|
|
5
5
|
import {
|
|
6
6
|
mapCatalogToAstro
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FIY5JLSQ.js";
|
|
8
8
|
|
|
9
9
|
// src/catalog-to-astro-content-directory.js
|
|
10
10
|
import { glob } from "glob";
|
|
@@ -43,8 +43,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
43
43
|
"events",
|
|
44
44
|
"commands",
|
|
45
45
|
"services",
|
|
46
|
-
"users",
|
|
47
|
-
"teams",
|
|
48
46
|
"domains",
|
|
49
47
|
"flows",
|
|
50
48
|
"changelogs",
|
|
@@ -72,10 +70,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
72
70
|
};
|
|
73
71
|
var catalogToAstro = async (source, astroDir) => {
|
|
74
72
|
const astroContentDir = path.join(astroDir, "src/content/");
|
|
75
|
-
|
|
76
|
-
fs.rmSync(astroContentDir, { recursive: true });
|
|
73
|
+
if (fs.existsSync(astroContentDir)) fs.rmSync(astroContentDir, { recursive: true });
|
|
77
74
|
fs.mkdirSync(astroContentDir);
|
|
78
|
-
fs.writeFileSync(path.join(astroContentDir, "config.ts"), astroConfigFile);
|
|
79
75
|
await verifyRequiredFieldsAreInCatalogConfigFile(source);
|
|
80
76
|
await copyFiles(source, astroDir);
|
|
81
77
|
await ensureAstroCollectionNotEmpty(astroDir);
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
161
161
|
var import_os = __toESM(require("os"), 1);
|
|
162
162
|
|
|
163
163
|
// package.json
|
|
164
|
-
var version = "2.
|
|
164
|
+
var version = "2.27.0";
|
|
165
165
|
|
|
166
166
|
// src/constants.ts
|
|
167
167
|
var VERSION = version;
|
|
@@ -219,8 +219,6 @@ var COLLECTION_KEYS = [
|
|
|
219
219
|
"events",
|
|
220
220
|
"commands",
|
|
221
221
|
"services",
|
|
222
|
-
"users",
|
|
223
|
-
"teams",
|
|
224
222
|
"domains",
|
|
225
223
|
"flows",
|
|
226
224
|
"pages",
|
|
@@ -431,8 +429,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
431
429
|
"events",
|
|
432
430
|
"commands",
|
|
433
431
|
"services",
|
|
434
|
-
"users",
|
|
435
|
-
"teams",
|
|
436
432
|
"domains",
|
|
437
433
|
"flows",
|
|
438
434
|
"changelogs",
|
|
@@ -460,10 +456,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
460
456
|
};
|
|
461
457
|
var catalogToAstro = async (source, astroDir) => {
|
|
462
458
|
const astroContentDir = path5.join(astroDir, "src/content/");
|
|
463
|
-
|
|
464
|
-
import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
459
|
+
if (import_fs.default.existsSync(astroContentDir)) import_fs.default.rmSync(astroContentDir, { recursive: true });
|
|
465
460
|
import_fs.default.mkdirSync(astroContentDir);
|
|
466
|
-
import_fs.default.writeFileSync(path5.join(astroContentDir, "config.ts"), astroConfigFile);
|
|
467
461
|
await verifyRequiredFieldsAreInCatalogConfigFile(source);
|
|
468
462
|
await copyFiles(source, astroDir);
|
|
469
463
|
await ensureAstroCollectionNotEmpty(astroDir);
|
package/dist/eventcatalog.js
CHANGED
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-BLDONK5J.js";
|
|
4
4
|
import {
|
|
5
5
|
watch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WUCY3QHK.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-CTL6CH3C.js";
|
|
10
|
+
import "./chunk-2VGR4HMJ.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R2NILSWL.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LMNJPHFP.js";
|
|
17
17
|
import {
|
|
18
18
|
isBackstagePluginEnabled
|
|
19
19
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
generate
|
|
22
22
|
} from "./chunk-YEQVKHST.js";
|
|
23
23
|
import "./chunk-E7TXTI7G.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-FIY5JLSQ.js";
|
|
25
25
|
|
|
26
26
|
// src/eventcatalog.ts
|
|
27
27
|
import { Command } from "commander";
|
package/dist/watcher.cjs
CHANGED
package/dist/watcher.js
CHANGED
|
@@ -22,9 +22,6 @@ export default defineConfig({
|
|
|
22
22
|
base,
|
|
23
23
|
server: { port: config.port || 3000 },
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
25
|
outDir: config.outDir ? join(projectDirectory, config.outDir) : join(projectDirectory, 'dist'),
|
|
29
26
|
|
|
30
27
|
// https://docs.astro.build/en/reference/configuration-reference/#site
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { useState, useMemo } from 'react';
|
|
2
|
+
import { ServerIcon, EnvelopeIcon, RectangleGroupIcon } from '@heroicons/react/24/outline';
|
|
3
|
+
import { buildUrlWithParams } from '@utils/url-builder';
|
|
4
|
+
import type { CollectionEntry } from 'astro:content';
|
|
5
|
+
import { type CollectionMessageTypes } from '@types';
|
|
6
|
+
import { getCollectionStyles } from './utils';
|
|
7
|
+
import { SearchBar } from './components';
|
|
8
|
+
|
|
9
|
+
export interface ExtendedDomain extends CollectionEntry<'domains'> {
|
|
10
|
+
sends: CollectionEntry<CollectionMessageTypes>[];
|
|
11
|
+
receives: CollectionEntry<CollectionMessageTypes>[];
|
|
12
|
+
services: CollectionEntry<'services'>[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface DomainGridProps {
|
|
16
|
+
domains: ExtendedDomain[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function DomainGrid({ domains }: DomainGridProps) {
|
|
20
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
21
|
+
|
|
22
|
+
const filteredDomains = useMemo(() => {
|
|
23
|
+
let result = [...domains];
|
|
24
|
+
|
|
25
|
+
// Filter by search query
|
|
26
|
+
if (searchQuery) {
|
|
27
|
+
const query = searchQuery.toLowerCase();
|
|
28
|
+
result = result.filter(
|
|
29
|
+
(domain) =>
|
|
30
|
+
domain.data.name?.toLowerCase().includes(query) ||
|
|
31
|
+
domain.data.summary?.toLowerCase().includes(query) ||
|
|
32
|
+
domain.data.services?.some((service: any) => service.data.name.toLowerCase().includes(query)) ||
|
|
33
|
+
domain.sends?.some((message: any) => message.data.name.toLowerCase().includes(query)) ||
|
|
34
|
+
domain.receives?.some((message: any) => message.data.name.toLowerCase().includes(query))
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Sort by name by default
|
|
39
|
+
result.sort((a, b) => (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id));
|
|
40
|
+
|
|
41
|
+
return result;
|
|
42
|
+
}, [domains, searchQuery]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div>
|
|
46
|
+
{/* Breadcrumb */}
|
|
47
|
+
<nav className="mb-4 flex items-center space-x-2 text-sm text-gray-500">
|
|
48
|
+
<div className="flex items-center gap-2">
|
|
49
|
+
<RectangleGroupIcon className="h-4 w-4" />
|
|
50
|
+
<span className="text-gray-900">Domains</span>
|
|
51
|
+
</div>
|
|
52
|
+
</nav>
|
|
53
|
+
|
|
54
|
+
<div className="relative border-b border-gray-200 mb-4 pb-4">
|
|
55
|
+
<div className="md:flex md:items-start md:justify-between">
|
|
56
|
+
<div className="min-w-0 flex-1 max-w-lg">
|
|
57
|
+
<h1 className="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate">
|
|
58
|
+
Domains ({filteredDomains.length})
|
|
59
|
+
</h1>
|
|
60
|
+
<p className="mt-2 text-sm text-gray-500">Browse and manage domains in your event-driven architecture</p>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div className="mt-6 md:mt-0 md:ml-4 flex-shrink-0">
|
|
64
|
+
<SearchBar
|
|
65
|
+
searchQuery={searchQuery}
|
|
66
|
+
onSearchChange={setSearchQuery}
|
|
67
|
+
placeholder="Search domains..."
|
|
68
|
+
totalResults={filteredDomains.length}
|
|
69
|
+
totalItems={domains.length}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 gap-6">
|
|
76
|
+
{filteredDomains.map((domain) => (
|
|
77
|
+
<a
|
|
78
|
+
key={domain.data.id}
|
|
79
|
+
href={buildUrlWithParams('/architecture/services', {
|
|
80
|
+
serviceIds: domain.data.services?.map((s: any) => s.data.id).join(','),
|
|
81
|
+
domainId: domain.data.id,
|
|
82
|
+
domainName: domain.data.name,
|
|
83
|
+
})}
|
|
84
|
+
className="group hover:bg-orange-100 border-2 border-orange-400/50 bg-yellow-50 rounded-lg shadow-sm hover:shadow-lg transition-all duration-200 overflow-hidden"
|
|
85
|
+
>
|
|
86
|
+
<div className="p-6">
|
|
87
|
+
<div className="flex items-center justify-between mb-3">
|
|
88
|
+
<div className="flex items-center gap-2">
|
|
89
|
+
<RectangleGroupIcon className="h-5 w-5 text-orange-500" />
|
|
90
|
+
<h3 className="text-lg font-semibold text-gray-900 truncate group-hover:underline transition-colors duration-200">
|
|
91
|
+
{domain.data.name || domain.data.id}
|
|
92
|
+
</h3>
|
|
93
|
+
</div>
|
|
94
|
+
<span className="ml-2 shrink-0 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-orange-50 text-orange-700">
|
|
95
|
+
v{domain.data.version}
|
|
96
|
+
</span>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<p className="text-gray-600 text-sm line-clamp-2 min-h-[2.5rem]">
|
|
100
|
+
{domain.data.summary || <span className="italic">No summary available</span>}
|
|
101
|
+
</p>
|
|
102
|
+
|
|
103
|
+
<div className="flex gap-4 mb-4">
|
|
104
|
+
<div className="flex items-center gap-2 bg-white rounded-lg px-3 py-2 border border-pink-200">
|
|
105
|
+
<ServerIcon className="h-4 w-4 text-pink-500" />
|
|
106
|
+
<div className="flex">
|
|
107
|
+
<p className="text-sm font-medium text-gray-900">{domain.data.services?.length || 0} Services</p>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div className="flex items-center gap-2 bg-white rounded-lg px-3 py-2 border border-gray-200 ">
|
|
111
|
+
<EnvelopeIcon className="h-4 w-4 text-blue-500" />
|
|
112
|
+
<div>
|
|
113
|
+
<p className="text-sm font-medium text-gray-900">
|
|
114
|
+
{(domain.sends?.length || 0) + (domain.receives?.length || 0)} Messages
|
|
115
|
+
</p>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div className="space-y-6">
|
|
121
|
+
{/* Services and their messages */}
|
|
122
|
+
{domain.data.services?.slice(0, 2).map((service: any) => (
|
|
123
|
+
<div
|
|
124
|
+
key={service.data.id}
|
|
125
|
+
className="block space-y-2 bg-white border-2 border-dashed border-pink-400 p-4 rounded-lg transition-colors duration-200"
|
|
126
|
+
>
|
|
127
|
+
<div className="flex items-center justify-between">
|
|
128
|
+
<div className="flex items-center gap-2">
|
|
129
|
+
<ServerIcon className="h-4 w-4 text-pink-500" />
|
|
130
|
+
<h4 className="text-sm font-medium text-gray-900">{service.data.name || service.data.id}</h4>
|
|
131
|
+
</div>
|
|
132
|
+
<span className="text-xs text-gray-500">v{service.data.version}</span>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div className="flex items-center gap-4">
|
|
136
|
+
<div className="flex-1 h-full flex flex-col bg-blue-50 border border-blue-300 rounded-lg p-3">
|
|
137
|
+
<div className="space-y-1.5 flex-1">
|
|
138
|
+
{service.data.receives?.slice(0, 3).map((message: any) => {
|
|
139
|
+
const { Icon, color } = getCollectionStyles(message.collection);
|
|
140
|
+
return (
|
|
141
|
+
<div
|
|
142
|
+
key={`${message.id}-${message.version}`}
|
|
143
|
+
className="group flex border border-gray-200 items-center gap-1 rounded-md text-[11px] font-medium bg-white"
|
|
144
|
+
>
|
|
145
|
+
<div className="bg-white border-r border-gray-200 px-2 py-1.5 rounded-l-md">
|
|
146
|
+
<Icon className={`h-3 w-3 text-${color}-500`} />
|
|
147
|
+
</div>
|
|
148
|
+
<span className="px-1 py-1">{message.id}</span>
|
|
149
|
+
</div>
|
|
150
|
+
);
|
|
151
|
+
})}
|
|
152
|
+
{service.data.receives && service.data.receives.length > 3 && (
|
|
153
|
+
<div className="text-center py-1">
|
|
154
|
+
<p className="text-gray-500 text-[10px]">+ {service.data.receives.length - 3} more</p>
|
|
155
|
+
</div>
|
|
156
|
+
)}
|
|
157
|
+
{!service.data.receives?.length && (
|
|
158
|
+
<div className="text-center py-6">
|
|
159
|
+
<p className="text-gray-500 text-xs">No messages received</p>
|
|
160
|
+
</div>
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div className="flex items-center gap-2">
|
|
166
|
+
<div className="w-4 h-[2px] bg-blue-200"></div>
|
|
167
|
+
<div className="bg-white border-2 border-gray-300 rounded-lg p-2 shadow-sm">
|
|
168
|
+
<div className="flex flex-col items-center gap-2">
|
|
169
|
+
<ServerIcon className="h-6 w-6 text-pink-500" />
|
|
170
|
+
<div className="text-center">
|
|
171
|
+
<p className="text-xs font-medium text-gray-900">{service.data.name || service.data.id}</p>
|
|
172
|
+
<p className="text-[10px] text-gray-500">v{service.data.version}</p>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
<div className="w-4 h-[2px] bg-emerald-200"></div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div className="flex-1 h-full flex flex-col bg-green-100 border border-green-300 rounded-lg p-3">
|
|
180
|
+
<div className="space-y-1.5 flex-1">
|
|
181
|
+
{service.data.sends?.slice(0, 3).map((message: any) => {
|
|
182
|
+
const { Icon, color } = getCollectionStyles(message.collection);
|
|
183
|
+
return (
|
|
184
|
+
<div
|
|
185
|
+
key={`${message.id}-${message.version}`}
|
|
186
|
+
className="group flex border border-gray-200 items-center gap-1 rounded-md text-[11px] font-medium bg-white"
|
|
187
|
+
>
|
|
188
|
+
<div className="bg-white border-r border-gray-200 px-2 py-1.5 rounded-l-md">
|
|
189
|
+
<Icon className={`h-3 w-3 text-${color}-500`} />
|
|
190
|
+
</div>
|
|
191
|
+
<span className="px-1 py-1">{message.id}</span>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
})}
|
|
195
|
+
{service.data.sends && service.data.sends.length > 3 && (
|
|
196
|
+
<div className="text-center py-1">
|
|
197
|
+
<p className="text-gray-500 text-xs">+ {service.data.sends.length - 3} more</p>
|
|
198
|
+
</div>
|
|
199
|
+
)}
|
|
200
|
+
{!service.data.sends?.length && (
|
|
201
|
+
<div className="text-center py-6">
|
|
202
|
+
<p className="text-gray-500 text-xs">No messages sent</p>
|
|
203
|
+
</div>
|
|
204
|
+
)}
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
))}
|
|
210
|
+
{domain.data.services && domain.data.services.length > 2 && (
|
|
211
|
+
<div className="block space-y-2 bg-white border-2 border-dashed border-pink-400 p-4 rounded-lg transition-colors duration-200">
|
|
212
|
+
<div className="flex items-center justify-between">
|
|
213
|
+
<div className="flex items-center gap-2">
|
|
214
|
+
<ServerIcon className="h-4 w-4 text-pink-500/70" />
|
|
215
|
+
<h4 className="text-sm font-medium text-gray-600">+{domain.data.services.length - 2} more services</h4>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
)}
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
</a>
|
|
223
|
+
))}
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
{filteredDomains.length === 0 && (
|
|
227
|
+
<div className="text-center py-12">
|
|
228
|
+
<p className="text-gray-500 text-lg">No domains found matching your criteria</p>
|
|
229
|
+
</div>
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
232
|
+
);
|
|
233
|
+
}
|