@iblai/iblai-js 2.23.0 → 2.24.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.
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, Fragment as Fragment$2, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
|
|
4
4
|
import * as dataLayer from '@iblai/data-layer';
|
|
5
|
-
import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerCourseOutlineQuery, getSections, findResumeBlock, flattenOutline, normalizeLearnerCompletionError, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
|
|
5
|
+
import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerCourseOutlineQuery, getSections, findResumeBlock, flattenOutline, normalizeLearnerCompletionError, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, splitHostPortInput, validateHostPort, useCreateVirtualMachineNetworkPolicyMutation, useUpdateVirtualMachineNetworkPolicyMutation, VIRTUAL_MACHINE_MAX_POLICY_HOSTS, getVirtualMachineApiError, useDeleteVirtualMachineNetworkPolicyMutation, extractBoundMentorIds, useCreateVirtualMachineSecretMutation, useUpdateVirtualMachineSecretMutation, VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH, VIRTUAL_MACHINE_ENV_VAR_PATTERN, useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, useListVirtualMachineNetworkPoliciesQuery, useListVirtualMachineSecretsQuery, getVirtualMachineErrorStatus, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
|
|
6
6
|
import { removeAuthItem, setAuthItem, isTauriEmbeddedLLMHost, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, use401TokenRefresh, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
|
|
7
7
|
import { useDispatch, useSelector } from 'react-redux';
|
|
8
8
|
import { toast } from 'sonner';
|
|
@@ -99786,7 +99786,9 @@ var profileAccount$3 = {
|
|
|
99786
99786
|
groupSystem: "System",
|
|
99787
99787
|
ariaSettingsNav: "Organization settings",
|
|
99788
99788
|
ariaSettingsNavMobile: "Organization settings (mobile)",
|
|
99789
|
-
groupFinance: "Finance"
|
|
99789
|
+
groupFinance: "Finance",
|
|
99790
|
+
tabVirtualMachine: "Virtual Machine",
|
|
99791
|
+
descVirtualMachine: "Manage the network policies and secrets available to agents' virtual machines."
|
|
99790
99792
|
};
|
|
99791
99793
|
var profileAddCreditsModal$3 = {
|
|
99792
99794
|
title: "Add Credits",
|
|
@@ -103124,6 +103126,177 @@ var profileLlmUsage$3 = {
|
|
|
103124
103126
|
tryAgain: "Try again",
|
|
103125
103127
|
scopeUser: "Usage for {username}"
|
|
103126
103128
|
};
|
|
103129
|
+
var virtualMachineHostInput$3 = {
|
|
103130
|
+
listLabel: "Allowed Hosts",
|
|
103131
|
+
removeHost: "Remove {host}",
|
|
103132
|
+
placeholder: "api.example.com:443",
|
|
103133
|
+
hint: "Type host:port and press Enter, or paste a list.",
|
|
103134
|
+
errorFormat: "{entry} must be host:port, for example api.example.com:443 — no scheme, path or wildcard.",
|
|
103135
|
+
errorPort: "{entry}: the port must be between 1 and 65535.",
|
|
103136
|
+
errorRejectedHost: "{entry}: this host is reserved and cannot be allowed.",
|
|
103137
|
+
errorIpNotAllowed: "{entry}: use a hostname here, not an IP address.",
|
|
103138
|
+
errorDuplicate: "{entry} is already in the list.",
|
|
103139
|
+
errorMax: "You can add at most {max} hosts."
|
|
103140
|
+
};
|
|
103141
|
+
var virtualMachineAdminTab$3 = {
|
|
103142
|
+
infoBox: "Agents with Virtual Machine Shell run code in an isolated Linux VM that has no network access by default. Network policies are reusable lists of the host:port destinations a VM may reach, and VM secrets are keys the VM can use but never read. Pick them for an agent from its Sandbox settings.",
|
|
103143
|
+
tabsAriaLabel: "Virtual machine sections",
|
|
103144
|
+
tabNetworkPolicies: "Network Policies",
|
|
103145
|
+
tabSecrets: "Secrets",
|
|
103146
|
+
forbidden: "You do not have permission to manage virtual machine network policies or secrets."
|
|
103147
|
+
};
|
|
103148
|
+
var virtualMachineNetworkPolicies$3 = {
|
|
103149
|
+
newPolicy: "New Policy",
|
|
103150
|
+
loadFailed: "Network policies could not be loaded. Try again in a moment.",
|
|
103151
|
+
colName: "Name",
|
|
103152
|
+
colHosts: "Allowed Hosts",
|
|
103153
|
+
colDescription: "Description",
|
|
103154
|
+
colUpdated: "Updated",
|
|
103155
|
+
colActions: "Actions",
|
|
103156
|
+
hostsListAriaLabel: "Hosts allowed by {name}",
|
|
103157
|
+
moreHosts: "+{count} more",
|
|
103158
|
+
editAriaLabel: "Edit policy {name}",
|
|
103159
|
+
deleteAriaLabel: "Delete policy {name}",
|
|
103160
|
+
empty: "No network policies yet. Create one to let an agent's VM reach specific hosts.",
|
|
103161
|
+
createTitle: "New Network Policy",
|
|
103162
|
+
editTitle: "Edit Network Policy",
|
|
103163
|
+
dialogDescription: "The host:port destinations a VM may reach under this policy. HTTPS is port 443.",
|
|
103164
|
+
fieldName: "Name",
|
|
103165
|
+
namePlaceholder: "e.g. Acme APIs",
|
|
103166
|
+
fieldHosts: "Allowed Hosts",
|
|
103167
|
+
hostsHint: "Type host:port and press Enter, or paste a list. Up to {max} entries; IP addresses are allowed.",
|
|
103168
|
+
removedHostsWarning: "You are removing {hosts}. If an agent uses this policy and has a secret that is sent to one of these hosts, that secret will stop working.",
|
|
103169
|
+
fieldDescription: "Description (Optional)",
|
|
103170
|
+
descriptionPlaceholder: "What this policy is for",
|
|
103171
|
+
cancel: "Cancel",
|
|
103172
|
+
saveChanges: "Save Changes",
|
|
103173
|
+
createPolicy: "Create Policy",
|
|
103174
|
+
errorNameRequired: "Give the policy a name.",
|
|
103175
|
+
errorHostsRequired: "Add at least one host.",
|
|
103176
|
+
created: "Network policy created",
|
|
103177
|
+
updated: "Network policy updated",
|
|
103178
|
+
deleted: "Network policy deleted",
|
|
103179
|
+
saveFailed: "The policy could not be saved. Try again.",
|
|
103180
|
+
forbiddenWrite: "You do not have permission to change network policies.",
|
|
103181
|
+
forbiddenDelete: "You do not have permission to delete network policies.",
|
|
103182
|
+
deleteTitle: "Delete Network Policy",
|
|
103183
|
+
deleteConfirm: "Delete {name}? Agents set to the Custom profile can only use policies that still exist.",
|
|
103184
|
+
deleteBlockedInUse: "This policy is still used by the following agents. Move them to another policy or profile first.",
|
|
103185
|
+
deleteFailed: "The policy could not be deleted. Try again.",
|
|
103186
|
+
"delete": "Delete"
|
|
103187
|
+
};
|
|
103188
|
+
var virtualMachineSecrets$3 = {
|
|
103189
|
+
newSecret: "New Secret",
|
|
103190
|
+
loadFailed: "VM secrets could not be loaded. Try again in a moment.",
|
|
103191
|
+
colName: "Name",
|
|
103192
|
+
colEnvVar: "Variable",
|
|
103193
|
+
colHosts: "Allowed Hosts",
|
|
103194
|
+
colSource: "Source",
|
|
103195
|
+
colUpdated: "Updated",
|
|
103196
|
+
colActions: "Actions",
|
|
103197
|
+
hostsListAriaLabel: "Hosts {name} is sent to",
|
|
103198
|
+
moreHosts: "+{count} more",
|
|
103199
|
+
sourceStored: "Stored Value",
|
|
103200
|
+
sourceFromCredential: "Credential {credential} · {field}",
|
|
103201
|
+
editAriaLabel: "Edit secret {name}",
|
|
103202
|
+
deleteAriaLabel: "Delete secret {name}",
|
|
103203
|
+
empty: "No VM secrets yet. Create one to let an agent call an API with your organization's key without ever seeing it.",
|
|
103204
|
+
createTitle: "New VM Secret",
|
|
103205
|
+
editTitle: "Edit VM Secret",
|
|
103206
|
+
dialogDescription: "The value is never shown again after you save it.",
|
|
103207
|
+
fieldName: "Name",
|
|
103208
|
+
namePlaceholder: "e.g. Acme API key",
|
|
103209
|
+
fieldEnvVar: "Environment Variable",
|
|
103210
|
+
envVarPlaceholder: "e.g. ACME_KEY",
|
|
103211
|
+
envVarHelp: "Letters, digits and underscores; cannot start with a digit.",
|
|
103212
|
+
envVarReadOnlyHelp: "Cannot be renamed. Delete this secret and create a new one instead.",
|
|
103213
|
+
fieldHosts: "Allowed Hosts",
|
|
103214
|
+
hostsHint: "Only these hosts receive the real key, so keep it to the narrowest host that needs it. Type host:port and press Enter.",
|
|
103215
|
+
fieldSource: "Value Source",
|
|
103216
|
+
sourceValue: "Enter a Value",
|
|
103217
|
+
sourceValueDescription: "Stored encrypted and never shown again.",
|
|
103218
|
+
sourceCredential: "Use an Integration Credential",
|
|
103219
|
+
sourceCredentialDescription: "Reads one field of a saved credential and follows rotations automatically.",
|
|
103220
|
+
fieldValue: "Value",
|
|
103221
|
+
valuePlaceholder: "Paste the key",
|
|
103222
|
+
valueKeepPlaceholder: "Leave blank to keep the current value",
|
|
103223
|
+
valueHelp: "At least {min} characters.",
|
|
103224
|
+
valueKeepHelp: "Leave blank to keep the current value.",
|
|
103225
|
+
fieldCredential: "Integration Credential",
|
|
103226
|
+
credentialPlaceholder: "Choose a credential",
|
|
103227
|
+
noCredentials: "Your organization has no integration credentials yet. Add one under Integrations, or enter a value instead.",
|
|
103228
|
+
fieldCredentialField: "Credential Field",
|
|
103229
|
+
credentialFieldPlaceholder: "Choose a field",
|
|
103230
|
+
credentialNoFields: "This credential has no fields to read from.",
|
|
103231
|
+
cancel: "Cancel",
|
|
103232
|
+
saveChanges: "Save Changes",
|
|
103233
|
+
createSecret: "Create Secret",
|
|
103234
|
+
errorNameRequired: "Give the secret a name.",
|
|
103235
|
+
errorEnvVarRequired: "Enter the environment variable name.",
|
|
103236
|
+
errorEnvVarFormat: "Use letters, digits and underscores only, and do not start with a digit.",
|
|
103237
|
+
errorHostsRequired: "Add at least one host.",
|
|
103238
|
+
errorValueRequired: "Enter the value.",
|
|
103239
|
+
errorValueTooShort: "The value must be at least {min} characters.",
|
|
103240
|
+
errorValueMasked: "This looks like a masked value. Paste the real key.",
|
|
103241
|
+
errorCredentialRequired: "Choose a credential.",
|
|
103242
|
+
errorFieldRequired: "Choose the credential field.",
|
|
103243
|
+
created: "VM secret created",
|
|
103244
|
+
updated: "VM secret updated",
|
|
103245
|
+
deleted: "VM secret deleted",
|
|
103246
|
+
saveFailed: "The secret could not be saved. Try again.",
|
|
103247
|
+
forbiddenWrite: "You do not have permission to change VM secrets.",
|
|
103248
|
+
forbiddenDelete: "You do not have permission to delete VM secrets.",
|
|
103249
|
+
deleteTitle: "Delete VM Secret",
|
|
103250
|
+
deleteConfirm: "Delete {envVar}? It will also be removed from every agent that uses it.",
|
|
103251
|
+
deleteFailed: "The secret could not be deleted. Try again.",
|
|
103252
|
+
"delete": "Delete"
|
|
103253
|
+
};
|
|
103254
|
+
var virtualMachineNetworkSection$3 = {
|
|
103255
|
+
title: "Network Access",
|
|
103256
|
+
description: "Decide what this agent's virtual machine can reach and which credentials it can use.",
|
|
103257
|
+
billingNotice: "Virtual machine time is billed to the chatting user's credits: ${usd} per {minutes} minutes by default, prorated per second. Your organization's rate may differ.",
|
|
103258
|
+
egressLabel: "Egress Profile",
|
|
103259
|
+
egressHelp: "How much of the network the VM gets.",
|
|
103260
|
+
egressNoneLabel: "No Network",
|
|
103261
|
+
egressNoneDescription: "The VM cannot reach anything.",
|
|
103262
|
+
egressRegistriesLabel: "Package Registries",
|
|
103263
|
+
egressRegistriesDescription: "PyPI, npm, apt and apk only, for installing packages.",
|
|
103264
|
+
egressPublicLabel: "Public Internet",
|
|
103265
|
+
egressPublicDescription: "Any public host. Private networks, localhost and cloud metadata stay blocked.",
|
|
103266
|
+
egressCustomLabel: "Custom Allowlist",
|
|
103267
|
+
egressCustomDescription: "Only the hosts in the network policy you pick below.",
|
|
103268
|
+
policyLabel: "Network Policy",
|
|
103269
|
+
policiesForbidden: "You do not have permission to view network policies, so this profile cannot be configured from here.",
|
|
103270
|
+
noPolicies: "No network policies yet",
|
|
103271
|
+
policyPlaceholder: "Choose a policy",
|
|
103272
|
+
createPolicy: "Create Policy",
|
|
103273
|
+
editPolicy: "Edit Policy",
|
|
103274
|
+
managePolicies: "Manage Policies",
|
|
103275
|
+
manageSecrets: "Manage Secrets",
|
|
103276
|
+
policyRequired: "The Custom profile needs a network policy.",
|
|
103277
|
+
policyHosts: "Hosts this policy allows:",
|
|
103278
|
+
secretsLabel: "Secrets",
|
|
103279
|
+
secretsHelp: "Keys the VM can use but never read. Up to {max} per agent.",
|
|
103280
|
+
noSecrets: "Your organization has no VM secrets yet. Use Manage Secrets to create one.",
|
|
103281
|
+
secretsCapReached: "This agent has the maximum of {max} secrets.",
|
|
103282
|
+
uncoveredTitle: "Some secrets are sent to hosts this policy does not allow:",
|
|
103283
|
+
uncoveredItem: "{envVar} needs {hosts}, which {policy} doesn't allow.",
|
|
103284
|
+
addHostsAndSave: "Add Hosts to {policy} and Save",
|
|
103285
|
+
saved: "Network settings saved",
|
|
103286
|
+
saveFailed: "The network settings could not be saved. Try again.",
|
|
103287
|
+
forbiddenSave: "You do not have permission to change these settings.",
|
|
103288
|
+
policyHostsAdded: "Hosts added to {policy}",
|
|
103289
|
+
policyUpdateFailed: "The policy could not be updated, so the settings were not saved.",
|
|
103290
|
+
policyUpdateForbidden: "You do not have permission to change network policies, so the settings were not saved.",
|
|
103291
|
+
discard: "Discard",
|
|
103292
|
+
save: "Save Changes",
|
|
103293
|
+
narrowTitle: "Unbind Secrets?",
|
|
103294
|
+
narrowDescription: "{profile} gives the VM no access to the hosts these secrets need, so saving will unbind {count, plural, one {# secret} other {# secrets}} from this agent.",
|
|
103295
|
+
cancel: "Cancel",
|
|
103296
|
+
narrowConfirm: "Unbind and Save",
|
|
103297
|
+
manageTitle: "Virtual Machine Settings",
|
|
103298
|
+
manageDescription: "Network policies and VM secrets are shared by every agent in your organization."
|
|
103299
|
+
};
|
|
103127
103300
|
var en = {
|
|
103128
103301
|
accessTabAddAccess: accessTabAddAccess$3,
|
|
103129
103302
|
accessTabLabels: accessTabLabels$3,
|
|
@@ -103409,7 +103582,12 @@ var en = {
|
|
|
103409
103582
|
analyticsCostTabs: analyticsCostTabs$3,
|
|
103410
103583
|
analyticsLlmUsage: analyticsLlmUsage$3,
|
|
103411
103584
|
analyticsTraces: analyticsTraces$3,
|
|
103412
|
-
profileLlmUsage: profileLlmUsage$3
|
|
103585
|
+
profileLlmUsage: profileLlmUsage$3,
|
|
103586
|
+
virtualMachineHostInput: virtualMachineHostInput$3,
|
|
103587
|
+
virtualMachineAdminTab: virtualMachineAdminTab$3,
|
|
103588
|
+
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$3,
|
|
103589
|
+
virtualMachineSecrets: virtualMachineSecrets$3,
|
|
103590
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection$3
|
|
103413
103591
|
};
|
|
103414
103592
|
|
|
103415
103593
|
var accessTabAddAccess$2 = {
|
|
@@ -107290,7 +107468,9 @@ var profileAccount$2 = {
|
|
|
107290
107468
|
groupSystem: "Système",
|
|
107291
107469
|
ariaSettingsNav: "Paramètres de l'organisation",
|
|
107292
107470
|
ariaSettingsNavMobile: "Paramètres de l'organisation (mobile)",
|
|
107293
|
-
groupFinance: "Finance"
|
|
107471
|
+
groupFinance: "Finance",
|
|
107472
|
+
tabVirtualMachine: "Machine virtuelle",
|
|
107473
|
+
descVirtualMachine: "Gérez les politiques réseau et les secrets disponibles pour les machines virtuelles des agents."
|
|
107294
107474
|
};
|
|
107295
107475
|
var profileAddCreditsModal$2 = {
|
|
107296
107476
|
title: "Ajouter des crédits",
|
|
@@ -110462,6 +110642,177 @@ var profileLlmUsage$2 = {
|
|
|
110462
110642
|
tryAgain: "Réessayer",
|
|
110463
110643
|
scopeUser: "Utilisation de {username}"
|
|
110464
110644
|
};
|
|
110645
|
+
var virtualMachineHostInput$2 = {
|
|
110646
|
+
listLabel: "Hôtes autorisés",
|
|
110647
|
+
removeHost: "Retirer {host}",
|
|
110648
|
+
placeholder: "api.exemple.com:443",
|
|
110649
|
+
hint: "Saisissez hôte:port et appuyez sur Entrée, ou collez une liste.",
|
|
110650
|
+
errorFormat: "{entry} doit être au format hôte:port, par exemple api.exemple.com:443, sans schéma, chemin ni joker.",
|
|
110651
|
+
errorPort: "{entry} : le port doit être compris entre 1 et 65535.",
|
|
110652
|
+
errorRejectedHost: "{entry} : cet hôte est réservé et ne peut pas être autorisé.",
|
|
110653
|
+
errorIpNotAllowed: "{entry} : utilisez ici un nom d'hôte, pas une adresse IP.",
|
|
110654
|
+
errorDuplicate: "{entry} figure déjà dans la liste.",
|
|
110655
|
+
errorMax: "Vous pouvez ajouter au plus {max} hôtes."
|
|
110656
|
+
};
|
|
110657
|
+
var virtualMachineAdminTab$2 = {
|
|
110658
|
+
infoBox: "Les agents dotés du Shell de machine virtuelle exécutent du code dans une VM Linux isolée, sans accès réseau par défaut. Les politiques réseau sont des listes réutilisables de destinations hôte:port qu'une VM peut joindre, et les secrets de VM sont des clés que la VM peut utiliser sans jamais les lire. Sélectionnez-les pour un agent depuis ses paramètres Sandbox.",
|
|
110659
|
+
tabsAriaLabel: "Sections de la machine virtuelle",
|
|
110660
|
+
tabNetworkPolicies: "Politiques réseau",
|
|
110661
|
+
tabSecrets: "Secrets",
|
|
110662
|
+
forbidden: "Vous n'avez pas l'autorisation de gérer les politiques réseau ni les secrets des machines virtuelles."
|
|
110663
|
+
};
|
|
110664
|
+
var virtualMachineNetworkPolicies$2 = {
|
|
110665
|
+
newPolicy: "Nouvelle politique",
|
|
110666
|
+
loadFailed: "Impossible de charger les politiques réseau. Réessayez dans un instant.",
|
|
110667
|
+
colName: "Nom",
|
|
110668
|
+
colHosts: "Hôtes autorisés",
|
|
110669
|
+
colDescription: "Description",
|
|
110670
|
+
colUpdated: "Mise à jour",
|
|
110671
|
+
colActions: "Actions",
|
|
110672
|
+
hostsListAriaLabel: "Hôtes autorisés par {name}",
|
|
110673
|
+
moreHosts: "+{count} de plus",
|
|
110674
|
+
editAriaLabel: "Modifier la politique {name}",
|
|
110675
|
+
deleteAriaLabel: "Supprimer la politique {name}",
|
|
110676
|
+
empty: "Aucune politique réseau pour l'instant. Créez-en une pour que la VM d'un agent puisse joindre des hôtes précis.",
|
|
110677
|
+
createTitle: "Nouvelle politique réseau",
|
|
110678
|
+
editTitle: "Modifier la politique réseau",
|
|
110679
|
+
dialogDescription: "Les destinations hôte:port qu'une VM peut joindre avec cette politique. HTTPS correspond au port 443.",
|
|
110680
|
+
fieldName: "Nom",
|
|
110681
|
+
namePlaceholder: "p. ex. API Acme",
|
|
110682
|
+
fieldHosts: "Hôtes autorisés",
|
|
110683
|
+
hostsHint: "Saisissez hôte:port et appuyez sur Entrée, ou collez une liste. Jusqu'à {max} entrées ; les adresses IP sont acceptées.",
|
|
110684
|
+
removedHostsWarning: "Vous retirez {hosts}. Si un agent utilise cette politique et possède un secret envoyé à l'un de ces hôtes, ce secret cessera de fonctionner.",
|
|
110685
|
+
fieldDescription: "Description (facultatif)",
|
|
110686
|
+
descriptionPlaceholder: "À quoi sert cette politique",
|
|
110687
|
+
cancel: "Annuler",
|
|
110688
|
+
saveChanges: "Enregistrer les modifications",
|
|
110689
|
+
createPolicy: "Créer la politique",
|
|
110690
|
+
errorNameRequired: "Donnez un nom à la politique.",
|
|
110691
|
+
errorHostsRequired: "Ajoutez au moins un hôte.",
|
|
110692
|
+
created: "Politique réseau créée",
|
|
110693
|
+
updated: "Politique réseau mise à jour",
|
|
110694
|
+
deleted: "Politique réseau supprimée",
|
|
110695
|
+
saveFailed: "La politique n'a pas pu être enregistrée. Réessayez.",
|
|
110696
|
+
forbiddenWrite: "Vous n'avez pas l'autorisation de modifier les politiques réseau.",
|
|
110697
|
+
forbiddenDelete: "Vous n'avez pas l'autorisation de supprimer les politiques réseau.",
|
|
110698
|
+
deleteTitle: "Supprimer la politique réseau",
|
|
110699
|
+
deleteConfirm: "Supprimer {name} ? Les agents en profil Personnalisé ne peuvent utiliser que des politiques existantes.",
|
|
110700
|
+
deleteBlockedInUse: "Cette politique est encore utilisée par les agents suivants. Passez-les d'abord sur une autre politique ou un autre profil.",
|
|
110701
|
+
deleteFailed: "La politique n'a pas pu être supprimée. Réessayez.",
|
|
110702
|
+
"delete": "Supprimer"
|
|
110703
|
+
};
|
|
110704
|
+
var virtualMachineSecrets$2 = {
|
|
110705
|
+
newSecret: "Nouveau secret",
|
|
110706
|
+
loadFailed: "Impossible de charger les secrets de VM. Réessayez dans un instant.",
|
|
110707
|
+
colName: "Nom",
|
|
110708
|
+
colEnvVar: "Variable",
|
|
110709
|
+
colHosts: "Hôtes autorisés",
|
|
110710
|
+
colSource: "Source",
|
|
110711
|
+
colUpdated: "Mis à jour",
|
|
110712
|
+
colActions: "Actions",
|
|
110713
|
+
hostsListAriaLabel: "Hôtes auxquels {name} est envoyé",
|
|
110714
|
+
moreHosts: "+{count} de plus",
|
|
110715
|
+
sourceStored: "Valeur enregistrée",
|
|
110716
|
+
sourceFromCredential: "Identifiant {credential} · {field}",
|
|
110717
|
+
editAriaLabel: "Modifier le secret {name}",
|
|
110718
|
+
deleteAriaLabel: "Supprimer le secret {name}",
|
|
110719
|
+
empty: "Aucun secret de VM pour l'instant. Créez-en un pour qu'un agent appelle une API avec la clé de votre organisation sans jamais la voir.",
|
|
110720
|
+
createTitle: "Nouveau secret de VM",
|
|
110721
|
+
editTitle: "Modifier le secret de VM",
|
|
110722
|
+
dialogDescription: "La valeur n'est plus jamais affichée après l'enregistrement.",
|
|
110723
|
+
fieldName: "Nom",
|
|
110724
|
+
namePlaceholder: "p. ex. Clé API Acme",
|
|
110725
|
+
fieldEnvVar: "Variable d'environnement",
|
|
110726
|
+
envVarPlaceholder: "p. ex. ACME_KEY",
|
|
110727
|
+
envVarHelp: "Lettres, chiffres et tirets bas ; ne peut pas commencer par un chiffre.",
|
|
110728
|
+
envVarReadOnlyHelp: "Ne peut pas être renommée. Supprimez ce secret et créez-en un nouveau.",
|
|
110729
|
+
fieldHosts: "Hôtes autorisés",
|
|
110730
|
+
hostsHint: "Seuls ces hôtes reçoivent la vraie clé ; limitez la liste à l'hôte le plus précis qui en a besoin. Saisissez hôte:port et appuyez sur Entrée.",
|
|
110731
|
+
fieldSource: "Source de la valeur",
|
|
110732
|
+
sourceValue: "Saisir une valeur",
|
|
110733
|
+
sourceValueDescription: "Stockée chiffrée et jamais réaffichée.",
|
|
110734
|
+
sourceCredential: "Utiliser un identifiant d'intégration",
|
|
110735
|
+
sourceCredentialDescription: "Lit un champ d'un identifiant enregistré et suit automatiquement les rotations.",
|
|
110736
|
+
fieldValue: "Valeur",
|
|
110737
|
+
valuePlaceholder: "Collez la clé",
|
|
110738
|
+
valueKeepPlaceholder: "Laissez vide pour conserver la valeur actuelle",
|
|
110739
|
+
valueHelp: "Au moins {min} caractères.",
|
|
110740
|
+
valueKeepHelp: "Laissez vide pour conserver la valeur actuelle.",
|
|
110741
|
+
fieldCredential: "Identifiant d'intégration",
|
|
110742
|
+
credentialPlaceholder: "Choisissez un identifiant",
|
|
110743
|
+
noCredentials: "Votre organisation n'a pas encore d'identifiants d'intégration. Ajoutez-en un dans Intégrations, ou saisissez une valeur.",
|
|
110744
|
+
fieldCredentialField: "Champ de l'identifiant",
|
|
110745
|
+
credentialFieldPlaceholder: "Choisissez un champ",
|
|
110746
|
+
credentialNoFields: "Cet identifiant n'a aucun champ à lire.",
|
|
110747
|
+
cancel: "Annuler",
|
|
110748
|
+
saveChanges: "Enregistrer les modifications",
|
|
110749
|
+
createSecret: "Créer le secret",
|
|
110750
|
+
errorNameRequired: "Donnez un nom au secret.",
|
|
110751
|
+
errorEnvVarRequired: "Saisissez le nom de la variable d'environnement.",
|
|
110752
|
+
errorEnvVarFormat: "Utilisez uniquement des lettres, des chiffres et des tirets bas, sans commencer par un chiffre.",
|
|
110753
|
+
errorHostsRequired: "Ajoutez au moins un hôte.",
|
|
110754
|
+
errorValueRequired: "Saisissez la valeur.",
|
|
110755
|
+
errorValueTooShort: "La valeur doit contenir au moins {min} caractères.",
|
|
110756
|
+
errorValueMasked: "Cela ressemble à une valeur masquée. Collez la vraie clé.",
|
|
110757
|
+
errorCredentialRequired: "Choisissez un identifiant.",
|
|
110758
|
+
errorFieldRequired: "Choisissez le champ de l'identifiant.",
|
|
110759
|
+
created: "Secret de VM créé",
|
|
110760
|
+
updated: "Secret de VM mis à jour",
|
|
110761
|
+
deleted: "Secret de VM supprimé",
|
|
110762
|
+
saveFailed: "Le secret n'a pas pu être enregistré. Réessayez.",
|
|
110763
|
+
forbiddenWrite: "Vous n'avez pas l'autorisation de modifier les secrets de VM.",
|
|
110764
|
+
forbiddenDelete: "Vous n'avez pas l'autorisation de supprimer les secrets de VM.",
|
|
110765
|
+
deleteTitle: "Supprimer le secret de VM",
|
|
110766
|
+
deleteConfirm: "Supprimer {envVar} ? Il sera aussi retiré de tous les agents qui l'utilisent.",
|
|
110767
|
+
deleteFailed: "Le secret n'a pas pu être supprimé. Réessayez.",
|
|
110768
|
+
"delete": "Supprimer"
|
|
110769
|
+
};
|
|
110770
|
+
var virtualMachineNetworkSection$2 = {
|
|
110771
|
+
title: "Accès réseau",
|
|
110772
|
+
description: "Décidez ce que la machine virtuelle de cet agent peut joindre et quels identifiants elle peut utiliser.",
|
|
110773
|
+
billingNotice: "Le temps de machine virtuelle est facturé sur les crédits de l'utilisateur qui discute : ${usd} par {minutes} minutes par défaut, au prorata de la seconde. Le tarif de votre organisation peut différer.",
|
|
110774
|
+
egressLabel: "Profil de sortie",
|
|
110775
|
+
egressHelp: "Quelle part du réseau la VM obtient.",
|
|
110776
|
+
egressNoneLabel: "Aucun réseau",
|
|
110777
|
+
egressNoneDescription: "La VM ne peut rien joindre.",
|
|
110778
|
+
egressRegistriesLabel: "Registres de paquets",
|
|
110779
|
+
egressRegistriesDescription: "PyPI, npm, apt et apk uniquement, pour installer des paquets.",
|
|
110780
|
+
egressPublicLabel: "Internet public",
|
|
110781
|
+
egressPublicDescription: "Tout hôte public. Les réseaux privés, localhost et les métadonnées cloud restent bloqués.",
|
|
110782
|
+
egressCustomLabel: "Liste personnalisée",
|
|
110783
|
+
egressCustomDescription: "Uniquement les hôtes de la politique réseau choisie ci-dessous.",
|
|
110784
|
+
policyLabel: "Politique réseau",
|
|
110785
|
+
policiesForbidden: "Vous n'avez pas l'autorisation de voir les politiques réseau, ce profil ne peut donc pas être configuré d'ici.",
|
|
110786
|
+
noPolicies: "Aucune politique réseau pour l'instant",
|
|
110787
|
+
policyPlaceholder: "Choisissez une politique",
|
|
110788
|
+
createPolicy: "Créer une politique",
|
|
110789
|
+
editPolicy: "Modifier la politique",
|
|
110790
|
+
managePolicies: "Gérer les politiques",
|
|
110791
|
+
manageSecrets: "Gérer les secrets",
|
|
110792
|
+
policyRequired: "Le profil Personnalisé nécessite une politique réseau.",
|
|
110793
|
+
policyHosts: "Hôtes autorisés par cette politique :",
|
|
110794
|
+
secretsLabel: "Secrets",
|
|
110795
|
+
secretsHelp: "Clés que la VM peut utiliser sans jamais les lire. Jusqu'à {max} par agent.",
|
|
110796
|
+
noSecrets: "Votre organisation n'a pas encore de secrets de VM. Utilisez Gérer les secrets pour en créer un.",
|
|
110797
|
+
secretsCapReached: "Cet agent a atteint le maximum de {max} secrets.",
|
|
110798
|
+
uncoveredTitle: "Certains secrets sont envoyés à des hôtes que cette politique n'autorise pas :",
|
|
110799
|
+
uncoveredItem: "{envVar} a besoin de {hosts}, que {policy} n'autorise pas.",
|
|
110800
|
+
addHostsAndSave: "Ajouter les hôtes à {policy} et enregistrer",
|
|
110801
|
+
saved: "Paramètres réseau enregistrés",
|
|
110802
|
+
saveFailed: "Les paramètres réseau n'ont pas pu être enregistrés. Réessayez.",
|
|
110803
|
+
forbiddenSave: "Vous n'avez pas l'autorisation de modifier ces paramètres.",
|
|
110804
|
+
policyHostsAdded: "Hôtes ajoutés à {policy}",
|
|
110805
|
+
policyUpdateFailed: "La politique n'a pas pu être mise à jour, les paramètres n'ont donc pas été enregistrés.",
|
|
110806
|
+
policyUpdateForbidden: "Vous n'avez pas l'autorisation de modifier les politiques réseau, les paramètres n'ont donc pas été enregistrés.",
|
|
110807
|
+
discard: "Annuler les modifications",
|
|
110808
|
+
save: "Enregistrer les modifications",
|
|
110809
|
+
narrowTitle: "Détacher les secrets ?",
|
|
110810
|
+
narrowDescription: "{profile} ne donne à la VM aucun accès aux hôtes dont ces secrets ont besoin ; l'enregistrement détachera donc {count, plural, one {# secret} other {# secrets}} de cet agent.",
|
|
110811
|
+
cancel: "Annuler",
|
|
110812
|
+
narrowConfirm: "Détacher et enregistrer",
|
|
110813
|
+
manageTitle: "Paramètres de la machine virtuelle",
|
|
110814
|
+
manageDescription: "Les politiques réseau et les secrets de VM sont partagés par tous les agents de votre organisation."
|
|
110815
|
+
};
|
|
110465
110816
|
var fr = {
|
|
110466
110817
|
accessTabAddAccess: accessTabAddAccess$2,
|
|
110467
110818
|
accessTabLabels: accessTabLabels$2,
|
|
@@ -110747,7 +111098,12 @@ var fr = {
|
|
|
110747
111098
|
analyticsCostTabs: analyticsCostTabs$2,
|
|
110748
111099
|
analyticsLlmUsage: analyticsLlmUsage$2,
|
|
110749
111100
|
analyticsTraces: analyticsTraces$2,
|
|
110750
|
-
profileLlmUsage: profileLlmUsage$2
|
|
111101
|
+
profileLlmUsage: profileLlmUsage$2,
|
|
111102
|
+
virtualMachineHostInput: virtualMachineHostInput$2,
|
|
111103
|
+
virtualMachineAdminTab: virtualMachineAdminTab$2,
|
|
111104
|
+
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$2,
|
|
111105
|
+
virtualMachineSecrets: virtualMachineSecrets$2,
|
|
111106
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection$2
|
|
110751
111107
|
};
|
|
110752
111108
|
|
|
110753
111109
|
var accessTabAddAccess$1 = {
|
|
@@ -114628,7 +114984,9 @@ var profileAccount$1 = {
|
|
|
114628
114984
|
groupSystem: "Sistema",
|
|
114629
114985
|
ariaSettingsNav: "Configuración de la organización",
|
|
114630
114986
|
ariaSettingsNavMobile: "Configuración de la organización (móvil)",
|
|
114631
|
-
groupFinance: "Finanzas"
|
|
114987
|
+
groupFinance: "Finanzas",
|
|
114988
|
+
tabVirtualMachine: "Máquina virtual",
|
|
114989
|
+
descVirtualMachine: "Gestiona las políticas de red y los secretos disponibles para las máquinas virtuales de los agentes."
|
|
114632
114990
|
};
|
|
114633
114991
|
var profileAddCreditsModal$1 = {
|
|
114634
114992
|
title: "Agregar créditos",
|
|
@@ -117800,6 +118158,177 @@ var profileLlmUsage$1 = {
|
|
|
117800
118158
|
tryAgain: "Intentar de nuevo",
|
|
117801
118159
|
scopeUser: "Uso de {username}"
|
|
117802
118160
|
};
|
|
118161
|
+
var virtualMachineHostInput$1 = {
|
|
118162
|
+
listLabel: "Hosts permitidos",
|
|
118163
|
+
removeHost: "Quitar {host}",
|
|
118164
|
+
placeholder: "api.ejemplo.com:443",
|
|
118165
|
+
hint: "Escribe host:puerto y pulsa Intro, o pega una lista.",
|
|
118166
|
+
errorFormat: "{entry} debe tener el formato host:puerto, por ejemplo api.ejemplo.com:443, sin esquema, ruta ni comodín.",
|
|
118167
|
+
errorPort: "{entry}: el puerto debe estar entre 1 y 65535.",
|
|
118168
|
+
errorRejectedHost: "{entry}: este host está reservado y no se puede permitir.",
|
|
118169
|
+
errorIpNotAllowed: "{entry}: usa aquí un nombre de host, no una dirección IP.",
|
|
118170
|
+
errorDuplicate: "{entry} ya está en la lista.",
|
|
118171
|
+
errorMax: "Puedes añadir como máximo {max} hosts."
|
|
118172
|
+
};
|
|
118173
|
+
var virtualMachineAdminTab$1 = {
|
|
118174
|
+
infoBox: "Los agentes con Shell de máquina virtual ejecutan código en una VM Linux aislada que, por defecto, no tiene acceso a la red. Las políticas de red son listas reutilizables de destinos host:puerto a los que una VM puede llegar, y los secretos de VM son claves que la VM puede usar pero nunca leer. Elígelos para un agente desde su configuración de Sandbox.",
|
|
118175
|
+
tabsAriaLabel: "Secciones de máquina virtual",
|
|
118176
|
+
tabNetworkPolicies: "Políticas de red",
|
|
118177
|
+
tabSecrets: "Secretos",
|
|
118178
|
+
forbidden: "No tienes permiso para gestionar las políticas de red ni los secretos de las máquinas virtuales."
|
|
118179
|
+
};
|
|
118180
|
+
var virtualMachineNetworkPolicies$1 = {
|
|
118181
|
+
newPolicy: "Nueva política",
|
|
118182
|
+
loadFailed: "No se pudieron cargar las políticas de red. Inténtalo de nuevo en un momento.",
|
|
118183
|
+
colName: "Nombre",
|
|
118184
|
+
colHosts: "Hosts permitidos",
|
|
118185
|
+
colDescription: "Descripción",
|
|
118186
|
+
colUpdated: "Actualizada",
|
|
118187
|
+
colActions: "Acciones",
|
|
118188
|
+
hostsListAriaLabel: "Hosts permitidos por {name}",
|
|
118189
|
+
moreHosts: "+{count} más",
|
|
118190
|
+
editAriaLabel: "Editar la política {name}",
|
|
118191
|
+
deleteAriaLabel: "Eliminar la política {name}",
|
|
118192
|
+
empty: "Todavía no hay políticas de red. Crea una para que la VM de un agente pueda llegar a hosts concretos.",
|
|
118193
|
+
createTitle: "Nueva política de red",
|
|
118194
|
+
editTitle: "Editar política de red",
|
|
118195
|
+
dialogDescription: "Los destinos host:puerto a los que una VM puede llegar con esta política. HTTPS es el puerto 443.",
|
|
118196
|
+
fieldName: "Nombre",
|
|
118197
|
+
namePlaceholder: "p. ej. APIs de Acme",
|
|
118198
|
+
fieldHosts: "Hosts permitidos",
|
|
118199
|
+
hostsHint: "Escribe host:puerto y pulsa Intro, o pega una lista. Hasta {max} entradas; se admiten direcciones IP.",
|
|
118200
|
+
removedHostsWarning: "Vas a quitar {hosts}. Si un agente usa esta política y tiene un secreto que se envía a uno de estos hosts, ese secreto dejará de funcionar.",
|
|
118201
|
+
fieldDescription: "Descripción (opcional)",
|
|
118202
|
+
descriptionPlaceholder: "Para qué sirve esta política",
|
|
118203
|
+
cancel: "Cancelar",
|
|
118204
|
+
saveChanges: "Guardar cambios",
|
|
118205
|
+
createPolicy: "Crear política",
|
|
118206
|
+
errorNameRequired: "Dale un nombre a la política.",
|
|
118207
|
+
errorHostsRequired: "Añade al menos un host.",
|
|
118208
|
+
created: "Política de red creada",
|
|
118209
|
+
updated: "Política de red actualizada",
|
|
118210
|
+
deleted: "Política de red eliminada",
|
|
118211
|
+
saveFailed: "No se pudo guardar la política. Inténtalo de nuevo.",
|
|
118212
|
+
forbiddenWrite: "No tienes permiso para modificar políticas de red.",
|
|
118213
|
+
forbiddenDelete: "No tienes permiso para eliminar políticas de red.",
|
|
118214
|
+
deleteTitle: "Eliminar política de red",
|
|
118215
|
+
deleteConfirm: "¿Eliminar {name}? Los agentes con el perfil Personalizado solo pueden usar políticas que sigan existiendo.",
|
|
118216
|
+
deleteBlockedInUse: "Esta política todavía la usan los siguientes agentes. Cámbialos antes a otra política o perfil.",
|
|
118217
|
+
deleteFailed: "No se pudo eliminar la política. Inténtalo de nuevo.",
|
|
118218
|
+
"delete": "Eliminar"
|
|
118219
|
+
};
|
|
118220
|
+
var virtualMachineSecrets$1 = {
|
|
118221
|
+
newSecret: "Nuevo secreto",
|
|
118222
|
+
loadFailed: "No se pudieron cargar los secretos de VM. Inténtalo de nuevo en un momento.",
|
|
118223
|
+
colName: "Nombre",
|
|
118224
|
+
colEnvVar: "Variable",
|
|
118225
|
+
colHosts: "Hosts permitidos",
|
|
118226
|
+
colSource: "Origen",
|
|
118227
|
+
colUpdated: "Actualizado",
|
|
118228
|
+
colActions: "Acciones",
|
|
118229
|
+
hostsListAriaLabel: "Hosts a los que se envía {name}",
|
|
118230
|
+
moreHosts: "+{count} más",
|
|
118231
|
+
sourceStored: "Valor guardado",
|
|
118232
|
+
sourceFromCredential: "Credencial {credential} · {field}",
|
|
118233
|
+
editAriaLabel: "Editar el secreto {name}",
|
|
118234
|
+
deleteAriaLabel: "Eliminar el secreto {name}",
|
|
118235
|
+
empty: "Todavía no hay secretos de VM. Crea uno para que un agente llame a una API con la clave de tu organización sin verla nunca.",
|
|
118236
|
+
createTitle: "Nuevo secreto de VM",
|
|
118237
|
+
editTitle: "Editar secreto de VM",
|
|
118238
|
+
dialogDescription: "El valor no vuelve a mostrarse después de guardarlo.",
|
|
118239
|
+
fieldName: "Nombre",
|
|
118240
|
+
namePlaceholder: "p. ej. Clave de la API de Acme",
|
|
118241
|
+
fieldEnvVar: "Variable de entorno",
|
|
118242
|
+
envVarPlaceholder: "p. ej. ACME_KEY",
|
|
118243
|
+
envVarHelp: "Letras, dígitos y guiones bajos; no puede empezar por un dígito.",
|
|
118244
|
+
envVarReadOnlyHelp: "No se puede renombrar. Elimina este secreto y crea uno nuevo.",
|
|
118245
|
+
fieldHosts: "Hosts permitidos",
|
|
118246
|
+
hostsHint: "Solo estos hosts reciben la clave real; limita la lista al host más concreto que la necesite. Escribe host:puerto y pulsa Intro.",
|
|
118247
|
+
fieldSource: "Origen del valor",
|
|
118248
|
+
sourceValue: "Introducir un valor",
|
|
118249
|
+
sourceValueDescription: "Se guarda cifrada y no vuelve a mostrarse.",
|
|
118250
|
+
sourceCredential: "Usar una credencial de integración",
|
|
118251
|
+
sourceCredentialDescription: "Lee un campo de una credencial guardada y sigue las rotaciones automáticamente.",
|
|
118252
|
+
fieldValue: "Valor",
|
|
118253
|
+
valuePlaceholder: "Pega la clave",
|
|
118254
|
+
valueKeepPlaceholder: "Déjalo en blanco para conservar el valor actual",
|
|
118255
|
+
valueHelp: "Al menos {min} caracteres.",
|
|
118256
|
+
valueKeepHelp: "Déjalo en blanco para conservar el valor actual.",
|
|
118257
|
+
fieldCredential: "Credencial de integración",
|
|
118258
|
+
credentialPlaceholder: "Elige una credencial",
|
|
118259
|
+
noCredentials: "Tu organización todavía no tiene credenciales de integración. Añade una en Integraciones o introduce un valor.",
|
|
118260
|
+
fieldCredentialField: "Campo de la credencial",
|
|
118261
|
+
credentialFieldPlaceholder: "Elige un campo",
|
|
118262
|
+
credentialNoFields: "Esta credencial no tiene campos de los que leer.",
|
|
118263
|
+
cancel: "Cancelar",
|
|
118264
|
+
saveChanges: "Guardar cambios",
|
|
118265
|
+
createSecret: "Crear secreto",
|
|
118266
|
+
errorNameRequired: "Dale un nombre al secreto.",
|
|
118267
|
+
errorEnvVarRequired: "Introduce el nombre de la variable de entorno.",
|
|
118268
|
+
errorEnvVarFormat: "Usa solo letras, dígitos y guiones bajos, y no empieces por un dígito.",
|
|
118269
|
+
errorHostsRequired: "Añade al menos un host.",
|
|
118270
|
+
errorValueRequired: "Introduce el valor.",
|
|
118271
|
+
errorValueTooShort: "El valor debe tener al menos {min} caracteres.",
|
|
118272
|
+
errorValueMasked: "Parece un valor enmascarado. Pega la clave real.",
|
|
118273
|
+
errorCredentialRequired: "Elige una credencial.",
|
|
118274
|
+
errorFieldRequired: "Elige el campo de la credencial.",
|
|
118275
|
+
created: "Secreto de VM creado",
|
|
118276
|
+
updated: "Secreto de VM actualizado",
|
|
118277
|
+
deleted: "Secreto de VM eliminado",
|
|
118278
|
+
saveFailed: "No se pudo guardar el secreto. Inténtalo de nuevo.",
|
|
118279
|
+
forbiddenWrite: "No tienes permiso para modificar secretos de VM.",
|
|
118280
|
+
forbiddenDelete: "No tienes permiso para eliminar secretos de VM.",
|
|
118281
|
+
deleteTitle: "Eliminar secreto de VM",
|
|
118282
|
+
deleteConfirm: "¿Eliminar {envVar}? También se quitará de todos los agentes que lo usan.",
|
|
118283
|
+
deleteFailed: "No se pudo eliminar el secreto. Inténtalo de nuevo.",
|
|
118284
|
+
"delete": "Eliminar"
|
|
118285
|
+
};
|
|
118286
|
+
var virtualMachineNetworkSection$1 = {
|
|
118287
|
+
title: "Acceso a la red",
|
|
118288
|
+
description: "Decide a qué puede llegar la máquina virtual de este agente y qué credenciales puede usar.",
|
|
118289
|
+
billingNotice: "El tiempo de máquina virtual se cobra de los créditos del usuario que chatea: ${usd} por cada {minutes} minutos por defecto, prorrateado por segundo. La tarifa de tu organización puede ser distinta.",
|
|
118290
|
+
egressLabel: "Perfil de salida",
|
|
118291
|
+
egressHelp: "Cuánta red recibe la VM.",
|
|
118292
|
+
egressNoneLabel: "Sin red",
|
|
118293
|
+
egressNoneDescription: "La VM no puede llegar a nada.",
|
|
118294
|
+
egressRegistriesLabel: "Registros de paquetes",
|
|
118295
|
+
egressRegistriesDescription: "Solo PyPI, npm, apt y apk, para instalar paquetes.",
|
|
118296
|
+
egressPublicLabel: "Internet público",
|
|
118297
|
+
egressPublicDescription: "Cualquier host público. Las redes privadas, localhost y los metadatos de la nube siguen bloqueados.",
|
|
118298
|
+
egressCustomLabel: "Lista personalizada",
|
|
118299
|
+
egressCustomDescription: "Solo los hosts de la política de red que elijas abajo.",
|
|
118300
|
+
policyLabel: "Política de red",
|
|
118301
|
+
policiesForbidden: "No tienes permiso para ver las políticas de red, así que este perfil no se puede configurar desde aquí.",
|
|
118302
|
+
noPolicies: "Todavía no hay políticas de red",
|
|
118303
|
+
policyPlaceholder: "Elige una política",
|
|
118304
|
+
createPolicy: "Crear política",
|
|
118305
|
+
editPolicy: "Editar política",
|
|
118306
|
+
managePolicies: "Gestionar políticas",
|
|
118307
|
+
manageSecrets: "Gestionar secretos",
|
|
118308
|
+
policyRequired: "El perfil Personalizado necesita una política de red.",
|
|
118309
|
+
policyHosts: "Hosts que permite esta política:",
|
|
118310
|
+
secretsLabel: "Secretos",
|
|
118311
|
+
secretsHelp: "Claves que la VM puede usar pero nunca leer. Hasta {max} por agente.",
|
|
118312
|
+
noSecrets: "Tu organización todavía no tiene secretos de VM. Usa Gestionar secretos para crear uno.",
|
|
118313
|
+
secretsCapReached: "Este agente tiene el máximo de {max} secretos.",
|
|
118314
|
+
uncoveredTitle: "Algunos secretos se envían a hosts que esta política no permite:",
|
|
118315
|
+
uncoveredItem: "{envVar} necesita {hosts}, y {policy} no lo permite.",
|
|
118316
|
+
addHostsAndSave: "Añadir hosts a {policy} y guardar",
|
|
118317
|
+
saved: "Configuración de red guardada",
|
|
118318
|
+
saveFailed: "No se pudo guardar la configuración de red. Inténtalo de nuevo.",
|
|
118319
|
+
forbiddenSave: "No tienes permiso para cambiar esta configuración.",
|
|
118320
|
+
policyHostsAdded: "Hosts añadidos a {policy}",
|
|
118321
|
+
policyUpdateFailed: "No se pudo actualizar la política, así que la configuración no se guardó.",
|
|
118322
|
+
policyUpdateForbidden: "No tienes permiso para modificar políticas de red, así que la configuración no se guardó.",
|
|
118323
|
+
discard: "Descartar",
|
|
118324
|
+
save: "Guardar cambios",
|
|
118325
|
+
narrowTitle: "¿Desvincular los secretos?",
|
|
118326
|
+
narrowDescription: "{profile} no da a la VM acceso a los hosts que necesitan estos secretos, así que al guardar se {count, plural, one {desvinculará # secreto} other {desvincularán # secretos}} de este agente.",
|
|
118327
|
+
cancel: "Cancelar",
|
|
118328
|
+
narrowConfirm: "Desvincular y guardar",
|
|
118329
|
+
manageTitle: "Configuración de la máquina virtual",
|
|
118330
|
+
manageDescription: "Las políticas de red y los secretos de VM son compartidos por todos los agentes de tu organización."
|
|
118331
|
+
};
|
|
117803
118332
|
var es = {
|
|
117804
118333
|
accessTabAddAccess: accessTabAddAccess$1,
|
|
117805
118334
|
accessTabLabels: accessTabLabels$1,
|
|
@@ -118085,7 +118614,12 @@ var es = {
|
|
|
118085
118614
|
analyticsCostTabs: analyticsCostTabs$1,
|
|
118086
118615
|
analyticsLlmUsage: analyticsLlmUsage$1,
|
|
118087
118616
|
analyticsTraces: analyticsTraces$1,
|
|
118088
|
-
profileLlmUsage: profileLlmUsage$1
|
|
118617
|
+
profileLlmUsage: profileLlmUsage$1,
|
|
118618
|
+
virtualMachineHostInput: virtualMachineHostInput$1,
|
|
118619
|
+
virtualMachineAdminTab: virtualMachineAdminTab$1,
|
|
118620
|
+
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$1,
|
|
118621
|
+
virtualMachineSecrets: virtualMachineSecrets$1,
|
|
118622
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection$1
|
|
118089
118623
|
};
|
|
118090
118624
|
|
|
118091
118625
|
var accessTabAddAccess = {
|
|
@@ -121966,7 +122500,9 @@ var profileAccount = {
|
|
|
121966
122500
|
groupSystem: "系统",
|
|
121967
122501
|
ariaSettingsNav: "组织设置",
|
|
121968
122502
|
ariaSettingsNavMobile: "组织设置(移动端)",
|
|
121969
|
-
groupFinance: "财务"
|
|
122503
|
+
groupFinance: "财务",
|
|
122504
|
+
tabVirtualMachine: "虚拟机",
|
|
122505
|
+
descVirtualMachine: "管理可供智能体虚拟机使用的网络策略和密钥。"
|
|
121970
122506
|
};
|
|
121971
122507
|
var profileAddCreditsModal = {
|
|
121972
122508
|
title: "添加积分",
|
|
@@ -125138,6 +125674,177 @@ var profileLlmUsage = {
|
|
|
125138
125674
|
tryAgain: "重试",
|
|
125139
125675
|
scopeUser: "{username} 的用量"
|
|
125140
125676
|
};
|
|
125677
|
+
var virtualMachineHostInput = {
|
|
125678
|
+
listLabel: "允许的主机",
|
|
125679
|
+
removeHost: "移除 {host}",
|
|
125680
|
+
placeholder: "api.example.com:443",
|
|
125681
|
+
hint: "输入 host:port 并按 Enter,或粘贴列表。",
|
|
125682
|
+
errorFormat: "{entry} 必须为 host:port 格式,例如 api.example.com:443,不能包含协议、路径或通配符。",
|
|
125683
|
+
errorPort: "{entry}:端口必须在 1 到 65535 之间。",
|
|
125684
|
+
errorRejectedHost: "{entry}:此主机为保留主机,不能加入允许列表。",
|
|
125685
|
+
errorIpNotAllowed: "{entry}:此处请使用主机名,而不是 IP 地址。",
|
|
125686
|
+
errorDuplicate: "{entry} 已在列表中。",
|
|
125687
|
+
errorMax: "最多只能添加 {max} 个主机。"
|
|
125688
|
+
};
|
|
125689
|
+
var virtualMachineAdminTab = {
|
|
125690
|
+
infoBox: "启用了虚拟机 Shell 的智能体会在隔离的 Linux 虚拟机中运行代码,默认没有网络访问权限。网络策略是可复用的 host:port 目标列表,规定虚拟机可以访问的地址;虚拟机密钥是虚拟机可以使用但永远无法读取的密钥。请在智能体的沙箱设置中为其选择。",
|
|
125691
|
+
tabsAriaLabel: "虚拟机设置分区",
|
|
125692
|
+
tabNetworkPolicies: "网络策略",
|
|
125693
|
+
tabSecrets: "密钥",
|
|
125694
|
+
forbidden: "您没有权限管理虚拟机的网络策略或密钥。"
|
|
125695
|
+
};
|
|
125696
|
+
var virtualMachineNetworkPolicies = {
|
|
125697
|
+
newPolicy: "新建策略",
|
|
125698
|
+
loadFailed: "无法加载网络策略,请稍后重试。",
|
|
125699
|
+
colName: "名称",
|
|
125700
|
+
colHosts: "允许的主机",
|
|
125701
|
+
colDescription: "描述",
|
|
125702
|
+
colUpdated: "更新时间",
|
|
125703
|
+
colActions: "操作",
|
|
125704
|
+
hostsListAriaLabel: "{name} 允许的主机",
|
|
125705
|
+
moreHosts: "还有 {count} 个",
|
|
125706
|
+
editAriaLabel: "编辑策略 {name}",
|
|
125707
|
+
deleteAriaLabel: "删除策略 {name}",
|
|
125708
|
+
empty: "还没有网络策略。创建一个策略,让智能体的虚拟机可以访问指定主机。",
|
|
125709
|
+
createTitle: "新建网络策略",
|
|
125710
|
+
editTitle: "编辑网络策略",
|
|
125711
|
+
dialogDescription: "此策略下虚拟机可以访问的 host:port 目标。HTTPS 使用 443 端口。",
|
|
125712
|
+
fieldName: "名称",
|
|
125713
|
+
namePlaceholder: "例如:Acme API",
|
|
125714
|
+
fieldHosts: "允许的主机",
|
|
125715
|
+
hostsHint: "输入 host:port 并按 Enter,或粘贴列表。最多 {max} 条;允许使用 IP 地址。",
|
|
125716
|
+
removedHostsWarning: "您正在移除 {hosts}。如果某个智能体使用此策略,并且有密钥会发送到这些主机之一,该密钥将无法再使用。",
|
|
125717
|
+
fieldDescription: "描述(可选)",
|
|
125718
|
+
descriptionPlaceholder: "此策略的用途",
|
|
125719
|
+
cancel: "取消",
|
|
125720
|
+
saveChanges: "保存更改",
|
|
125721
|
+
createPolicy: "创建策略",
|
|
125722
|
+
errorNameRequired: "请为策略输入名称。",
|
|
125723
|
+
errorHostsRequired: "请至少添加一个主机。",
|
|
125724
|
+
created: "网络策略已创建",
|
|
125725
|
+
updated: "网络策略已更新",
|
|
125726
|
+
deleted: "网络策略已删除",
|
|
125727
|
+
saveFailed: "无法保存策略,请重试。",
|
|
125728
|
+
forbiddenWrite: "您没有权限修改网络策略。",
|
|
125729
|
+
forbiddenDelete: "您没有权限删除网络策略。",
|
|
125730
|
+
deleteTitle: "删除网络策略",
|
|
125731
|
+
deleteConfirm: "确定删除 {name} 吗?设为“自定义”配置的智能体只能使用仍然存在的策略。",
|
|
125732
|
+
deleteBlockedInUse: "以下智能体仍在使用此策略。请先将它们改为其他策略或配置。",
|
|
125733
|
+
deleteFailed: "无法删除策略,请重试。",
|
|
125734
|
+
"delete": "删除"
|
|
125735
|
+
};
|
|
125736
|
+
var virtualMachineSecrets = {
|
|
125737
|
+
newSecret: "新建密钥",
|
|
125738
|
+
loadFailed: "无法加载虚拟机密钥,请稍后重试。",
|
|
125739
|
+
colName: "名称",
|
|
125740
|
+
colEnvVar: "变量",
|
|
125741
|
+
colHosts: "允许的主机",
|
|
125742
|
+
colSource: "来源",
|
|
125743
|
+
colUpdated: "更新时间",
|
|
125744
|
+
colActions: "操作",
|
|
125745
|
+
hostsListAriaLabel: "{name} 发送至的主机",
|
|
125746
|
+
moreHosts: "还有 {count} 个",
|
|
125747
|
+
sourceStored: "已存储的值",
|
|
125748
|
+
sourceFromCredential: "凭据 {credential} · {field}",
|
|
125749
|
+
editAriaLabel: "编辑密钥 {name}",
|
|
125750
|
+
deleteAriaLabel: "删除密钥 {name}",
|
|
125751
|
+
empty: "还没有虚拟机密钥。创建一个密钥,让智能体无需看到组织的密钥即可调用 API。",
|
|
125752
|
+
createTitle: "新建虚拟机密钥",
|
|
125753
|
+
editTitle: "编辑虚拟机密钥",
|
|
125754
|
+
dialogDescription: "保存后,该值不会再显示。",
|
|
125755
|
+
fieldName: "名称",
|
|
125756
|
+
namePlaceholder: "例如:Acme API 密钥",
|
|
125757
|
+
fieldEnvVar: "环境变量",
|
|
125758
|
+
envVarPlaceholder: "例如:ACME_KEY",
|
|
125759
|
+
envVarHelp: "只能包含字母、数字和下划线,且不能以数字开头。",
|
|
125760
|
+
envVarReadOnlyHelp: "无法重命名。请删除此密钥并新建一个。",
|
|
125761
|
+
fieldHosts: "允许的主机",
|
|
125762
|
+
hostsHint: "只有这些主机会收到真实密钥,请仅填写需要它的最小范围主机。输入 host:port 并按 Enter。",
|
|
125763
|
+
fieldSource: "值的来源",
|
|
125764
|
+
sourceValue: "输入一个值",
|
|
125765
|
+
sourceValueDescription: "加密存储,之后不再显示。",
|
|
125766
|
+
sourceCredential: "使用集成凭据",
|
|
125767
|
+
sourceCredentialDescription: "读取已保存凭据中的一个字段,并自动跟随凭据轮换。",
|
|
125768
|
+
fieldValue: "值",
|
|
125769
|
+
valuePlaceholder: "粘贴密钥",
|
|
125770
|
+
valueKeepPlaceholder: "留空以保留当前值",
|
|
125771
|
+
valueHelp: "至少 {min} 个字符。",
|
|
125772
|
+
valueKeepHelp: "留空以保留当前值。",
|
|
125773
|
+
fieldCredential: "集成凭据",
|
|
125774
|
+
credentialPlaceholder: "选择一个凭据",
|
|
125775
|
+
noCredentials: "您的组织还没有集成凭据。请在“集成”中添加,或改为输入一个值。",
|
|
125776
|
+
fieldCredentialField: "凭据字段",
|
|
125777
|
+
credentialFieldPlaceholder: "选择一个字段",
|
|
125778
|
+
credentialNoFields: "此凭据没有可读取的字段。",
|
|
125779
|
+
cancel: "取消",
|
|
125780
|
+
saveChanges: "保存更改",
|
|
125781
|
+
createSecret: "创建密钥",
|
|
125782
|
+
errorNameRequired: "请为密钥输入名称。",
|
|
125783
|
+
errorEnvVarRequired: "请输入环境变量名。",
|
|
125784
|
+
errorEnvVarFormat: "只能使用字母、数字和下划线,且不能以数字开头。",
|
|
125785
|
+
errorHostsRequired: "请至少添加一个主机。",
|
|
125786
|
+
errorValueRequired: "请输入值。",
|
|
125787
|
+
errorValueTooShort: "值至少需要 {min} 个字符。",
|
|
125788
|
+
errorValueMasked: "这看起来是打码后的值,请粘贴真实密钥。",
|
|
125789
|
+
errorCredentialRequired: "请选择一个凭据。",
|
|
125790
|
+
errorFieldRequired: "请选择凭据字段。",
|
|
125791
|
+
created: "虚拟机密钥已创建",
|
|
125792
|
+
updated: "虚拟机密钥已更新",
|
|
125793
|
+
deleted: "虚拟机密钥已删除",
|
|
125794
|
+
saveFailed: "无法保存密钥,请重试。",
|
|
125795
|
+
forbiddenWrite: "您没有权限修改虚拟机密钥。",
|
|
125796
|
+
forbiddenDelete: "您没有权限删除虚拟机密钥。",
|
|
125797
|
+
deleteTitle: "删除虚拟机密钥",
|
|
125798
|
+
deleteConfirm: "确定删除 {envVar} 吗?它也会从所有使用它的智能体中移除。",
|
|
125799
|
+
deleteFailed: "无法删除密钥,请重试。",
|
|
125800
|
+
"delete": "删除"
|
|
125801
|
+
};
|
|
125802
|
+
var virtualMachineNetworkSection = {
|
|
125803
|
+
title: "网络访问",
|
|
125804
|
+
description: "决定此智能体的虚拟机可以访问哪些地址,以及可以使用哪些凭据。",
|
|
125805
|
+
billingNotice: "虚拟机使用时长按聊天用户的积分计费:默认每 {minutes} 分钟 ${usd},按秒计算。您所在组织的费率可能不同。",
|
|
125806
|
+
egressLabel: "出站配置",
|
|
125807
|
+
egressHelp: "虚拟机可获得的网络访问范围。",
|
|
125808
|
+
egressNoneLabel: "无网络",
|
|
125809
|
+
egressNoneDescription: "虚拟机无法访问任何地址。",
|
|
125810
|
+
egressRegistriesLabel: "软件包仓库",
|
|
125811
|
+
egressRegistriesDescription: "仅限 PyPI、npm、apt 和 apk,用于安装软件包。",
|
|
125812
|
+
egressPublicLabel: "公共互联网",
|
|
125813
|
+
egressPublicDescription: "任何公共主机。私有网络、localhost 和云元数据仍被阻止。",
|
|
125814
|
+
egressCustomLabel: "自定义允许列表",
|
|
125815
|
+
egressCustomDescription: "仅限下方所选网络策略中的主机。",
|
|
125816
|
+
policyLabel: "网络策略",
|
|
125817
|
+
policiesForbidden: "您没有权限查看网络策略,因此无法在此处配置该选项。",
|
|
125818
|
+
noPolicies: "还没有网络策略",
|
|
125819
|
+
policyPlaceholder: "选择一个策略",
|
|
125820
|
+
createPolicy: "创建策略",
|
|
125821
|
+
editPolicy: "编辑策略",
|
|
125822
|
+
managePolicies: "管理策略",
|
|
125823
|
+
manageSecrets: "管理密钥",
|
|
125824
|
+
policyRequired: "“自定义”配置需要一个网络策略。",
|
|
125825
|
+
policyHosts: "此策略允许的主机:",
|
|
125826
|
+
secretsLabel: "密钥",
|
|
125827
|
+
secretsHelp: "虚拟机可以使用但永远无法读取的密钥。每个智能体最多 {max} 个。",
|
|
125828
|
+
noSecrets: "您的组织还没有虚拟机密钥。请使用“管理密钥”创建一个。",
|
|
125829
|
+
secretsCapReached: "此智能体已达到 {max} 个密钥的上限。",
|
|
125830
|
+
uncoveredTitle: "部分密钥会发送到此策略不允许的主机:",
|
|
125831
|
+
uncoveredItem: "{envVar} 需要 {hosts},但 {policy} 不允许。",
|
|
125832
|
+
addHostsAndSave: "将主机添加到 {policy} 并保存",
|
|
125833
|
+
saved: "网络设置已保存",
|
|
125834
|
+
saveFailed: "无法保存网络设置,请重试。",
|
|
125835
|
+
forbiddenSave: "您没有权限修改这些设置。",
|
|
125836
|
+
policyHostsAdded: "主机已添加到 {policy}",
|
|
125837
|
+
policyUpdateFailed: "无法更新策略,因此设置未保存。",
|
|
125838
|
+
policyUpdateForbidden: "您没有权限修改网络策略,因此设置未保存。",
|
|
125839
|
+
discard: "放弃更改",
|
|
125840
|
+
save: "保存更改",
|
|
125841
|
+
narrowTitle: "解除密钥绑定?",
|
|
125842
|
+
narrowDescription: "{profile} 不允许虚拟机访问这些密钥所需的主机,因此保存后将从此智能体解除 {count, plural, one {# 个密钥} other {# 个密钥}} 的绑定。",
|
|
125843
|
+
cancel: "取消",
|
|
125844
|
+
narrowConfirm: "解除绑定并保存",
|
|
125845
|
+
manageTitle: "虚拟机设置",
|
|
125846
|
+
manageDescription: "网络策略和虚拟机密钥由您组织中的所有智能体共享。"
|
|
125847
|
+
};
|
|
125141
125848
|
var zh = {
|
|
125142
125849
|
accessTabAddAccess: accessTabAddAccess,
|
|
125143
125850
|
accessTabLabels: accessTabLabels,
|
|
@@ -125423,7 +126130,12 @@ var zh = {
|
|
|
125423
126130
|
analyticsCostTabs: analyticsCostTabs,
|
|
125424
126131
|
analyticsLlmUsage: analyticsLlmUsage,
|
|
125425
126132
|
analyticsTraces: analyticsTraces,
|
|
125426
|
-
profileLlmUsage: profileLlmUsage
|
|
126133
|
+
profileLlmUsage: profileLlmUsage,
|
|
126134
|
+
virtualMachineHostInput: virtualMachineHostInput,
|
|
126135
|
+
virtualMachineAdminTab: virtualMachineAdminTab,
|
|
126136
|
+
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies,
|
|
126137
|
+
virtualMachineSecrets: virtualMachineSecrets,
|
|
126138
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection
|
|
125427
126139
|
};
|
|
125428
126140
|
|
|
125429
126141
|
/**
|
|
@@ -232828,6 +233540,684 @@ function MemoryAdminTab({ tenantKey, username }) {
|
|
|
232828
233540
|
return (jsxs(Tabs, { defaultValue: "global-memories", "aria-label": t('memoryAdminTab.tabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('memoryAdminTab.tabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [jsx(TabsTrigger, { "data-testid": "memory-admin-sub-tab-global", value: "global-memories", children: t('memoryAdminTab.tabGlobalMemories') }), jsx(TabsTrigger, { "data-testid": "memory-admin-sub-tab-agent", value: "agent-memories", children: t('memoryAdminTab.tabAgentMemories') })] }), jsx(TabsContent, { className: "mt-4", value: "global-memories", children: jsx(GlobalMemoriesSection, { tenantKey: tenantKey, username: username }) }), jsx(TabsContent, { className: "mt-4", value: "agent-memories", children: jsx(AgentMemoriesSection, { tenantKey: tenantKey, username: username }) })] }));
|
|
232829
233541
|
}
|
|
232830
233542
|
|
|
233543
|
+
const ISSUE_KEYS = {
|
|
233544
|
+
format: 'virtualMachineHostInput.errorFormat',
|
|
233545
|
+
port: 'virtualMachineHostInput.errorPort',
|
|
233546
|
+
rejected_host: 'virtualMachineHostInput.errorRejectedHost',
|
|
233547
|
+
ip_not_allowed: 'virtualMachineHostInput.errorIpNotAllowed',
|
|
233548
|
+
};
|
|
233549
|
+
/**
|
|
233550
|
+
* A chip (tag) input for `host:port` allowlists. Entries are added with Enter,
|
|
233551
|
+
* comma or space, or by pasting a list; each is checked client-side
|
|
233552
|
+
* (`validateHostPort`) before it becomes a chip, and invalid ones stay in the
|
|
233553
|
+
* box with the reason announced through a polite live region. Backspace on an
|
|
233554
|
+
* empty box removes the last chip; every chip has a labelled remove button so
|
|
233555
|
+
* the whole control works from the keyboard.
|
|
233556
|
+
*/
|
|
233557
|
+
function HostPortChipInput({ id, value, onChange, allowIpAddresses = false, maxEntries, disabled = false, placeholder, describedBy, error, listLabel, hint, testId, }) {
|
|
233558
|
+
var _a;
|
|
233559
|
+
const t = useT();
|
|
233560
|
+
const generatedId = useId$2();
|
|
233561
|
+
const hintId = `${generatedId}-hint`;
|
|
233562
|
+
const errorId = `${generatedId}-error`;
|
|
233563
|
+
const [draft, setDraft] = useState('');
|
|
233564
|
+
const [localError, setLocalError] = useState(null);
|
|
233565
|
+
const message = (_a = localError !== null && localError !== void 0 ? localError : error) !== null && _a !== void 0 ? _a : null;
|
|
233566
|
+
/**
|
|
233567
|
+
* Turn the typed / pasted text into chips. Valid entries are appended;
|
|
233568
|
+
* whatever failed stays in the box, with the first problem explained.
|
|
233569
|
+
*/
|
|
233570
|
+
const commit = (text) => {
|
|
233571
|
+
const entries = splitHostPortInput(text);
|
|
233572
|
+
if (entries.length === 0) {
|
|
233573
|
+
setDraft('');
|
|
233574
|
+
return;
|
|
233575
|
+
}
|
|
233576
|
+
const next = [...value];
|
|
233577
|
+
const leftover = [];
|
|
233578
|
+
let problem = null;
|
|
233579
|
+
for (const entry of entries) {
|
|
233580
|
+
if (next.includes(entry)) {
|
|
233581
|
+
problem !== null && problem !== void 0 ? problem : (problem = t('virtualMachineHostInput.errorDuplicate', { entry }));
|
|
233582
|
+
continue;
|
|
233583
|
+
}
|
|
233584
|
+
const issue = validateHostPort(entry, { allowIpAddresses });
|
|
233585
|
+
if (issue) {
|
|
233586
|
+
problem !== null && problem !== void 0 ? problem : (problem = t(ISSUE_KEYS[issue], { entry }));
|
|
233587
|
+
leftover.push(entry);
|
|
233588
|
+
continue;
|
|
233589
|
+
}
|
|
233590
|
+
if (maxEntries !== undefined && next.length >= maxEntries) {
|
|
233591
|
+
problem !== null && problem !== void 0 ? problem : (problem = t('virtualMachineHostInput.errorMax', { max: maxEntries }));
|
|
233592
|
+
leftover.push(entry);
|
|
233593
|
+
continue;
|
|
233594
|
+
}
|
|
233595
|
+
next.push(entry);
|
|
233596
|
+
}
|
|
233597
|
+
if (next.length !== value.length)
|
|
233598
|
+
onChange(next);
|
|
233599
|
+
setDraft(leftover.join(' '));
|
|
233600
|
+
setLocalError(problem);
|
|
233601
|
+
};
|
|
233602
|
+
const remove = (host) => {
|
|
233603
|
+
onChange(value.filter((entry) => entry !== host));
|
|
233604
|
+
};
|
|
233605
|
+
const handleKeyDown = (event) => {
|
|
233606
|
+
if (event.key === 'Enter' || event.key === ',' || event.key === ' ') {
|
|
233607
|
+
event.preventDefault();
|
|
233608
|
+
commit(draft);
|
|
233609
|
+
}
|
|
233610
|
+
else if (event.key === 'Backspace' && draft === '' && value.length > 0) {
|
|
233611
|
+
event.preventDefault();
|
|
233612
|
+
remove(value[value.length - 1]);
|
|
233613
|
+
}
|
|
233614
|
+
else if (event.key === 'Escape' && (draft !== '' || localError)) {
|
|
233615
|
+
event.preventDefault();
|
|
233616
|
+
setDraft('');
|
|
233617
|
+
setLocalError(null);
|
|
233618
|
+
}
|
|
233619
|
+
};
|
|
233620
|
+
const handlePaste = (event) => {
|
|
233621
|
+
const pasted = event.clipboardData.getData('text');
|
|
233622
|
+
if (!pasted)
|
|
233623
|
+
return;
|
|
233624
|
+
event.preventDefault();
|
|
233625
|
+
commit(`${draft} ${pasted}`);
|
|
233626
|
+
};
|
|
233627
|
+
return (jsxs("div", { className: "space-y-2", "data-testid": testId, children: [value.length > 0 && (jsx("ul", { role: "list", "aria-label": listLabel !== null && listLabel !== void 0 ? listLabel : t('virtualMachineHostInput.listLabel'), className: "flex flex-wrap gap-2", children: value.map((host) => (jsxs("li", { className: "inline-flex items-center gap-1 rounded-md border border-gray-200 bg-gray-50 py-0.5 pr-1 pl-2 font-mono text-xs text-gray-700", children: [jsx("span", { children: host }), !disabled && (jsx("button", { type: "button", onClick: () => remove(host), "aria-label": t('virtualMachineHostInput.removeHost', { host }), className: "cursor-pointer rounded p-0.5 text-gray-400 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500", children: jsx(X$2, { className: "h-3 w-3", "aria-hidden": "true" }) }))] }, host))) })), jsx(Input, { id: id, type: "text", value: draft, disabled: disabled, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('virtualMachineHostInput.placeholder'), autoComplete: "off", autoCapitalize: "off", spellCheck: false, onChange: (event) => {
|
|
233628
|
+
setDraft(event.target.value);
|
|
233629
|
+
if (localError)
|
|
233630
|
+
setLocalError(null);
|
|
233631
|
+
}, onKeyDown: handleKeyDown, onPaste: handlePaste, onBlur: () => {
|
|
233632
|
+
if (draft.trim())
|
|
233633
|
+
commit(draft);
|
|
233634
|
+
}, "aria-invalid": message ? true : undefined, "aria-describedby": [describedBy, hintId, errorId].filter(Boolean).join(' ') }), jsx("p", { id: hintId, className: "text-xs text-gray-500", children: hint !== null && hint !== void 0 ? hint : t('virtualMachineHostInput.hint') }), jsx("p", { id: errorId, "aria-live": "polite", className: cn(message ? 'text-xs text-red-600' : 'sr-only'), children: message })] }));
|
|
233635
|
+
}
|
|
233636
|
+
|
|
233637
|
+
const NAME_MAX_LENGTH$1 = 255;
|
|
233638
|
+
/**
|
|
233639
|
+
* Create / edit form for a virtual-machine network policy: a name (unique in
|
|
233640
|
+
* the org), 1–100 `host:port` entries and an optional description. Backend
|
|
233641
|
+
* 400s land next to the matching field or, for a plain-string `error`, as a
|
|
233642
|
+
* form-level message. On edit, only the fields that changed are sent
|
|
233643
|
+
* (`allowed_hosts` always replaces the whole list), and removing a host warns
|
|
233644
|
+
* that a bound secret which needs it would stop working — the backend does
|
|
233645
|
+
* not block that edit.
|
|
233646
|
+
*/
|
|
233647
|
+
function NetworkPolicyDialog({ open, onOpenChange, tenantKey, policy = null, onSaved, }) {
|
|
233648
|
+
const t = useT();
|
|
233649
|
+
const baseId = useId$2();
|
|
233650
|
+
const nameId = `${baseId}-name`;
|
|
233651
|
+
const hostsId = `${baseId}-hosts`;
|
|
233652
|
+
const descriptionId = `${baseId}-description`;
|
|
233653
|
+
const [createPolicy, { isLoading: isCreating }] = useCreateVirtualMachineNetworkPolicyMutation();
|
|
233654
|
+
const [updatePolicy, { isLoading: isUpdating }] = useUpdateVirtualMachineNetworkPolicyMutation();
|
|
233655
|
+
const isSaving = isCreating || isUpdating;
|
|
233656
|
+
const [name, setName] = useState('');
|
|
233657
|
+
const [hosts, setHosts] = useState([]);
|
|
233658
|
+
const [description, setDescription] = useState('');
|
|
233659
|
+
const [fieldErrors, setFieldErrors] = useState({});
|
|
233660
|
+
const [formError, setFormError] = useState(null);
|
|
233661
|
+
// Start from the policy being edited (or blank) every time the dialog opens.
|
|
233662
|
+
useEffect(() => {
|
|
233663
|
+
var _a, _b, _c;
|
|
233664
|
+
if (!open)
|
|
233665
|
+
return;
|
|
233666
|
+
setName((_a = policy === null || policy === void 0 ? void 0 : policy.name) !== null && _a !== void 0 ? _a : '');
|
|
233667
|
+
setHosts((_b = policy === null || policy === void 0 ? void 0 : policy.allowed_hosts) !== null && _b !== void 0 ? _b : []);
|
|
233668
|
+
setDescription((_c = policy === null || policy === void 0 ? void 0 : policy.description) !== null && _c !== void 0 ? _c : '');
|
|
233669
|
+
setFieldErrors({});
|
|
233670
|
+
setFormError(null);
|
|
233671
|
+
}, [open, policy]);
|
|
233672
|
+
const isEdit = policy !== null;
|
|
233673
|
+
const removedHosts = isEdit ? policy.allowed_hosts.filter((host) => !hosts.includes(host)) : [];
|
|
233674
|
+
const handleSubmit = async (event) => {
|
|
233675
|
+
var _a;
|
|
233676
|
+
event.preventDefault();
|
|
233677
|
+
const trimmedName = name.trim();
|
|
233678
|
+
const trimmedDescription = description.trim();
|
|
233679
|
+
const clientErrors = {};
|
|
233680
|
+
if (!trimmedName)
|
|
233681
|
+
clientErrors.name = t('virtualMachineNetworkPolicies.errorNameRequired');
|
|
233682
|
+
if (hosts.length === 0) {
|
|
233683
|
+
clientErrors.allowed_hosts = t('virtualMachineNetworkPolicies.errorHostsRequired');
|
|
233684
|
+
}
|
|
233685
|
+
setFieldErrors(clientErrors);
|
|
233686
|
+
setFormError(null);
|
|
233687
|
+
if (Object.keys(clientErrors).length > 0)
|
|
233688
|
+
return;
|
|
233689
|
+
try {
|
|
233690
|
+
let saved;
|
|
233691
|
+
if (isEdit) {
|
|
233692
|
+
const body = { id: policy.id };
|
|
233693
|
+
if (trimmedName !== policy.name)
|
|
233694
|
+
body.name = trimmedName;
|
|
233695
|
+
if (hosts.length !== policy.allowed_hosts.length ||
|
|
233696
|
+
hosts.some((host, index) => host !== policy.allowed_hosts[index])) {
|
|
233697
|
+
body.allowed_hosts = hosts;
|
|
233698
|
+
}
|
|
233699
|
+
if (trimmedDescription !== ((_a = policy.description) !== null && _a !== void 0 ? _a : ''))
|
|
233700
|
+
body.description = trimmedDescription;
|
|
233701
|
+
if (Object.keys(body).length === 1) {
|
|
233702
|
+
onOpenChange(false);
|
|
233703
|
+
return;
|
|
233704
|
+
}
|
|
233705
|
+
saved = await updatePolicy({ org: tenantKey, body }).unwrap();
|
|
233706
|
+
toast.success(t('virtualMachineNetworkPolicies.updated'));
|
|
233707
|
+
}
|
|
233708
|
+
else {
|
|
233709
|
+
saved = await createPolicy({
|
|
233710
|
+
org: tenantKey,
|
|
233711
|
+
body: { name: trimmedName, allowed_hosts: hosts, description: trimmedDescription },
|
|
233712
|
+
}).unwrap();
|
|
233713
|
+
toast.success(t('virtualMachineNetworkPolicies.created'));
|
|
233714
|
+
}
|
|
233715
|
+
onSaved === null || onSaved === void 0 ? void 0 : onSaved(saved);
|
|
233716
|
+
onOpenChange(false);
|
|
233717
|
+
}
|
|
233718
|
+
catch (error) {
|
|
233719
|
+
const parsed = getVirtualMachineApiError(error);
|
|
233720
|
+
if (parsed.status === 403) {
|
|
233721
|
+
setFormError(t('virtualMachineNetworkPolicies.forbiddenWrite'));
|
|
233722
|
+
return;
|
|
233723
|
+
}
|
|
233724
|
+
const nextErrors = {};
|
|
233725
|
+
let unmatched = [];
|
|
233726
|
+
for (const [field, messages] of Object.entries(parsed.fieldErrors)) {
|
|
233727
|
+
if (field === 'name' || field === 'allowed_hosts' || field === 'description') {
|
|
233728
|
+
nextErrors[field] = messages.join(' ');
|
|
233729
|
+
}
|
|
233730
|
+
else {
|
|
233731
|
+
unmatched = unmatched.concat(messages);
|
|
233732
|
+
}
|
|
233733
|
+
}
|
|
233734
|
+
setFieldErrors(nextErrors);
|
|
233735
|
+
const message = [parsed.message, ...unmatched].filter(Boolean).join(' ');
|
|
233736
|
+
if (message) {
|
|
233737
|
+
setFormError(message);
|
|
233738
|
+
}
|
|
233739
|
+
else if (Object.keys(nextErrors).length === 0) {
|
|
233740
|
+
setFormError(t('virtualMachineNetworkPolicies.saveFailed'));
|
|
233741
|
+
}
|
|
233742
|
+
}
|
|
233743
|
+
};
|
|
233744
|
+
return (jsx(Dialog, { open: open, onOpenChange: (next) => !isSaving && onOpenChange(next), children: jsxs(DialogContent, { className: "max-h-[90vh] w-full max-w-lg overflow-y-auto", "data-testid": "network-policy-dialog", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: isEdit
|
|
233745
|
+
? t('virtualMachineNetworkPolicies.editTitle')
|
|
233746
|
+
: t('virtualMachineNetworkPolicies.createTitle') }), jsx(DialogDescription, { children: t('virtualMachineNetworkPolicies.dialogDescription') })] }), jsxs("form", { onSubmit: handleSubmit, noValidate: true, className: "mt-1 grid gap-5", children: [formError && (jsx("div", { role: "alert", "data-testid": "network-policy-form-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: formError })), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: nameId, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineNetworkPolicies.fieldName') }), jsx(Input, { id: nameId, value: name, maxLength: NAME_MAX_LENGTH$1, onChange: (event) => setName(event.target.value), placeholder: t('virtualMachineNetworkPolicies.namePlaceholder'), "aria-invalid": fieldErrors.name ? true : undefined, "aria-describedby": fieldErrors.name ? `${nameId}-error` : undefined, required: true }), fieldErrors.name && (jsx("p", { id: `${nameId}-error`, role: "alert", className: "text-xs text-red-600", children: fieldErrors.name }))] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: hostsId, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineNetworkPolicies.fieldHosts') }), jsx(HostPortChipInput, { id: hostsId, value: hosts, onChange: setHosts, allowIpAddresses: true, maxEntries: VIRTUAL_MACHINE_MAX_POLICY_HOSTS, hint: t('virtualMachineNetworkPolicies.hostsHint', {
|
|
233747
|
+
max: VIRTUAL_MACHINE_MAX_POLICY_HOSTS,
|
|
233748
|
+
}), error: fieldErrors.allowed_hosts, testId: "network-policy-hosts" }), removedHosts.length > 0 && (jsxs("div", { role: "status", "data-testid": "network-policy-removed-hosts-warning", className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0", "aria-hidden": "true" }), jsx("span", { children: t('virtualMachineNetworkPolicies.removedHostsWarning', {
|
|
233749
|
+
hosts: removedHosts.join(', '),
|
|
233750
|
+
}) })] }))] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: descriptionId, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineNetworkPolicies.fieldDescription') }), jsx(Textarea, { id: descriptionId, value: description, rows: 2, onChange: (event) => setDescription(event.target.value), placeholder: t('virtualMachineNetworkPolicies.descriptionPlaceholder'), "aria-invalid": fieldErrors.description ? true : undefined, "aria-describedby": fieldErrors.description ? `${descriptionId}-error` : undefined }), fieldErrors.description && (jsx("p", { id: `${descriptionId}-error`, role: "alert", className: "text-xs text-red-600", children: fieldErrors.description }))] }), jsxs(DialogFooter, { children: [jsx(Button$1, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSaving, children: t('virtualMachineNetworkPolicies.cancel') }), jsxs(Button$1, { type: "submit", disabled: isSaving, "data-testid": "network-policy-save", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isSaving && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), isEdit
|
|
233751
|
+
? t('virtualMachineNetworkPolicies.saveChanges')
|
|
233752
|
+
: t('virtualMachineNetworkPolicies.createPolicy')] })] })] })] }) }));
|
|
233753
|
+
}
|
|
233754
|
+
|
|
233755
|
+
const HOST_PREVIEW_COUNT$1 = 3;
|
|
233756
|
+
/** Placeholder swapped for the inline record in the delete sentence. */
|
|
233757
|
+
const RECORD_SLOT$1 = '__record__';
|
|
233758
|
+
const MENTOR_LOOKUP_LIMIT = 100;
|
|
233759
|
+
/** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
|
|
233760
|
+
function relativeTime$1(value) {
|
|
233761
|
+
const date = new Date(value);
|
|
233762
|
+
return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
|
|
233763
|
+
}
|
|
233764
|
+
/**
|
|
233765
|
+
* Network policies table with create / edit / delete. Deleting a policy an
|
|
233766
|
+
* agent still uses is refused by the backend; the refusal names the agents,
|
|
233767
|
+
* which are listed (by name where the tenant agent list resolves them, else
|
|
233768
|
+
* by id) so the admin knows what to move off it first.
|
|
233769
|
+
*/
|
|
233770
|
+
function NetworkPoliciesSection({ tenantKey, username, policies, isLoading, isError, }) {
|
|
233771
|
+
var _a;
|
|
233772
|
+
const t = useT();
|
|
233773
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
233774
|
+
const [editingPolicy, setEditingPolicy] = useState(null);
|
|
233775
|
+
const [deletingPolicy, setDeletingPolicy] = useState(null);
|
|
233776
|
+
const [deleteFailure, setDeleteFailure] = useState(null);
|
|
233777
|
+
const [deletePolicy, { isLoading: isDeleting }] = useDeleteVirtualMachineNetworkPolicyMutation();
|
|
233778
|
+
const boundMentorIds = (_a = deleteFailure === null || deleteFailure === void 0 ? void 0 : deleteFailure.boundMentorIds) !== null && _a !== void 0 ? _a : [];
|
|
233779
|
+
// Best-effort names for the agents named in a refused delete.
|
|
233780
|
+
const { data: mentorsData } = useGetMentorsQuery({ org: tenantKey, username: username !== null && username !== void 0 ? username : '', limit: MENTOR_LOOKUP_LIMIT }, { skip: !username || boundMentorIds.length === 0 });
|
|
233781
|
+
const mentorNames = useMemo(() => {
|
|
233782
|
+
const names = new Map();
|
|
233783
|
+
const results = mentorsData === null || mentorsData === void 0 ? void 0 : mentorsData.results;
|
|
233784
|
+
for (const mentor of results !== null && results !== void 0 ? results : []) {
|
|
233785
|
+
if (mentor.unique_id && mentor.name)
|
|
233786
|
+
names.set(mentor.unique_id, mentor.name);
|
|
233787
|
+
}
|
|
233788
|
+
return names;
|
|
233789
|
+
}, [mentorsData]);
|
|
233790
|
+
// The translated sentence with the policy name rendered inline, whatever the word order.
|
|
233791
|
+
const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineNetworkPolicies.deleteConfirm', {
|
|
233792
|
+
name: RECORD_SLOT$1,
|
|
233793
|
+
}).split(RECORD_SLOT$1);
|
|
233794
|
+
const openCreate = () => {
|
|
233795
|
+
setEditingPolicy(null);
|
|
233796
|
+
setDialogOpen(true);
|
|
233797
|
+
};
|
|
233798
|
+
const openEdit = (policy) => {
|
|
233799
|
+
setEditingPolicy(policy);
|
|
233800
|
+
setDialogOpen(true);
|
|
233801
|
+
};
|
|
233802
|
+
const openDelete = (policy) => {
|
|
233803
|
+
setDeleteFailure(null);
|
|
233804
|
+
setDeletingPolicy(policy);
|
|
233805
|
+
};
|
|
233806
|
+
const handleDelete = async (policy) => {
|
|
233807
|
+
var _a;
|
|
233808
|
+
try {
|
|
233809
|
+
await deletePolicy({ org: tenantKey, id: policy.id }).unwrap();
|
|
233810
|
+
toast.success(t('virtualMachineNetworkPolicies.deleted'));
|
|
233811
|
+
setDeletingPolicy(null);
|
|
233812
|
+
}
|
|
233813
|
+
catch (error) {
|
|
233814
|
+
const parsed = getVirtualMachineApiError(error);
|
|
233815
|
+
const boundIds = extractBoundMentorIds(parsed.message);
|
|
233816
|
+
setDeleteFailure({
|
|
233817
|
+
message: parsed.status === 403
|
|
233818
|
+
? t('virtualMachineNetworkPolicies.forbiddenDelete')
|
|
233819
|
+
: boundIds.length > 0
|
|
233820
|
+
? t('virtualMachineNetworkPolicies.deleteBlockedInUse')
|
|
233821
|
+
: ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineNetworkPolicies.deleteFailed')),
|
|
233822
|
+
boundMentorIds: boundIds,
|
|
233823
|
+
});
|
|
233824
|
+
}
|
|
233825
|
+
};
|
|
233826
|
+
return (jsxs("div", { "data-testid": "vm-network-policies-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button$1, { size: "sm", onClick: openCreate, "data-testid": "vm-network-policy-new", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('virtualMachineNetworkPolicies.newPolicy')] }) }), isLoading ? (jsx("div", { className: "flex h-40 items-center justify-center", children: jsx(Spinner, {}) })) : isError ? (jsx("div", { role: "alert", className: "rounded-lg border border-red-200 bg-red-50 px-6 py-6 text-center text-sm text-red-700", children: t('virtualMachineNetworkPolicies.loadFailed') })) : (jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "border-b border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colName') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colHosts') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colDescription') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colUpdated') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colActions') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [policies.map((policy) => {
|
|
233827
|
+
const preview = policy.allowed_hosts.slice(0, HOST_PREVIEW_COUNT$1);
|
|
233828
|
+
const remaining = policy.allowed_hosts.length - preview.length;
|
|
233829
|
+
return (jsxs("tr", { "data-testid": `vm-network-policy-row-${policy.id}`, children: [jsx("td", { className: "px-6 py-4 font-medium text-gray-900 dark:text-gray-100", children: policy.name }), jsx("td", { className: "px-6 py-4", children: jsxs("ul", { role: "list", "aria-label": t('virtualMachineNetworkPolicies.hostsListAriaLabel', {
|
|
233830
|
+
name: policy.name,
|
|
233831
|
+
}), className: "flex flex-wrap gap-1", children: [preview.map((host) => (jsx("li", { className: "rounded-md border border-gray-200 bg-gray-50 px-2 py-0.5 font-mono text-xs text-gray-700", children: host }, host))), remaining > 0 && (jsx("li", { className: "px-1 py-0.5 text-xs text-gray-500", children: t('virtualMachineNetworkPolicies.moreHosts', { count: remaining }) }))] }) }), jsx("td", { className: "max-w-0 px-6 py-4 text-gray-600 dark:text-gray-300", children: jsx("div", { className: "truncate", children: policy.description || '—' }) }), jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300", children: relativeTime$1(policy.updated_at) }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex justify-end gap-1", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(policy), "aria-label": t('virtualMachineNetworkPolicies.editAriaLabel', {
|
|
233832
|
+
name: policy.name,
|
|
233833
|
+
}), "data-testid": `vm-network-policy-edit-${policy.id}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openDelete(policy), "aria-label": t('virtualMachineNetworkPolicies.deleteAriaLabel', {
|
|
233834
|
+
name: policy.name,
|
|
233835
|
+
}), "data-testid": `vm-network-policy-delete-${policy.id}`, className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) })] }) })] }, policy.id));
|
|
233836
|
+
}), policies.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.empty') }) }))] })] }) })), jsx(NetworkPolicyDialog, { open: dialogOpen, onOpenChange: setDialogOpen, tenantKey: tenantKey, policy: editingPolicy }), jsx(Dialog, { open: deletingPolicy !== null, onOpenChange: (open) => {
|
|
233837
|
+
if (!open && !isDeleting) {
|
|
233838
|
+
setDeletingPolicy(null);
|
|
233839
|
+
setDeleteFailure(null);
|
|
233840
|
+
}
|
|
233841
|
+
}, children: jsxs(DialogContent, { className: "max-w-md", "data-testid": "vm-network-policy-delete-dialog", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('virtualMachineNetworkPolicies.deleteTitle') }) }), jsxs(DialogDescription, { className: "text-gray-600", children: [deleteConfirmBefore, jsx("span", { className: "font-medium text-gray-900", children: deletingPolicy === null || deletingPolicy === void 0 ? void 0 : deletingPolicy.name }), deleteConfirmAfter] }), deleteFailure && (jsxs("div", { role: "alert", "data-testid": "vm-network-policy-delete-error", className: "space-y-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: [jsx("p", { children: deleteFailure.message }), boundMentorIds.length > 0 && (jsx("ul", { role: "list", className: "list-disc space-y-0.5 pl-5", children: boundMentorIds.map((id) => {
|
|
233842
|
+
var _a;
|
|
233843
|
+
return (jsx("li", { children: (_a = mentorNames.get(id)) !== null && _a !== void 0 ? _a : id }, id));
|
|
233844
|
+
}) }))] })), jsxs(DialogFooter, { className: "pt-2", children: [jsx(Button$1, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
|
|
233845
|
+
setDeletingPolicy(null);
|
|
233846
|
+
setDeleteFailure(null);
|
|
233847
|
+
}, children: t('virtualMachineNetworkPolicies.cancel') }), boundMentorIds.length === 0 && deletingPolicy && (jsxs(Button$1, { type: "button", onClick: () => void handleDelete(deletingPolicy), disabled: isDeleting, "data-testid": "vm-network-policy-delete-confirm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isDeleting && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), t('virtualMachineNetworkPolicies.delete')] }))] })] }) })] }));
|
|
233848
|
+
}
|
|
233849
|
+
|
|
233850
|
+
function fieldKeys(value) {
|
|
233851
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
233852
|
+
return Object.keys(value);
|
|
233853
|
+
}
|
|
233854
|
+
// Some serialisers hand the masked value back as a JSON string.
|
|
233855
|
+
if (typeof value === 'string') {
|
|
233856
|
+
try {
|
|
233857
|
+
return fieldKeys(JSON.parse(value));
|
|
233858
|
+
}
|
|
233859
|
+
catch (_a) {
|
|
233860
|
+
return [];
|
|
233861
|
+
}
|
|
233862
|
+
}
|
|
233863
|
+
return [];
|
|
233864
|
+
}
|
|
233865
|
+
/**
|
|
233866
|
+
* Normalise the integration-credential list response into picker options.
|
|
233867
|
+
* Tolerates a bare array or a `{ results }` / `{ data }` wrapper, and drops
|
|
233868
|
+
* rows without a numeric id.
|
|
233869
|
+
*/
|
|
233870
|
+
function toIntegrationCredentialOptions(data) {
|
|
233871
|
+
var _a, _b;
|
|
233872
|
+
const rows = Array.isArray(data)
|
|
233873
|
+
? data
|
|
233874
|
+
: data && typeof data === 'object'
|
|
233875
|
+
? ((_b = (_a = data.results) !== null && _a !== void 0 ? _a : data.data) !== null && _b !== void 0 ? _b : [])
|
|
233876
|
+
: [];
|
|
233877
|
+
const options = [];
|
|
233878
|
+
for (const row of rows) {
|
|
233879
|
+
if (!row || typeof row !== 'object')
|
|
233880
|
+
continue;
|
|
233881
|
+
const { id, name, value } = row;
|
|
233882
|
+
if (typeof id !== 'number')
|
|
233883
|
+
continue;
|
|
233884
|
+
options.push({
|
|
233885
|
+
id,
|
|
233886
|
+
name: typeof name === 'string' && name ? name : String(id),
|
|
233887
|
+
fields: fieldKeys(value),
|
|
233888
|
+
});
|
|
233889
|
+
}
|
|
233890
|
+
return options.sort((a, b) => a.name.localeCompare(b.name));
|
|
233891
|
+
}
|
|
233892
|
+
|
|
233893
|
+
/**
|
|
233894
|
+
* Radio items in the virtual-machine forms use the same blue as the sandbox
|
|
233895
|
+
* switches (`data-[state=checked]:bg-blue-500`) so the selected option reads
|
|
233896
|
+
* as "on" like the toggles around it. The indicator is an inner svg, hence the
|
|
233897
|
+
* descendant variants.
|
|
233898
|
+
*/
|
|
233899
|
+
const BLUE_RADIO_ITEM_CLASS = 'mt-0.5 border-gray-300 text-blue-500 data-[state=checked]:border-blue-500 [&_svg]:fill-blue-500 [&_svg]:text-blue-500';
|
|
233900
|
+
|
|
233901
|
+
const FIELD_NAMES = [
|
|
233902
|
+
'name',
|
|
233903
|
+
'env_var',
|
|
233904
|
+
'allow_hosts',
|
|
233905
|
+
'value',
|
|
233906
|
+
'source_credential_id',
|
|
233907
|
+
'source_field',
|
|
233908
|
+
];
|
|
233909
|
+
const NAME_MAX_LENGTH = 255;
|
|
233910
|
+
const ENV_VAR_MAX_LENGTH = 128;
|
|
233911
|
+
/** Values that look masked (`sk-****`) are rejected by the backend too. */
|
|
233912
|
+
const MASKED_VALUE_PATTERN = /\*{3,}/;
|
|
233913
|
+
/**
|
|
233914
|
+
* Create / edit form for a VM secret. A secret gets its value in one of two
|
|
233915
|
+
* ways, offered as a choice: the admin pastes a key (stored, min 8
|
|
233916
|
+
* characters), or the secret points at one field of an integration
|
|
233917
|
+
* credential the org already saved and reads it at run time. No endpoint ever
|
|
233918
|
+
* returns the value, so the field is never prefilled — on edit it stays blank
|
|
233919
|
+
* to keep the current value — and `env_var` is read-only once created (delete
|
|
233920
|
+
* and recreate to rename). Backend 400s land next to the matching field or as
|
|
233921
|
+
* a form-level message.
|
|
233922
|
+
*/
|
|
233923
|
+
function VmSecretDialog({ open, onOpenChange, tenantKey, secret = null, credentials, onSaved, }) {
|
|
233924
|
+
var _a;
|
|
233925
|
+
const t = useT();
|
|
233926
|
+
const baseId = useId$2();
|
|
233927
|
+
const ids = {
|
|
233928
|
+
name: `${baseId}-name`,
|
|
233929
|
+
envVar: `${baseId}-env-var`,
|
|
233930
|
+
envVarHelp: `${baseId}-env-var-help`,
|
|
233931
|
+
hosts: `${baseId}-hosts`,
|
|
233932
|
+
source: `${baseId}-source`,
|
|
233933
|
+
sourceValue: `${baseId}-source-value`,
|
|
233934
|
+
sourceCredential: `${baseId}-source-credential`,
|
|
233935
|
+
value: `${baseId}-value`,
|
|
233936
|
+
valueHelp: `${baseId}-value-help`,
|
|
233937
|
+
credential: `${baseId}-credential`,
|
|
233938
|
+
credentialLabel: `${baseId}-credential-label`,
|
|
233939
|
+
field: `${baseId}-field`,
|
|
233940
|
+
fieldLabel: `${baseId}-field-label`,
|
|
233941
|
+
};
|
|
233942
|
+
const [createSecret, { isLoading: isCreating }] = useCreateVirtualMachineSecretMutation();
|
|
233943
|
+
const [updateSecret, { isLoading: isUpdating }] = useUpdateVirtualMachineSecretMutation();
|
|
233944
|
+
const isSaving = isCreating || isUpdating;
|
|
233945
|
+
const [name, setName] = useState('');
|
|
233946
|
+
const [envVar, setEnvVar] = useState('');
|
|
233947
|
+
const [hosts, setHosts] = useState([]);
|
|
233948
|
+
const [source, setSource] = useState('value');
|
|
233949
|
+
const [value, setValue] = useState('');
|
|
233950
|
+
const [credentialId, setCredentialId] = useState('');
|
|
233951
|
+
const [field, setField] = useState('');
|
|
233952
|
+
const [fieldErrors, setFieldErrors] = useState({});
|
|
233953
|
+
const [formError, setFormError] = useState(null);
|
|
233954
|
+
// Start from the secret being edited (or blank) every time the dialog
|
|
233955
|
+
// opens. The value is deliberately never prefilled.
|
|
233956
|
+
useEffect(() => {
|
|
233957
|
+
var _a, _b, _c, _d;
|
|
233958
|
+
if (!open)
|
|
233959
|
+
return;
|
|
233960
|
+
setName((_a = secret === null || secret === void 0 ? void 0 : secret.name) !== null && _a !== void 0 ? _a : '');
|
|
233961
|
+
setEnvVar((_b = secret === null || secret === void 0 ? void 0 : secret.env_var) !== null && _b !== void 0 ? _b : '');
|
|
233962
|
+
setHosts((_c = secret === null || secret === void 0 ? void 0 : secret.allow_hosts) !== null && _c !== void 0 ? _c : []);
|
|
233963
|
+
const linked = (secret === null || secret === void 0 ? void 0 : secret.source_credential_id) != null;
|
|
233964
|
+
setSource(linked ? 'credential' : 'value');
|
|
233965
|
+
setValue('');
|
|
233966
|
+
setCredentialId(linked ? String(secret.source_credential_id) : '');
|
|
233967
|
+
setField(linked ? ((_d = secret.source_field) !== null && _d !== void 0 ? _d : '') : '');
|
|
233968
|
+
setFieldErrors({});
|
|
233969
|
+
setFormError(null);
|
|
233970
|
+
}, [open, secret]);
|
|
233971
|
+
const isEdit = secret !== null;
|
|
233972
|
+
const selectedCredential = credentials.find((option) => String(option.id) === credentialId);
|
|
233973
|
+
const credentialFields = (_a = selectedCredential === null || selectedCredential === void 0 ? void 0 : selectedCredential.fields) !== null && _a !== void 0 ? _a : [];
|
|
233974
|
+
const handleSubmit = async (event) => {
|
|
233975
|
+
event.preventDefault();
|
|
233976
|
+
const trimmedName = name.trim();
|
|
233977
|
+
const trimmedEnvVar = envVar.trim();
|
|
233978
|
+
const clientErrors = {};
|
|
233979
|
+
if (!trimmedName)
|
|
233980
|
+
clientErrors.name = t('virtualMachineSecrets.errorNameRequired');
|
|
233981
|
+
if (!isEdit) {
|
|
233982
|
+
if (!trimmedEnvVar) {
|
|
233983
|
+
clientErrors.env_var = t('virtualMachineSecrets.errorEnvVarRequired');
|
|
233984
|
+
}
|
|
233985
|
+
else if (!VIRTUAL_MACHINE_ENV_VAR_PATTERN.test(trimmedEnvVar)) {
|
|
233986
|
+
clientErrors.env_var = t('virtualMachineSecrets.errorEnvVarFormat');
|
|
233987
|
+
}
|
|
233988
|
+
}
|
|
233989
|
+
if (hosts.length === 0)
|
|
233990
|
+
clientErrors.allow_hosts = t('virtualMachineSecrets.errorHostsRequired');
|
|
233991
|
+
if (source === 'value') {
|
|
233992
|
+
if (!isEdit && !value) {
|
|
233993
|
+
clientErrors.value = t('virtualMachineSecrets.errorValueRequired');
|
|
233994
|
+
}
|
|
233995
|
+
else if (value && value.length < VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH) {
|
|
233996
|
+
clientErrors.value = t('virtualMachineSecrets.errorValueTooShort', {
|
|
233997
|
+
min: VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH,
|
|
233998
|
+
});
|
|
233999
|
+
}
|
|
234000
|
+
else if (value && MASKED_VALUE_PATTERN.test(value)) {
|
|
234001
|
+
clientErrors.value = t('virtualMachineSecrets.errorValueMasked');
|
|
234002
|
+
}
|
|
234003
|
+
}
|
|
234004
|
+
else {
|
|
234005
|
+
if (!credentialId) {
|
|
234006
|
+
clientErrors.source_credential_id = t('virtualMachineSecrets.errorCredentialRequired');
|
|
234007
|
+
}
|
|
234008
|
+
if (!field)
|
|
234009
|
+
clientErrors.source_field = t('virtualMachineSecrets.errorFieldRequired');
|
|
234010
|
+
}
|
|
234011
|
+
setFieldErrors(clientErrors);
|
|
234012
|
+
setFormError(null);
|
|
234013
|
+
if (Object.keys(clientErrors).length > 0)
|
|
234014
|
+
return;
|
|
234015
|
+
try {
|
|
234016
|
+
let saved;
|
|
234017
|
+
if (isEdit) {
|
|
234018
|
+
const body = { env_var: secret.env_var };
|
|
234019
|
+
if (trimmedName !== secret.name)
|
|
234020
|
+
body.name = trimmedName;
|
|
234021
|
+
if (hosts.length !== secret.allow_hosts.length ||
|
|
234022
|
+
hosts.some((host, index) => host !== secret.allow_hosts[index])) {
|
|
234023
|
+
body.allow_hosts = hosts;
|
|
234024
|
+
}
|
|
234025
|
+
if (source === 'value') {
|
|
234026
|
+
// A blank value keeps the stored one; a new value replaces it (and
|
|
234027
|
+
// drops any credential link on the backend).
|
|
234028
|
+
if (value)
|
|
234029
|
+
body.value = value;
|
|
234030
|
+
}
|
|
234031
|
+
else if (Number(credentialId) !== secret.source_credential_id ||
|
|
234032
|
+
field !== secret.source_field) {
|
|
234033
|
+
body.source_credential_id = Number(credentialId);
|
|
234034
|
+
body.source_field = field;
|
|
234035
|
+
}
|
|
234036
|
+
if (Object.keys(body).length === 1) {
|
|
234037
|
+
onOpenChange(false);
|
|
234038
|
+
return;
|
|
234039
|
+
}
|
|
234040
|
+
saved = await updateSecret({ org: tenantKey, body }).unwrap();
|
|
234041
|
+
toast.success(t('virtualMachineSecrets.updated'));
|
|
234042
|
+
}
|
|
234043
|
+
else {
|
|
234044
|
+
const body = {
|
|
234045
|
+
name: trimmedName,
|
|
234046
|
+
env_var: trimmedEnvVar,
|
|
234047
|
+
allow_hosts: hosts,
|
|
234048
|
+
...(source === 'value'
|
|
234049
|
+
? { value }
|
|
234050
|
+
: { source_credential_id: Number(credentialId), source_field: field }),
|
|
234051
|
+
};
|
|
234052
|
+
saved = await createSecret({ org: tenantKey, body }).unwrap();
|
|
234053
|
+
toast.success(t('virtualMachineSecrets.created'));
|
|
234054
|
+
}
|
|
234055
|
+
onSaved === null || onSaved === void 0 ? void 0 : onSaved(saved);
|
|
234056
|
+
onOpenChange(false);
|
|
234057
|
+
}
|
|
234058
|
+
catch (error) {
|
|
234059
|
+
const parsed = getVirtualMachineApiError(error);
|
|
234060
|
+
if (parsed.status === 403) {
|
|
234061
|
+
setFormError(t('virtualMachineSecrets.forbiddenWrite'));
|
|
234062
|
+
return;
|
|
234063
|
+
}
|
|
234064
|
+
const nextErrors = {};
|
|
234065
|
+
let unmatched = [];
|
|
234066
|
+
for (const [key, messages] of Object.entries(parsed.fieldErrors)) {
|
|
234067
|
+
if (FIELD_NAMES.includes(key)) {
|
|
234068
|
+
nextErrors[key] = messages.join(' ');
|
|
234069
|
+
}
|
|
234070
|
+
else {
|
|
234071
|
+
unmatched = unmatched.concat(messages);
|
|
234072
|
+
}
|
|
234073
|
+
}
|
|
234074
|
+
setFieldErrors(nextErrors);
|
|
234075
|
+
const message = [parsed.message, ...unmatched].filter(Boolean).join(' ');
|
|
234076
|
+
if (message) {
|
|
234077
|
+
setFormError(message);
|
|
234078
|
+
}
|
|
234079
|
+
else if (Object.keys(nextErrors).length === 0) {
|
|
234080
|
+
setFormError(t('virtualMachineSecrets.saveFailed'));
|
|
234081
|
+
}
|
|
234082
|
+
}
|
|
234083
|
+
};
|
|
234084
|
+
const fieldError = (key, id) => fieldErrors[key] ? (jsx("p", { id: `${id}-error`, role: "alert", className: "text-xs text-red-600", children: fieldErrors[key] })) : null;
|
|
234085
|
+
return (jsx(Dialog, { open: open, onOpenChange: (next) => !isSaving && onOpenChange(next), children: jsxs(DialogContent, { className: "max-h-[90vh] w-full max-w-lg overflow-y-auto", "data-testid": "vm-secret-dialog", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: isEdit ? t('virtualMachineSecrets.editTitle') : t('virtualMachineSecrets.createTitle') }), jsx(DialogDescription, { children: t('virtualMachineSecrets.dialogDescription') })] }), jsxs("form", { onSubmit: handleSubmit, noValidate: true, className: "mt-1 grid gap-5", children: [formError && (jsx("div", { role: "alert", "data-testid": "vm-secret-form-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: formError })), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.name, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldName') }), jsx(Input, { id: ids.name, value: name, maxLength: NAME_MAX_LENGTH, onChange: (event) => setName(event.target.value), placeholder: t('virtualMachineSecrets.namePlaceholder'), "aria-invalid": fieldErrors.name ? true : undefined, "aria-describedby": fieldErrors.name ? `${ids.name}-error` : undefined, required: true }), fieldError('name', ids.name)] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.envVar, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldEnvVar') }), jsx(Input, { id: ids.envVar, value: envVar, maxLength: ENV_VAR_MAX_LENGTH, readOnly: isEdit, disabled: isEdit, onChange: (event) => setEnvVar(event.target.value), placeholder: t('virtualMachineSecrets.envVarPlaceholder'), autoCapitalize: "characters", autoComplete: "off", spellCheck: false, className: "font-mono", "aria-invalid": fieldErrors.env_var ? true : undefined, "aria-describedby": [ids.envVarHelp, fieldErrors.env_var ? `${ids.envVar}-error` : '']
|
|
234086
|
+
.filter(Boolean)
|
|
234087
|
+
.join(' '), required: !isEdit }), jsx("p", { id: ids.envVarHelp, className: "text-xs text-gray-500", children: isEdit
|
|
234088
|
+
? t('virtualMachineSecrets.envVarReadOnlyHelp')
|
|
234089
|
+
: t('virtualMachineSecrets.envVarHelp') }), fieldError('env_var', ids.envVar)] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.hosts, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldHosts') }), jsx(HostPortChipInput, { id: ids.hosts, value: hosts, onChange: setHosts, hint: t('virtualMachineSecrets.hostsHint'), error: fieldErrors.allow_hosts, testId: "vm-secret-hosts" })] }), jsxs("fieldset", { className: "space-y-3", children: [jsx("legend", { id: ids.source, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldSource') }), jsxs(RadioGroup, { value: source, onValueChange: (next) => setSource(next), "aria-labelledby": ids.source, className: "gap-3", children: [jsxs("div", { className: "flex items-start gap-3", children: [jsx(RadioGroupItem, { value: "value", id: ids.sourceValue, "data-testid": "vm-secret-source-value", className: BLUE_RADIO_ITEM_CLASS }), jsxs(Label$1, { htmlFor: ids.sourceValue, className: "flex flex-col gap-1 font-normal", children: [jsx("span", { className: "text-[13px] font-medium text-[#646464]", children: t('virtualMachineSecrets.sourceValue') }), jsx("span", { className: "text-xs text-gray-500", children: t('virtualMachineSecrets.sourceValueDescription') })] })] }), jsxs("div", { className: "flex items-start gap-3", children: [jsx(RadioGroupItem, { value: "credential", id: ids.sourceCredential, "data-testid": "vm-secret-source-credential", className: BLUE_RADIO_ITEM_CLASS }), jsxs(Label$1, { htmlFor: ids.sourceCredential, className: "flex flex-col gap-1 font-normal", children: [jsx("span", { className: "text-[13px] font-medium text-[#646464]", children: t('virtualMachineSecrets.sourceCredential') }), jsx("span", { className: "text-xs text-gray-500", children: t('virtualMachineSecrets.sourceCredentialDescription') })] })] })] })] }), source === 'value' ? (jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.value, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldValue') }), jsx(Input, { id: ids.value, type: "password", value: value, onChange: (event) => setValue(event.target.value), placeholder: isEdit
|
|
234090
|
+
? t('virtualMachineSecrets.valueKeepPlaceholder')
|
|
234091
|
+
: t('virtualMachineSecrets.valuePlaceholder'), autoComplete: "new-password", spellCheck: false, "aria-invalid": fieldErrors.value ? true : undefined, "aria-describedby": [ids.valueHelp, fieldErrors.value ? `${ids.value}-error` : '']
|
|
234092
|
+
.filter(Boolean)
|
|
234093
|
+
.join(' '), required: !isEdit, "data-testid": "vm-secret-value" }), jsx("p", { id: ids.valueHelp, className: "text-xs text-gray-500", children: isEdit
|
|
234094
|
+
? t('virtualMachineSecrets.valueKeepHelp')
|
|
234095
|
+
: t('virtualMachineSecrets.valueHelp', {
|
|
234096
|
+
min: VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH,
|
|
234097
|
+
}) }), fieldError('value', ids.value)] })) : (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { id: ids.credentialLabel, htmlFor: ids.credential, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldCredential') }), credentials.length === 0 ? (jsx("p", { className: "text-xs text-gray-500", "data-testid": "vm-secret-no-credentials", children: t('virtualMachineSecrets.noCredentials') })) : (jsxs(Select$1, { value: credentialId, onValueChange: (next) => {
|
|
234098
|
+
setCredentialId(next);
|
|
234099
|
+
setField('');
|
|
234100
|
+
}, children: [jsx(SelectTrigger, { id: ids.credential, "aria-labelledby": ids.credentialLabel, "aria-invalid": fieldErrors.source_credential_id ? true : undefined, "data-testid": "vm-secret-credential-select", children: jsx(SelectValue, { placeholder: t('virtualMachineSecrets.credentialPlaceholder') }) }), jsx(SelectContent, { children: credentials.map((option) => (jsx(SelectItem, { value: String(option.id), children: option.name }, option.id))) })] })), fieldError('source_credential_id', ids.credential)] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { id: ids.fieldLabel, htmlFor: ids.field, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldCredentialField') }), jsxs(Select$1, { value: field, onValueChange: setField, disabled: !selectedCredential || credentialFields.length === 0, children: [jsx(SelectTrigger, { id: ids.field, "aria-labelledby": ids.fieldLabel, "aria-invalid": fieldErrors.source_field ? true : undefined, "data-testid": "vm-secret-field-select", children: jsx(SelectValue, { placeholder: t('virtualMachineSecrets.credentialFieldPlaceholder') }) }), jsx(SelectContent, { children: credentialFields.map((key) => (jsx(SelectItem, { value: key, children: key }, key))) })] }), selectedCredential && credentialFields.length === 0 && (jsx("p", { className: "text-xs text-gray-500", children: t('virtualMachineSecrets.credentialNoFields') })), fieldError('source_field', ids.field)] })] })), jsxs(DialogFooter, { children: [jsx(Button$1, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSaving, children: t('virtualMachineSecrets.cancel') }), jsxs(Button$1, { type: "submit", disabled: isSaving, "data-testid": "vm-secret-save", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isSaving && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), isEdit
|
|
234101
|
+
? t('virtualMachineSecrets.saveChanges')
|
|
234102
|
+
: t('virtualMachineSecrets.createSecret')] })] })] })] }) }));
|
|
234103
|
+
}
|
|
234104
|
+
|
|
234105
|
+
const HOST_PREVIEW_COUNT = 3;
|
|
234106
|
+
/** Placeholder swapped for the inline variable in the delete sentence. */
|
|
234107
|
+
const RECORD_SLOT = '__record__';
|
|
234108
|
+
/** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
|
|
234109
|
+
function relativeTime(value) {
|
|
234110
|
+
const date = new Date(value);
|
|
234111
|
+
return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
|
|
234112
|
+
}
|
|
234113
|
+
/**
|
|
234114
|
+
* VM secrets table with create / edit / delete. A value is never displayed
|
|
234115
|
+
* — the Source column only says whether the secret holds a stored value or
|
|
234116
|
+
* follows an integration credential's field. Deleting a secret also unbinds
|
|
234117
|
+
* it from every agent that uses it, which the confirmation spells out.
|
|
234118
|
+
*/
|
|
234119
|
+
function VmSecretsSection({ tenantKey, secrets, isLoading, isError, }) {
|
|
234120
|
+
const t = useT();
|
|
234121
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
234122
|
+
const [editingSecret, setEditingSecret] = useState(null);
|
|
234123
|
+
const [deletingSecret, setDeletingSecret] = useState(null);
|
|
234124
|
+
const [deleteError, setDeleteError] = useState(null);
|
|
234125
|
+
const [deleteSecret, { isLoading: isDeleting }] = useDeleteVirtualMachineSecretMutation();
|
|
234126
|
+
// The org's integration credentials feed the "use an existing credential"
|
|
234127
|
+
// source in the form and name the credential in the Source column.
|
|
234128
|
+
const { data: credentialsData } = useGetIntegrationCredentialsQuery({ org: tenantKey });
|
|
234129
|
+
const credentials = useMemo(() => toIntegrationCredentialOptions(credentialsData), [credentialsData]);
|
|
234130
|
+
const credentialNames = useMemo(() => new Map(credentials.map((option) => [option.id, option.name])), [credentials]);
|
|
234131
|
+
const sourceLabel = (secret) => {
|
|
234132
|
+
var _a;
|
|
234133
|
+
if (secret.source_credential_id == null)
|
|
234134
|
+
return t('virtualMachineSecrets.sourceStored');
|
|
234135
|
+
const credentialName = (_a = credentialNames.get(secret.source_credential_id)) !== null && _a !== void 0 ? _a : `#${secret.source_credential_id}`;
|
|
234136
|
+
return t('virtualMachineSecrets.sourceFromCredential', {
|
|
234137
|
+
credential: credentialName,
|
|
234138
|
+
field: secret.source_field,
|
|
234139
|
+
});
|
|
234140
|
+
};
|
|
234141
|
+
// The translated sentence with the variable rendered as the table's code chip.
|
|
234142
|
+
const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineSecrets.deleteConfirm', {
|
|
234143
|
+
envVar: RECORD_SLOT,
|
|
234144
|
+
}).split(RECORD_SLOT);
|
|
234145
|
+
const openCreate = () => {
|
|
234146
|
+
setEditingSecret(null);
|
|
234147
|
+
setDialogOpen(true);
|
|
234148
|
+
};
|
|
234149
|
+
const openEdit = (secret) => {
|
|
234150
|
+
setEditingSecret(secret);
|
|
234151
|
+
setDialogOpen(true);
|
|
234152
|
+
};
|
|
234153
|
+
const openDelete = (secret) => {
|
|
234154
|
+
setDeleteError(null);
|
|
234155
|
+
setDeletingSecret(secret);
|
|
234156
|
+
};
|
|
234157
|
+
const handleDelete = async (secret) => {
|
|
234158
|
+
var _a;
|
|
234159
|
+
try {
|
|
234160
|
+
await deleteSecret({ org: tenantKey, envVar: secret.env_var }).unwrap();
|
|
234161
|
+
toast.success(t('virtualMachineSecrets.deleted'));
|
|
234162
|
+
setDeletingSecret(null);
|
|
234163
|
+
}
|
|
234164
|
+
catch (error) {
|
|
234165
|
+
const parsed = getVirtualMachineApiError(error);
|
|
234166
|
+
setDeleteError(parsed.status === 403
|
|
234167
|
+
? t('virtualMachineSecrets.forbiddenDelete')
|
|
234168
|
+
: ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineSecrets.deleteFailed')));
|
|
234169
|
+
}
|
|
234170
|
+
};
|
|
234171
|
+
return (jsxs("div", { "data-testid": "vm-secrets-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button$1, { size: "sm", onClick: openCreate, "data-testid": "vm-secret-new", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('virtualMachineSecrets.newSecret')] }) }), isLoading ? (jsx("div", { className: "flex h-40 items-center justify-center", children: jsx(Spinner, {}) })) : isError ? (jsx("div", { role: "alert", className: "rounded-lg border border-red-200 bg-red-50 px-6 py-6 text-center text-sm text-red-700", children: t('virtualMachineSecrets.loadFailed') })) : (jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "border-b border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colName') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colEnvVar') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colHosts') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colSource') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colUpdated') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colActions') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [secrets.map((secret) => {
|
|
234172
|
+
const preview = secret.allow_hosts.slice(0, HOST_PREVIEW_COUNT);
|
|
234173
|
+
const remaining = secret.allow_hosts.length - preview.length;
|
|
234174
|
+
return (jsxs("tr", { "data-testid": `vm-secret-row-${secret.env_var}`, children: [jsx("td", { className: "px-6 py-4 font-medium text-gray-900 dark:text-gray-100", children: secret.name }), jsx("td", { className: "px-6 py-4", children: jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: secret.env_var }) }), jsx("td", { className: "px-6 py-4", children: jsxs("ul", { role: "list", "aria-label": t('virtualMachineSecrets.hostsListAriaLabel', {
|
|
234175
|
+
name: secret.name,
|
|
234176
|
+
}), className: "flex flex-wrap gap-1", children: [preview.map((host) => (jsx("li", { className: "rounded-md border border-gray-200 bg-gray-50 px-2 py-0.5 font-mono text-xs text-gray-700", children: host }, host))), remaining > 0 && (jsx("li", { className: "px-1 py-0.5 text-xs text-gray-500", children: t('virtualMachineSecrets.moreHosts', { count: remaining }) }))] }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300", children: sourceLabel(secret) }), jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300", children: relativeTime(secret.updated_at) }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex justify-end gap-1", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(secret), "aria-label": t('virtualMachineSecrets.editAriaLabel', {
|
|
234177
|
+
name: secret.name,
|
|
234178
|
+
}), "data-testid": `vm-secret-edit-${secret.env_var}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openDelete(secret), "aria-label": t('virtualMachineSecrets.deleteAriaLabel', {
|
|
234179
|
+
name: secret.name,
|
|
234180
|
+
}), "data-testid": `vm-secret-delete-${secret.env_var}`, className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) })] }) })] }, secret.id));
|
|
234181
|
+
}), secrets.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 6, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.empty') }) }))] })] }) })), jsx(VmSecretDialog, { open: dialogOpen, onOpenChange: setDialogOpen, tenantKey: tenantKey, secret: editingSecret, credentials: credentials }), jsx(Dialog, { open: deletingSecret !== null, onOpenChange: (open) => {
|
|
234182
|
+
if (!open && !isDeleting) {
|
|
234183
|
+
setDeletingSecret(null);
|
|
234184
|
+
setDeleteError(null);
|
|
234185
|
+
}
|
|
234186
|
+
}, children: jsxs(DialogContent, { className: "max-w-md", "data-testid": "vm-secret-delete-dialog", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('virtualMachineSecrets.deleteTitle') }) }), jsxs(DialogDescription, { className: "text-gray-600", children: [deleteConfirmBefore, jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: deletingSecret === null || deletingSecret === void 0 ? void 0 : deletingSecret.env_var }), deleteConfirmAfter] }), deleteError && (jsx("div", { role: "alert", "data-testid": "vm-secret-delete-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: deleteError })), jsxs(DialogFooter, { className: "pt-2", children: [jsx(Button$1, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
|
|
234187
|
+
setDeletingSecret(null);
|
|
234188
|
+
setDeleteError(null);
|
|
234189
|
+
}, children: t('virtualMachineSecrets.cancel') }), jsxs(Button$1, { type: "button", onClick: () => {
|
|
234190
|
+
if (deletingSecret)
|
|
234191
|
+
void handleDelete(deletingSecret);
|
|
234192
|
+
}, disabled: isDeleting, "data-testid": "vm-secret-delete-confirm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isDeleting && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), t('virtualMachineSecrets.delete')] })] })] }) })] }));
|
|
234193
|
+
}
|
|
234194
|
+
|
|
234195
|
+
/**
|
|
234196
|
+
* Tenant-settings **Virtual Machine** tab. Org admins manage the two records
|
|
234197
|
+
* that decide what an agent's Virtual Machine Shell can reach: reusable
|
|
234198
|
+
* `host:port` network policies (bound under the `custom` egress profile) and
|
|
234199
|
+
* VM secrets the VM can use but never read. Each section is hidden when its
|
|
234200
|
+
* list call answers 403; when both do, a single permission notice remains.
|
|
234201
|
+
*/
|
|
234202
|
+
function VirtualMachineAdminTab({ tenantKey, username, defaultTab = 'network-policies', }) {
|
|
234203
|
+
var _a, _b;
|
|
234204
|
+
const t = useT();
|
|
234205
|
+
const policiesQuery = useListVirtualMachineNetworkPoliciesQuery({ org: tenantKey });
|
|
234206
|
+
const secretsQuery = useListVirtualMachineSecretsQuery({ org: tenantKey });
|
|
234207
|
+
const policiesForbidden = getVirtualMachineErrorStatus(policiesQuery.error) === 403;
|
|
234208
|
+
const secretsForbidden = getVirtualMachineErrorStatus(secretsQuery.error) === 403;
|
|
234209
|
+
if (policiesQuery.isLoading && secretsQuery.isLoading) {
|
|
234210
|
+
return (jsxs("div", { className: "space-y-6", "data-testid": "vm-admin-loading", children: [jsx(Skeleton, { className: "h-10 w-full max-w-sm rounded-lg" }), jsx(Skeleton, { className: "h-40 w-full rounded-lg" })] }));
|
|
234211
|
+
}
|
|
234212
|
+
if (policiesForbidden && secretsForbidden) {
|
|
234213
|
+
return (jsx("div", { className: "max-w-2xl", children: jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, "data-testid": "vm-admin-forbidden", children: jsx("p", { className: "text-sm text-gray-500", children: t('virtualMachineAdminTab.forbidden') }) }) }));
|
|
234214
|
+
}
|
|
234215
|
+
const initialTab = (defaultTab === 'secrets' && !secretsForbidden) || policiesForbidden
|
|
234216
|
+
? 'secrets'
|
|
234217
|
+
: 'network-policies';
|
|
234218
|
+
return (jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "vm-admin-info-box", children: t('virtualMachineAdminTab.infoBox') }), jsxs(Tabs, { defaultValue: initialTab, "aria-label": t('virtualMachineAdminTab.tabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('virtualMachineAdminTab.tabsAriaLabel'), className: "max-w-full justify-start overflow-x-auto px-1", children: [!policiesForbidden && (jsx(TabsTrigger, { "data-testid": "vm-admin-sub-tab-policies", value: "network-policies", children: t('virtualMachineAdminTab.tabNetworkPolicies') })), !secretsForbidden && (jsx(TabsTrigger, { "data-testid": "vm-admin-sub-tab-secrets", value: "secrets", children: t('virtualMachineAdminTab.tabSecrets') }))] }), !policiesForbidden && (jsx(TabsContent, { className: "mt-4", value: "network-policies", children: jsx(NetworkPoliciesSection, { tenantKey: tenantKey, username: username, policies: (_a = policiesQuery.data) !== null && _a !== void 0 ? _a : [], isLoading: policiesQuery.isLoading, isError: policiesQuery.isError }) })), !secretsForbidden && (jsx(TabsContent, { className: "mt-4", value: "secrets", children: jsx(VmSecretsSection, { tenantKey: tenantKey, secrets: (_b = secretsQuery.data) !== null && _b !== void 0 ? _b : [], isLoading: secretsQuery.isLoading, isError: secretsQuery.isError }) }))] })] }));
|
|
234219
|
+
}
|
|
234220
|
+
|
|
232831
234221
|
// ::- Persistent data structure representing an ordered mapping from
|
|
232832
234222
|
// strings to values, with some convenient update methods.
|
|
232833
234223
|
function OrderedMap(content) {
|
|
@@ -267666,6 +269056,7 @@ const TAB_DESC_KEYS = {
|
|
|
267666
269056
|
monetization: 'descMonetization',
|
|
267667
269057
|
datasets: 'descBenchmarks',
|
|
267668
269058
|
memory: 'descMemory',
|
|
269059
|
+
virtualMachine: 'descVirtualMachine',
|
|
267669
269060
|
advanced: 'descAdvanced',
|
|
267670
269061
|
basic: 'descBasic',
|
|
267671
269062
|
social: 'descSocial',
|
|
@@ -267724,6 +269115,12 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
|
|
|
267724
269115
|
]
|
|
267725
269116
|
: []),
|
|
267726
269117
|
{ id: 'memory', label: t('profileAccount.tabMemory'), icon: Brain, group: 'aiData' },
|
|
269118
|
+
{
|
|
269119
|
+
id: 'virtualMachine',
|
|
269120
|
+
label: t('profileAccount.tabVirtualMachine'),
|
|
269121
|
+
icon: Server,
|
|
269122
|
+
group: 'aiData',
|
|
269123
|
+
},
|
|
267727
269124
|
{ id: 'advanced', label: t('profileAccount.tabAdvanced'), icon: Settings$1, group: 'system' },
|
|
267728
269125
|
];
|
|
267729
269126
|
const [organizationLogo, setOrganizationLogo] = useState(`${LOGO_ENDPOINTS.light_logo(tenant)}?v=${Date.now()}`);
|
|
@@ -267820,7 +269217,7 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
|
|
|
267820
269217
|
setOrganizationLogo('');
|
|
267821
269218
|
} }) })) : (jsx("div", { className: "flex h-14 w-14 flex-shrink-0 items-center justify-center rounded-xl border border-blue-100 bg-blue-50 text-blue-600 dark:border-blue-900 dark:bg-blue-950 dark:text-blue-300", "aria-hidden": "true", children: jsx(BriefcaseBusiness, { className: "h-6 w-6" }) })), jsxs("div", { className: "min-w-0", children: [jsx("h2", { className: "truncate text-[15px] font-semibold text-gray-900 dark:text-gray-100", title: platformName, children: platformName }), platformName !== tenant && (jsx("p", { className: "truncate font-mono text-xs text-gray-500 dark:text-gray-400", children: tenant }))] })] }), jsxs("div", { className: "flex flex-wrap gap-1.5", children: [roleChip, showPlatformName && jsx(SettingsChip, { children: tenant.toUpperCase() })] })] }));
|
|
267822
269219
|
const mobileHeader = (jsx("div", { className: "flex min-w-0 items-center justify-between gap-3", children: jsx("p", { className: "truncate text-[15px] font-semibold text-gray-900 dark:text-gray-100", children: platformName || t('profileAccount.profileTitle') }) }));
|
|
267823
|
-
return (jsx(SettingsShell, { sidebarHeader: sidebarHeader, sidebarNav: jsx(SettingsSidebarNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNav') }), mobileHeader: mobileHeader, mobileNav: jsx(SettingsMobileNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNavMobile') }), title: title, description: description, overlays: jsx(ToastProvider, {}), children: jsxs("div", { className: "space-y-6", children: [activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onboardingBasePath: onboardingBasePath, authSpaUrl: authURL, onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && jsx(IntegrationsTab, { tenantKey: tenant, username: username }), activeTab === 'billing' && canSeeBilling && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && jsx(MonetizationTab, { platformKey: tenant, authURL: authURL }), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'memory' && jsx(MemoryAdminTab, { tenantKey: tenant, username: username }), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] }) }));
|
|
269220
|
+
return (jsx(SettingsShell, { sidebarHeader: sidebarHeader, sidebarNav: jsx(SettingsSidebarNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNav') }), mobileHeader: mobileHeader, mobileNav: jsx(SettingsMobileNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNavMobile') }), title: title, description: description, overlays: jsx(ToastProvider, {}), children: jsxs("div", { className: "space-y-6", children: [activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onboardingBasePath: onboardingBasePath, authSpaUrl: authURL, onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && jsx(IntegrationsTab, { tenantKey: tenant, username: username }), activeTab === 'billing' && canSeeBilling && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && jsx(MonetizationTab, { platformKey: tenant, authURL: authURL }), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'memory' && jsx(MemoryAdminTab, { tenantKey: tenant, username: username }), activeTab === 'virtualMachine' && (jsx(VirtualMachineAdminTab, { tenantKey: tenant, username: username })), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] }) }));
|
|
267824
269221
|
}
|
|
267825
269222
|
|
|
267826
269223
|
function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showGradebookTab = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, showLlmUsageTab = true, showBenchmarks = false, localLLMProps, enableSupportPhone, onboardingBasePath = '', }) {
|
|
@@ -267898,6 +269295,7 @@ function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, sho
|
|
|
267898
269295
|
'billing',
|
|
267899
269296
|
'monetization',
|
|
267900
269297
|
'datasets',
|
|
269298
|
+
'virtualMachine',
|
|
267901
269299
|
].includes(targetTab) && (jsxs(Fragment$1, { children: [jsx(Account, { onboardingBasePath: onboardingBasePath, onInviteClick: () => setIsInviteUserDialogOpen(true), tenant: params.tenantKey, tenants: tenants, username: getUserName$1(), email: email, mainPlatformKey: mainPlatformKey, showUsernameField: showUsernameField, showPlatformName: showPlatformName, useGravatarPicFallback: useGravatarPicFallback, onClose: onClose, isAdmin: params.isAdmin, targetTab: targetTab, currentPlan: currentPlan, currentSPA: currentSPA, userActiveApp: userActiveApp, authURL: authURL, onTenantUpdate: onTenantUpdate, currentPlatformBaseDomain: currentPlatformBaseDomain, rbacPermissions: rbacPermissions, enableRbac: enableRbac, onLoadGroupPermissions: onLoadGroupPermissions, onTabChange: onTabChange, defaultSupportPhone: defaultSupportPhone, showBenchmarks: showBenchmarks, enableSupportPhone: enableSupportPhone, showGradebookTab: showGradebookTab }), isInviteUserDialogOpen && (jsx(InviteUserDialog, { tenant: params.tenantKey, onClose: () => setIsInviteUserDialogOpen(false), isOpen: isInviteUserDialogOpen, enableCatalogInvite: enableCatalogInvite, hasManageUsersPermission: hasManageUsersPermission })), isInvitedUsersDialogOpen && (jsx(InvitedUsersDialog, { onClose: () => setIsInvitedUsersDialogOpen(false), tenant: params.tenantKey }))] }))] }) }) }));
|
|
267902
269300
|
}
|
|
267903
269301
|
|