Skip to content

Commit

Permalink
deploy api with preview
Browse files Browse the repository at this point in the history
Signed-off-by: Jitendra Gundaniya <[email protected]>
  • Loading branch information
jitu5 committed May 8, 2024
1 parent 4da365f commit 9f2afa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package/kedro_viz/api/rest/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ async def get_single_pipeline_data(registered_pipeline_id: str):

@router.post("/deploy")
async def deploy_kedro_viz(input_values: DeployerConfiguration):
# Importing here to avoid circular imports
from kedro_viz.server import load_and_populate_data # pylint: disable=import-outside-toplevel

try:
# load_and_populate_data(Path.cwd(), input_values.preview)
load_and_populate_data(Path.cwd(), input_values.preview)

deployer = DeployerFactory.create_deployer(
input_values.platform, input_values.endpoint, input_values.bucket_name
Expand Down
2 changes: 1 addition & 1 deletion src/components/shareable-url-modal/shareable-url-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ShareableUrlModal = ({ onToggleModal, visible }) => {
'Content-Type': 'application/json',
},
method: 'POST',
body: JSON.stringify(inputValues),
body: JSON.stringify({ ...inputValues, preview: false }), // preview appended to the body to disable the preview data
});
const response = await request.json();

Expand Down

0 comments on commit 9f2afa2

Please sign in to comment.