Commit 0cf6d19
authored
330 improve spark integration with notebook (#331)
* Add Spark session creation button to NotebookToolbar component
* Refactor hover styles in NotebookToolbar component to use CSS-in-JS approach for SparkIcon, improving code readability and maintainability.
* Enhance NotebookToolbar component by replacing SparkIcon with VscFlame icon and updating hover styles to use inline event handlers, improving user interaction and visual consistency.
* Add Spark session creation functionality and update Spark app configuration handling
- Implemented a new endpoint in `spark_app.py` for creating Spark sessions via a POST request.
- Enhanced `Notebook.js` to include a method for initiating Spark session creation and handling success/error responses.
- Updated `SparkModel.js` to fetch Spark configuration and create a Spark session, improving integration with the backend API.
- Added state management for Spark configuration in the Notebook component.
* Integrate NotebookToolbar into Notebook component and enhance Spark session creation logging
- Added NotebookToolbar component to the Notebook, providing controls for running all cells, saving, deleting, and creating Spark sessions.
- Improved logging in the createSparkSession method to provide better visibility into the session creation process, including notebook path and configuration responses.
- Updated error handling to maintain user feedback during Spark session creation.
* Refactor import path for NotebookToolbar in Notebook component
- Updated the import statement for NotebookToolbar to reflect its new location in the 'content' directory, improving project structure and organization.
* Refactor Notebook component by removing Spark session creation logic and NotebookToolbar integration
- Eliminated the handleCreateSparkSession function to streamline the Notebook component.
- Removed NotebookToolbar component from the Notebook, simplifying the UI and focusing on core functionalities.
- Updated runAllCells prop to directly reference the runAllCells function, enhancing code clarity.
* Add runAllCells function to Notebook component for executing all cells
* Enhance Notebook component by integrating createSparkSession prop
- Added createSparkSession prop to both Notebook and Code components, enabling Spark session creation functionality.
- Updated the Code component to pass createSparkSession to the relevant child components, ensuring consistent functionality across the notebook interface.
* Add handleCreateSparkSession function to Notebook component for improved Spark session management
* Refactor Spark session creation in SparkModel.js to generate unique Spark app IDs and streamline API requests
- Updated the createSparkSession method to generate a unique Spark app ID using the current timestamp.
- Modified the API request to use the new Spark app ID for session creation, enhancing session management.
- Improved error handling and logging for better visibility during the Spark session creation process.
* Enhance demo notebook with Spark session initialization and update Notebook component cell handling
- Added a new code cell in the demo notebook to create a Spark session with detailed configuration settings.
- Updated the Notebook component to append new cells at the bottom instead of the top, improving user experience.
- Adjusted the execution logic to correctly handle the index of newly added cells during execution.
* Enhance demo notebook and Cell component for Spark output handling
- Added a markdown cell to the demo notebook for better documentation.
- Updated the last execution time and execution count in the notebook.
- Refactored the Cell component to include a new renderOutput function for improved handling of Spark output types, specifically integrating SparkOutputBox for Spark session information display.
- Streamlined output rendering logic to enhance code clarity and maintainability.
* Add SparkOutputBox component for rendering Spark output in notebooks
* Refactor SparkOutputBox styling and simplify component structure
- Updated the StyledBox component to use theme-based styling for better responsiveness.
- Changed the CSS selectors to target MUI Card components instead of the previous output area.
- Streamlined the return statement in SparkOutputBox for improved readability.
* Revert "Add SparkOutputBox component for rendering Spark output in notebooks"
This reverts commit 389bdac.
* Revert "Enhance demo notebook and Cell component for Spark output handling"
This reverts commit 0a10aba.1 parent 5f389e6 commit 0cf6d19
File tree
6 files changed
+235
-16
lines changed- examples/user_0@gmail.com
- server/app/routes
- webapp/src
- components/notebook
- content
- models
6 files changed
+235
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
3 | 68 | | |
4 | 69 | | |
5 | 70 | | |
| |||
14 | 79 | | |
15 | 80 | | |
16 | 81 | | |
17 | | - | |
| 82 | + | |
18 | 83 | | |
19 | 84 | | |
20 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
268 | 321 | | |
269 | 322 | | |
270 | 323 | | |
| |||
310 | 363 | | |
311 | 364 | | |
312 | 365 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 366 | + | |
323 | 367 | | |
324 | 368 | | |
| 369 | + | |
325 | 370 | | |
326 | 371 | | |
327 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
76 | 98 | | |
77 | 99 | | |
78 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
47 | 114 | | |
48 | 115 | | |
49 | 116 | | |
| |||
0 commit comments