@serve.zone/catalog 2.8.0 → 2.9.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.
@@ -55,12 +55,21 @@ export interface IRouteSecurity {
55
55
  rateLimit?: { enabled: boolean; maxRequests: number; window: number };
56
56
  }
57
57
 
58
+ export interface IRouteMetadata {
59
+ securityProfileRef?: string;
60
+ networkTargetRef?: string;
61
+ securityProfileName?: string;
62
+ networkTargetName?: string;
63
+ lastResolvedAt?: number;
64
+ }
65
+
58
66
  export interface IRouteConfig {
59
67
  id?: string;
60
68
  match: IRouteMatch;
61
69
  action: IRouteAction;
62
70
  security?: IRouteSecurity;
63
71
  headers?: { request?: Record<string, string>; response?: Record<string, string> };
72
+ metadata?: IRouteMetadata;
64
73
  name?: string;
65
74
  description?: string;
66
75
  priority?: number;
@@ -127,6 +136,10 @@ export class SzRouteCard extends DeesElement {
127
136
  rateLimit: { enabled: true, maxRequests: 100, window: 60 },
128
137
  maxConnections: 1000,
129
138
  },
139
+ metadata: {
140
+ securityProfileName: 'STANDARD',
141
+ networkTargetName: 'LOSSLESS_INFRA',
142
+ },
130
143
  } satisfies IRouteConfig}
131
144
  ></sz-route-card>
132
145
  </div>
@@ -296,6 +309,21 @@ export class SzRouteCard extends DeesElement {
296
309
  border-left-color: ${cssManager.bdTheme('#f59e0b', '#f59e0b')};
297
310
  }
298
311
 
312
+ .section.linked {
313
+ border-left-color: ${cssManager.bdTheme('#8b5cf6', '#8b5cf6')};
314
+ }
315
+
316
+ .linked-name {
317
+ display: inline-flex;
318
+ padding: 1px 6px;
319
+ border-radius: 3px;
320
+ font-size: 12px;
321
+ font-weight: 600;
322
+ font-family: monospace;
323
+ background: ${cssManager.bdTheme('#ede9fe', 'rgba(139, 92, 246, 0.15)')};
324
+ color: ${cssManager.bdTheme('#6d28d9', '#a78bfa')};
325
+ }
326
+
299
327
  .section-label {
300
328
  font-size: 10px;
301
329
  font-weight: 600;
@@ -624,6 +652,9 @@ export class SzRouteCard extends DeesElement {
624
652
  `
625
653
  : ''}
626
654
 
655
+ <!-- Linked References Section -->
656
+ ${this.renderLinked()}
657
+
627
658
  <!-- Feature Icons Row -->
628
659
  ${this.renderFeatures()}
629
660
  </div>
@@ -638,12 +669,43 @@ export class SzRouteCard extends DeesElement {
638
669
  )}`;
639
670
  }
640
671
 
672
+ private renderLinked(): TemplateResult {
673
+ const meta = this.route?.metadata;
674
+ if (!meta) return html``;
675
+ const hasProfile = !!meta.securityProfileName;
676
+ const hasTarget = !!meta.networkTargetName;
677
+ if (!hasProfile && !hasTarget) return html``;
678
+
679
+ return html`
680
+ <div class="section linked">
681
+ <div class="section-label">Linked</div>
682
+ ${hasProfile
683
+ ? html`
684
+ <div class="field-row">
685
+ <span class="field-key">Profile</span>
686
+ <span class="field-value"><span class="linked-name">${meta.securityProfileName}</span></span>
687
+ </div>
688
+ `
689
+ : ''}
690
+ ${hasTarget
691
+ ? html`
692
+ <div class="field-row">
693
+ <span class="field-key">Target</span>
694
+ <span class="field-value"><span class="linked-name">${meta.networkTargetName}</span></span>
695
+ </div>
696
+ `
697
+ : ''}
698
+ </div>
699
+ `;
700
+ }
701
+
641
702
  private renderFeatures(): TemplateResult {
642
703
  if (!this.route) return html``;
643
704
  const features: TemplateResult[] = [];
644
705
  const action = this.route.action;
645
706
  const security = this.route.security;
646
707
  const headers = this.route.headers;
708
+ const meta = this.route.metadata;
647
709
 
648
710
  if (action.tls) {
649
711
  features.push(html`<span class="feature"><span class="feature-icon">&#x1f512;</span>TLS</span>`);
@@ -660,6 +722,9 @@ export class SzRouteCard extends DeesElement {
660
722
  if (headers) {
661
723
  features.push(html`<span class="feature"><span class="feature-icon">&#x2699;</span>Headers</span>`);
662
724
  }
725
+ if (meta?.securityProfileName || meta?.networkTargetName) {
726
+ features.push(html`<span class="feature"><span class="feature-icon">&#x1f517;</span>Linked</span>`);
727
+ }
663
728
 
664
729
  if (features.length === 0) return html``;
665
730
  return html`<div class="features-row">${features}</div>`;