@iblai/iblai-js 2.67.3 → 2.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web-containers/source/_virtual/index2.js +2 -2
- package/dist/web-containers/source/_virtual/index3.js +2 -2
- package/dist/web-containers/source/account-sheet.js +2 -2
- package/dist/web-containers/source/account-sheet.js.map +1 -1
- package/dist/web-containers/source/account.js +39 -21
- package/dist/web-containers/source/account.js.map +1 -1
- package/dist/web-containers/source/api/api-field-label.js +14 -0
- package/dist/web-containers/source/api/api-field-label.js.map +1 -0
- package/dist/web-containers/source/{profile/integration/api-tab → api}/api-key-modal.js +8 -8
- package/dist/web-containers/source/api/api-key-modal.js.map +1 -0
- package/dist/web-containers/source/api/api-keys-table.js +61 -0
- package/dist/web-containers/source/api/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/{api-tab → api}/api-token-utils.js +34 -1
- package/dist/web-containers/source/api/api-token-utils.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → api}/constants.js +0 -1
- package/dist/web-containers/source/api/constants.js.map +1 -0
- package/dist/web-containers/source/{profile/integration/api-tab → api}/create-api-modal.js +19 -26
- package/dist/web-containers/source/api/create-api-modal.js.map +1 -0
- package/dist/web-containers/source/api/delete-api-modal.js +31 -0
- package/dist/web-containers/source/api/delete-api-modal.js.map +1 -0
- package/dist/web-containers/source/{api-tab → api}/edit-api-modal.js +34 -28
- package/dist/web-containers/source/api/edit-api-modal.js.map +1 -0
- package/dist/web-containers/source/api/expiration-date-field.js +35 -0
- package/dist/web-containers/source/api/expiration-date-field.js.map +1 -0
- package/dist/web-containers/source/api/index.js +30 -0
- package/dist/web-containers/source/api/index.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → api}/token-policy-fields.js +6 -6
- package/dist/web-containers/source/api/token-policy-fields.js.map +1 -0
- package/dist/web-containers/source/api-field-label.js +14 -0
- package/dist/web-containers/source/api-field-label.js.map +1 -0
- package/dist/web-containers/source/api-keys-table.js +61 -0
- package/dist/web-containers/source/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/api-tab/labels.js +23 -19
- package/dist/web-containers/source/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/api-tab.js +15 -20
- package/dist/web-containers/source/api-tab.js.map +1 -1
- package/dist/web-containers/source/api-token-utils.js +34 -1
- package/dist/web-containers/source/api-token-utils.js.map +1 -1
- package/dist/web-containers/source/azure-config.js +37 -0
- package/dist/web-containers/source/azure-config.js.map +1 -0
- package/dist/web-containers/source/azure-model-fields.js +118 -0
- package/dist/web-containers/source/azure-model-fields.js.map +1 -0
- package/dist/web-containers/source/claw-sandbox/virtual-machine-network-section.js +147 -24
- package/dist/web-containers/source/claw-sandbox/virtual-machine-network-section.js.map +1 -1
- package/dist/web-containers/source/components/claw-sandbox/virtual-machine-network-section.js +147 -24
- package/dist/web-containers/source/components/claw-sandbox/virtual-machine-network-section.js.map +1 -1
- package/dist/web-containers/source/components/field-info.js +18 -0
- package/dist/web-containers/source/components/field-info.js.map +1 -0
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/components/modals/user-profile-modal.js +4 -4
- package/dist/web-containers/source/components/modals/user-profile-modal.js.map +1 -1
- package/dist/web-containers/source/components/platform-sidebar/account-sheet.js +2 -2
- package/dist/web-containers/source/components/platform-sidebar/account-sheet.js.map +1 -1
- package/dist/web-containers/source/components/platform-sidebar/footer.js +15 -14
- package/dist/web-containers/source/components/platform-sidebar/footer.js.map +1 -1
- package/dist/web-containers/source/components/platform-sidebar/index.js +0 -2
- package/dist/web-containers/source/components/platform-sidebar/index.js.map +1 -1
- package/dist/web-containers/source/components/profile/account.js +39 -21
- package/dist/web-containers/source/components/profile/account.js.map +1 -1
- package/dist/web-containers/source/components/profile/api/api-field-label.js +14 -0
- package/dist/web-containers/source/components/profile/api/api-field-label.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → components/profile/api}/api-key-modal.js +8 -8
- package/dist/web-containers/source/components/profile/api/api-key-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/api-keys-table.js +61 -0
- package/dist/web-containers/source/components/profile/api/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → components/profile/api}/api-token-utils.js +34 -1
- package/dist/web-containers/source/components/profile/api/api-token-utils.js.map +1 -0
- package/dist/web-containers/source/components/profile/{integration/api-tab → api}/constants.js +0 -1
- package/dist/web-containers/source/components/profile/api/constants.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → components/profile/api}/create-api-modal.js +19 -26
- package/dist/web-containers/source/components/profile/api/create-api-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/delete-api-modal.js +31 -0
- package/dist/web-containers/source/components/profile/api/delete-api-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/{integration/api-tab → api}/edit-api-modal.js +34 -28
- package/dist/web-containers/source/components/profile/api/edit-api-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/expiration-date-field.js +35 -0
- package/dist/web-containers/source/components/profile/api/expiration-date-field.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/index.js +30 -0
- package/dist/web-containers/source/components/profile/api/index.js.map +1 -0
- package/dist/web-containers/source/{profile/integration/api-tab → components/profile/api}/token-policy-fields.js +6 -6
- package/dist/web-containers/source/components/profile/api/token-policy-fields.js.map +1 -0
- package/dist/web-containers/source/components/profile/info-banner.js +3 -1
- package/dist/web-containers/source/components/profile/info-banner.js.map +1 -1
- package/dist/web-containers/source/components/profile/integration/index.js +17 -38
- package/dist/web-containers/source/components/profile/integration/index.js.map +1 -1
- package/dist/web-containers/source/components/profile/secrets/index.js +106 -0
- package/dist/web-containers/source/components/profile/secrets/index.js.map +1 -0
- package/dist/web-containers/source/components/profile/secrets/secrets-list.js +237 -0
- package/dist/web-containers/source/components/profile/secrets/secrets-list.js.map +1 -0
- package/dist/web-containers/source/components/profile/virtual-machine-admin/index.js +12 -18
- package/dist/web-containers/source/components/profile/virtual-machine-admin/index.js.map +1 -1
- package/dist/web-containers/source/components/profile/virtual-machine-admin/network-policies-section.js +5 -4
- package/dist/web-containers/source/components/profile/virtual-machine-admin/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/components/tooltip-icon-button.js +15 -0
- package/dist/web-containers/source/components/tooltip-icon-button.js.map +1 -0
- package/dist/web-containers/source/components/user-profile-dropdown/index.js +2 -0
- package/dist/web-containers/source/components/user-profile-dropdown/index.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/azure-config.js +37 -0
- package/dist/web-containers/source/components/virtual-machine/azure-config.js.map +1 -0
- package/dist/web-containers/source/components/virtual-machine/azure-model-fields.js +118 -0
- package/dist/web-containers/source/components/virtual-machine/azure-model-fields.js.map +1 -0
- package/dist/web-containers/source/components/virtual-machine/credential-options.js +268 -22
- package/dist/web-containers/source/components/virtual-machine/credential-options.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/host-port-chip-input.js +14 -8
- package/dist/web-containers/source/components/virtual-machine/host-port-chip-input.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/network-policy-dialog.js +30 -6
- package/dist/web-containers/source/components/virtual-machine/network-policy-dialog.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/secret-rows.js +66 -0
- package/dist/web-containers/source/components/virtual-machine/secret-rows.js.map +1 -0
- package/dist/web-containers/source/components/virtual-machine/vm-secret-dialog.js +848 -158
- package/dist/web-containers/source/components/virtual-machine/vm-secret-dialog.js.map +1 -1
- package/dist/web-containers/source/connector-dialogs.js +1 -1
- package/dist/web-containers/source/constants.js +55 -22
- package/dist/web-containers/source/constants.js.map +1 -1
- package/dist/web-containers/source/create-api-modal.js +4 -4
- package/dist/web-containers/source/credential-options.js +268 -22
- package/dist/web-containers/source/credential-options.js.map +1 -1
- package/dist/web-containers/source/edit-api-modal.js +34 -28
- package/dist/web-containers/source/edit-api-modal.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/en.json.js +278 -227
- package/dist/web-containers/source/en.json.js.map +1 -1
- package/dist/web-containers/source/es.json.js +449 -398
- package/dist/web-containers/source/es.json.js.map +1 -1
- package/dist/web-containers/source/expiration-date-field.js +16 -10
- package/dist/web-containers/source/expiration-date-field.js.map +1 -1
- package/dist/web-containers/source/field-info.js +11 -7
- package/dist/web-containers/source/field-info.js.map +1 -1
- package/dist/web-containers/source/footer.js +15 -14
- package/dist/web-containers/source/footer.js.map +1 -1
- package/dist/web-containers/source/fr.json.js +457 -406
- package/dist/web-containers/source/fr.json.js.map +1 -1
- package/dist/web-containers/source/host-port-chip-input.js +14 -8
- package/dist/web-containers/source/host-port-chip-input.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/en.json.js +278 -227
- package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/es.json.js +449 -398
- package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/fr.json.js +457 -406
- package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/zh.json.js +456 -405
- package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/index2.js +2 -2
- package/dist/web-containers/source/index3.js +2 -2
- package/dist/web-containers/source/info-banner.js +3 -1
- package/dist/web-containers/source/info-banner.js.map +1 -1
- package/dist/web-containers/source/integration/index.js +17 -38
- package/dist/web-containers/source/integration/index.js.map +1 -1
- package/dist/web-containers/source/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/messages/en.json.js +278 -227
- package/dist/web-containers/source/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/messages/es.json.js +449 -398
- package/dist/web-containers/source/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/messages/fr.json.js +457 -406
- package/dist/web-containers/source/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/messages/zh.json.js +456 -405
- package/dist/web-containers/source/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/modals/user-profile-modal.js +4 -4
- package/dist/web-containers/source/modals/user-profile-modal.js.map +1 -1
- package/dist/web-containers/source/network-policies-section.js +5 -4
- package/dist/web-containers/source/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/network-policy-dialog.js +30 -6
- package/dist/web-containers/source/network-policy-dialog.js.map +1 -1
- package/dist/web-containers/source/node_modules/.pnpm/css-mediaquery@0.1.2/node_modules/css-mediaquery/index.js +1 -1
- package/dist/web-containers/source/node_modules/.pnpm/matchmediaquery@0.4.2/node_modules/matchmediaquery/index.js +1 -1
- package/dist/web-containers/source/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/web-containers/source/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/platform-sidebar/account-sheet.js +2 -2
- package/dist/web-containers/source/platform-sidebar/account-sheet.js.map +1 -1
- package/dist/web-containers/source/platform-sidebar/footer.js +15 -14
- package/dist/web-containers/source/platform-sidebar/footer.js.map +1 -1
- package/dist/web-containers/source/platform-sidebar/index.js +0 -2
- package/dist/web-containers/source/platform-sidebar/index.js.map +1 -1
- package/dist/web-containers/source/profile/account.js +39 -21
- package/dist/web-containers/source/profile/account.js.map +1 -1
- package/dist/web-containers/source/profile/api/api-field-label.js +14 -0
- package/dist/web-containers/source/profile/api/api-field-label.js.map +1 -0
- package/dist/web-containers/source/{components/profile/integration/api-tab → profile/api}/api-key-modal.js +8 -8
- package/dist/web-containers/source/profile/api/api-key-modal.js.map +1 -0
- package/dist/web-containers/source/profile/api/api-keys-table.js +61 -0
- package/dist/web-containers/source/profile/api/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/profile/{integration/api-tab → api}/api-token-utils.js +34 -1
- package/dist/web-containers/source/profile/api/api-token-utils.js.map +1 -0
- package/dist/web-containers/source/{api-tab → profile/api}/constants.js +0 -1
- package/dist/web-containers/source/profile/api/constants.js.map +1 -0
- package/dist/web-containers/source/{components/profile/integration/api-tab → profile/api}/create-api-modal.js +19 -26
- package/dist/web-containers/source/profile/api/create-api-modal.js.map +1 -0
- package/dist/web-containers/source/profile/api/delete-api-modal.js +31 -0
- package/dist/web-containers/source/profile/api/delete-api-modal.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → profile/api}/edit-api-modal.js +34 -28
- package/dist/web-containers/source/profile/api/edit-api-modal.js.map +1 -0
- package/dist/web-containers/source/profile/api/expiration-date-field.js +35 -0
- package/dist/web-containers/source/profile/api/expiration-date-field.js.map +1 -0
- package/dist/web-containers/source/profile/api/index.js +30 -0
- package/dist/web-containers/source/profile/api/index.js.map +1 -0
- package/dist/web-containers/source/{api-tab → profile/api}/token-policy-fields.js +6 -6
- package/dist/web-containers/source/profile/api/token-policy-fields.js.map +1 -0
- package/dist/web-containers/source/profile/info-banner.js +3 -1
- package/dist/web-containers/source/profile/info-banner.js.map +1 -1
- package/dist/web-containers/source/profile/integration/index.js +17 -38
- package/dist/web-containers/source/profile/integration/index.js.map +1 -1
- package/dist/web-containers/source/profile/secrets/index.js +106 -0
- package/dist/web-containers/source/profile/secrets/index.js.map +1 -0
- package/dist/web-containers/source/profile/secrets/secrets-list.js +237 -0
- package/dist/web-containers/source/profile/secrets/secrets-list.js.map +1 -0
- package/dist/web-containers/source/profile/virtual-machine-admin/index.js +12 -18
- package/dist/web-containers/source/profile/virtual-machine-admin/index.js.map +1 -1
- package/dist/web-containers/source/profile/virtual-machine-admin/network-policies-section.js +5 -4
- package/dist/web-containers/source/profile/virtual-machine-admin/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/secret-rows.js +66 -0
- package/dist/web-containers/source/secret-rows.js.map +1 -0
- package/dist/web-containers/source/secrets/index.js +106 -0
- package/dist/web-containers/source/secrets/index.js.map +1 -0
- package/dist/web-containers/source/secrets/secrets-list.js +237 -0
- package/dist/web-containers/source/secrets/secrets-list.js.map +1 -0
- package/dist/web-containers/source/secrets-list.js +237 -0
- package/dist/web-containers/source/secrets-list.js.map +1 -0
- package/dist/web-containers/source/skills-tab/index.js +1 -1
- package/dist/web-containers/source/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/token-policy-fields.js +6 -6
- package/dist/web-containers/source/token-policy-fields.js.map +1 -1
- package/dist/web-containers/source/tooltip-icon-button.js +15 -0
- package/dist/web-containers/source/tooltip-icon-button.js.map +1 -0
- package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/user-profile-dropdown/index.js +2 -0
- package/dist/web-containers/source/user-profile-dropdown/index.js.map +1 -1
- package/dist/web-containers/source/user-profile-modal.js +4 -4
- package/dist/web-containers/source/user-profile-modal.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/azure-config.js +37 -0
- package/dist/web-containers/source/virtual-machine/azure-config.js.map +1 -0
- package/dist/web-containers/source/virtual-machine/azure-model-fields.js +118 -0
- package/dist/web-containers/source/virtual-machine/azure-model-fields.js.map +1 -0
- package/dist/web-containers/source/virtual-machine/credential-options.js +268 -22
- package/dist/web-containers/source/virtual-machine/credential-options.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/host-port-chip-input.js +14 -8
- package/dist/web-containers/source/virtual-machine/host-port-chip-input.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/network-policy-dialog.js +30 -6
- package/dist/web-containers/source/virtual-machine/network-policy-dialog.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/secret-rows.js +66 -0
- package/dist/web-containers/source/virtual-machine/secret-rows.js.map +1 -0
- package/dist/web-containers/source/virtual-machine/vm-secret-dialog.js +848 -158
- package/dist/web-containers/source/virtual-machine/vm-secret-dialog.js.map +1 -1
- package/dist/web-containers/source/virtual-machine-admin/index.js +12 -18
- package/dist/web-containers/source/virtual-machine-admin/index.js.map +1 -1
- package/dist/web-containers/source/virtual-machine-admin/network-policies-section.js +5 -4
- package/dist/web-containers/source/virtual-machine-admin/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/virtual-machine-network-section.js +147 -24
- package/dist/web-containers/source/virtual-machine-network-section.js.map +1 -1
- package/dist/web-containers/source/vm-secret-dialog.js +848 -158
- package/dist/web-containers/source/vm-secret-dialog.js.map +1 -1
- package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/zh.json.js +456 -405
- package/dist/web-containers/source/zh.json.js.map +1 -1
- package/package.json +5 -5
- package/dist/web-containers/source/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/api-key-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/api-token-utils.js +0 -57
- package/dist/web-containers/source/components/profile/integration/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/create-api-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/delete-api-modal.js +0 -31
- package/dist/web-containers/source/components/profile/integration/api-tab/delete-api-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/components/profile/integration/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/components/profile/integration/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/token-policy-fields.js +0 -101
- package/dist/web-containers/source/components/profile/integration/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/components/profile/integration/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/components/profile/integration/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/components/profile/virtual-machine-admin/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/components/profile/virtual-machine-admin/vm-secrets-section.js.map +0 -1
- package/dist/web-containers/source/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/create-llm-modal.js +0 -287
- package/dist/web-containers/source/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/api-key-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/create-api-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/delete-api-modal.js +0 -31
- package/dist/web-containers/source/integration/api-tab/delete-api-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/integration/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/integration/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/integration/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/integration/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/integration/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/integration/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/integration/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/api-key-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/constants.js +0 -24
- package/dist/web-containers/source/profile/integration/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/create-api-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/delete-api-modal.js +0 -31
- package/dist/web-containers/source/profile/integration/api-tab/delete-api-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/edit-api-modal.js +0 -113
- package/dist/web-containers/source/profile/integration/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/profile/integration/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/profile/integration/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/profile/integration/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/profile/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/profile/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/profile/integration/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/profile/integration/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/profile/integration/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/profile/virtual-machine-admin/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/profile/virtual-machine-admin/vm-secrets-section.js.map +0 -1
- package/dist/web-containers/source/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/virtual-machine-admin/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/virtual-machine-admin/vm-secrets-section.js.map +0 -1
- package/dist/web-containers/source/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/vm-secrets-section.js.map +0 -1
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useMemo } from 'react';
|
|
3
|
-
import { formatDistanceToNow } from 'date-fns';
|
|
4
|
-
import { toast } from 'sonner';
|
|
5
|
-
import { useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, getVirtualMachineApiError } from '@iblai/data-layer';
|
|
6
|
-
import { Button } from '../../ui/button.js';
|
|
7
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '../../ui/dialog.js';
|
|
8
|
-
import { Spinner } from '../../spinner/index.js';
|
|
9
|
-
import { useT } from '../../../i18n/context.js';
|
|
10
|
-
import '../../../packages/i18n/dist/index.esm.js';
|
|
11
|
-
import { toIntegrationCredentialOptions } from '../../virtual-machine/credential-options.js';
|
|
12
|
-
import { VmSecretDialog } from '../../virtual-machine/vm-secret-dialog.js';
|
|
13
|
-
import Plus from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js';
|
|
14
|
-
import Pencil from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/pencil.js';
|
|
15
|
-
import Trash2 from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/trash-2.js';
|
|
16
|
-
import LoaderCircle from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/loader-circle.js';
|
|
17
|
-
|
|
18
|
-
const HOST_PREVIEW_COUNT = 3;
|
|
19
|
-
/** Placeholder swapped for the inline variable in the delete sentence. */
|
|
20
|
-
const RECORD_SLOT = '__record__';
|
|
21
|
-
/** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
|
|
22
|
-
function relativeTime(value) {
|
|
23
|
-
const date = new Date(value);
|
|
24
|
-
return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* VM secrets table with create / edit / delete. A value is never displayed
|
|
28
|
-
* — the Source column only says whether the secret holds a stored value or
|
|
29
|
-
* follows an integration credential's field. Deleting a secret also unbinds
|
|
30
|
-
* it from every agent that uses it, which the confirmation spells out.
|
|
31
|
-
*/
|
|
32
|
-
function VmSecretsSection({ tenantKey, secrets, isLoading, isError, }) {
|
|
33
|
-
const t = useT();
|
|
34
|
-
const [dialogOpen, setDialogOpen] = useState(false);
|
|
35
|
-
const [editingSecret, setEditingSecret] = useState(null);
|
|
36
|
-
const [deletingSecret, setDeletingSecret] = useState(null);
|
|
37
|
-
const [deleteError, setDeleteError] = useState(null);
|
|
38
|
-
const [deleteSecret, { isLoading: isDeleting }] = useDeleteVirtualMachineSecretMutation();
|
|
39
|
-
// The org's integration credentials feed the "use an existing credential"
|
|
40
|
-
// source in the form and name the credential in the Source column.
|
|
41
|
-
const { data: credentialsData } = useGetIntegrationCredentialsQuery({ org: tenantKey });
|
|
42
|
-
const credentials = useMemo(() => toIntegrationCredentialOptions(credentialsData), [credentialsData]);
|
|
43
|
-
const credentialNames = useMemo(() => new Map(credentials.map((option) => [option.id, option.name])), [credentials]);
|
|
44
|
-
const sourceLabel = (secret) => {
|
|
45
|
-
var _a;
|
|
46
|
-
if (secret.source_credential_id == null)
|
|
47
|
-
return t('virtualMachineSecrets.sourceStored');
|
|
48
|
-
const credentialName = (_a = credentialNames.get(secret.source_credential_id)) !== null && _a !== void 0 ? _a : `#${secret.source_credential_id}`;
|
|
49
|
-
return t('virtualMachineSecrets.sourceFromCredential', {
|
|
50
|
-
credential: credentialName,
|
|
51
|
-
field: secret.source_field,
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
// The translated sentence with the variable rendered as the table's code chip.
|
|
55
|
-
const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineSecrets.deleteConfirm', {
|
|
56
|
-
envVar: RECORD_SLOT,
|
|
57
|
-
}).split(RECORD_SLOT);
|
|
58
|
-
const openCreate = () => {
|
|
59
|
-
setEditingSecret(null);
|
|
60
|
-
setDialogOpen(true);
|
|
61
|
-
};
|
|
62
|
-
const openEdit = (secret) => {
|
|
63
|
-
setEditingSecret(secret);
|
|
64
|
-
setDialogOpen(true);
|
|
65
|
-
};
|
|
66
|
-
const openDelete = (secret) => {
|
|
67
|
-
setDeleteError(null);
|
|
68
|
-
setDeletingSecret(secret);
|
|
69
|
-
};
|
|
70
|
-
const handleDelete = async (secret) => {
|
|
71
|
-
var _a;
|
|
72
|
-
try {
|
|
73
|
-
await deleteSecret({ org: tenantKey, envVar: secret.env_var }).unwrap();
|
|
74
|
-
toast.success(t('virtualMachineSecrets.deleted'));
|
|
75
|
-
setDeletingSecret(null);
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
const parsed = getVirtualMachineApiError(error);
|
|
79
|
-
setDeleteError(parsed.status === 403
|
|
80
|
-
? t('virtualMachineSecrets.forbiddenDelete')
|
|
81
|
-
: ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineSecrets.deleteFailed')));
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
return (jsxs("div", { "data-testid": "vm-secrets-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button, { 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) => {
|
|
85
|
-
const preview = secret.allow_hosts.slice(0, HOST_PREVIEW_COUNT);
|
|
86
|
-
const remaining = secret.allow_hosts.length - preview.length;
|
|
87
|
-
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', {
|
|
88
|
-
name: secret.name,
|
|
89
|
-
}), 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, { variant: "ghost", size: "sm", onClick: () => openEdit(secret), "aria-label": t('virtualMachineSecrets.editAriaLabel', {
|
|
90
|
-
name: secret.name,
|
|
91
|
-
}), "data-testid": `vm-secret-edit-${secret.env_var}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button, { variant: "ghost", size: "sm", onClick: () => openDelete(secret), "aria-label": t('virtualMachineSecrets.deleteAriaLabel', {
|
|
92
|
-
name: secret.name,
|
|
93
|
-
}), "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));
|
|
94
|
-
}), 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) => {
|
|
95
|
-
if (!open && !isDeleting) {
|
|
96
|
-
setDeletingSecret(null);
|
|
97
|
-
setDeleteError(null);
|
|
98
|
-
}
|
|
99
|
-
}, 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, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
|
|
100
|
-
setDeletingSecret(null);
|
|
101
|
-
setDeleteError(null);
|
|
102
|
-
}, children: t('virtualMachineSecrets.cancel') }), jsxs(Button, { type: "button", onClick: () => {
|
|
103
|
-
if (deletingSecret)
|
|
104
|
-
void handleDelete(deletingSecret);
|
|
105
|
-
}, 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')] })] })] }) })] }));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export { VmSecretsSection };
|
|
109
|
-
//# sourceMappingURL=vm-secrets-section.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vm-secrets-section.js","sources":["../../../../../../../../src/components/profile/virtual-machine-admin/vm-secrets-section.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","Loader2"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AACA,MAAM,WAAW,GAAG,YAAY;AAUhC;AACA,SAAS,YAAY,CAAC,KAAa,EAAA;AACjC,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;IAC5B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,mBAAmB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC5F;AAEA;;;;;AAKG;AACG,SAAU,gBAAgB,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,GACe,EAAA;AACtB,IAAA,MAAM,CAAC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atDistanceToNow } from 'date-fns';
|
|
4
|
-
import { toast } from 'sonner';
|
|
5
|
-
import { useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, getVirtualMachineApiError } from '@iblai/data-layer';
|
|
6
|
-
import { Button } from '../../ui/button.js';
|
|
7
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '../../ui/dialog.js';
|
|
8
|
-
import { Spinner } from '../../spinner/index.js';
|
|
9
|
-
import { useT } from '../../../i18n/context.js';
|
|
10
|
-
import '../../../packages/i18n/dist/index.esm.js';
|
|
11
|
-
import { toIntegrationCredentialOptions } from '../../virtual-machine/credential-options.js';
|
|
12
|
-
import { VmSecretDialog } from '../../virtual-machine/vm-secret-dialog.js';
|
|
13
|
-
import Plus from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js';
|
|
14
|
-
import Pencil from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/pencil.js';
|
|
15
|
-
import Trash2 from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/trash-2.js';
|
|
16
|
-
import LoaderCircle from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/loader-circle.js';
|
|
17
|
-
|
|
18
|
-
const HOST_PREVIEW_COUNT = 3;
|
|
19
|
-
/** Placeholder swapped for the inline variable in the delete sentence. */
|
|
20
|
-
const RECORD_SLOT = '__record__';
|
|
21
|
-
/** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
|
|
22
|
-
function relativeTime(value) {
|
|
23
|
-
const date = new Date(value);
|
|
24
|
-
return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* VM secrets table with create / edit / delete. A value is never displayed
|
|
28
|
-
* — the Source column only says whether the secret holds a stored value or
|
|
29
|
-
* follows an integration credential's field. Deleting a secret also unbinds
|
|
30
|
-
* it from every agent that uses it, which the confirmation spells out.
|
|
31
|
-
*/
|
|
32
|
-
function VmSecretsSection({ tenantKey, secrets, isLoading, isError, }) {
|
|
33
|
-
const t = useT();
|
|
34
|
-
const [dialogOpen, setDialogOpen] = useState(false);
|
|
35
|
-
const [editingSecret, setEditingSecret] = useState(null);
|
|
36
|
-
const [deletingSecret, setDeletingSecret] = useState(null);
|
|
37
|
-
const [deleteError, setDeleteError] = useState(null);
|
|
38
|
-
const [deleteSecret, { isLoading: isDeleting }] = useDeleteVirtualMachineSecretMutation();
|
|
39
|
-
// The org's integration credentials feed the "use an existing credential"
|
|
40
|
-
// source in the form and name the credential in the Source column.
|
|
41
|
-
const { data: credentialsData } = useGetIntegrationCredentialsQuery({ org: tenantKey });
|
|
42
|
-
const credentials = useMemo(() => toIntegrationCredentialOptions(credentialsData), [credentialsData]);
|
|
43
|
-
const credentialNames = useMemo(() => new Map(credentials.map((option) => [option.id, option.name])), [credentials]);
|
|
44
|
-
const sourceLabel = (secret) => {
|
|
45
|
-
var _a;
|
|
46
|
-
if (secret.source_credential_id == null)
|
|
47
|
-
return t('virtualMachineSecrets.sourceStored');
|
|
48
|
-
const credentialName = (_a = credentialNames.get(secret.source_credential_id)) !== null && _a !== void 0 ? _a : `#${secret.source_credential_id}`;
|
|
49
|
-
return t('virtualMachineSecrets.sourceFromCredential', {
|
|
50
|
-
credential: credentialName,
|
|
51
|
-
field: secret.source_field,
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
// The translated sentence with the variable rendered as the table's code chip.
|
|
55
|
-
const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineSecrets.deleteConfirm', {
|
|
56
|
-
envVar: RECORD_SLOT,
|
|
57
|
-
}).split(RECORD_SLOT);
|
|
58
|
-
const openCreate = () => {
|
|
59
|
-
setEditingSecret(null);
|
|
60
|
-
setDialogOpen(true);
|
|
61
|
-
};
|
|
62
|
-
const openEdit = (secret) => {
|
|
63
|
-
setEditingSecret(secret);
|
|
64
|
-
setDialogOpen(true);
|
|
65
|
-
};
|
|
66
|
-
const openDelete = (secret) => {
|
|
67
|
-
setDeleteError(null);
|
|
68
|
-
setDeletingSecret(secret);
|
|
69
|
-
};
|
|
70
|
-
const handleDelete = async (secret) => {
|
|
71
|
-
var _a;
|
|
72
|
-
try {
|
|
73
|
-
await deleteSecret({ org: tenantKey, envVar: secret.env_var }).unwrap();
|
|
74
|
-
toast.success(t('virtualMachineSecrets.deleted'));
|
|
75
|
-
setDeletingSecret(null);
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
const parsed = getVirtualMachineApiError(error);
|
|
79
|
-
setDeleteError(parsed.status === 403
|
|
80
|
-
? t('virtualMachineSecrets.forbiddenDelete')
|
|
81
|
-
: ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineSecrets.deleteFailed')));
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
return (jsxs("div", { "data-testid": "vm-secrets-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button, { 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) => {
|
|
85
|
-
const preview = secret.allow_hosts.slice(0, HOST_PREVIEW_COUNT);
|
|
86
|
-
const remaining = secret.allow_hosts.length - preview.length;
|
|
87
|
-
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', {
|
|
88
|
-
name: secret.name,
|
|
89
|
-
}), 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, { variant: "ghost", size: "sm", onClick: () => openEdit(secret), "aria-label": t('virtualMachineSecrets.editAriaLabel', {
|
|
90
|
-
name: secret.name,
|
|
91
|
-
}), "data-testid": `vm-secret-edit-${secret.env_var}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button, { variant: "ghost", size: "sm", onClick: () => openDelete(secret), "aria-label": t('virtualMachineSecrets.deleteAriaLabel', {
|
|
92
|
-
name: secret.name,
|
|
93
|
-
}), "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));
|
|
94
|
-
}), 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) => {
|
|
95
|
-
if (!open && !isDeleting) {
|
|
96
|
-
setDeletingSecret(null);
|
|
97
|
-
setDeleteError(null);
|
|
98
|
-
}
|
|
99
|
-
}, 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, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
|
|
100
|
-
setDeletingSecret(null);
|
|
101
|
-
setDeleteError(null);
|
|
102
|
-
}, children: t('virtualMachineSecrets.cancel') }), jsxs(Button, { type: "button", onClick: () => {
|
|
103
|
-
if (deletingSecret)
|
|
104
|
-
void handleDelete(deletingSecret);
|
|
105
|
-
}, 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')] })] })] }) })] }));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export { VmSecretsSection };
|
|
109
|
-
//# sourceMappingURL=vm-secrets-section.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vm-secrets-section.js","sources":["../../../../../../../../src/components/profile/virtual-machine-admin/vm-secrets-section.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","Loader2"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AACA,MAAM,WAAW,GAAG,YAAY;AAUhC;AACA,SAAS,YAAY,CAAC,KAAa,EAAA;AACjC,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;IAC5B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,mBAAmB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC5F;AAEA;;;;;AAKG;AACG,SAAU,gBAAgB,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,GACe,EAAA;AACtB,IAAA,MAAM,CAAC,G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