abstra 3.24.4__py3-none-any.whl → 3.24.5__py3-none-any.whl
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.
- {abstra-3.24.4.dist-info → abstra-3.24.5.dist-info}/METADATA +2 -1
- {abstra-3.24.4.dist-info → abstra-3.24.5.dist-info}/RECORD +175 -175
- abstra_internals/repositories/execution.py +3 -6
- abstra_internals/repositories/tasks.py +2 -2
- abstra_internals/services/sql_storage.py +236 -0
- abstra_internals/services/sql_storage_test.py +112 -0
- abstra_statics/dist/assets/{AbstraButton.vue_vue_type_script_setup_true_lang.779f608b.js → AbstraButton.vue_vue_type_script_setup_true_lang.6c541630.js} +2 -2
- abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.e1cfa824.js +2 -0
- abstra_statics/dist/assets/{ApiKeys.fbd3ff63.js → ApiKeys.96f96fe2.js} +2 -2
- abstra_statics/dist/assets/App.6b1b6a94.js +2 -0
- abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.08210ecb.js +2 -0
- abstra_statics/dist/assets/{BaseLayout.c2cb2f91.js → BaseLayout.2a82be24.js} +2 -2
- abstra_statics/dist/assets/Billing.24199f3a.js +2 -0
- abstra_statics/dist/assets/{Breadcrumb.1a138bb1.js → Breadcrumb.c8da3019.js} +2 -2
- abstra_statics/dist/assets/{Builds.f3c7442c.js → Builds.366d6ceb.js} +2 -2
- abstra_statics/dist/assets/{Card.0899e9af.js → Card.0d56c597.js} +2 -2
- abstra_statics/dist/assets/{CircularLoading.9f9e733d.js → CircularLoading.daf759d9.js} +2 -2
- abstra_statics/dist/assets/CloseCircleOutlined.2be0ee6c.js +2 -0
- abstra_statics/dist/assets/{ConnectorsView.9d99a93b.js → ConnectorsView.904ff1c0.js} +2 -2
- abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.17fc3e62.js +2 -0
- abstra_statics/dist/assets/ContentLayout.c133929b.js +2 -0
- abstra_statics/dist/assets/CrudView.789b533f.js +2 -0
- abstra_statics/dist/assets/{DocsButton.vue_vue_type_script_setup_true_lang.88300c0e.js → DocsButton.vue_vue_type_script_setup_true_lang.a2b3eeb7.js} +2 -2
- abstra_statics/dist/assets/{EditorLogin.440d3dc5.js → EditorLogin.cac0ed52.js} +2 -2
- abstra_statics/dist/assets/{EditorsView.c81d5c0a.js → EditorsView.4b74b13b.js} +2 -2
- abstra_statics/dist/assets/EnvVars.0dfba770.js +2 -0
- abstra_statics/dist/assets/{Error.8fd45945.js → Error.c7f25d1b.js} +2 -2
- abstra_statics/dist/assets/ExclamationCircleOutlined.ad66211a.js +2 -0
- abstra_statics/dist/assets/ExecutionContext.91c0e0db.js +2 -0
- abstra_statics/dist/assets/ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.31b499a5.js +2 -0
- abstra_statics/dist/assets/{Files.2ef1fd75.js → Files.4ec90b9a.js} +2 -2
- abstra_statics/dist/assets/{Form.4047a0fe.js → Form.5a5cac5f.js} +2 -2
- abstra_statics/dist/assets/{FormRunner.8d0c448a.js → FormRunner.4a5270dc.js} +2 -2
- abstra_statics/dist/assets/{Home.c4610516.js → Home.1271fb51.js} +2 -2
- abstra_statics/dist/assets/{Home.586b0b6c.js → Home.f82c1587.js} +2 -2
- abstra_statics/dist/assets/LoadingContainer.4430af86.js +2 -0
- abstra_statics/dist/assets/LoadingOutlined.2d29f0e1.js +2 -0
- abstra_statics/dist/assets/{Login.2d19f80c.js → Login.180d7b1c.js} +2 -2
- abstra_statics/dist/assets/Login.8e13b15d.js +2 -0
- abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.8d4054f1.js → Login.vue_vue_type_script_setup_true_lang.ab4402e7.js} +2 -2
- abstra_statics/dist/assets/Logo.e86b6b23.js +2 -0
- abstra_statics/dist/assets/Logs.03931b09.js +2 -0
- abstra_statics/dist/assets/Main.3afc4ba4.js +2 -0
- abstra_statics/dist/assets/{MockForm.aa5ad3bb.js → MockForm.1fa371d2.js} +2 -2
- abstra_statics/dist/assets/Navbar.2d7490c1.js +2 -0
- abstra_statics/dist/assets/{NewEditor.5ebf7c09.css → NewEditor.d2ee5048.css} +1 -1
- abstra_statics/dist/assets/NewEditor.dc0e868f.js +8 -0
- abstra_statics/dist/assets/OidcLoginCallback.8216e341.js +2 -0
- abstra_statics/dist/assets/OidcLogoutCallback.f471ecec.js +2 -0
- abstra_statics/dist/assets/{OmniChat.3d03d97a.js → OmniChat.be2d3d92.js} +2 -2
- abstra_statics/dist/assets/{OnboardingView.4b747af0.js → OnboardingView.4957b5f8.js} +2 -2
- abstra_statics/dist/assets/Organization.27e529a7.js +2 -0
- abstra_statics/dist/assets/{Organizations.2340795a.js → Organizations.88897e55.js} +2 -2
- abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.d9dd0137.js → PhArrowCounterClockwise.vue.9ad742bf.js} +2 -2
- abstra_statics/dist/assets/{PhArrowSquareOut.vue.93df49c1.js → PhArrowSquareOut.vue.2a07a9b3.js} +2 -2
- abstra_statics/dist/assets/{PhClockCounterClockwise.vue.f1f419a1.js → PhClockCounterClockwise.vue.b4dc22ed.js} +2 -2
- abstra_statics/dist/assets/{PhCopy.vue.e59eaa52.js → PhCopy.vue.17ec4184.js} +2 -2
- abstra_statics/dist/assets/PhCopySimple.vue.d9213ca9.js +2 -0
- abstra_statics/dist/assets/{PhCube.vue.e29a6bae.js → PhCube.vue.027246a6.js} +2 -2
- abstra_statics/dist/assets/{PhDatabase.vue.e22926ed.js → PhDatabase.vue.a188015f.js} +2 -2
- abstra_statics/dist/assets/{PhDotsThreeVertical.vue.fff5caa8.js → PhDotsThreeVertical.vue.e9c6f787.js} +2 -2
- abstra_statics/dist/assets/PhDownloadSimple.vue.9ba8ac6f.js +2 -0
- abstra_statics/dist/assets/{PhFileArrowUp.vue.9f743e50.js → PhFileArrowUp.vue.cd3d3139.js} +2 -2
- abstra_statics/dist/assets/{PhFilePlus.vue.b2e51e09.js → PhFilePlus.vue.2464bbea.js} +2 -2
- abstra_statics/dist/assets/{PhFolderPlus.vue.8742ea4d.js → PhFolderPlus.vue.696aab26.js} +2 -2
- abstra_statics/dist/assets/{PhGear.vue.1c3eb148.js → PhGear.vue.c247e86d.js} +2 -2
- abstra_statics/dist/assets/{PhKey.vue.8702106e.js → PhKey.vue.1a84e5d0.js} +2 -2
- abstra_statics/dist/assets/{PhPencil.vue.74eafe52.js → PhPencil.vue.3586175f.js} +2 -2
- abstra_statics/dist/assets/{PhPencilSimple.vue.87355169.js → PhPencilSimple.vue.e88b8fd0.js} +2 -2
- abstra_statics/dist/assets/{PhRocket.vue.d4a6ad6a.js → PhRocket.vue.8b8080c3.js} +2 -2
- abstra_statics/dist/assets/{PhSignOut.vue.83e5f761.js → PhSignOut.vue.9eb21b1c.js} +2 -2
- abstra_statics/dist/assets/{PhSparkle.vue.d2009d46.js → PhSparkle.vue.70bce97e.js} +2 -2
- abstra_statics/dist/assets/{PhTranslate.vue.bec980b1.js → PhTranslate.vue.e579c286.js} +2 -2
- abstra_statics/dist/assets/{PhUsersThree.vue.dd23f9fb.js → PhUsersThree.vue.65e9b349.js} +2 -2
- abstra_statics/dist/assets/{PhWarningCircle.vue.27414f28.js → PhWarningCircle.vue.3134c1fb.js} +2 -2
- abstra_statics/dist/assets/{PhWebhooksLogo.vue.ff084558.js → PhWebhooksLogo.vue.e7321653.js} +2 -2
- abstra_statics/dist/assets/{PlayerConfigProvider.ca40f824.js → PlayerConfigProvider.f0eaf9f3.js} +2 -2
- abstra_statics/dist/assets/{PlayerNavbar.393e1a48.js → PlayerNavbar.7c0453f2.js} +2 -2
- abstra_statics/dist/assets/Project.fad3c835.js +2 -0
- abstra_statics/dist/assets/{ProjectLogin.26c92806.js → ProjectLogin.83ae9c4c.js} +2 -2
- abstra_statics/dist/assets/{ProjectSettings.70e7668b.js → ProjectSettings.f4e91391.js} +2 -2
- abstra_statics/dist/assets/{ProjectsView.83667357.js → ProjectsView.c4e3053a.js} +2 -2
- abstra_statics/dist/assets/{SaveButton.56d96f71.js → SaveButton.986667ef.js} +2 -2
- abstra_statics/dist/assets/ScrollArea.vue_vue_type_script_setup_true_lang.077a2088.js +2 -0
- abstra_statics/dist/assets/{Sidebar.fd8a9f17.js → Sidebar.b1e6ca23.js} +2 -2
- abstra_statics/dist/assets/{Sql.92e57cd8.js → Sql.24116fa0.js} +4 -4
- abstra_statics/dist/assets/Steps.95771774.js +2 -0
- abstra_statics/dist/assets/TableCard.981d88c4.js +2 -0
- abstra_statics/dist/assets/{TableEditor.de62b5ae.js → TableEditor.a74fc9f4.js} +2 -2
- abstra_statics/dist/assets/{Tables.f33c00ab.js → Tables.870957e7.js} +2 -2
- abstra_statics/dist/assets/{TablesDiagram.621aac9c.js → TablesDiagram.6a217e62.js} +2 -2
- abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.983777c7.js +2 -0
- abstra_statics/dist/assets/{Tasks.e7e8affd.js → Tasks.8fbc0cc0.js} +2 -2
- abstra_statics/dist/assets/{UploadOutlined.76665096.js → UploadOutlined.e2352877.js} +2 -2
- abstra_statics/dist/assets/{View.2d181255.js → View.fd9cb47e.js} +2 -2
- abstra_statics/dist/assets/{View.vue_vue_type_script_setup_true_lang.c02bf815.js → View.vue_vue_type_script_setup_true_lang.69e51c6f.js} +2 -2
- abstra_statics/dist/assets/{Watermark.34db0ee5.js → Watermark.b1fed4a7.js} +2 -2
- abstra_statics/dist/assets/{WebEditor.615c5ed3.js → WebEditor.75ce5bd6.js} +2 -2
- abstra_statics/dist/assets/WidgetPreview.5b0abaab.js +2 -0
- abstra_statics/dist/assets/WorkflowViewer.6f38d23f.js +2 -0
- abstra_statics/dist/assets/{ant-design.24becb3a.js → ant-design.5bd7ec4d.js} +2 -2
- abstra_statics/dist/assets/{apiKey.846016a7.js → apiKey.7cf16e08.js} +2 -2
- abstra_statics/dist/assets/asyncComputed.febe2b11.js +2 -0
- abstra_statics/dist/assets/{build.8774fc90.js → build.db7d8668.js} +2 -2
- abstra_statics/dist/assets/colorHelpers.939427f5.js +2 -0
- abstra_statics/dist/assets/{console.984bbe98.js → console.f402574a.js} +3 -3
- abstra_statics/dist/assets/constants.bbfdfb21.js +2 -0
- abstra_statics/dist/assets/{contracts.generated.31740563.js → contracts.generated.3f22c968.js} +2 -2
- abstra_statics/dist/assets/{cssMode.f4a00eca.js → cssMode.d0c8e26e.js} +2 -2
- abstra_statics/dist/assets/datetime.d5fe62ba.js +2 -0
- abstra_statics/dist/assets/dayjs.8c9480e7.js +2 -0
- abstra_statics/dist/assets/editor.11a4f0cf.js +2 -0
- abstra_statics/dist/assets/editor.main.2f21f781.js +2 -0
- abstra_statics/dist/assets/fetch.e0dfa394.js +2 -0
- abstra_statics/dist/assets/{files.c547743b.js → files.59b464cc.js} +2 -2
- abstra_statics/dist/assets/{folder.57131245.js → folder.5b0f3179.js} +2 -2
- abstra_statics/dist/assets/{freemarker2.7a4cfae0.js → freemarker2.03629ab6.js} +2 -2
- abstra_statics/dist/assets/{handlebars.db4a27de.js → handlebars.1163d9ba.js} +2 -2
- abstra_statics/dist/assets/{html.f4b3970c.js → html.ef74c7bd.js} +2 -2
- abstra_statics/dist/assets/{htmlMode.631923d5.js → htmlMode.8829acd3.js} +2 -2
- abstra_statics/dist/assets/{index.7f04c017.js → index.07e9309d.js} +2 -2
- abstra_statics/dist/assets/index.12e6cfe2.js +2 -0
- abstra_statics/dist/assets/{index.6f45b384.js → index.2aa34d4f.js} +2 -2
- abstra_statics/dist/assets/{index.2f74579e.js → index.5eeedb69.js} +2 -2
- abstra_statics/dist/assets/{index.2141f0e8.js → index.63e70668.js} +2 -2
- abstra_statics/dist/assets/index.75a16b09.js +2 -0
- abstra_statics/dist/assets/{index.30fbc3f5.js → index.76cbd30f.js} +2 -2
- abstra_statics/dist/assets/{index.12c03275.js → index.8995a499.js} +2 -2
- abstra_statics/dist/assets/{index.8e10d0e4.js → index.d408b03e.js} +2 -2
- abstra_statics/dist/assets/{javascript.b2197abc.js → javascript.0dfeb7bb.js} +2 -2
- abstra_statics/dist/assets/{jsonMode.8f2810a6.js → jsonMode.179b6695.js} +2 -2
- abstra_statics/dist/assets/{jwt-decode.esm.5ee65524.js → jwt-decode.esm.47f59010.js} +8 -8
- abstra_statics/dist/assets/{linters.7d520e27.js → linters.9f818fd6.js} +2 -2
- abstra_statics/dist/assets/{liquid.d3e68b2e.js → liquid.0627704b.js} +3 -3
- abstra_statics/dist/assets/{member.0ebe904c.js → member.689a99e8.js} +2 -2
- abstra_statics/dist/assets/{metadata.db332d21.js → metadata.69e468d6.js} +2 -2
- abstra_statics/dist/assets/{omniChatStore.cf2158f0.js → omniChatStore.07f62bd5.js} +2 -2
- abstra_statics/dist/assets/{organization.23b0aa74.js → organization.298987a0.js} +2 -2
- abstra_statics/dist/assets/{os.e0510e90.js → os.faa277a9.js} +2 -2
- abstra_statics/dist/assets/player.ebf3133f.js +2 -0
- abstra_statics/dist/assets/{plotly.min.f771780a.js → plotly.min.16914e67.js} +2 -2
- abstra_statics/dist/assets/polling.96dd15ee.js +2 -0
- abstra_statics/dist/assets/{project.afe4bf99.js → project.8a5a3632.js} +2 -2
- abstra_statics/dist/assets/{python.d8c220ed.js → python.3bf17d7f.js} +3 -3
- abstra_statics/dist/assets/{razor.97fa5198.js → razor.ea162aec.js} +2 -2
- abstra_statics/dist/assets/{record.dd367e66.js → record.30ff6eef.js} +2 -2
- abstra_statics/dist/assets/redirect.d0ca2136.js +2 -0
- abstra_statics/dist/assets/{repository.214607cb.js → repository.5c0cd878.js} +2 -2
- abstra_statics/dist/assets/repository.b1c27c35.js +2 -0
- abstra_statics/dist/assets/router.ae5c14de.js +2 -0
- abstra_statics/dist/assets/{router.9781de48.js → router.cfb03f89.js} +5 -5
- abstra_statics/dist/assets/{string.0d721ad6.js → string.39c8a903.js} +2 -2
- abstra_statics/dist/assets/{tables.45712b3f.js → tables.34208b7c.js} +2 -2
- abstra_statics/dist/assets/{tasksController.538cacf5.js → tasksController.04461f1a.js} +3 -3
- abstra_statics/dist/assets/{toggleHighContrast.daf44fef.js → toggleHighContrast.fa77fdf8.js} +7 -7
- abstra_statics/dist/assets/{tsMode.b785363f.js → tsMode.a5869619.js} +2 -2
- abstra_statics/dist/assets/{typescript.8bb42736.js → typescript.f2aa2c4b.js} +3 -3
- abstra_statics/dist/assets/url.4ba49005.js +2 -0
- abstra_statics/dist/assets/{useCodebaseEvents.e9e5d343.js → useCodebaseEvents.3542d20f.js} +2 -2
- abstra_statics/dist/assets/{useTables.2441f2b4.js → useTables.3e387cf0.js} +2 -2
- abstra_statics/dist/assets/userStore.e8304ebc.js +2 -0
- abstra_statics/dist/assets/uuid.2075c158.js +2 -0
- abstra_statics/dist/assets/{vue-flow-background.a4e5e1cd.js → vue-flow-background.32950d16.js} +2 -2
- abstra_statics/dist/assets/{vue-flow-core.bc9175da.js → vue-flow-core.d96b7b33.js} +2 -2
- abstra_statics/dist/assets/{vue-quill.esm-bundler.12c58800.js → vue-quill.esm-bundler.42450ff3.js} +2 -2
- abstra_statics/dist/assets/{workspaceStore.18d1ed9a.js → workspaceStore.9693f43b.js} +2 -2
- abstra_statics/dist/assets/{xml.1dacd023.js → xml.a1244cf9.js} +3 -3
- abstra_statics/dist/assets/{yaml.e841ac1c.js → yaml.759fa896.js} +3 -3
- abstra_statics/dist/console.html +14 -14
- abstra_statics/dist/editor.html +13 -13
- abstra_statics/dist/player.html +9 -9
- abstra_internals/services/fs_storage.py +0 -76
- abstra_internals/services/fs_storage_test.py +0 -71
- abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.9c4020b5.js +0 -2
- abstra_statics/dist/assets/App.cdc99dd8.js +0 -2
- abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.c5b57972.js +0 -2
- abstra_statics/dist/assets/Billing.f53186a3.js +0 -2
- abstra_statics/dist/assets/CloseCircleOutlined.36d9f25b.js +0 -2
- abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.7061772f.js +0 -2
- abstra_statics/dist/assets/ContentLayout.da1fff81.js +0 -2
- abstra_statics/dist/assets/CrudView.5b250a71.js +0 -2
- abstra_statics/dist/assets/EnvVars.688f662d.js +0 -2
- abstra_statics/dist/assets/ExclamationCircleOutlined.ea15dcd1.js +0 -2
- abstra_statics/dist/assets/LoadingContainer.12120ff7.js +0 -2
- abstra_statics/dist/assets/LoadingOutlined.3c83d190.js +0 -2
- abstra_statics/dist/assets/Login.de9c56a5.js +0 -2
- abstra_statics/dist/assets/Logo.3f68eae2.js +0 -2
- abstra_statics/dist/assets/Logs.1f1770c9.js +0 -2
- abstra_statics/dist/assets/LogsController.e88bddfb.js +0 -2
- abstra_statics/dist/assets/Main.a79ded11.js +0 -2
- abstra_statics/dist/assets/Navbar.2529c5ae.js +0 -2
- abstra_statics/dist/assets/NewEditor.2603174c.js +0 -8
- abstra_statics/dist/assets/OidcLoginCallback.7ed0c484.js +0 -2
- abstra_statics/dist/assets/OidcLogoutCallback.7303c2ab.js +0 -2
- abstra_statics/dist/assets/Organization.aab680aa.js +0 -2
- abstra_statics/dist/assets/PhCopySimple.vue.11467aaf.js +0 -2
- abstra_statics/dist/assets/PhDownloadSimple.vue.e11671c2.js +0 -2
- abstra_statics/dist/assets/Project.72b53439.js +0 -2
- abstra_statics/dist/assets/ScrollArea.vue_vue_type_script_setup_true_lang.a29d9bc5.js +0 -2
- abstra_statics/dist/assets/Steps.8d0493a8.js +0 -2
- abstra_statics/dist/assets/TableCard.75d256c8.js +0 -2
- abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.db87820d.js +0 -2
- abstra_statics/dist/assets/WidgetPreview.d7362a8d.js +0 -2
- abstra_statics/dist/assets/WorkflowViewer.e89c0824.js +0 -2
- abstra_statics/dist/assets/asyncComputed.78dd1715.js +0 -2
- abstra_statics/dist/assets/colorHelpers.d8c19ea3.js +0 -2
- abstra_statics/dist/assets/constants.3b7395d7.js +0 -2
- abstra_statics/dist/assets/datetime.01b86df2.js +0 -2
- abstra_statics/dist/assets/dayjs.26942e0e.js +0 -2
- abstra_statics/dist/assets/editor.a6369f16.js +0 -2
- abstra_statics/dist/assets/editor.main.a0763b31.js +0 -2
- abstra_statics/dist/assets/fetch.33e85d9b.js +0 -2
- abstra_statics/dist/assets/index.0a1e5d8b.js +0 -2
- abstra_statics/dist/assets/index.fb17f22c.js +0 -2
- abstra_statics/dist/assets/player.78bcc85c.js +0 -2
- abstra_statics/dist/assets/polling.5339a00f.js +0 -2
- abstra_statics/dist/assets/redirect.970a0b6b.js +0 -2
- abstra_statics/dist/assets/repository.c874615c.js +0 -2
- abstra_statics/dist/assets/repository.d889eafa.js +0 -2
- abstra_statics/dist/assets/router.e3b4de3c.js +0 -2
- abstra_statics/dist/assets/url.804625c6.js +0 -2
- abstra_statics/dist/assets/userStore.9eb65729.js +0 -2
- abstra_statics/dist/assets/uuid.bc394306.js +0 -2
- {abstra-3.24.4.dist-info → abstra-3.24.5.dist-info}/WHEEL +0 -0
- {abstra-3.24.4.dist-info → abstra-3.24.5.dist-info}/entry_points.txt +0 -0
- {abstra-3.24.4.dist-info → abstra-3.24.5.dist-info}/top_level.txt +0 -0
- /abstra_statics/dist/assets/{LogsController.61f8e22d.css → ExecutionContext.61f8e22d.css} +0 -0
|
@@ -7,7 +7,7 @@ from uuid import uuid4
|
|
|
7
7
|
from abstra_internals.cloud_api.http_client import HTTPClient
|
|
8
8
|
from abstra_internals.consts.filepaths import TASKS_DIR_PATH
|
|
9
9
|
from abstra_internals.repositories.multiprocessing import MPContext
|
|
10
|
-
from abstra_internals.services.
|
|
10
|
+
from abstra_internals.services.sql_storage import SqlStorage
|
|
11
11
|
from abstra_internals.utils.datetime import to_utc_iso_string
|
|
12
12
|
from abstra_internals.utils.serializable import Serializable
|
|
13
13
|
|
|
@@ -108,7 +108,7 @@ class TasksRepository(ABC):
|
|
|
108
108
|
|
|
109
109
|
class LocalTasksRepository(TasksRepository):
|
|
110
110
|
def __init__(self, mp_context: MPContext):
|
|
111
|
-
self.fs_storage =
|
|
111
|
+
self.fs_storage = SqlStorage(
|
|
112
112
|
mp_context, directory=TASKS_DIR_PATH, model=TaskDTO
|
|
113
113
|
)
|
|
114
114
|
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Generic, List, Optional, Type, TypeVar
|
|
4
|
+
|
|
5
|
+
from abstra_json_sql.eval import eval_sql
|
|
6
|
+
from abstra_json_sql.persistence import FileSystemJsonTables
|
|
7
|
+
from abstra_json_sql.tables import Column, ColumnType, Table
|
|
8
|
+
|
|
9
|
+
from abstra_internals.interface.sdk.tables.utils import serialize
|
|
10
|
+
from abstra_internals.logger import AbstraLogger
|
|
11
|
+
from abstra_internals.repositories.multiprocessing import MPContext
|
|
12
|
+
from abstra_internals.settings import Settings
|
|
13
|
+
from abstra_internals.utils.serializable import Serializable
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound=Serializable)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class SqlStorage(Generic[T]):
|
|
19
|
+
def __init__(self, mp_context: MPContext, directory: str, model: Type[T]):
|
|
20
|
+
self.lock = mp_context.RLock()
|
|
21
|
+
self.directory = directory
|
|
22
|
+
self.model = model
|
|
23
|
+
self.table_name = "data"
|
|
24
|
+
self._tables_instance: Optional[FileSystemJsonTables] = None
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def directory_path(self) -> Path:
|
|
28
|
+
return Settings.root_path / self.directory
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def tables(self) -> FileSystemJsonTables:
|
|
32
|
+
"""Get or create a FileSystemJsonTables instance."""
|
|
33
|
+
if self._tables_instance is None:
|
|
34
|
+
self.directory_path.mkdir(parents=True, exist_ok=True)
|
|
35
|
+
self._tables_instance = FileSystemJsonTables(workdir=self.directory_path)
|
|
36
|
+
return self._tables_instance
|
|
37
|
+
|
|
38
|
+
def _ensure_table_exists(self) -> None:
|
|
39
|
+
"""Ensure the table exists in the database."""
|
|
40
|
+
try:
|
|
41
|
+
# Try to get the table to see if it exists
|
|
42
|
+
self.tables.get_table(self.table_name)
|
|
43
|
+
except (FileNotFoundError, Exception):
|
|
44
|
+
# If the table doesn't exist, create it
|
|
45
|
+
# Always start with an id column
|
|
46
|
+
columns = [Column(name="id", schema=ColumnType.string, is_primary_key=True)]
|
|
47
|
+
|
|
48
|
+
if hasattr(self.model, "model_fields"):
|
|
49
|
+
# Pydantic v2
|
|
50
|
+
for field_name in self.model.model_fields.keys():
|
|
51
|
+
if field_name != "id": # Skip if model already has id
|
|
52
|
+
columns.append(
|
|
53
|
+
Column(name=field_name, schema=ColumnType.string)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
table = Table(
|
|
57
|
+
name=self.table_name,
|
|
58
|
+
columns=columns,
|
|
59
|
+
data=[],
|
|
60
|
+
)
|
|
61
|
+
self.tables.add_table(table)
|
|
62
|
+
|
|
63
|
+
def _serialize_value(self, value) -> str:
|
|
64
|
+
"""Serialize a value to a string for SQL storage."""
|
|
65
|
+
serialized = serialize(value)
|
|
66
|
+
if serialized is None:
|
|
67
|
+
return ""
|
|
68
|
+
if isinstance(serialized, str):
|
|
69
|
+
return serialized
|
|
70
|
+
return json.dumps(serialized)
|
|
71
|
+
|
|
72
|
+
def _escape_sql_string(self, value: str) -> str:
|
|
73
|
+
"""Escape single quotes in SQL string literals."""
|
|
74
|
+
return value.replace("'", "''")
|
|
75
|
+
|
|
76
|
+
def save(self, id: str, data: T) -> None:
|
|
77
|
+
with self.lock:
|
|
78
|
+
self._ensure_table_exists()
|
|
79
|
+
|
|
80
|
+
# Convert the model to dict and serialize values
|
|
81
|
+
data_dict = data.dump()
|
|
82
|
+
|
|
83
|
+
# Add the id to the data dict if it's not already there
|
|
84
|
+
if "id" not in data_dict:
|
|
85
|
+
data_dict["id"] = id
|
|
86
|
+
|
|
87
|
+
# Serialize values
|
|
88
|
+
serialized_dict = {}
|
|
89
|
+
for key, value in data_dict.items():
|
|
90
|
+
serialized_dict[key] = self._serialize_value(value)
|
|
91
|
+
|
|
92
|
+
# Check if record exists
|
|
93
|
+
try:
|
|
94
|
+
result = eval_sql(
|
|
95
|
+
code=f'SELECT "id" FROM {self.table_name} WHERE "id" = \'{self._escape_sql_string(id)}\'',
|
|
96
|
+
tables=self.tables,
|
|
97
|
+
ctx={},
|
|
98
|
+
)
|
|
99
|
+
except Exception as e:
|
|
100
|
+
AbstraLogger.capture_exception(e)
|
|
101
|
+
result = []
|
|
102
|
+
|
|
103
|
+
if result and len(result) > 0:
|
|
104
|
+
# Update existing record
|
|
105
|
+
# Use double quotes for column names to handle SQL keywords
|
|
106
|
+
set_parts = []
|
|
107
|
+
for key, value in serialized_dict.items():
|
|
108
|
+
if key != "id":
|
|
109
|
+
escaped_value = self._escape_sql_string(value)
|
|
110
|
+
set_parts.append(f"\"{key}\" = '{escaped_value}'")
|
|
111
|
+
|
|
112
|
+
if set_parts:
|
|
113
|
+
set_clause = ", ".join(set_parts)
|
|
114
|
+
try:
|
|
115
|
+
eval_sql(
|
|
116
|
+
code=f"UPDATE {self.table_name} SET {set_clause} WHERE \"id\" = '{self._escape_sql_string(id)}'",
|
|
117
|
+
tables=self.tables,
|
|
118
|
+
ctx={},
|
|
119
|
+
)
|
|
120
|
+
except Exception as e:
|
|
121
|
+
AbstraLogger.capture_exception(e)
|
|
122
|
+
raise
|
|
123
|
+
else:
|
|
124
|
+
# Insert new record
|
|
125
|
+
# Use double quotes for column names to handle SQL keywords
|
|
126
|
+
columns = ", ".join([f'"{key}"' for key in serialized_dict.keys()])
|
|
127
|
+
values = ", ".join(
|
|
128
|
+
[
|
|
129
|
+
f"'{self._escape_sql_string(value)}'"
|
|
130
|
+
for value in serialized_dict.values()
|
|
131
|
+
]
|
|
132
|
+
)
|
|
133
|
+
try:
|
|
134
|
+
sql_command = (
|
|
135
|
+
f"INSERT INTO {self.table_name} ({columns}) VALUES ({values})"
|
|
136
|
+
)
|
|
137
|
+
eval_sql(
|
|
138
|
+
code=sql_command,
|
|
139
|
+
tables=self.tables,
|
|
140
|
+
ctx={},
|
|
141
|
+
)
|
|
142
|
+
except Exception as e:
|
|
143
|
+
AbstraLogger.capture_exception(e)
|
|
144
|
+
raise
|
|
145
|
+
|
|
146
|
+
def load_all(self) -> List[T]:
|
|
147
|
+
with self.lock:
|
|
148
|
+
try:
|
|
149
|
+
self._ensure_table_exists()
|
|
150
|
+
|
|
151
|
+
result = eval_sql(
|
|
152
|
+
code=f"SELECT * FROM {self.table_name}",
|
|
153
|
+
tables=self.tables,
|
|
154
|
+
ctx={},
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
data_list = []
|
|
158
|
+
if result is not None:
|
|
159
|
+
for row in result:
|
|
160
|
+
try:
|
|
161
|
+
# Deserialize JSON strings back to objects
|
|
162
|
+
deserialized_row = self._deserialize_row(row)
|
|
163
|
+
data_list.append(self.model(**deserialized_row))
|
|
164
|
+
except Exception as e:
|
|
165
|
+
AbstraLogger.capture_exception(e)
|
|
166
|
+
continue
|
|
167
|
+
|
|
168
|
+
return data_list
|
|
169
|
+
except Exception as e:
|
|
170
|
+
AbstraLogger.capture_exception(e)
|
|
171
|
+
return []
|
|
172
|
+
|
|
173
|
+
def load(self, id: str) -> Optional[T]:
|
|
174
|
+
with self.lock:
|
|
175
|
+
return self._load(id)
|
|
176
|
+
|
|
177
|
+
def delete(self, id: str) -> None:
|
|
178
|
+
with self.lock:
|
|
179
|
+
try:
|
|
180
|
+
self._ensure_table_exists()
|
|
181
|
+
eval_sql(
|
|
182
|
+
code=f"DELETE FROM {self.table_name} WHERE \"id\" = '{self._escape_sql_string(id)}'",
|
|
183
|
+
tables=self.tables,
|
|
184
|
+
ctx={},
|
|
185
|
+
)
|
|
186
|
+
except Exception as e:
|
|
187
|
+
AbstraLogger.capture_exception(e)
|
|
188
|
+
|
|
189
|
+
def clear(self) -> None:
|
|
190
|
+
with self.lock:
|
|
191
|
+
try:
|
|
192
|
+
self._ensure_table_exists()
|
|
193
|
+
eval_sql(
|
|
194
|
+
code=f"DELETE FROM {self.table_name}",
|
|
195
|
+
tables=self.tables,
|
|
196
|
+
ctx={},
|
|
197
|
+
)
|
|
198
|
+
except Exception as e:
|
|
199
|
+
AbstraLogger.capture_exception(e)
|
|
200
|
+
|
|
201
|
+
def _deserialize_row(self, row: dict) -> dict:
|
|
202
|
+
"""Deserialize row data, converting JSON strings back to objects."""
|
|
203
|
+
deserialized = {}
|
|
204
|
+
for key, value in row.items():
|
|
205
|
+
if isinstance(value, str) and value.strip():
|
|
206
|
+
# Try to parse as JSON
|
|
207
|
+
try:
|
|
208
|
+
deserialized[key] = json.loads(value)
|
|
209
|
+
except (json.JSONDecodeError, ValueError):
|
|
210
|
+
# If it's not valid JSON, keep as string
|
|
211
|
+
deserialized[key] = value
|
|
212
|
+
elif value == "":
|
|
213
|
+
# Empty strings might represent None
|
|
214
|
+
deserialized[key] = None
|
|
215
|
+
else:
|
|
216
|
+
deserialized[key] = value
|
|
217
|
+
return deserialized
|
|
218
|
+
|
|
219
|
+
def _load(self, id: str) -> Optional[T]:
|
|
220
|
+
try:
|
|
221
|
+
self._ensure_table_exists()
|
|
222
|
+
|
|
223
|
+
result = eval_sql(
|
|
224
|
+
code=f"SELECT * FROM {self.table_name} WHERE \"id\" = '{self._escape_sql_string(id)}'",
|
|
225
|
+
tables=self.tables,
|
|
226
|
+
ctx={},
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
if result and len(result) > 0:
|
|
230
|
+
deserialized_row = self._deserialize_row(result[0])
|
|
231
|
+
return self.model(**deserialized_row)
|
|
232
|
+
|
|
233
|
+
return None
|
|
234
|
+
except Exception as e:
|
|
235
|
+
AbstraLogger.capture_exception(e)
|
|
236
|
+
return None
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
from abstra_internals.services.sql_storage import SqlStorage
|
|
2
|
+
from abstra_internals.utils.serializable import Serializable
|
|
3
|
+
from tests.fixtures import BaseTest
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class MockModel(Serializable):
|
|
7
|
+
name: str
|
|
8
|
+
age: int
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ModelWithReservedWords(Serializable):
|
|
12
|
+
"""Model with SQL reserved words as field names to test escaping."""
|
|
13
|
+
|
|
14
|
+
update: str
|
|
15
|
+
select: str
|
|
16
|
+
where: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class TestFileManager(BaseTest):
|
|
20
|
+
def setUp(self) -> None:
|
|
21
|
+
super().setUp()
|
|
22
|
+
mp_context = self.repositories.mp_context.get_context()
|
|
23
|
+
self.manager = SqlStorage[MockModel](
|
|
24
|
+
mp_context, directory="test", model=MockModel
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
def test_save_and_load(self):
|
|
28
|
+
test_data = MockModel(name="John", age=30)
|
|
29
|
+
self.manager.save("test_id", test_data)
|
|
30
|
+
|
|
31
|
+
loaded_data = self.manager.load("test_id")
|
|
32
|
+
assert loaded_data is not None
|
|
33
|
+
assert loaded_data.name == "John"
|
|
34
|
+
assert loaded_data.age == 30
|
|
35
|
+
|
|
36
|
+
def test_load_all(self):
|
|
37
|
+
test_data1 = MockModel(name="John", age=30)
|
|
38
|
+
test_data2 = MockModel(name="Jane", age=25)
|
|
39
|
+
|
|
40
|
+
self.manager.save("test_id_1", test_data1)
|
|
41
|
+
self.manager.save("test_id_2", test_data2)
|
|
42
|
+
|
|
43
|
+
loaded_data = self.manager.load_all()
|
|
44
|
+
assert len(loaded_data) == 2
|
|
45
|
+
|
|
46
|
+
def test_delete(self):
|
|
47
|
+
test_data = MockModel(name="John", age=30)
|
|
48
|
+
self.manager.save("test_id", test_data)
|
|
49
|
+
|
|
50
|
+
self.manager.delete("test_id")
|
|
51
|
+
loaded_data = self.manager.load("test_id")
|
|
52
|
+
assert loaded_data is None
|
|
53
|
+
|
|
54
|
+
def test_clear(self):
|
|
55
|
+
test_data1 = MockModel(name="John", age=30)
|
|
56
|
+
test_data2 = MockModel(name="Jane", age=25)
|
|
57
|
+
|
|
58
|
+
self.manager.save("test_id_1", test_data1)
|
|
59
|
+
self.manager.save("test_id_2", test_data2)
|
|
60
|
+
|
|
61
|
+
self.manager.clear()
|
|
62
|
+
loaded_data = self.manager.load_all()
|
|
63
|
+
assert len(loaded_data) == 0
|
|
64
|
+
|
|
65
|
+
def test_load_nonexistent(self):
|
|
66
|
+
loaded_data = self.manager.load("nonexistent_id")
|
|
67
|
+
assert loaded_data is None
|
|
68
|
+
|
|
69
|
+
def test_save_invalid_data(self):
|
|
70
|
+
# This test needs to be adapted for SQL storage
|
|
71
|
+
# Instead of writing invalid data directly to a file,
|
|
72
|
+
# we test that loading a model with invalid data fails gracefully
|
|
73
|
+
# by trying to create a model with invalid data
|
|
74
|
+
try:
|
|
75
|
+
invalid_model = MockModel(name="John", age="thirty") # type: ignore
|
|
76
|
+
# If this succeeds, pydantic coerced the string to int
|
|
77
|
+
# So we save it and load it back
|
|
78
|
+
self.manager.save("test_id", invalid_model)
|
|
79
|
+
loaded_data = self.manager.load("test_id")
|
|
80
|
+
# The data should load successfully since pydantic accepted it
|
|
81
|
+
assert loaded_data is not None
|
|
82
|
+
except Exception:
|
|
83
|
+
# If pydantic rejects it, that's also acceptable
|
|
84
|
+
pass
|
|
85
|
+
|
|
86
|
+
def test_reserved_sql_keywords(self):
|
|
87
|
+
"""Test that SQL reserved words as field names are properly escaped."""
|
|
88
|
+
mp_context = self.repositories.mp_context.get_context()
|
|
89
|
+
manager = SqlStorage[ModelWithReservedWords](
|
|
90
|
+
mp_context, directory="test_reserved", model=ModelWithReservedWords
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
# Test save with reserved keywords
|
|
94
|
+
test_data = ModelWithReservedWords(
|
|
95
|
+
update="update_value", select="select_value", where="where_value"
|
|
96
|
+
)
|
|
97
|
+
manager.save("reserved_id", test_data)
|
|
98
|
+
|
|
99
|
+
# Test load
|
|
100
|
+
loaded_data = manager.load("reserved_id")
|
|
101
|
+
assert loaded_data is not None
|
|
102
|
+
assert loaded_data.update == "update_value"
|
|
103
|
+
assert loaded_data.select == "select_value"
|
|
104
|
+
assert loaded_data.where == "where_value"
|
|
105
|
+
|
|
106
|
+
# Test update
|
|
107
|
+
test_data.update = "new_update_value"
|
|
108
|
+
manager.save("reserved_id", test_data)
|
|
109
|
+
|
|
110
|
+
reloaded_data = manager.load("reserved_id")
|
|
111
|
+
assert reloaded_data is not None
|
|
112
|
+
assert reloaded_data.update == "new_update_value"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as c,c as b,a as
|
|
2
|
-
//# sourceMappingURL=AbstraButton.vue_vue_type_script_setup_true_lang.
|
|
1
|
+
import{d as c,c as b,a as r,b as a,u as n,eG as d,ed as g,o as i,f as l,dj as p,ae as u,h as f,eH as m,bY as y,b0 as _}from"./jwt-decode.esm.47f59010.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="8c010625-7f09-4eb6-9da4-68d63af3501b",t._sentryDebugIdIdentifier="sentry-dbid-8c010625-7f09-4eb6-9da4-68d63af3501b")}catch{}})();const h=c({__name:"AbstraButton",props:{disabledTooltip:{},tooltip:{},prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(t){const e=t,s=b(()=>e.disabledTooltip&&e.disabled?e.disabledTooltip:e.tooltip);return(o,k)=>s.value?(i(),r(n(_),{key:0,title:s.value},{default:a(()=>[l(n(y),d(m(o.$props)),{default:a(()=>[l(n(p),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:a(()=>[o.loading?f("",!0):u(o.$slots,"default",{key:0})]),_:3})]),_:3},16)]),_:3},8,["title"])):(i(),r(n(y),d(g({key:1},o.$props)),{default:a(()=>[l(n(p),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:a(()=>[o.loading?f("",!0):u(o.$slots,"default",{key:0})]),_:3})]),_:3},16))}});export{h as _};
|
|
2
|
+
//# sourceMappingURL=AbstraButton.vue_vue_type_script_setup_true_lang.6c541630.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as t}from"./Logo.e86b6b23.js";import{d as n,o as r,a as d,u as i}from"./jwt-decode.esm.47f59010.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d51df29e-b9a5-4096-92a2-aead1130b4ae",e._sentryDebugIdIdentifier="sentry-dbid-d51df29e-b9a5-4096-92a2-aead1130b4ae")}catch{}})();const f="/assets/logo.0faadfa2.svg",b=n({__name:"AbstraLogo",props:{hideText:{type:Boolean},size:{}},setup(e){return(a,o)=>{var s;return r(),d(t,{"image-url":i(f),"brand-name":"Abstra","hide-text":a.hideText,size:(s=a.size)!=null?s:"small"},null,8,["image-url","hide-text","size"])}}});export{b as _};
|
|
2
|
+
//# sourceMappingURL=AbstraLogo.vue_vue_type_script_setup_true_lang.e1cfa824.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as x}from"./CrudView.
|
|
2
|
-
//# sourceMappingURL=ApiKeys.
|
|
1
|
+
import{C as x}from"./CrudView.789b533f.js";import{d as I,r as A,i as e,ei as C,c as h,ac as D,f as d,u as t,b as p,aY as M,o as P,de as T,g as y,t as f,df as j,M as V,ek as B,er as E}from"./jwt-decode.esm.47f59010.js";import{a as N}from"./asyncComputed.febe2b11.js";import{A as c}from"./apiKey.7cf16e08.js";import"./router.cfb03f89.js";import{M as $}from"./member.689a99e8.js";import{a as z}from"./project.8a5a3632.js";import"./tables.34208b7c.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.a2b3eeb7.js";import"./constants.bbfdfb21.js";import"./url.4ba49005.js";import"./PhDotsThreeVertical.vue.e9c6f787.js";import"./index.12e6cfe2.js";import"./index.8995a499.js";import"./record.30ff6eef.js";import"./string.39c8a903.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="19e7602f-9a32-4894-930b-5f095dcd8c13",s._sentryDebugIdIdentifier="sentry-dbid-19e7602f-9a32-4894-930b-5f095dcd8c13")}catch{}})();const te=I({__name:"ApiKeys",setup(s){const o=A(null),_=[{key:"name",label:e.translate("i18n_apikeysview_field_name")}],l=C().params.projectId,w=new $,{loading:v,result:k,refetch:m}=N(async()=>Promise.all([c.list(l),z.get(l).then(a=>w.list(a.organizationId))]).then(([a,n])=>a.map(i=>({apiKey:i,member:n.find(r=>r.authorId===i.ownerId)})))),b=async a=>{const n=await c.create({projectId:l,name:a.name});m(),o.value=n.value},g=h(()=>{var a,n;return{columns:[{title:e.translate("i18n_apikeysview_column_name")},{title:e.translate("i18n_apikeysview_column_creation_date")},{title:e.translate("i18n_apikeysview_column_owner")},{title:"",align:"right"}],rows:(n=(a=k.value)==null?void 0:a.map(({apiKey:i,member:r})=>{var u;return{key:i.id,cells:[{type:"text",text:i.name},{type:"text",text:B(i.createdAt)},{type:"text",text:(u=r==null?void 0:r.email)!=null?u:e.translate("i18n_apikeysview_owner_unknown")},{type:"actions",actions:[{label:e.translate("i18n_apikeysview_action_delete"),icon:E,dangerous:!0,onClick:async()=>{await c.delete(l,i.id),m()}}]}]}}))!=null?n:[]}});return(a,n)=>(P(),D(M,null,[d(x,{"entity-name":t(e).translate("i18n_apikeysview_entity_name"),"create-button-text":t(e).translate("i18n_apikeysview_create_button"),loading:t(v),title:t(e).translate("i18n_apikeysview_title"),description:t(e).translate("i18n_apikeysview_description"),"empty-title":t(e).translate("i18n_apikeysview_empty_title"),table:g.value,fields:_,create:b},null,8,["entity-name","create-button-text","loading","title","description","empty-title","table"]),d(t(V),{open:!!o.value,title:t(e).translate("i18n_apikeysview_modal_title"),onCancel:n[0]||(n[0]=i=>o.value=null)},{footer:p(()=>[]),default:p(()=>[d(t(T),null,{default:p(()=>[y(f(t(e).translate("i18n_apikeysview_modal_description")),1)]),_:1}),d(t(j),{code:"",copyable:""},{default:p(()=>[y(f(o.value),1)]),_:1})]),_:1},8,["open","title"])],64))}});export{te as default};
|
|
2
|
+
//# sourceMappingURL=ApiKeys.96f96fe2.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./App.vue_vue_type_style_index_0_lang.08210ecb.js";import{_ as c}from"./App.vue_vue_type_style_index_0_lang.08210ecb.js";import"./userStore.e8304ebc.js";import"./jwt-decode.esm.47f59010.js";import"./PlayerConfigProvider.f0eaf9f3.js";import"./colorHelpers.939427f5.js";import"./workspaceStore.9693f43b.js";import"./url.4ba49005.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="9b55f592-c290-4d3d-a56e-9dec44d175f3",e._sentryDebugIdIdentifier="sentry-dbid-9b55f592-c290-4d3d-a56e-9dec44d175f3")}catch{}})();export{c as default};
|
|
2
|
+
//# sourceMappingURL=App.6b1b6a94.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as r}from"./userStore.e8304ebc.js";import{W as n}from"./PlayerConfigProvider.f0eaf9f3.js";import{u as c}from"./workspaceStore.9693f43b.js";import{d as f,w as i,j as d,u as o,a as p,b as u,h as l,o as m,f as _}from"./jwt-decode.esm.47f59010.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="a1fd0e72-daab-4bc5-9c5b-98eae69e3f77",t._sentryDebugIdIdentifier="sentry-dbid-a1fd0e72-daab-4bc5-9c5b-98eae69e3f77")}catch{}})();const v=f({__name:"App",setup(t){const a=r(),e=c();return e.actions.fetch(),i(()=>a.jwt,e.actions.fetch),(w,b)=>{const s=d("RouterView");return o(e).state.workspace?(m(),p(n,{key:0,"main-color":o(e).state.workspace.mainColor,background:o(e).state.workspace.theme,"font-family":o(e).state.workspace.fontFamily,locale:o(e).state.workspace.language},{default:u(()=>[_(s,{style:{height:"100vh",width:"100%"}})]),_:1},8,["main-color","background","font-family","locale"])):l("",!0)}}});export{v as _};
|
|
2
|
+
//# sourceMappingURL=App.vue_vue_type_style_index_0_lang.08210ecb.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as c,o,ac as n,ae as s,e as d,h as a}from"./jwt-decode.esm.
|
|
2
|
-
//# sourceMappingURL=BaseLayout.
|
|
1
|
+
import{_ as c,o,ac as n,ae as s,e as d,h as a}from"./jwt-decode.esm.47f59010.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="00dc26ac-5682-4d1b-83be-3f0d4e3b4050",e._sentryDebugIdIdentifier="sentry-dbid-00dc26ac-5682-4d1b-83be-3f0d4e3b4050")}catch{}})();const r={},i={class:"base-layout"},_={class:"base-middle"},l={class:"content"},u={class:"left"},f={key:0,class:"base-footer"},b={key:0};function y(e,t){return o(),n("div",i,[s(e.$slots,"sidebar",{},void 0,!0),d("section",_,[s(e.$slots,"navbar",{},void 0,!0),d("section",l,[d("section",u,[s(e.$slots,"content",{},void 0,!0),e.$slots.footer?(o(),n("section",f,[s(e.$slots,"footer",{},void 0,!0)])):a("",!0)]),e.$slots.chat?(o(),n("section",b,[s(e.$slots,"chat",{},void 0,!0)])):a("",!0)])])])}const g=c(r,[["render",y],["__scopeId","data-v-da85ecdc"]]);export{g as B};
|
|
2
|
+
//# sourceMappingURL=BaseLayout.2a82be24.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as w}from"./asyncComputed.febe2b11.js";import{d as h,ei as k,U as I,u as e,a as d,ac as x,f as n,b as t,h as C,o,A as _,g as c,t as s,i as u,bY as v,dj as p,e as z}from"./jwt-decode.esm.47f59010.js";import{o as m,c as B}from"./router.cfb03f89.js";import{a as D}from"./organization.298987a0.js";import"./tables.34208b7c.js";import{L as N}from"./LoadingContainer.4430af86.js";import"./index.8995a499.js";import"./record.30ff6eef.js";import"./string.39c8a903.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="0b75320b-34a6-4ebc-8483-9f7faa22ec94",a._sentryDebugIdIdentifier="sentry-dbid-0b75320b-34a6-4ebc-8483-9f7faa22ec94")}catch{}})();const U={key:1},j=["src"],O=h({__name:"Billing",setup(a){const g=k().params.organizationId,{loading:y,result:r}=w(async()=>{const l=await D.get(g),f=await l.getUsageReportUrl();return{organization:l,reportUrl:f}});I(()=>{location.search.includes("upgrade")&&m.showNewMessage("I want to upgrade my plan")});const b=()=>m.showNewMessage("I want to upgrade my plan");return(l,f)=>e(y)?(o(),d(N,{key:0})):e(r)?(o(),x("div",U,[n(e(p),{justify:"space-between",align:"center"},{default:t(()=>[n(e(_),{level:3},{default:t(()=>[c(s(e(u).translate("i18n_billing_current_plan"))+" "+s(e(r).organization.coalescedPlan),1)]),_:1}),n(e(v),{type:"primary",onClick:b},{default:t(()=>[c(s(e(u).translate("i18n_billing_upgrade")),1)]),_:1})]),_:1}),n(e(B),{style:{"margin-top":"0"}}),e(r).organization.hasUsageReport?(o(),d(e(p),{key:0,align:"center",justify:"center"},{default:t(()=>[z("iframe",{src:e(r).reportUrl,frameborder:"0",style:{width:"1000px",height:"1700px"}},null,8,j)]),_:1})):(o(),d(e(p),{key:1,align:"center",justify:"center"},{default:t(()=>[n(e(_),{level:4},{default:t(()=>[c(s(e(u).translate("i18n_billing_no_usage_report")),1)]),_:1})]),_:1}))])):C("",!0)}});export{O as default};
|
|
2
|
+
//# sourceMappingURL=Billing.24199f3a.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{d as O,an as w,b_ as _,f as c,aq as f,aC as R,az as A,eb as j,bu as D,bW as P,ai as z,aj as E,W as B,au as M,e2 as X,aK as N,aG as H,dF as L,bE as F}from"./jwt-decode.esm.
|
|
1
|
+
import{d as O,an as w,b_ as _,f as c,aq as f,aC as R,az as A,eb as j,bu as D,bW as P,ai as z,aj as E,W as B,au as M,e2 as X,aK as N,aG as H,dF as L,bE as F}from"./jwt-decode.esm.47f59010.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="20072785-d535-494f-870a-d4b669c58a8d",r._sentryDebugIdIdentifier="sentry-dbid-20072785-d535-494f-870a-d4b669c58a8d")}catch{}})();var U=globalThis&&globalThis.__rest||function(r,e){var a={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(r);t<n.length;t++)e.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(r,n[t])&&(a[n[t]]=r[n[t]]);return a};const W=()=>({prefixCls:String,href:String,separator:R.any,dropdownProps:A(),overlay:R.any,onClick:j()}),K=O({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:W(),slots:Object,setup(r,e){let{slots:a,attrs:n,emit:t}=e;const{prefixCls:u}=w("breadcrumb",r),y=(d,h)=>{const b=_(a,r,"overlay");return b?c(P,f(f({},r.dropdownProps),{},{overlay:b,placement:"bottom"}),{default:()=>[c("span",{class:`${h}-overlay-link`},[d,c(D,null,null)])]}):d},I=d=>{t("click",d)};return()=>{var d;const h=(d=_(a,r,"separator"))!==null&&d!==void 0?d:"/",b=_(a,r),{class:l,style:s}=n,o=U(n,["class","style"]);let i;return r.href!==void 0?i=c("a",f({class:`${u.value}-link`,onClick:I},o),[b]):i=c("span",f({class:`${u.value}-link`,onClick:I},o),[b]),i=y(i,u.value),b!=null?c("li",{class:l,style:s},[i,h&&c("span",{class:`${u.value}-separator`},[h])]):null}}}),V=r=>{const{componentCls:e,iconCls:a}=r;return{[e]:B(B({},M(r)),{color:r.breadcrumbBaseColor,fontSize:r.breadcrumbFontSize,[a]:{fontSize:r.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:B({color:r.breadcrumbLinkColor,transition:`color ${r.motionDurationMid}`,padding:`0 ${r.paddingXXS}px`,borderRadius:r.borderRadiusSM,height:r.lineHeight*r.fontSize,display:"inline-block",marginInline:-r.marginXXS,"&:hover":{color:r.breadcrumbLinkColorHover,backgroundColor:r.colorBgTextHover}},X(r)),["li:last-child"]:{color:r.breadcrumbLastItemColor,[`& > ${e}-separator`]:{display:"none"}},[`${e}-separator`]:{marginInline:r.breadcrumbSeparatorMargin,color:r.breadcrumbSeparatorColor},[`${e}-link`]:{[`
|
|
2
2
|
> ${a} + span,
|
|
3
3
|
> ${a} + a
|
|
4
4
|
`]:{marginInlineStart:r.marginXXS}},[`${e}-overlay-link`]:{borderRadius:r.borderRadiusSM,height:r.lineHeight*r.fontSize,display:"inline-block",padding:`0 ${r.paddingXXS}px`,marginInline:-r.marginXXS,[`> ${a}`]:{marginInlineStart:r.marginXXS,fontSize:r.fontSizeIcon},"&:hover":{color:r.breadcrumbLinkColorHover,backgroundColor:r.colorBgTextHover,a:{color:r.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${r.componentCls}-rtl`]:{direction:"rtl"}})}},q=z("Breadcrumb",r=>{const e=E(r,{breadcrumbBaseColor:r.colorTextDescription,breadcrumbFontSize:r.fontSize,breadcrumbIconFontSize:r.fontSize,breadcrumbLinkColor:r.colorTextDescription,breadcrumbLinkColorHover:r.colorText,breadcrumbLastItemColor:r.colorText,breadcrumbSeparatorMargin:r.marginXS,breadcrumbSeparatorColor:r.colorTextDescription});return[V(e)]}),G=()=>({prefixCls:String,routes:{type:Array},params:R.any,separator:R.any,itemRender:{type:Function}});function J(r,e){if(!r.breadcrumbName)return null;const a=Object.keys(e).join("|");return r.breadcrumbName.replace(new RegExp(`:(${a})`,"g"),(t,u)=>e[u]||t)}function T(r){const{route:e,params:a,routes:n,paths:t}=r,u=n.indexOf(e)===n.length-1,y=J(e,a);return u?c("span",null,[y]):c("a",{href:`#/${t.join("/")}`},[y])}const Y=O({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:G(),slots:Object,setup(r,e){let{slots:a,attrs:n}=e;const{prefixCls:t,direction:u}=w("breadcrumb",r),[y,I]=q(t),d=(l,s)=>(l=(l||"").replace(/^\//,""),Object.keys(s).forEach(o=>{l=l.replace(`:${o}`,s[o])}),l),h=(l,s,o)=>{const i=[...l],m=d(s||"",o);return m&&i.push(m),i},b=l=>{let{routes:s=[],params:o={},separator:i,itemRender:m=T}=l;const S=[];return s.map(p=>{const C=d(p.path,o);C&&S.push(C);const g=[...S];let v=null;p.children&&p.children.length&&(v=c(F,{items:p.children.map(x=>({key:x.path||x.breadcrumbName,label:m({route:x,params:o,routes:s,paths:h(g,x.path,o)})}))},null));const $={separator:i};return v&&($.overlay=v),c(K,f(f({},$),{},{key:C||p.breadcrumbName}),{default:()=>[m({route:p,params:o,routes:s,paths:g})]})})};return()=>{var l;let s;const{routes:o,params:i={}}=r,m=N(_(a,r)),S=(l=_(a,r,"separator"))!==null&&l!==void 0?l:"/",p=r.itemRender||a.itemRender||T;o&&o.length>0?s=b({routes:o,params:i,separator:S,itemRender:p}):m.length&&(s=m.map((g,v)=>(H(typeof g.type=="object"&&(g.type.__ANT_BREADCRUMB_ITEM||g.type.__ANT_BREADCRUMB_SEPARATOR)),L(g,{separator:S,key:v}))));const C={[t.value]:!0,[`${t.value}-rtl`]:u.value==="rtl",[`${n.class}`]:!!n.class,[I.value]:!0};return y(c("nav",f(f({},n),{},{class:C}),[c("ol",null,[s])]))}}});export{K as A,Y as B};
|
|
5
|
-
//# sourceMappingURL=Breadcrumb.
|
|
5
|
+
//# sourceMappingURL=Breadcrumb.c8da3019.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as F}from"./CrudView.5b250a71.js";import{d as I,at as Z,c as P,o as c,ac as h,ae as K,h as C,ed as H,e as A,f as u,ee as j,f7 as q,ec as U,a as f,b as s,u as e,bW as W,bE as Q,bD as Y,df as k,g as b,t as y,i as g,cC as J,ei as X,U as ee,R as te,r as ne,aY as ae,b0 as le,cS as re,de as ie,ad as se,d9 as oe,S as ue,M as ce,ek as de,_ as pe}from"./jwt-decode.esm.5ee65524.js";import{a as V}from"./asyncComputed.78dd1715.js";import{g as fe}from"./datetime.01b86df2.js";import{u as me}from"./polling.5339a00f.js";import{G as ge}from"./PhArrowCounterClockwise.vue.d9dd0137.js";import{H as _e}from"./PhCube.vue.e29a6bae.js";import{G as be}from"./PhDownloadSimple.vue.e11671c2.js";import{f as ye,e as ve,r as he}from"./router.9781de48.js";import{a as Ce,B as ke}from"./build.8774fc90.js";import{a as Ae}from"./project.afe4bf99.js";import"./tables.45712b3f.js";import{G as Oe}from"./PhClockCounterClockwise.vue.f1f419a1.js";import{F as we,a as Se,G as Pe,I as xe}from"./PhWebhooksLogo.vue.ff084558.js";import{A as M}from"./index.0a1e5d8b.js";import{E as Ze}from"./ExclamationCircleOutlined.ea15dcd1.js";import{C as Me}from"./CloseCircleOutlined.36d9f25b.js";import{L as $}from"./LoadingOutlined.3c83d190.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.88300c0e.js";import"./constants.3b7395d7.js";import"./url.804625c6.js";import"./PhDotsThreeVertical.vue.fff5caa8.js";import"./index.12c03275.js";import"./record.dd367e66.js";import"./string.0d721ad6.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[t]="e115d41f-b41a-41ec-99f0-6d4d84974737",l._sentryDebugIdIdentifier="sentry-dbid-e115d41f-b41a-41ec-99f0-6d4d84974737")}catch{}})();var $e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Ie=$e;var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};const ze=je,Be=["width","height","fill","transform"],De={key:0},Ee=A("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-16-84a16,16,0,1,1-16-16A16,16,0,0,1,112,128Zm64,0a16,16,0,1,1-16-16A16,16,0,0,1,176,128Z"},null,-1),Ve=[Ee],Ne={key:1},Te=A("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Ge=A("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm56-88a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Le=[Te,Ge],Re={key:2},Fe=A("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"},null,-1),Ke=[Fe],He={key:3},qe=A("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm10-90a10,10,0,1,1-10-10A10,10,0,0,1,138,128Zm-44,0a10,10,0,1,1-10-10A10,10,0,0,1,94,128Zm88,0a10,10,0,1,1-10-10A10,10,0,0,1,182,128Z"},null,-1),Ue=[qe],We={key:4},Qe=A("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm44,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-88,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Ye=[Qe],Je={key:5},Xe=A("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm8-92a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-44,0a8,8,0,1,1-8-8A8,8,0,0,1,92,128Zm88,0a8,8,0,1,1-8-8A8,8,0,0,1,180,128Z"},null,-1),et=[Xe],tt={name:"PhDotsThreeCircle"},nt=I({...tt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(l){const t=l,a=Z("weight","regular"),d=Z("size","1em"),o=Z("color","currentColor"),x=Z("mirrored",!1),p=P(()=>{var m;return(m=t.weight)!=null?m:a}),w=P(()=>{var m;return(m=t.size)!=null?m:d}),v=P(()=>{var m;return(m=t.color)!=null?m:o}),O=P(()=>t.mirrored!==void 0?t.mirrored?"scale(-1, 1)":void 0:x?"scale(-1, 1)":void 0);return(m,E)=>(c(),h("svg",H({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:w.value,height:w.value,fill:v.value,transform:O.value},m.$attrs),[K(m.$slots,"default"),p.value==="bold"?(c(),h("g",De,Ve)):p.value==="duotone"?(c(),h("g",Ne,Le)):p.value==="fill"?(c(),h("g",Re,Ke)):p.value==="light"?(c(),h("g",He,Ue)):p.value==="regular"?(c(),h("g",We,Ye)):p.value==="thin"?(c(),h("g",Je,et)):C("",!0)],16,Be))}});function N(l){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?Object(arguments[t]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable}))),d.forEach(function(o){at(l,o,a[o])})}return l}function at(l,t,a){return t in l?Object.defineProperty(l,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[t]=a,l}var z=function(t,a){var d=N({},t,a.attrs);return u(j,N({},d,{icon:q}),null)};z.displayName="CheckCircleOutlined";z.inheritAttrs=!1;const lt=z;function T(l){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?Object(arguments[t]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable}))),d.forEach(function(o){rt(l,o,a[o])})}return l}function rt(l,t,a){return t in l?Object.defineProperty(l,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[t]=a,l}var B=function(t,a){var d=T({},t,a.attrs);return u(j,T({},d,{icon:Ie}),null)};B.displayName="MinusCircleOutlined";B.inheritAttrs=!1;const it=B;function G(l){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?Object(arguments[t]):{},d=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(a).filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable}))),d.forEach(function(o){st(l,o,a[o])})}return l}function st(l,t,a){return t in l?Object.defineProperty(l,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):l[t]=a,l}var D=function(t,a){var d=G({},t,a.attrs);return u(j,G({},d,{icon:ze}),null)};D.displayName="PauseCircleOutlined";D.inheritAttrs=!1;const ot=D,ut={style:{display:"flex","align-items":"center",gap:"5px"}},ct={key:1},dt=I({__name:"BuildInspector",props:{buildSpec:{}},setup(l){const t=l,a=U(),d=o=>{a.push({name:"logs",params:{projectId:t.buildSpec.projectId},query:o.logQuery})};return(o,x)=>o.buildSpec.runtimes.length>0?(c(),f(e(ve),{key:0,"item-layout":"horizontal","data-source":o.buildSpec.runtimes},{renderItem:s(({item:p})=>[u(e(ye),null,{actions:s(()=>[u(e(W),null,{overlay:s(()=>[u(e(Q),null,{default:s(()=>[u(e(Y),{onClick:w=>d(p)},{default:s(()=>[A("div",ut,[u(e(Oe)),u(e(k),null,{default:s(()=>[b(y(e(g).translate("i18n_build_inspector_view_logs",null)),1)]),_:1})])]),_:2},1032,["onClick"])]),_:2},1024)]),default:s(()=>[u(e(nt),{style:{cursor:"pointer"}})]),_:2},1024)]),default:s(()=>[p.type=="form"?(c(),f(e(M),{key:0,size:"large"},{default:s(()=>[u(e(we)),u(e(k),{strong:""},{default:s(()=>[b(y(p.title),1)]),_:2},1024),u(e(k),{type:"secondary",code:""},{default:s(()=>[b("/"+y(p.path),1)]),_:2},1024)]),_:2},1024)):C("",!0),p.type=="job"?(c(),f(e(M),{key:1,size:"large"},{default:s(()=>[u(e(Se)),u(e(k),{strong:""},{default:s(()=>[b(y(p.title),1)]),_:2},1024),u(e(k),{type:"secondary",code:""},{default:s(()=>[b(y(p.schedule),1)]),_:2},1024)]),_:2},1024)):C("",!0),p.type=="hook"?(c(),f(e(M),{key:2,size:"large"},{default:s(()=>[u(e(Pe)),u(e(k),{strong:""},{default:s(()=>[b(y(p.title),1)]),_:2},1024),u(e(k),{type:"secondary",code:""},{default:s(()=>[b("/_hooks/"+y(p.path),1)]),_:2},1024)]),_:2},1024)):C("",!0),p.type=="script"?(c(),f(e(M),{key:3,size:"large"},{default:s(()=>[u(e(xe)),u(e(k),{strong:""},{default:s(()=>[b(y(p.title),1)]),_:2},1024)]),_:2},1024)):C("",!0)]),_:2},1024)]),_:1},8,["data-source"])):(c(),h("div",ct,[u(e(J),{description:e(g).translate("i18n_build_inspector_no_runtimes",null)},null,8,["description"])]))}}),pt=I({__name:"Builds",setup(l){const a=X().params.projectId,{loading:d,result:o,refetch:x}=V(async()=>{const[n,r]=await Promise.all([Ce.list(a),Ae.getStatus(a)]);return{b:n.map(_=>({build:_,status:r.filter(S=>S.buildId==_.id).map(S=>S.status)})),status:r}}),{startPolling:p,endPolling:w}=me({task:x,interval:1e4});ee(()=>p()),te(()=>w());const v=ne(null),O=V(async()=>v.value?await ke.get(v.value):null),m=()=>{var i;const n=(i=o.value)==null?void 0:i.b.find(_=>_.build.id===v.value);return`Version ${n==null?void 0:n.build.id.slice(0,8)} - ${n==null?void 0:n.build.createdAt.toLocaleString()}`},E=[{translationKey:"i18n_builds_deploying",tagColor:"blue",check:n=>{var r,i;return(i=n.build.latest&&n.status.some(_=>_=="Running")&&((r=o.value)==null?void 0:r.status.some(_=>_.buildId!==n.build.id)))!=null?i:!1},loading:!0},{translationKey:"i18n_builds_deactivating",tagColor:"orange",check:n=>n.build.status==="success"&&!n.build.latest&&n.status.some(r=>r=="Running"),loading:!0},{translationKey:"i18n_builds_live",tagColor:"green",check:n=>n.build.latest&&n.status.some(r=>r=="Running")},{translationKey:"i18n_builds_sleeping",tagColor:"cyan",check:n=>n.build.latest&&n.status.length===0},{translationKey:"i18n_builds_failed",tagColor:"red",check:n=>n.build.latest&&n.status.some(r=>r=="Failed")},{translationKey:"i18n_builds_inactive",tagColor:"default",check:n=>n.build.status==="success"},{translationKey:"i18n_builds_aborted",tagColor:"default",check:n=>n.build.status==="aborted"||n.build.status==="aborted-by-user"},{translationKey:"i18n_builds_failed",tagColor:"orange",check:n=>n.build.status==="failure"},{translationKey:"i18n_builds_deploying",tagColor:"blue",check:n=>n.build.status==="in-progress",loading:!0},{translationKey:"i18n_builds_uploading",tagColor:"yellow",check:n=>n.build.status==="pending"}];function L(n){var i,_;const r=E.find(S=>S.check(n));return{text:r?g.translate(r.translationKey):"unknown",tagColor:(i=r==null?void 0:r.tagColor)!=null?i:"default",hover:(_=n.build.log)!=null?_:void 0}}const R=P(()=>{const n=[{title:g.translate("i18n_builds_id")},{title:g.translate("i18n_builds_date")},{title:g.translate("i18n_builds_abstra_version")},{title:g.translate("i18n_builds_status")},{title:"",align:"right"}];return o.value?{columns:n,rows:o.value.b.map(r=>{var i;return{key:r.build.id,cells:[{type:"text",text:r.build.id.slice(0,8)},{key:"date",type:"slot",payload:{date:fe(r.build.createdAt,{weekday:void 0}),distance:de(r.build.createdAt)}},{type:"text",text:(i=r.build.abstraVersion)!=null?i:"-"},{key:"status",type:"slot",payload:L(r)},{type:"actions",actions:[{icon:_e,label:g.translate("i18n_builds_inspect_version"),onClick:async()=>{v.value=r.build.id,O.refetch()}},{icon:ge,label:g.translate("i18n_builds_view_application_logs"),onClick:()=>{he.push({name:"logs",params:{projectId:a},query:{buildId:r.build.id}})}},{icon:be,label:g.translate("i18n_builds_download_files"),onClick:()=>r.build.download()}]}]}})}:{columns:n,rows:[]}});return(n,r)=>(c(),h(ae,null,[u(F,{"entity-name":"build",loading:e(d),title:e(g).translate("i18n_builds_version_history"),description:e(g).translate("i18n_builds_description"),"empty-title":e(g).translate("i18n_builds_empty_title"),table:R.value,live:""},{date:s(({payload:i})=>[u(e(le),null,{title:s(()=>[b(y(i.distance),1)]),default:s(()=>[b(y(i.date)+" ",1)]),_:2},1024)]),status:s(({payload:i})=>[u(e(re),{open:i.hover?void 0:!1},{content:s(()=>[u(e(ie),{style:{width:"300px",overflow:"auto","font-family":"monospace"},content:i.hover,copyable:""},null,8,["content"])]),default:s(()=>[i.text!=="unknown"?(c(),f(e(oe),{key:0,color:i.tagColor,style:se({cursor:i.hover?"pointer":"default"})},{default:s(()=>[i.text==="Live"?(c(),f(e(lt),{key:0})):i.text==="Inactive"?(c(),f(e(it),{key:1})):i.text==="Failed"?(c(),f(e(Ze),{key:2})):i.text==="Aborted"?(c(),f(e(Me),{key:3})):i.text==="Sleeping"?(c(),f(e(ot),{key:4})):i.text==="Uploading"?(c(),f(e($),{key:5})):i.text==="Deploying"?(c(),f(e($),{key:6})):i.text==="Deactivating"?(c(),f(e($),{key:7})):C("",!0),b(" "+y(i.text),1)]),_:2},1032,["color","style"])):C("",!0)]),_:2},1032,["open"])]),_:1},8,["loading","title","description","empty-title","table"]),v.value?(c(),f(e(ce),{key:0,footer:null,open:!!v.value,size:"large",width:"80%",title:m(),onCancel:r[0]||(r[0]=i=>v.value=null)},{default:s(()=>[!e(O).result.value||e(O).loading.value?(c(),f(e(ue),{key:0})):e(O).result.value?(c(),f(dt,{key:1,"build-spec":e(O).result.value},null,8,["build-spec"])):C("",!0)]),_:1},8,["open","title"])):C("",!0)],64))}});const Vt=pe(pt,[["__scopeId","data-v-cfc16bae"]]);export{Vt as default};
|
|
2
|
-
//# sourceMappingURL=Builds.
|
|
1
|
+
import{C as F}from"./CrudView.789b533f.js";import{d as I,at as Z,c as P,o as c,ac as h,ae as K,h as C,ed as H,e as A,f as u,ee as j,f7 as q,ec as U,a as f,b as s,u as e,bW as W,bE as Q,bD as Y,df as k,g as _,t as y,i as g,cC as J,ei as X,U as ee,R as te,r as ae,aY as ne,b0 as le,cS as re,de as ie,ad as se,d9 as oe,S as ue,M as ce,ek as de,_ as pe}from"./jwt-decode.esm.47f59010.js";import{a as V}from"./asyncComputed.febe2b11.js";import{g as fe}from"./datetime.d5fe62ba.js";import{u as me}from"./polling.96dd15ee.js";import{G as ge}from"./PhArrowCounterClockwise.vue.9ad742bf.js";import{H as be}from"./PhCube.vue.027246a6.js";import{G as _e}from"./PhDownloadSimple.vue.9ba8ac6f.js";import{f as ye,e as ve,r as he}from"./router.cfb03f89.js";import{a as Ce,B as ke}from"./build.db7d8668.js";import{a as Ae}from"./project.8a5a3632.js";import"./tables.34208b7c.js";import{G as Oe}from"./PhClockCounterClockwise.vue.b4dc22ed.js";import{F as we,a as Se,G as Pe,I as xe}from"./PhWebhooksLogo.vue.e7321653.js";import{A as M}from"./index.12e6cfe2.js";import{E as Ze}from"./ExclamationCircleOutlined.ad66211a.js";import{C as Me}from"./CloseCircleOutlined.2be0ee6c.js";import{L as $}from"./LoadingOutlined.2d29f0e1.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.a2b3eeb7.js";import"./constants.bbfdfb21.js";import"./url.4ba49005.js";import"./PhDotsThreeVertical.vue.e9c6f787.js";import"./index.8995a499.js";import"./record.30ff6eef.js";import"./string.39c8a903.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[t]="039a1a7d-cbb2-469c-9a0c-f677d98bfb9e",l._sentryDebugIdIdentifier="sentry-dbid-039a1a7d-cbb2-469c-9a0c-f677d98bfb9e")}catch{}})();var $e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Ie=$e;var je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};const ze=je,Be=["width","height","fill","transform"],De={key:0},Ee=A("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-16-84a16,16,0,1,1-16-16A16,16,0,0,1,112,128Zm64,0a16,16,0,1,1-16-16A16,16,0,0,1,176,128Z"},null,-1),Ve=[Ee],Ne={key:1},Te=A("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Ge=A("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm56-88a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Le=[Te,Ge],Re={key:2},Fe=A("path",{d:"M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"},null,-1),Ke=[Fe],He={key:3},qe=A("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm10-90a10,10,0,1,1-10-10A10,10,0,0,1,138,128Zm-44,0a10,10,0,1,1-10-10A10,10,0,0,1,94,128Zm88,0a10,10,0,1,1-10-10A10,10,0,0,1,182,128Z"},null,-1),Ue=[qe],We={key:4},Qe=A("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm44,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Zm-88,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Z"},null,-1),Ye=[Qe],Je={key:5},Xe=A("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm8-92a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-44,0a8,8,0,1,1-8-8A8,8,0,0,1,92,128Zm88,0a8,8,0,1,1-8-8A8,8,0,0,1,180,128Z"},null,-1),et=[Xe],tt={name:"PhDotsThreeCircle"},at=I({...tt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(l){const t=l,n=Z("weight","regular"),d=Z("size","1em"),o=Z("color","currentColor"),x=Z("mirrored",!1),p=P(()=>{var m;return(m=t.weight)!=null?m:n}),w=P(()=>{var m;return(m=t.size)!=null?m:d}),v=P(()=>{var m;return(m=t.color)!=null?m:o}),O=P(()=>t.mirrored!==void 0?t.mirrored?"scale(-1, 1)":void 0:x?"scale(-1, 1)":void 0);return(m,E)=>(c(),h("svg",H({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:w.value,height:w.value,fill:v.value,transform:O.value},m.$attrs),[K(m.$slots,"default"),p.value==="bold"?(c(),h("g",De,Ve)):p.value==="duotone"?(c(),h("g",Ne,Le)):p.value==="fill"?(c(),h("g",Re,Ke)):p.value==="light"?(c(),h("g",He,Ue)):p.value==="regular"?(c(),h("g",We,Ye)):p.value==="thin"?(c(),h("g",Je,et)):C("",!0)],16,Be))}});function N(l){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},d=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),d.forEach(function(o){nt(l,o,n[o])})}return l}function nt(l,t,n){return t in l?Object.defineProperty(l,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[t]=n,l}var z=function(t,n){var d=N({},t,n.attrs);return u(j,N({},d,{icon:q}),null)};z.displayName="CheckCircleOutlined";z.inheritAttrs=!1;const lt=z;function T(l){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},d=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),d.forEach(function(o){rt(l,o,n[o])})}return l}function rt(l,t,n){return t in l?Object.defineProperty(l,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[t]=n,l}var B=function(t,n){var d=T({},t,n.attrs);return u(j,T({},d,{icon:Ie}),null)};B.displayName="MinusCircleOutlined";B.inheritAttrs=!1;const it=B;function G(l){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},d=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),d.forEach(function(o){st(l,o,n[o])})}return l}function st(l,t,n){return t in l?Object.defineProperty(l,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[t]=n,l}var D=function(t,n){var d=G({},t,n.attrs);return u(j,G({},d,{icon:ze}),null)};D.displayName="PauseCircleOutlined";D.inheritAttrs=!1;const ot=D,ut={style:{display:"flex","align-items":"center",gap:"5px"}},ct={key:1},dt=I({__name:"BuildInspector",props:{buildSpec:{}},setup(l){const t=l,n=U(),d=o=>{n.push({name:"logs",params:{projectId:t.buildSpec.projectId},query:o.logQuery})};return(o,x)=>o.buildSpec.runtimes.length>0?(c(),f(e(ve),{key:0,"item-layout":"horizontal","data-source":o.buildSpec.runtimes},{renderItem:s(({item:p})=>[u(e(ye),null,{actions:s(()=>[u(e(W),null,{overlay:s(()=>[u(e(Q),null,{default:s(()=>[u(e(Y),{onClick:w=>d(p)},{default:s(()=>[A("div",ut,[u(e(Oe)),u(e(k),null,{default:s(()=>[_(y(e(g).translate("i18n_build_inspector_view_logs",null)),1)]),_:1})])]),_:2},1032,["onClick"])]),_:2},1024)]),default:s(()=>[u(e(at),{style:{cursor:"pointer"}})]),_:2},1024)]),default:s(()=>[p.type=="form"?(c(),f(e(M),{key:0,size:"large"},{default:s(()=>[u(e(we)),u(e(k),{strong:""},{default:s(()=>[_(y(p.title),1)]),_:2},1024),u(e(k),{type:"secondary",code:""},{default:s(()=>[_("/"+y(p.path),1)]),_:2},1024)]),_:2},1024)):C("",!0),p.type=="job"?(c(),f(e(M),{key:1,size:"large"},{default:s(()=>[u(e(Se)),u(e(k),{strong:""},{default:s(()=>[_(y(p.title),1)]),_:2},1024),u(e(k),{type:"secondary",code:""},{default:s(()=>[_(y(p.schedule),1)]),_:2},1024)]),_:2},1024)):C("",!0),p.type=="hook"?(c(),f(e(M),{key:2,size:"large"},{default:s(()=>[u(e(Pe)),u(e(k),{strong:""},{default:s(()=>[_(y(p.title),1)]),_:2},1024),u(e(k),{type:"secondary",code:""},{default:s(()=>[_("/_hooks/"+y(p.path),1)]),_:2},1024)]),_:2},1024)):C("",!0),p.type=="script"?(c(),f(e(M),{key:3,size:"large"},{default:s(()=>[u(e(xe)),u(e(k),{strong:""},{default:s(()=>[_(y(p.title),1)]),_:2},1024)]),_:2},1024)):C("",!0)]),_:2},1024)]),_:1},8,["data-source"])):(c(),h("div",ct,[u(e(J),{description:e(g).translate("i18n_build_inspector_no_runtimes",null)},null,8,["description"])]))}}),pt=I({__name:"Builds",setup(l){const n=X().params.projectId,{loading:d,result:o,refetch:x}=V(async()=>{const[a,r]=await Promise.all([Ce.list(n),Ae.getStatus(n)]);return{b:a.map(b=>({build:b,status:r.filter(S=>S.buildId==b.id).map(S=>S.status)})),status:r}}),{startPolling:p,endPolling:w}=me({task:x,interval:1e4});ee(()=>p()),te(()=>w());const v=ae(null),O=V(async()=>v.value?await ke.get(v.value):null),m=()=>{var i;const a=(i=o.value)==null?void 0:i.b.find(b=>b.build.id===v.value);return`Version ${a==null?void 0:a.build.id.slice(0,8)} - ${a==null?void 0:a.build.createdAt.toLocaleString()}`},E=[{translationKey:"i18n_builds_deploying",tagColor:"blue",check:a=>{var r,i;return(i=a.build.latest&&a.status.some(b=>b=="Running")&&((r=o.value)==null?void 0:r.status.some(b=>b.buildId!==a.build.id)))!=null?i:!1},loading:!0},{translationKey:"i18n_builds_deactivating",tagColor:"orange",check:a=>a.build.status==="success"&&!a.build.latest&&a.status.some(r=>r=="Running"),loading:!0},{translationKey:"i18n_builds_live",tagColor:"green",check:a=>a.build.latest&&a.status.some(r=>r=="Running")},{translationKey:"i18n_builds_sleeping",tagColor:"cyan",check:a=>a.build.latest&&a.status.length===0},{translationKey:"i18n_builds_failed",tagColor:"red",check:a=>a.build.latest&&a.status.some(r=>r=="Failed")},{translationKey:"i18n_builds_inactive",tagColor:"default",check:a=>a.build.status==="success"},{translationKey:"i18n_builds_aborted",tagColor:"default",check:a=>a.build.status==="aborted"||a.build.status==="aborted-by-user"},{translationKey:"i18n_builds_failed",tagColor:"orange",check:a=>a.build.status==="failure"},{translationKey:"i18n_builds_deploying",tagColor:"blue",check:a=>a.build.status==="in-progress",loading:!0},{translationKey:"i18n_builds_uploading",tagColor:"yellow",check:a=>a.build.status==="pending"}];function L(a){var i,b;const r=E.find(S=>S.check(a));return{text:r?g.translate(r.translationKey):"unknown",tagColor:(i=r==null?void 0:r.tagColor)!=null?i:"default",hover:(b=a.build.log)!=null?b:void 0}}const R=P(()=>{const a=[{title:g.translate("i18n_builds_id")},{title:g.translate("i18n_builds_date")},{title:g.translate("i18n_builds_abstra_version")},{title:g.translate("i18n_builds_status")},{title:"",align:"right"}];return o.value?{columns:a,rows:o.value.b.map(r=>{var i;return{key:r.build.id,cells:[{type:"text",text:r.build.id.slice(0,8)},{key:"date",type:"slot",payload:{date:fe(r.build.createdAt,{weekday:void 0}),distance:de(r.build.createdAt)}},{type:"text",text:(i=r.build.abstraVersion)!=null?i:"-"},{key:"status",type:"slot",payload:L(r)},{type:"actions",actions:[{icon:be,label:g.translate("i18n_builds_inspect_version"),onClick:async()=>{v.value=r.build.id,O.refetch()}},{icon:ge,label:g.translate("i18n_builds_view_application_logs"),onClick:()=>{he.push({name:"logs",params:{projectId:n},query:{buildId:r.build.id}})}},{icon:_e,label:g.translate("i18n_builds_download_files"),onClick:()=>r.build.download()}]}]}})}:{columns:a,rows:[]}});return(a,r)=>(c(),h(ne,null,[u(F,{"entity-name":"build",loading:e(d),title:e(g).translate("i18n_builds_version_history"),description:e(g).translate("i18n_builds_description"),"empty-title":e(g).translate("i18n_builds_empty_title"),table:R.value,live:""},{date:s(({payload:i})=>[u(e(le),null,{title:s(()=>[_(y(i.distance),1)]),default:s(()=>[_(y(i.date)+" ",1)]),_:2},1024)]),status:s(({payload:i})=>[u(e(re),{open:i.hover?void 0:!1},{content:s(()=>[u(e(ie),{style:{width:"300px",overflow:"auto","font-family":"monospace"},content:i.hover,copyable:""},null,8,["content"])]),default:s(()=>[i.text!=="unknown"?(c(),f(e(oe),{key:0,color:i.tagColor,style:se({cursor:i.hover?"pointer":"default"})},{default:s(()=>[i.text==="Live"?(c(),f(e(lt),{key:0})):i.text==="Inactive"?(c(),f(e(it),{key:1})):i.text==="Failed"?(c(),f(e(Ze),{key:2})):i.text==="Aborted"?(c(),f(e(Me),{key:3})):i.text==="Sleeping"?(c(),f(e(ot),{key:4})):i.text==="Uploading"?(c(),f(e($),{key:5})):i.text==="Deploying"?(c(),f(e($),{key:6})):i.text==="Deactivating"?(c(),f(e($),{key:7})):C("",!0),_(" "+y(i.text),1)]),_:2},1032,["color","style"])):C("",!0)]),_:2},1032,["open"])]),_:1},8,["loading","title","description","empty-title","table"]),v.value?(c(),f(e(ce),{key:0,footer:null,open:!!v.value,size:"large",width:"80%",title:m(),onCancel:r[0]||(r[0]=i=>v.value=null)},{default:s(()=>[!e(O).result.value||e(O).loading.value?(c(),f(e(ue),{key:0})):e(O).result.value?(c(),f(dt,{key:1,"build-spec":e(O).result.value},null,8,["build-spec"])):C("",!0)]),_:1},8,["open","title"])):C("",!0)],64))}});const Vt=pe(pt,[["__scopeId","data-v-cfc16bae"]]);export{Vt as default};
|
|
2
|
+
//# sourceMappingURL=Builds.366d6ceb.js.map
|