Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

336 fix spark badge display #337

Merged
merged 7 commits into from
Dec 10, 2024
Merged

Conversation

xuwenyihust
Copy link
Owner

No description provided.

- 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.
…ling

- 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.
…egration

- 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.
…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.
- 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.
…agement

- 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.
…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.
@xuwenyihust xuwenyihust linked an issue Dec 10, 2024 that may be closed by this pull request
@xuwenyihust xuwenyihust merged commit 3d346d0 into release-0.6.1 Dec 10, 2024
4 checks passed
@xuwenyihust xuwenyihust deleted the 336-fix-spark-badge-display branch December 10, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Spark Badge Display
1 participant