Commit 3d346d0
authored
336 fix spark badge display (#337)
* Enhance notebook loading process with Spark integration
- Added SparkModel import to App.js for improved Spark session handling.
- Refactored handleExistingNotebookClick to use async/await for fetching notebook data and Spark application details concurrently.
- Implemented error handling for fetching notebook and Spark app, ensuring better user feedback and session management.
- Introduced a new method in SparkModel.js to retrieve Spark app details by notebook path, enhancing integration with the backend API.
* Enhance App.js with notebook reference and improved Spark app ID handling
- Added useRef for notebook reference to facilitate direct interaction with the Notebook component.
- Updated Spark app ID handling to ensure it is set correctly when an active Spark application is detected.
- Minor refactoring for improved clarity and maintainability of the code.
* Enhance App.js with additional logging for notebook and Spark app integration
- Added console log to display the associated Spark application after fetching notebook data.
- Improved visibility into the notebook and Spark app interaction for better debugging and user feedback.
* Refactor Notebook component to support forward refs and expose Spark app ID setter
- Updated Notebook.js to use forwardRef, allowing parent components to directly interact with the Notebook's internal state.
- Implemented useImperativeHandle to expose a method for setting the Spark app ID, enhancing integration with parent components.
- Improved code clarity and maintainability by restructuring the component's function signature.
* Enhance logging in App.js and Notebook.js for improved debugging
- Added useEffect in App.js to log the current notebook reference, aiding in tracking its state.
- Implemented useEffect in Notebook.js to log changes to sparkAppId, enhancing visibility into Spark application interactions.
- Updated setSparkAppId method in Notebook.js to include logging when setting the Spark app ID, improving traceability during state changes.
* Refactor Notebook.js to enhance Spark app ID handling and session management
- Updated the Notebook component to reset sparkAppId when switching notebooks and immediately fetch the associated Spark app.
- Improved error handling during the Spark app fetch process, logging any failures for better debugging.
- Streamlined the useEffect hook to ensure proper state management and clarity in the notebook's functionality.
* Update demo notebook to modify execution state and add Spark session termination cell
- Changed the execution state of an existing code cell from true to false, indicating it was not executed.
- Added a new code cell to the demo notebook for stopping the Spark session, including execution metadata and success status.
- Enhanced the notebook structure for better clarity and usability in Spark session management.1 parent 3b2dca7 commit 3d346d0
File tree
4 files changed
+104
-23
lines changed- examples/[email protected]
- webapp/src
- components/notebook
- models
4 files changed
+104
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
131 | | - | |
| 138 | + | |
132 | 139 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
143 | 167 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | 168 | | |
148 | 169 | | |
149 | 170 | | |
| |||
211 | 232 | | |
212 | 233 | | |
213 | 234 | | |
| 235 | + | |
214 | 236 | | |
215 | 237 | | |
216 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
73 | 85 | | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
78 | | - | |
79 | 91 | | |
80 | 92 | | |
81 | 93 | | |
| |||
318 | 330 | | |
319 | 331 | | |
320 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
321 | 346 | | |
322 | 347 | | |
323 | 348 | | |
| |||
382 | 407 | | |
383 | 408 | | |
384 | 409 | | |
385 | | - | |
| 410 | + | |
386 | 411 | | |
387 | 412 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
97 | 119 | | |
98 | 120 | | |
99 | 121 | | |
| |||
0 commit comments