FEAT: Unified Notifications Feature Implementation
What
Implemented the Unified Notifications feature, which includes:
- Storing log messages in Redis for 24 hours to persist.
- Storing popup notification messages in Redis alongside log messages.
- Enhancing the logs component to display both log and notification messages.
- Making the logs component global, now available on all pages.
- Adding UI/UX improvements, allowing users to resize the logs component for better usability.
Why
- Previously, log messages were not stored, causing them to be lost on page refresh.
- Popup notifications were short lived, making it difficult for users to track them after they disappeared.
- The logs component was only available on specific pages, leading to inconsistent behavior and limited utility across the application.
- The existing logs component lacked flexibility and usability, making it less user-friendly.
How
- Integrated Redis to persist log and notification messages for 24 hours.
- Updated the logs component to fetch and display both log and notification messages.
- Refactored the logs component to make it global, ensuring it appears at the bottom of every page.
- Enhanced the UI/UX of the logs component by adding resizable functionality, allowing users to adjust its height as needed.
- Improved the overall design and layout of the logs component for better user experience.
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Yes. This PR includes some major refactoring with respect to the way logs and popup notifications are handled.
Database Migrations
NA
Env Config
backend's .env: LOGS_EXPIRATION_TIME_IN_SECOND: This env stores the expiration time of the log messages.
Relevant Docs
NA
Related Issues or PRs
NA
Dependencies Versions
NA
Notes on Testing
NA
Screenshots
Logs component collapsed:
Logs component semi-expanded:
Logs component fully expanded:
Checklist
I have read and understood the Contribution Guidelines.
@tahierhussain how will this behave across prompt studio and workflow screens? I believe we show different log headers for these 2 pages currently. Can you add a screenshot for the workflow / pipeline pages as well in that regard?
@tahierhussain how will this behave across prompt studio and workflow screens? I believe we show different log headers for these 2 pages currently. Can you add a screenshot for the workflow / pipeline pages as well in that regard?
@chandrasekharan-zipstack As of now, we are not displaying different headers on different screens. Instead, we show the same logs component (with the same headers) across all screens. We have consolidated all the necessary headers into a single view. We may improve this in the future based on user experience.
| filepath | function | $$\textcolor{#23d18b}{\tt{passed}}$$ | SUBTOTAL |
|---|---|---|---|
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_logs}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ | $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ | $$\textcolor{#23d18b}{\tt{1}}$$ |
| $$\textcolor{#23d18b}{\tt{TOTAL}}$$ | $$\textcolor{#23d18b}{\tt{9}}$$ | $$\textcolor{#23d18b}{\tt{9}}$$ |
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code