@malloy-publisher/sdk 0.0.33 → 0.0.35
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/README.md +21 -0
- package/dist/RenderedResult-DphykkT6.cjs +1 -0
- package/dist/client/api.d.ts +18 -0
- package/dist/components/ApiErrorDisplay.d.ts +13 -0
- package/dist/components/Model/ModelCell.d.ts +1 -6
- package/dist/components/Package/Config.d.ts +1 -9
- package/dist/components/Package/Connections.d.ts +1 -8
- package/dist/components/Package/Databases.d.ts +1 -9
- package/dist/components/Package/Models.d.ts +1 -6
- package/dist/components/Package/Notebooks.d.ts +2 -7
- package/dist/components/Package/Package.d.ts +1 -6
- package/dist/components/Package/PackageProvider.d.ts +14 -0
- package/dist/components/Package/Schedules.d.ts +1 -9
- package/dist/components/Package/index.d.ts +2 -1
- package/dist/components/Project/About.d.ts +1 -7
- package/dist/components/Project/ConnectionExplorer.d.ts +1 -4
- package/dist/components/Project/Packages.d.ts +2 -5
- package/dist/components/Project/Project.d.ts +11 -3
- package/dist/components/Project/index.d.ts +1 -1
- package/dist/components/QueryResult/QueryResult.d.ts +1 -6
- package/dist/components/RenderedResult/RenderedResult.d.ts +4 -1
- package/dist/index-nKbldp0y.cjs +3000 -0
- package/dist/index.cjs.js +1 -2914
- package/dist/sdk.css +1 -1
- package/package.json +5 -5
- package/src/components/ApiErrorDisplay.tsx +40 -0
- package/src/components/Home/Home.tsx +8 -1
- package/src/components/Model/Model.tsx +59 -28
- package/src/components/Model/ModelCell.tsx +26 -63
- package/src/components/Model/NamedQueries.tsx +2 -2
- package/src/components/Model/SourcesExplorer.tsx +14 -15
- package/src/components/MutableNotebook/ModelPicker.tsx +13 -3
- package/src/components/MutableNotebook/MutableCell.tsx +6 -10
- package/src/components/MutableNotebook/MutableNotebook.tsx +2 -2
- package/src/components/Notebook/Notebook.tsx +48 -24
- package/src/components/Notebook/NotebookCell.tsx +7 -5
- package/src/components/Package/Config.tsx +10 -18
- package/src/components/Package/Connections.tsx +10 -12
- package/src/components/Package/Databases.tsx +93 -198
- package/src/components/Package/FileTreeView.tsx +21 -4
- package/src/components/Package/Models.tsx +21 -31
- package/src/components/Package/Notebooks.tsx +22 -32
- package/src/components/Package/Package.tsx +31 -89
- package/src/components/Package/PackageProvider.tsx +46 -0
- package/src/components/Package/Schedules.tsx +10 -19
- package/src/components/Package/index.ts +6 -1
- package/src/components/Project/About.tsx +7 -15
- package/src/components/Project/ConnectionExplorer.tsx +131 -52
- package/src/components/Project/Packages.tsx +12 -13
- package/src/components/Project/Project.tsx +35 -16
- package/src/components/Project/index.ts +1 -1
- package/src/components/QueryResult/QueryResult.tsx +12 -15
- package/src/components/RenderedResult/RenderedResult.tsx +50 -11
- package/src/components/RenderedResult/ResultContainer.tsx +24 -9
- package/dist/RenderedResult-B9Gth8IY.cjs +0 -1
- package/dist/RenderedResult-Drg_uJPZ.js +0 -30
- package/dist/abap-BmBUA35e.js +0 -6
- package/dist/actionscript-3-zFUbzQa9.js +0 -6
- package/dist/ada-CBvPkFpZ.js +0 -6
- package/dist/andromeeda-uXNdzNpk.js +0 -4
- package/dist/angular-html-0fTdLuKf.js +0 -32
- package/dist/angular-ts-wkniW60G.js +0 -21
- package/dist/apache-CVNlsSDc.js +0 -6
- package/dist/apex-DFk3KRB1.js +0 -6
- package/dist/apl-TLDHFJX6.js +0 -16
- package/dist/applescript-CYMR_y0g.js +0 -6
- package/dist/ara-4QmU5e04.js +0 -6
- package/dist/asciidoc-v_1bjgUg.js +0 -6
- package/dist/asm-RC0Yh-NZ.js +0 -6
- package/dist/astro-Uf8_VxKJ.js +0 -16
- package/dist/aurora-x-BwoVEUWZ.js +0 -4
- package/dist/awk-gPH8MVMW.js +0 -6
- package/dist/ayu-dark-CxPZkpb2.js +0 -4
- package/dist/ballerina-kvLnRU_e.js +0 -6
- package/dist/bat-BHYy44sT.js +0 -6
- package/dist/beancount-D-MADTs_.js +0 -6
- package/dist/berry-Ci9U0o4h.js +0 -6
- package/dist/bibtex-CX618D15.js +0 -6
- package/dist/bicep-iuYiPopT.js +0 -6
- package/dist/blade-BtR00Gx0.js +0 -18
- package/dist/bsl-BIXPNqL4.js +0 -8
- package/dist/c-DASdrs7p.js +0 -6
- package/dist/cadence-BDALQi26.js +0 -6
- package/dist/cairo-tXZKA2PT.js +0 -8
- package/dist/catppuccin-frappe-BrTOiad2.js +0 -4
- package/dist/catppuccin-latte-D-dc_R4m.js +0 -4
- package/dist/catppuccin-macchiato-DN4jOp0G.js +0 -4
- package/dist/catppuccin-mocha-B8yCE3-3.js +0 -4
- package/dist/clarity-CNgV2Ths.js +0 -6
- package/dist/clojure-CsKKFGwv.js +0 -6
- package/dist/cmake-Dr-A3iJx.js +0 -6
- package/dist/cobol-DMssKNmC.js +0 -10
- package/dist/codeowners-Bt9yU6NX.js +0 -6
- package/dist/codeql-DBNTqJi1.js +0 -6
- package/dist/coffee-D_GzM8k1.js +0 -8
- package/dist/common-lisp-r7ZEOG7T.js +0 -6
- package/dist/components/Package/PublisherPackageProvider.d.ts +0 -14
- package/dist/components/Project/TablesInSchema.d.ts +0 -10
- package/dist/coq-CB6Pv_W9.js +0 -6
- package/dist/cpp-CJF2i3ah.js +0 -18
- package/dist/crystal-BKWnaU3g.js +0 -18
- package/dist/csharp-CYWRhZ2R.js +0 -6
- package/dist/css-D1aVdRIU.js +0 -6
- package/dist/csv-DvCncUGQ.js +0 -6
- package/dist/cue-BXMrmvay.js +0 -6
- package/dist/cypher-DTm5zNR1.js +0 -6
- package/dist/d-D6ZXmn3l.js +0 -6
- package/dist/dark-plus-pUHDTVV0.js +0 -4
- package/dist/dart-Dz59Is3F.js +0 -6
- package/dist/dax-DTVGzydb.js +0 -6
- package/dist/desktop-Db9vb-dl.js +0 -6
- package/dist/diff-XmNrvgM1.js +0 -6
- package/dist/docker-DWH2onkn.js +0 -6
- package/dist/dotenv-4337wvzu.js +0 -6
- package/dist/dracula-BtZx2Kac.js +0 -4
- package/dist/dracula-soft-BKa-aqBv.js +0 -4
- package/dist/dream-maker-CvvfrJSx.js +0 -6
- package/dist/edge-CgxR-qhM.js +0 -12
- package/dist/elixir-DZkeSPwW.js +0 -8
- package/dist/elm-BKuV1HE1.js +0 -8
- package/dist/emacs-lisp-BAefI874.js +0 -6
- package/dist/erb-BLwkpXUJ.js +0 -10
- package/dist/erlang-CmIiwF3I.js +0 -6
- package/dist/everforest-dark-DMCBqXCK.js +0 -4
- package/dist/everforest-light-BbXl82Em.js +0 -4
- package/dist/fennel-DNqkz9pE.js +0 -6
- package/dist/fish-DIm72t2T.js +0 -6
- package/dist/fluent-BapTxJsC.js +0 -6
- package/dist/fortran-fixed-form-s9Hnb3av.js +0 -8
- package/dist/fortran-free-form-CNDsBFUj.js +0 -6
- package/dist/fsharp-Cv0x43wb.js +0 -8
- package/dist/gdresource-CMcKXvgJ.js +0 -10
- package/dist/gdscript-D7aheHm-.js +0 -6
- package/dist/gdshader-BGJEsM2Z.js +0 -6
- package/dist/genie-C9gPjc6J.js +0 -6
- package/dist/gherkin-bka1Exbx.js +0 -6
- package/dist/git-commit-BspYIY3P.js +0 -8
- package/dist/git-rebase--zLBTjUa.js +0 -8
- package/dist/github-dark-DenFmJkN.js +0 -4
- package/dist/github-dark-default-BJPUVz4H.js +0 -4
- package/dist/github-dark-dimmed-DUshB20C.js +0 -4
- package/dist/github-dark-high-contrast-D3aGCnF8.js +0 -4
- package/dist/github-light-JYsPkUQd.js +0 -4
- package/dist/github-light-default-D99KPAby.js +0 -4
- package/dist/github-light-high-contrast-BbmZE-Mp.js +0 -4
- package/dist/gleam-B4k9YFGD.js +0 -6
- package/dist/glimmer-js-DhY9umHJ.js +0 -14
- package/dist/glimmer-ts-CCrHcYH5.js +0 -14
- package/dist/glsl-XLGYNq5B.js +0 -8
- package/dist/gnuplot-DnWoRZt-.js +0 -6
- package/dist/go-BErP6iv1.js +0 -6
- package/dist/graphql-DWpQF4JI.js +0 -14
- package/dist/groovy-IWs5-NIO.js +0 -6
- package/dist/hack-CQrV-ytR.js +0 -10
- package/dist/haml-CMN0hQaL.js +0 -10
- package/dist/handlebars-Cc-7fXX5.js +0 -14
- package/dist/haskell-CtlGos0K.js +0 -6
- package/dist/haxe-CZZ33vZw.js +0 -6
- package/dist/hcl-6hOg9WP4.js +0 -6
- package/dist/hjson-CgwED-oz.js +0 -6
- package/dist/hlsl-3-lv4gi7.js +0 -6
- package/dist/houston-BDYrDoDW.js +0 -4
- package/dist/html-B0P_v3yU.js +0 -10
- package/dist/html-derivative-D59SHfh8.js +0 -8
- package/dist/http-Dcjm_K1m.js +0 -14
- package/dist/hxml-BNKImryz.js +0 -8
- package/dist/hy-C2xHhR6I.js +0 -6
- package/dist/imba-Drd0AMDo.js +0 -8
- package/dist/index.es.js +0 -140061
- package/dist/ini-BUcvsX-U.js +0 -6
- package/dist/java-B7odJ7Ap.js +0 -6
- package/dist/javascript-fa8UlHZE.js +0 -6
- package/dist/jinja-CCSYduCH.js +0 -11
- package/dist/jison-BygvlveW.js +0 -8
- package/dist/json-71t8ZF9g.js +0 -6
- package/dist/json5-Z7F6rA6a.js +0 -6
- package/dist/jsonc-Dphhs4m2.js +0 -6
- package/dist/jsonl-D9jj92Gg.js +0 -6
- package/dist/jsonnet-DEQ7IUoJ.js +0 -6
- package/dist/jssm-j74e88UX.js +0 -6
- package/dist/jsx-Bkesy5tT.js +0 -6
- package/dist/julia-CiahampL.js +0 -16
- package/dist/kanagawa-dragon-CiKur4Hl.js +0 -4
- package/dist/kanagawa-lotus-BKu-smKu.js +0 -4
- package/dist/kanagawa-wave-CQwozSzG.js +0 -4
- package/dist/kotlin-DCgZY7Ii.js +0 -6
- package/dist/kusto-Cw029H-v.js +0 -6
- package/dist/laserwave-6a00oqik.js +0 -4
- package/dist/latex-LfGCYGw5.js +0 -8
- package/dist/lean-CYSet4vs.js +0 -6
- package/dist/less-DQA4v-Nm.js +0 -6
- package/dist/light-plus-CZuVqSLX.js +0 -4
- package/dist/liquid-CvufO3kO.js +0 -14
- package/dist/log-D2eRfqDn.js +0 -6
- package/dist/logo-QEAtGWZ9.js +0 -6
- package/dist/lua-BVfhNLDr.js +0 -8
- package/dist/luau-BjYGiqID.js +0 -6
- package/dist/make-BjuHP00g.js +0 -6
- package/dist/malloy-explorer.css +0 -497
- package/dist/markdown-B6guhLWd.js +0 -6
- package/dist/marko-CHlMS8w5.js +0 -14
- package/dist/material-theme-D6KBX41T.js +0 -4
- package/dist/material-theme-darker-CkRroheE.js +0 -4
- package/dist/material-theme-lighter-BUBw43Yz.js +0 -4
- package/dist/material-theme-ocean-ClGX14Ja.js +0 -4
- package/dist/material-theme-palenight-C1RVm8K1.js +0 -4
- package/dist/matlab-BpQlIJiw.js +0 -6
- package/dist/mdc-4K6B6lHG.js +0 -12
- package/dist/mdx-DIoECIFU.js +0 -6
- package/dist/mermaid-BZ7WHNIe.js +0 -6
- package/dist/min-dark-C7ak0t6c.js +0 -4
- package/dist/min-light-CKFxVcPp.js +0 -4
- package/dist/mipsasm-DusDYkFc.js +0 -6
- package/dist/mojo-CY9jaezJ.js +0 -6
- package/dist/monokai-C1KBYcO0.js +0 -4
- package/dist/move-ChphFumd.js +0 -6
- package/dist/narrat-Dz4d7OmN.js +0 -6
- package/dist/nextflow-DW0Yq9a2.js +0 -6
- package/dist/nginx-Can2eAjw.js +0 -8
- package/dist/night-owl-Bm2rzalh.js +0 -4
- package/dist/nim-B3r2RtQZ.js +0 -20
- package/dist/nix-Cg5uV_xg.js +0 -6
- package/dist/nord-CC5OiUXg.js +0 -4
- package/dist/nushell-BfRnzRWn.js +0 -6
- package/dist/objective-c-BGg9R27G.js +0 -6
- package/dist/objective-cpp-CJ3y3V_5.js +0 -6
- package/dist/ocaml-BZLsfx_o.js +0 -6
- package/dist/one-dark-pro-D7-kP8fv.js +0 -4
- package/dist/one-light-D9sNaUtq.js +0 -4
- package/dist/pascal-l2bqd7Dz.js +0 -6
- package/dist/perl-DaMQyPwp.js +0 -16
- package/dist/php-BL3EfPBi.js +0 -18
- package/dist/plastic-CSTz3KZp.js +0 -4
- package/dist/plsql-oVq_K_wH.js +0 -6
- package/dist/po-5jaeIyVd.js +0 -6
- package/dist/poimandres-C-VADXHD.js +0 -4
- package/dist/polar-wcLp8ci7.js +0 -6
- package/dist/postcss-BZ3MNRIJ.js +0 -6
- package/dist/powerquery-CgRa2XRw.js +0 -6
- package/dist/powershell-Diwyv8Eh.js +0 -6
- package/dist/prisma-COL_v1x4.js +0 -6
- package/dist/prolog-CuvJOxqT.js +0 -6
- package/dist/proto-o9HLmF90.js +0 -6
- package/dist/pug-HKe4Luo3.js +0 -12
- package/dist/puppet-wpGOnQp5.js +0 -6
- package/dist/purescript-B_1NgE2N.js +0 -6
- package/dist/python-xYxLFJY-.js +0 -6
- package/dist/qml-FlMIyjU9.js +0 -8
- package/dist/qmldir-BInDYbpo.js +0 -6
- package/dist/qss-D-h4NdUG.js +0 -6
- package/dist/r-F-9I-ITZ.js +0 -6
- package/dist/racket-BoD1TBFT.js +0 -6
- package/dist/raku-IaYcw19m.js +0 -6
- package/dist/razor-CeqqNtyB.js +0 -10
- package/dist/red-7y8PH7HH.js +0 -4
- package/dist/reg-CMUdAgIP.js +0 -6
- package/dist/regexp-GiFkbxS-.js +0 -6
- package/dist/rel-BaRn3QX7.js +0 -6
- package/dist/riscv-B9V3SsvW.js +0 -6
- package/dist/rose-pine-DhT-HZE9.js +0 -4
- package/dist/rose-pine-dawn-DiCjL2i4.js +0 -4
- package/dist/rose-pine-moon-BNmGHlcn.js +0 -4
- package/dist/rst-C3D6-dqL.js +0 -22
- package/dist/ruby-DcPLUUK3.js +0 -30
- package/dist/rust-Pc7DCsZD.js +0 -6
- package/dist/sas-tDSYjXcL.js +0 -8
- package/dist/sass-iCyS6eP9.js +0 -6
- package/dist/scala-Cly-fENF.js +0 -6
- package/dist/scheme-Zi24oEYu.js +0 -6
- package/dist/scss-DhHc4lxB.js +0 -8
- package/dist/sdbl-BBamrXFL.js +0 -6
- package/dist/shaderlab-CvqEIoL0.js +0 -8
- package/dist/shellscript-Dn0-btNd.js +0 -6
- package/dist/shellsession-8OLo3sB6.js +0 -8
- package/dist/slack-dark-i7wN4OET.js +0 -4
- package/dist/slack-ochin-ndHf0LoP.js +0 -4
- package/dist/smalltalk-Cns31tKw.js +0 -6
- package/dist/snazzy-light-BlSJXAu4.js +0 -4
- package/dist/solarized-dark-UTmkh7lw.js +0 -4
- package/dist/solarized-light-BheCkDPT.js +0 -4
- package/dist/solidity-BG_k8fA_.js +0 -6
- package/dist/soy-EwHMOVPj.js +0 -8
- package/dist/sparql-DhuelBut.js +0 -8
- package/dist/splunk-CTqDjQdo.js +0 -6
- package/dist/sql-DCkt643-.js +0 -6
- package/dist/ssh-config-DHHGll-v.js +0 -6
- package/dist/stata-Dok6hMw0.js +0 -8
- package/dist/stylus-n_9f0QQ5.js +0 -6
- package/dist/svelte-01qw6Rxm.js +0 -14
- package/dist/swift-BAWqNR8A.js +0 -6
- package/dist/synthwave-84-NU3C_KFZ.js +0 -4
- package/dist/system-verilog-Cui-g-ut.js +0 -6
- package/dist/systemd-CsKYQIQK.js +0 -6
- package/dist/talonscript-D2dGh8FO.js +0 -6
- package/dist/tasl-D3W8HMV6.js +0 -6
- package/dist/tcl-2y0Fuc4S.js +0 -6
- package/dist/templ-Hmy8U0DD.js +0 -12
- package/dist/terraform-BGW6Oerf.js +0 -6
- package/dist/tex-mHs7a43s.js +0 -8
- package/dist/tokyo-night-LhP3hHhi.js +0 -4
- package/dist/toml-CQSfOn0e.js +0 -6
- package/dist/ts-tags-DYZ4SGcN.js +0 -41
- package/dist/tsv-BtvSkaG0.js +0 -6
- package/dist/tsx-DiGsgWT8.js +0 -6
- package/dist/turtle-BJ2wmjPc.js +0 -6
- package/dist/twig-BmytkGQV.js +0 -18
- package/dist/typescript-buWNZFwO.js +0 -6
- package/dist/typespec-bLbdsxJL.js +0 -6
- package/dist/typst-Y9_SmXTs.js +0 -6
- package/dist/v-wa8Orrdd.js +0 -6
- package/dist/vala-DRdriFr_.js +0 -6
- package/dist/vb-E2_-jk4M.js +0 -6
- package/dist/vendor-DfRellEl.js +0 -75318
- package/dist/verilog-B1iBoR5_.js +0 -6
- package/dist/vesper-CJsaOsSM.js +0 -4
- package/dist/vhdl-CRVaAhXk.js +0 -6
- package/dist/viml-B-zWOd7Z.js +0 -6
- package/dist/vitesse-black-BoGvW84i.js +0 -4
- package/dist/vitesse-dark-Cym-eLtO.js +0 -4
- package/dist/vitesse-light-CcmG315c.js +0 -4
- package/dist/vue-Bl1uVNsA.js +0 -31
- package/dist/vue-html-DHr5wjBG.js +0 -10
- package/dist/vyper-DWutKXpa.js +0 -6
- package/dist/wasm-Bv5f0gKv.js +0 -6
- package/dist/wasm-DQxwEHae.js +0 -7
- package/dist/wenyan-BMYnfus1.js +0 -6
- package/dist/wgsl-DnPoPGDU.js +0 -6
- package/dist/wikitext-CntM04PE.js +0 -6
- package/dist/wolfram-Ws5qPlX9.js +0 -6
- package/dist/xml-ChBsf5uy.js +0 -8
- package/dist/xsl-BefjlXrd.js +0 -8
- package/dist/yaml-Bbg74JKr.js +0 -6
- package/dist/zenscript-C0RKE4nU.js +0 -6
- package/dist/zig-D6SXBGNm.js +0 -6
- package/src/components/Package/PublisherPackageProvider.tsx +0 -48
- package/src/components/Project/TablesInSchema.tsx +0 -84
|
@@ -5,28 +5,15 @@ import Connections from "./Connections";
|
|
|
5
5
|
import Databases from "./Databases";
|
|
6
6
|
import Models from "./Models";
|
|
7
7
|
import Notebooks from "./Notebooks";
|
|
8
|
-
import { PublisherPackageProvider } from "./PublisherPackageProvider";
|
|
9
8
|
import Schedules from "./Schedules";
|
|
10
9
|
|
|
11
10
|
const README_NOTEBOOK = "README.malloynb";
|
|
12
11
|
|
|
13
12
|
interface PackageProps {
|
|
14
|
-
server?: string;
|
|
15
|
-
projectName: string;
|
|
16
|
-
packageName: string;
|
|
17
|
-
versionId?: string;
|
|
18
13
|
navigate?: (to: string, event?: React.MouseEvent) => void;
|
|
19
|
-
accessToken?: string;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
export default function Package({
|
|
23
|
-
server,
|
|
24
|
-
projectName,
|
|
25
|
-
packageName,
|
|
26
|
-
versionId,
|
|
27
|
-
navigate,
|
|
28
|
-
accessToken,
|
|
29
|
-
}: PackageProps) {
|
|
16
|
+
export default function Package({ navigate }: PackageProps) {
|
|
30
17
|
if (!navigate) {
|
|
31
18
|
navigate = (to: string) => {
|
|
32
19
|
window.location.href = to;
|
|
@@ -34,82 +21,37 @@ export default function Package({
|
|
|
34
21
|
}
|
|
35
22
|
|
|
36
23
|
return (
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
versionId={versionId}
|
|
24
|
+
<Grid
|
|
25
|
+
container
|
|
26
|
+
spacing={2}
|
|
27
|
+
columns={12}
|
|
28
|
+
sx={{ mb: (theme) => theme.spacing(2) }}
|
|
43
29
|
>
|
|
44
|
-
<Grid
|
|
45
|
-
|
|
46
|
-
spacing={2}
|
|
47
|
-
columns={12}
|
|
48
|
-
sx={{ mb: (theme) => theme.spacing(2) }}
|
|
49
|
-
>
|
|
50
|
-
<Grid size={{ xs: 12, md: 4 }}>
|
|
51
|
-
<Config
|
|
52
|
-
server={server}
|
|
53
|
-
projectName={projectName}
|
|
54
|
-
packageName={packageName}
|
|
55
|
-
versionId={versionId}
|
|
56
|
-
accessToken={accessToken}
|
|
57
|
-
/>
|
|
58
|
-
</Grid>
|
|
59
|
-
<Grid size={{ xs: 12, md: 4 }}>
|
|
60
|
-
<Notebooks
|
|
61
|
-
server={server}
|
|
62
|
-
projectName={projectName}
|
|
63
|
-
packageName={packageName}
|
|
64
|
-
versionId={versionId}
|
|
65
|
-
navigate={navigate}
|
|
66
|
-
accessToken={accessToken}
|
|
67
|
-
/>
|
|
68
|
-
</Grid>
|
|
69
|
-
<Grid size={{ xs: 12, md: 4 }}>
|
|
70
|
-
<Models
|
|
71
|
-
server={server}
|
|
72
|
-
projectName={projectName}
|
|
73
|
-
packageName={packageName}
|
|
74
|
-
versionId={versionId}
|
|
75
|
-
navigate={navigate}
|
|
76
|
-
accessToken={accessToken}
|
|
77
|
-
/>
|
|
78
|
-
</Grid>
|
|
79
|
-
<Grid size={{ xs: 12, md: 6 }}>
|
|
80
|
-
<Databases
|
|
81
|
-
server={server}
|
|
82
|
-
projectName={projectName}
|
|
83
|
-
packageName={packageName}
|
|
84
|
-
versionId={versionId}
|
|
85
|
-
accessToken={accessToken}
|
|
86
|
-
/>
|
|
87
|
-
</Grid>
|
|
88
|
-
<Grid size={{ xs: 12, md: 6 }}>
|
|
89
|
-
<Connections
|
|
90
|
-
navigate={navigate}
|
|
91
|
-
server={server}
|
|
92
|
-
projectName={projectName}
|
|
93
|
-
accessToken={accessToken}
|
|
94
|
-
/>
|
|
95
|
-
</Grid>
|
|
96
|
-
<Grid size={{ xs: 12, md: 12 }}>
|
|
97
|
-
<Schedules
|
|
98
|
-
server={server}
|
|
99
|
-
projectName={projectName}
|
|
100
|
-
packageName={packageName}
|
|
101
|
-
versionId={versionId}
|
|
102
|
-
accessToken={accessToken}
|
|
103
|
-
/>
|
|
104
|
-
</Grid>
|
|
105
|
-
<Grid size={{ xs: 12, md: 12 }}>
|
|
106
|
-
<Notebook
|
|
107
|
-
notebookPath={README_NOTEBOOK}
|
|
108
|
-
expandCodeCells={false}
|
|
109
|
-
hideEmbeddingIcons={true}
|
|
110
|
-
/>
|
|
111
|
-
</Grid>
|
|
30
|
+
<Grid size={{ xs: 12, md: 4 }}>
|
|
31
|
+
<Config />
|
|
112
32
|
</Grid>
|
|
113
|
-
|
|
33
|
+
<Grid size={{ xs: 12, md: 4 }}>
|
|
34
|
+
<Notebooks navigate={navigate} />
|
|
35
|
+
</Grid>
|
|
36
|
+
<Grid size={{ xs: 12, md: 4 }}>
|
|
37
|
+
<Models navigate={navigate} />
|
|
38
|
+
</Grid>
|
|
39
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
40
|
+
<Databases />
|
|
41
|
+
</Grid>
|
|
42
|
+
<Grid size={{ xs: 12, md: 6 }}>
|
|
43
|
+
<Connections navigate={navigate} />
|
|
44
|
+
</Grid>
|
|
45
|
+
<Grid size={{ xs: 12, md: 12 }}>
|
|
46
|
+
<Schedules />
|
|
47
|
+
</Grid>
|
|
48
|
+
<Grid size={{ xs: 12, md: 12 }}>
|
|
49
|
+
<Notebook
|
|
50
|
+
notebookPath={README_NOTEBOOK}
|
|
51
|
+
expandCodeCells={false}
|
|
52
|
+
hideEmbeddingIcons={true}
|
|
53
|
+
/>
|
|
54
|
+
</Grid>
|
|
55
|
+
</Grid>
|
|
114
56
|
);
|
|
115
57
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { createContext, useContext, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export interface PackageContextProps {
|
|
4
|
+
server?: string;
|
|
5
|
+
projectName: string;
|
|
6
|
+
packageName: string;
|
|
7
|
+
versionId?: string;
|
|
8
|
+
accessToken?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const PackageContext = createContext<PackageContextProps | undefined>(
|
|
12
|
+
undefined,
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
interface PackageProviderProps extends PackageContextProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Provider for the Package context.
|
|
20
|
+
// This context is used to pass the package information to the components
|
|
21
|
+
// that need it.
|
|
22
|
+
// The package information is passed to the components via the usePackage hook.
|
|
23
|
+
export const PackageProvider = ({
|
|
24
|
+
server,
|
|
25
|
+
projectName,
|
|
26
|
+
packageName,
|
|
27
|
+
versionId,
|
|
28
|
+
accessToken,
|
|
29
|
+
children,
|
|
30
|
+
}: PackageProviderProps) => {
|
|
31
|
+
return (
|
|
32
|
+
<PackageContext.Provider
|
|
33
|
+
value={{ server, projectName, packageName, versionId, accessToken }}
|
|
34
|
+
>
|
|
35
|
+
{children}
|
|
36
|
+
</PackageContext.Provider>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export function usePackage() {
|
|
41
|
+
const context = useContext(PackageContext);
|
|
42
|
+
if (!context) {
|
|
43
|
+
throw new Error("usePackage must be used within a PackageProvider");
|
|
44
|
+
}
|
|
45
|
+
return context;
|
|
46
|
+
}
|
|
@@ -11,29 +11,18 @@ import {
|
|
|
11
11
|
Typography,
|
|
12
12
|
} from "@mui/material";
|
|
13
13
|
import { QueryClient, useQuery } from "@tanstack/react-query";
|
|
14
|
-
import axios from "axios";
|
|
15
14
|
import { Configuration, SchedulesApi } from "../../client";
|
|
16
15
|
import { StyledCard, StyledCardContent } from "../styles";
|
|
16
|
+
import { usePackage } from "./PackageProvider";
|
|
17
|
+
import { ApiErrorDisplay } from "../ApiErrorDisplay";
|
|
17
18
|
|
|
18
|
-
axios.defaults.baseURL = "http://localhost:4000";
|
|
19
19
|
const schedulesApi = new SchedulesApi(new Configuration());
|
|
20
20
|
const queryClient = new QueryClient();
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
server
|
|
24
|
-
|
|
25
|
-
packageName: string;
|
|
26
|
-
versionId?: string;
|
|
27
|
-
accessToken: string;
|
|
28
|
-
}
|
|
22
|
+
export default function Schedules() {
|
|
23
|
+
const { server, projectName, packageName, versionId, accessToken } =
|
|
24
|
+
usePackage();
|
|
29
25
|
|
|
30
|
-
export default function Package({
|
|
31
|
-
server,
|
|
32
|
-
projectName,
|
|
33
|
-
packageName,
|
|
34
|
-
versionId,
|
|
35
|
-
accessToken,
|
|
36
|
-
}: PackageProps) {
|
|
37
26
|
const { data, isError, isLoading, error } = useQuery(
|
|
38
27
|
{
|
|
39
28
|
queryKey: ["schedules", server, projectName, packageName, versionId],
|
|
@@ -46,6 +35,7 @@ export default function Package({
|
|
|
46
35
|
},
|
|
47
36
|
}),
|
|
48
37
|
retry: false,
|
|
38
|
+
throwOnError: false,
|
|
49
39
|
},
|
|
50
40
|
queryClient,
|
|
51
41
|
);
|
|
@@ -60,9 +50,10 @@ export default function Package({
|
|
|
60
50
|
|
|
61
51
|
if (isError) {
|
|
62
52
|
return (
|
|
63
|
-
<
|
|
64
|
-
{
|
|
65
|
-
|
|
53
|
+
<ApiErrorDisplay
|
|
54
|
+
error={error}
|
|
55
|
+
context={`${projectName} > ${packageName} > Schedules`}
|
|
56
|
+
/>
|
|
66
57
|
);
|
|
67
58
|
}
|
|
68
59
|
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export { default as Package } from "./Package";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./PackageProvider";
|
|
3
|
+
// Backward compatibility
|
|
4
|
+
export {
|
|
5
|
+
PackageProvider as PublisherPackageProvider,
|
|
6
|
+
usePackage as usePublisherPackage,
|
|
7
|
+
} from "./PackageProvider";
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { Divider, Typography } from "@mui/material";
|
|
2
2
|
import { Configuration, ProjectsApi } from "../../client";
|
|
3
|
-
import axios from "axios";
|
|
4
3
|
import Markdown from "markdown-to-jsx";
|
|
5
4
|
import { StyledCard, StyledCardContent, StyledCardMedia } from "../styles";
|
|
6
5
|
import { QueryClient, useQuery } from "@tanstack/react-query";
|
|
6
|
+
import { useProject } from "./Project";
|
|
7
|
+
import { ApiErrorDisplay } from "../ApiErrorDisplay";
|
|
7
8
|
|
|
8
|
-
axios.defaults.baseURL = "http://localhost:4000";
|
|
9
9
|
const projectsApi = new ProjectsApi(new Configuration());
|
|
10
10
|
const queryClient = new QueryClient();
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
server
|
|
14
|
-
projectName: string;
|
|
15
|
-
accessToken?: string;
|
|
16
|
-
}
|
|
12
|
+
export default function About() {
|
|
13
|
+
const { server, projectName, accessToken } = useProject();
|
|
17
14
|
|
|
18
|
-
export default function About({
|
|
19
|
-
server,
|
|
20
|
-
projectName,
|
|
21
|
-
accessToken,
|
|
22
|
-
}: AboutProps) {
|
|
23
15
|
const { data, isSuccess, isError, error } = useQuery(
|
|
24
16
|
{
|
|
25
17
|
queryKey: ["about", server, projectName],
|
|
@@ -31,6 +23,8 @@ export default function About({
|
|
|
31
23
|
Authorization: accessToken && `Bearer ${accessToken}`,
|
|
32
24
|
},
|
|
33
25
|
}),
|
|
26
|
+
retry: false,
|
|
27
|
+
throwOnError: false,
|
|
34
28
|
},
|
|
35
29
|
queryClient,
|
|
36
30
|
);
|
|
@@ -56,9 +50,7 @@ export default function About({
|
|
|
56
50
|
</StyledCard>
|
|
57
51
|
)}
|
|
58
52
|
{isError && (
|
|
59
|
-
<
|
|
60
|
-
{error.message}
|
|
61
|
-
</Typography>
|
|
53
|
+
<ApiErrorDisplay error={error} context={`${projectName} > About`} />
|
|
62
54
|
)}
|
|
63
55
|
</>
|
|
64
56
|
);
|
|
@@ -12,36 +12,33 @@ import {
|
|
|
12
12
|
DialogContent,
|
|
13
13
|
DialogTitle,
|
|
14
14
|
IconButton,
|
|
15
|
+
Switch,
|
|
16
|
+
FormControlLabel,
|
|
15
17
|
Table,
|
|
16
18
|
TableBody,
|
|
17
19
|
TableCell,
|
|
18
20
|
TableContainer,
|
|
19
21
|
TableHead,
|
|
20
22
|
TableRow,
|
|
21
|
-
Switch,
|
|
22
|
-
FormControlLabel,
|
|
23
23
|
} from "@mui/material";
|
|
24
24
|
import { QueryClient, useQuery } from "@tanstack/react-query";
|
|
25
25
|
import { ConnectionsApi } from "../../client/api";
|
|
26
26
|
import { Configuration } from "../../client/configuration";
|
|
27
|
-
import
|
|
27
|
+
import { useProject } from "./Project";
|
|
28
|
+
import { ApiErrorDisplay } from "../ApiErrorDisplay";
|
|
28
29
|
|
|
29
30
|
const connectionsApi = new ConnectionsApi(new Configuration());
|
|
30
31
|
const queryClient = new QueryClient();
|
|
31
32
|
|
|
32
33
|
interface ConnectionExplorerProps {
|
|
33
|
-
server?: string;
|
|
34
|
-
projectName: string;
|
|
35
34
|
connectionName: string;
|
|
36
|
-
accessToken?: string;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
export default function ConnectionExplorer({
|
|
40
|
-
server,
|
|
41
|
-
projectName,
|
|
42
38
|
connectionName,
|
|
43
|
-
accessToken,
|
|
44
39
|
}: ConnectionExplorerProps) {
|
|
40
|
+
const { server, projectName, accessToken } = useProject();
|
|
41
|
+
|
|
45
42
|
const [selectedTable, setSelectedTable] = React.useState<string | undefined>(
|
|
46
43
|
undefined,
|
|
47
44
|
);
|
|
@@ -61,6 +58,7 @@ export default function ConnectionExplorer({
|
|
|
61
58
|
},
|
|
62
59
|
}),
|
|
63
60
|
retry: false,
|
|
61
|
+
throwOnError: false,
|
|
64
62
|
},
|
|
65
63
|
queryClient,
|
|
66
64
|
);
|
|
@@ -100,9 +98,10 @@ export default function ConnectionExplorer({
|
|
|
100
98
|
</Typography>
|
|
101
99
|
)}
|
|
102
100
|
{isError && (
|
|
103
|
-
<
|
|
104
|
-
{
|
|
105
|
-
|
|
101
|
+
<ApiErrorDisplay
|
|
102
|
+
error={error}
|
|
103
|
+
context={`${projectName} > ${connectionName}`}
|
|
104
|
+
/>
|
|
106
105
|
)}
|
|
107
106
|
{isSuccess && data.data.length === 0 && (
|
|
108
107
|
<Typography variant="body2">No Schemas</Typography>
|
|
@@ -142,11 +141,8 @@ export default function ConnectionExplorer({
|
|
|
142
141
|
{selectedSchema && (
|
|
143
142
|
<Paper sx={{ p: 2 }}>
|
|
144
143
|
<TablesInSchema
|
|
145
|
-
server={server}
|
|
146
|
-
projectName={projectName}
|
|
147
144
|
connectionName={connectionName}
|
|
148
145
|
schemaName={selectedSchema}
|
|
149
|
-
accessToken={accessToken}
|
|
150
146
|
onTableClick={(tableName) => {
|
|
151
147
|
setSelectedTable(tableName);
|
|
152
148
|
}}
|
|
@@ -156,12 +152,9 @@ export default function ConnectionExplorer({
|
|
|
156
152
|
</Grid>
|
|
157
153
|
{selectedTable && (
|
|
158
154
|
<TableViewer
|
|
159
|
-
server={server}
|
|
160
|
-
projectName={projectName}
|
|
161
155
|
connectionName={connectionName}
|
|
162
156
|
schemaName={selectedSchema}
|
|
163
157
|
tableName={selectedTable}
|
|
164
|
-
accessToken={accessToken}
|
|
165
158
|
onClose={() => setSelectedTable(undefined)}
|
|
166
159
|
/>
|
|
167
160
|
)}
|
|
@@ -170,23 +163,20 @@ export default function ConnectionExplorer({
|
|
|
170
163
|
}
|
|
171
164
|
|
|
172
165
|
type TableViewerProps = {
|
|
173
|
-
server: string;
|
|
174
|
-
projectName: string;
|
|
175
166
|
connectionName: string;
|
|
176
167
|
schemaName: string;
|
|
177
168
|
tableName: string;
|
|
178
|
-
accessToken: string;
|
|
179
169
|
onClose: () => void;
|
|
180
170
|
};
|
|
171
|
+
|
|
181
172
|
function TableViewer({
|
|
182
|
-
server,
|
|
183
|
-
projectName,
|
|
184
173
|
connectionName,
|
|
185
174
|
schemaName,
|
|
186
175
|
tableName,
|
|
187
|
-
accessToken,
|
|
188
176
|
onClose,
|
|
189
177
|
}: TableViewerProps) {
|
|
178
|
+
const { server, projectName, accessToken } = useProject();
|
|
179
|
+
|
|
190
180
|
const { data, isSuccess, isError, error, isLoading } = useQuery(
|
|
191
181
|
{
|
|
192
182
|
queryKey: [
|
|
@@ -212,15 +202,17 @@ function TableViewer({
|
|
|
212
202
|
},
|
|
213
203
|
),
|
|
214
204
|
retry: false,
|
|
205
|
+
throwOnError: false,
|
|
215
206
|
},
|
|
216
207
|
queryClient,
|
|
217
208
|
);
|
|
209
|
+
|
|
218
210
|
if (isSuccess && data) {
|
|
219
211
|
console.log(data);
|
|
220
212
|
}
|
|
213
|
+
|
|
221
214
|
return (
|
|
222
|
-
|
|
223
|
-
<Dialog open={true} onClose={onclose} maxWidth="sm" fullWidth>
|
|
215
|
+
<Dialog open={true} onClose={onClose} maxWidth="sm" fullWidth>
|
|
224
216
|
<DialogTitle>
|
|
225
217
|
Table: {schemaName}.{tableName}
|
|
226
218
|
<Typography
|
|
@@ -228,7 +220,9 @@ function TableViewer({
|
|
|
228
220
|
variant="body2"
|
|
229
221
|
fontFamily="monospace"
|
|
230
222
|
component="span"
|
|
231
|
-
|
|
223
|
+
>
|
|
224
|
+
{tableName}
|
|
225
|
+
</Typography>
|
|
232
226
|
<IconButton
|
|
233
227
|
aria-label="close"
|
|
234
228
|
onClick={onClose}
|
|
@@ -248,32 +242,117 @@ function TableViewer({
|
|
|
248
242
|
</IconButton>
|
|
249
243
|
</DialogTitle>
|
|
250
244
|
<DialogContent>
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
245
|
+
{isLoading && (
|
|
246
|
+
<Typography variant="body2" sx={{ p: "20px", m: "auto" }}>
|
|
247
|
+
Fetching Table Details...
|
|
248
|
+
</Typography>
|
|
249
|
+
)}
|
|
250
|
+
{isError && (
|
|
251
|
+
<ApiErrorDisplay
|
|
252
|
+
error={error}
|
|
253
|
+
context={`${projectName} > ${connectionName} > ${schemaName}.${tableName}`}
|
|
254
|
+
/>
|
|
255
|
+
)}
|
|
256
|
+
{isSuccess && data && (
|
|
257
|
+
<TableContainer>
|
|
258
|
+
<Table
|
|
259
|
+
size="small"
|
|
260
|
+
sx={{ "& .MuiTableCell-root": { padding: "10px" } }}
|
|
261
|
+
>
|
|
262
|
+
<TableHead>
|
|
263
|
+
<TableRow>
|
|
264
|
+
<TableCell>NAME</TableCell>
|
|
265
|
+
<TableCell>TYPE</TableCell>
|
|
266
|
+
</TableRow>
|
|
267
|
+
</TableHead>
|
|
268
|
+
<TableBody>
|
|
269
|
+
{data.data.columns?.map(
|
|
270
|
+
(column: { name: string; type: string }) => (
|
|
271
|
+
<TableRow key={column.name}>
|
|
272
|
+
<TableCell>{column.name}</TableCell>
|
|
273
|
+
<TableCell>{column.type}</TableCell>
|
|
274
|
+
</TableRow>
|
|
275
|
+
),
|
|
276
|
+
)}
|
|
277
|
+
</TableBody>
|
|
278
|
+
</Table>
|
|
279
|
+
</TableContainer>
|
|
280
|
+
)}
|
|
276
281
|
</DialogContent>
|
|
277
282
|
</Dialog>
|
|
278
283
|
);
|
|
279
284
|
}
|
|
285
|
+
|
|
286
|
+
interface TablesInSchemaProps {
|
|
287
|
+
connectionName: string;
|
|
288
|
+
schemaName: string;
|
|
289
|
+
onTableClick: (tableName: string) => void;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function TablesInSchema({
|
|
293
|
+
connectionName,
|
|
294
|
+
schemaName,
|
|
295
|
+
onTableClick,
|
|
296
|
+
}: TablesInSchemaProps) {
|
|
297
|
+
const { server, projectName, accessToken } = useProject();
|
|
298
|
+
|
|
299
|
+
const { data, isSuccess, isError, error, isLoading } = useQuery(
|
|
300
|
+
{
|
|
301
|
+
queryKey: [
|
|
302
|
+
"tablesInSchema",
|
|
303
|
+
server,
|
|
304
|
+
projectName,
|
|
305
|
+
connectionName,
|
|
306
|
+
schemaName,
|
|
307
|
+
],
|
|
308
|
+
queryFn: () =>
|
|
309
|
+
connectionsApi.listTables(projectName, connectionName, schemaName, {
|
|
310
|
+
baseURL: server,
|
|
311
|
+
withCredentials: !accessToken,
|
|
312
|
+
headers: {
|
|
313
|
+
Authorization: accessToken && `Bearer ${accessToken}`,
|
|
314
|
+
},
|
|
315
|
+
}),
|
|
316
|
+
retry: false,
|
|
317
|
+
throwOnError: false,
|
|
318
|
+
},
|
|
319
|
+
queryClient,
|
|
320
|
+
);
|
|
321
|
+
|
|
322
|
+
return (
|
|
323
|
+
<>
|
|
324
|
+
<Typography variant="overline" fontWeight="bold">
|
|
325
|
+
Tables in {schemaName}
|
|
326
|
+
</Typography>
|
|
327
|
+
<Divider />
|
|
328
|
+
<Box sx={{ mt: "10px", maxHeight: "600px", overflowY: "auto" }}>
|
|
329
|
+
{isLoading && (
|
|
330
|
+
<Typography variant="body2" sx={{ p: "20px", m: "auto" }}>
|
|
331
|
+
Fetching Tables...
|
|
332
|
+
</Typography>
|
|
333
|
+
)}
|
|
334
|
+
{isError && (
|
|
335
|
+
<ApiErrorDisplay
|
|
336
|
+
error={error}
|
|
337
|
+
context={`${projectName} > ${connectionName} > ${schemaName}`}
|
|
338
|
+
/>
|
|
339
|
+
)}
|
|
340
|
+
{isSuccess && data.data.length === 0 && (
|
|
341
|
+
<Typography variant="body2">No Tables</Typography>
|
|
342
|
+
)}
|
|
343
|
+
{isSuccess && data.data.length > 0 && (
|
|
344
|
+
<List dense disablePadding>
|
|
345
|
+
{data.data.map((tableName: string) => (
|
|
346
|
+
<ListItemButton
|
|
347
|
+
key={tableName}
|
|
348
|
+
onClick={() => onTableClick(tableName)}
|
|
349
|
+
>
|
|
350
|
+
<ListItemText primary={tableName} />
|
|
351
|
+
</ListItemButton>
|
|
352
|
+
))}
|
|
353
|
+
</List>
|
|
354
|
+
)}
|
|
355
|
+
</Box>
|
|
356
|
+
</>
|
|
357
|
+
);
|
|
358
|
+
}
|
|
@@ -2,23 +2,19 @@ import { Box, Divider, Grid, Typography } from "@mui/material";
|
|
|
2
2
|
import { Configuration, PackagesApi } from "../../client";
|
|
3
3
|
import { StyledCard, StyledCardContent, StyledCardMedia } from "../styles";
|
|
4
4
|
import { QueryClient, useQuery } from "@tanstack/react-query";
|
|
5
|
+
import { useProject } from "./Project";
|
|
6
|
+
import { ApiErrorDisplay } from "../ApiErrorDisplay";
|
|
5
7
|
|
|
6
8
|
const packagesApi = new PackagesApi(new Configuration());
|
|
7
9
|
const queryClient = new QueryClient();
|
|
8
10
|
|
|
9
|
-
interface
|
|
10
|
-
server?: string;
|
|
11
|
-
projectName: string;
|
|
11
|
+
interface PackagesProps {
|
|
12
12
|
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
13
|
-
accessToken?: string;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
export default function
|
|
17
|
-
server,
|
|
18
|
-
|
|
19
|
-
navigate,
|
|
20
|
-
accessToken,
|
|
21
|
-
}: ProjectProps) {
|
|
15
|
+
export default function Packages({ navigate }: PackagesProps) {
|
|
16
|
+
const { server, projectName, accessToken } = useProject();
|
|
17
|
+
|
|
22
18
|
const { data, isSuccess, isError, error } = useQuery(
|
|
23
19
|
{
|
|
24
20
|
queryKey: ["packages", server, projectName],
|
|
@@ -30,6 +26,8 @@ export default function Project({
|
|
|
30
26
|
Authorization: accessToken && `Bearer ${accessToken}`,
|
|
31
27
|
},
|
|
32
28
|
}),
|
|
29
|
+
retry: false,
|
|
30
|
+
throwOnError: false,
|
|
33
31
|
},
|
|
34
32
|
queryClient,
|
|
35
33
|
);
|
|
@@ -100,9 +98,10 @@ export default function Project({
|
|
|
100
98
|
</StyledCard>
|
|
101
99
|
)}
|
|
102
100
|
{isError && (
|
|
103
|
-
<
|
|
104
|
-
{error
|
|
105
|
-
|
|
101
|
+
<ApiErrorDisplay
|
|
102
|
+
error={error}
|
|
103
|
+
context={`${projectName} > Packages`}
|
|
104
|
+
/>
|
|
106
105
|
)}
|
|
107
106
|
</>
|
|
108
107
|
);
|