From 5eb37afa7a6f47c0a67c32ec3d836bd6613318d3 Mon Sep 17 00:00:00 2001 From: xuwenyihust Date: Fri, 12 Jul 2024 11:06:10 +0800 Subject: [PATCH] Update init.sql to include new notebooks and directories, and update Runs.js to display a message when there are no Spark Applications associated with the notebook --- docker/postgres/init.sql | 2 ++ webapp/src/components/notebook/content/Runs.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/postgres/init.sql b/docker/postgres/init.sql index 4e1bdaa..3ae4635 100644 --- a/docker/postgres/init.sql +++ b/docker/postgres/init.sql @@ -40,6 +40,8 @@ GRANT ALL PRIVILEGES ON SEQUENCE notebook_spark_apps_id_seq TO server; -- Add some initial data INSERT INTO notebooks (name, path) VALUES ('demo.ipynb', 'work/demo.ipynb'); INSERT INTO notebooks (name, path) VALUES ('notebook.ipynb', 'work/notebook.ipynb'); +INSERT INTO notebooks (name, path) VALUES ('quickstart.ipynb', 'work/quickstart.ipynb'); +INSERT INTO notebooks (name, path) VALUES ('sg-resale-flat-prices.ipynb', 'work/sg-resale-flat-prices/sg-resale-flat-prices.ipynb'); INSERT INTO directories (name, path) VALUES ('work', '/work'); INSERT INTO directories (name, path) VALUES ('word-count', '/work/word-count'); diff --git a/webapp/src/components/notebook/content/Runs.js b/webapp/src/components/notebook/content/Runs.js index d072d50..6f91f37 100644 --- a/webapp/src/components/notebook/content/Runs.js +++ b/webapp/src/components/notebook/content/Runs.js @@ -18,7 +18,7 @@ function Runs({ }; fetchSparkApps(); - }, [contentType]); + }, [contentType, notebook]); return ( ) - : ('Loading...')} + : ('No Spark Applications associated with this notebook.')}