@odigos/ui-kit 0.0.264 → 0.0.265
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/CHANGELOG.md +12 -0
- package/lib/chunks/index-BMLDblot.js +155 -0
- package/lib/chunks/{odigos-context-_YAZF63s.js → odigos-context-Dq_yIuDF.js} +2 -2
- package/lib/chunks/source-instrument-form-context-D1tB6ZAx.js +5 -0
- package/lib/chunks/ui-components-CoDVeDqt.js +1581 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/radio-card/index.d.ts +16 -0
- package/lib/components.js +1 -1
- package/lib/constants/strings/index.d.ts +74 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_drawers/add-source-drawer/strings.d.ts +8 -6
- package/lib/containers/_drawers/create-cloud-connector-drawer/index.d.ts +15 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/custom-resource-table.d.ts +9 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/helpers.d.ts +5 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/index.d.ts +2 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/permission-list.d.ts +12 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/permissions.d.ts +25 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/policy-preview.d.ts +5 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/select-provider/provider-list.d.ts +8 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/setup-credentials/create-role-section.d.ts +6 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/setup-credentials/enter-arn-section.d.ts +5 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/setup-credentials/index.d.ts +5 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/setup-credentials/methods.d.ts +30 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/setup-credentials/section.d.ts +9 -0
- package/lib/containers/_drawers/create-cloud-connector-drawer/steps/validate-connection/index.d.ts +8 -0
- package/lib/containers/_drawers/edit-source-drawer/helpers.d.ts +9 -5
- package/lib/containers/_drawers/edit-source-drawer/overview/runtime-card.d.ts +12 -0
- package/lib/containers/_drawers/edit-source-drawer/profiling/flamebearer.d.ts +18 -0
- package/lib/containers/_drawers/index.d.ts +1 -0
- package/lib/containers/central-connections/helpers.d.ts +11 -1
- package/lib/containers/central-connections/index.d.ts +6 -1
- package/lib/containers.js +599 -170
- package/lib/contexts/cloud-connector-form-context.d.ts +35 -0
- package/lib/contexts/index.d.ts +1 -0
- package/lib/contexts/odigos-api/capabilities.d.ts +5 -1
- package/lib/contexts/odigos-api/hooks/use-sources-api.d.ts +1 -0
- package/lib/contexts/odigos-api/types.d.ts +1 -0
- package/lib/contexts/odigos-context.d.ts +2 -0
- package/lib/contexts.js +1 -1
- package/lib/functions/get-source-kind-label/index.d.ts +8 -0
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons/compute-platform/cloud-connector-icon/index.d.ts +2 -0
- package/lib/icons/compute-platform/cloud-connector-policy-icon/index.d.ts +2 -0
- package/lib/icons/compute-platform/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/snippets/connector-created-modal/index.d.ts +7 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +1 -4
- package/lib/types/cloud-connectors/index.d.ts +88 -0
- package/lib/types/common/index.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/snapshot/index.d.ts +1 -0
- package/lib/types/sources/index.d.ts +1 -0
- package/lib/types/workload/index.d.ts +38 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-B-zICLj7.js +0 -155
- package/lib/chunks/source-instrument-form-context-CZQIaTUV.js +0 -5
- package/lib/chunks/ui-components-CAPnizLR.js +0 -1543
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
import type { CloudConnectorProvider } from '../types';
|
|
3
|
+
import { type GenericFormResult } from '../hooks/useGenericForm';
|
|
4
|
+
export interface CloudConnectorCapability {
|
|
5
|
+
discovery: boolean;
|
|
6
|
+
instrumentation: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type CloudConnectorCapabilities = Record<string, CloudConnectorCapability>;
|
|
9
|
+
export interface CloudConnectorFormData {
|
|
10
|
+
provider: string;
|
|
11
|
+
permission: string;
|
|
12
|
+
customCapabilities: CloudConnectorCapabilities;
|
|
13
|
+
authMethod: string;
|
|
14
|
+
setupMethod: string;
|
|
15
|
+
awsAccountId: string;
|
|
16
|
+
credentials: Record<string, string>;
|
|
17
|
+
accessToken: string;
|
|
18
|
+
secretId: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
21
|
+
interface CloudConnectorFormContextValue {
|
|
22
|
+
providers: CloudConnectorProvider[];
|
|
23
|
+
genericForm: GenericFormResult<CloudConnectorFormData>;
|
|
24
|
+
validateFormData: () => {
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
preparedFormData: CloudConnectorFormData;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface CloudConnectorFormContextProviderProps {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
providers?: CloudConnectorProvider[];
|
|
32
|
+
}
|
|
33
|
+
export declare const CloudConnectorFormContextProvider: FC<CloudConnectorFormContextProviderProps>;
|
|
34
|
+
export declare const useCloudConnectorFormContext: () => CloudConnectorFormContextValue;
|
|
35
|
+
export {};
|
package/lib/contexts/index.d.ts
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* the ticket called out.
|
|
5
5
|
*
|
|
6
6
|
* Capabilities are computed from:
|
|
7
|
-
* 1. `ctx.platformType` — VM platforms gate out cluster-only features
|
|
7
|
+
* 1. `ctx.platformType` — VM platforms gate out cluster-only features;
|
|
8
|
+
* connectors share the agents-api dialect with VM for sources and must
|
|
9
|
+
* not inherit Kubernetes-only affordances.
|
|
8
10
|
* 2. `ctx.tier` — community vs enterprise.
|
|
9
11
|
* 3. Operation presence — if the host adapter doesn't supply
|
|
10
12
|
* `CREATE_ACTION`, the capability is `false`.
|
|
@@ -37,5 +39,7 @@ export interface Capabilities {
|
|
|
37
39
|
canManageSamplingRules: boolean;
|
|
38
40
|
isEnterprise: boolean;
|
|
39
41
|
isVm: boolean;
|
|
42
|
+
isConnector: boolean;
|
|
43
|
+
isK8s: boolean;
|
|
40
44
|
}
|
|
41
45
|
export declare const deriveCapabilities: (operations: OdigosApiOperations, ctx: OperationContext) => Capabilities;
|
|
@@ -12,6 +12,8 @@ export declare const useOdigos: (minSupportedVersion?: MinSupportedVersion) => {
|
|
|
12
12
|
isVersionSupported: boolean;
|
|
13
13
|
minSupportedVersion: number;
|
|
14
14
|
isVm: boolean;
|
|
15
|
+
isConnector: boolean;
|
|
16
|
+
isK8s: boolean;
|
|
15
17
|
isEnterprise: boolean;
|
|
16
18
|
version: string;
|
|
17
19
|
platformType: PlatformType;
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-
|
|
1
|
+
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-D1tB6ZAx.js";export{A as ActionFormContextProvider,C as CloudConnectorFormContextProvider,D as DataStreamFormContextProvider,b as DestinationFormContextProvider,O as OdigosApiConnectionsScope,c as OdigosApiProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,d as SamplingRulesFormProvider,e as SourceEditFormContextProvider,f as SourceInstrumentFormContextProvider,p as prepareNamespacePayloads,g as prepareSourcePayloads,h as useActionFormContext,i as useApiLazyQuery,j as useApiMutation,k as useApiQuery,l as useCloudConnectorFormContext,m as useDataStreamFormContext,n as useDestinationFormContext,o as useOdigosApi,q as useRuleFormContext,s as useSamplingRulesFormContext,t as useSourceEditFormContext,v as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-D1tB6ZAx.js";export{O as OdigosProvider,c as checkVersionSupport,r as resolveMinSupportedVersion,u as useOdigos}from"./chunks/odigos-context-Dq_yIuDF.js";import{jsx as F}from"react/jsx-runtime";import{useMemo as P,useContext as T,createContext as E}from"react";import{P as I,t as _}from"./chunks/ui-components-CoDVeDqt.js";import{useApolloClient as M}from"@apollo/client/react";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"@apollo/client/errors";import"@apollo/client";import"styled-components";import"./icons.js";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";const V=()=>{const o=M(),{operations:r,context:e}=a();return{multiFetch:async(t,s,n)=>{const i=r[t];return i?y(o,i,s,n,e):{results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:s.length,error:`Operation ${String(t)} not configured`}},bulkPersistSources:async(t,s)=>{const n=[];for(const i of t){const t={...e,proxyID:i},{error:a}=await x(o,r.PERSIST_SOURCES,s,t);a&&n.push(`${i}: ${a}`)}return n.length?{error:n.join(", ")}:void 0},applyConfigurations:async(t,s)=>{if(!r.UPDATE_REMOTE_CONFIG)return{error:"UPDATE_REMOTE_CONFIG not configured"};const{error:n}=await x(o,r.UPDATE_REMOTE_CONFIG,{formData:s,connectionIds:t},e);return n?{error:n}:void 0}}},N=(o,r)=>o.platformType===I.K8s?r.K8s:o.platformType===I.Vm?r.Vm:void 0,U=o=>r=>{const e=o[r.platformType];if(!e)return;const t=Object.keys(e);if(0===t.length)return;const s=_(r.schemaVersion??r.version),n=[...t].sort((o,r)=>_(r)-_(o)).find(o=>s>=_(o));return n?e[n]:void 0},w=(o,r)=>{const e={};for(const t of Object.keys(o))e[t]=r(o[t]);return e},z=E({formType:void 0}),G=({children:o,formType:r})=>{const e=P(()=>({formType:r}),[r]);return F(z.Provider,{value:e,children:o})},$=()=>T(z);export{G as StorybookProvider,N as pickByPlatform,V as useApiForConnections,$ as useStorybook,U as versionedDocument,w as vmDialectMap};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-readable labels for source / workload kinds.
|
|
3
|
+
*
|
|
4
|
+
* Kubernetes kinds are already title-cased enum values (Deployment, …).
|
|
5
|
+
* Cloud connector kinds are opaque provider strings (aws.lambda, aws.fargate-task)
|
|
6
|
+
* that need a friendlier Overview label.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getSourceKindLabel: (kind?: string | null) => string;
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './get-platform-icon';
|
|
|
32
32
|
export * from './get-platform-label';
|
|
33
33
|
export * from './get-programming-language-icon';
|
|
34
34
|
export * from './get-recursive-values';
|
|
35
|
+
export * from './get-source-kind-label';
|
|
35
36
|
export * from './get-sse-target-from-id';
|
|
36
37
|
export * from './get-status-color';
|
|
37
38
|
export * from './get-status-from-pod-status';
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{bf as adaptInstrumentationRuleFromWire,bd as adaptInstrumentationRuleInputForWire,c9 as buildBadgeForDesiredStatus,ff as capitalizeFirstLetter,fg as cleanObjectEmptyStringsValues,bz as compareCondition,fh as decimalsOnly,aR as deepClone,eo as entityIdKey,et as filterActions,es as filterDestinations,c4 as filterDestinationsByStream,er as filterSources,ef as filterSourcesByStream,fi as flattenObjectKeys,co as formatBytes,fj as formatDuration,a$ as generateId,c2 as getActionIcon,em as getConditionsBooleans,cB as getContainersIcons,fk as getContainersInstrumentedCount,fl as getDeepValue,bX as getDestinationIcon,fm as getDetectedLanguageIcons,ce as getEffectiveLanguage,cu as getEffectiveRuntimeVersion,ep as getEntityIcon,bc as getEntityId,el as getEntityIdKey,en as getEntityLabel,fn as getHealthBadgeLabel,ba as getIdFromSseTarget,c6 as getInstrumentationRuleIcon,fo as getMainContainerLanguage,fp as getMetricForEntity,fq as getMonitorIcon,fr as getNearestTypographySize,fs as getPlatformIcon,eb as getPlatformLabel,aJ as getProgrammingLanguageIcon,ft as getRecursiveValues,cn as getSourceKindLabel,ck as getSourceLanguageIcons,b3 as getSseTargetFromId,fu as getStatusColor,ev as getStatusFromPodStatus,ek as getStatusIcon,cp as getStatusTypeFromOdigosHealth,fv as getValueForRange,cj as getVirtualServiceIcon,ci as getWorkloadId,c5 as getYamlFieldsForDestination,fw as hasUnhealthyInstances,fx as instrumentationRuleSourceScopesFromWire,fy as instrumentationRuleSourceScopesToWire,bk as isEmpty,bl as isLegalK8sLabel,cW as isOverTime,fz as isStringABoolean,fA as isTimeElapsed,ct as isValidVersion,fB as mapConditions,cc as mapDesiredStatusToConditionStatus,c3 as mapDestinationFieldsForDisplay,bp as mapExportedSignals,bn as mapSupportedSignals,fC as numbersOnly,fD as parseBooleanFromString,fE as parseJsonStringToPrettyString,bE as prepareDestinationFormData,fF as removeEmptyValuesFromObject,s as safeJsonParse,fG as safeJsonStringify,fH as setDeepValue,fI as sleep,v as splitCamelString,fJ as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-CoDVeDqt.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{fX as IGNORE_OUTSIDE_CLICK_ATTR,fY as useActionFormData,fZ as useBodyScroll,eq as useContainerSize,a_ as useCopy,f_ as useDataStreamFormData,f$ as useDestinationFormData,bg as useGenericForm,g0 as useInstrumentationRuleFormData,cV as useKeyDown,cq as useOnClickOutside,g1 as useOverflow,g2 as usePopup,c8 as useScrollIntoViewWhen,eQ as useScrollTo,eh as useSessionStorage,g3 as useSourceFormData,c7 as useTimeAgo}from"./chunks/ui-components-CoDVeDqt.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|