Open NShaforostov opened 1 year ago
In order to implement this feature the following changes are required form server side:
UserNotification
object: NotificationType
, EntityClass
, EntityId
and some additional fields depending on the typeNotification | Entity |
---|---|
BILLING_QUOTA_EXCEEDING | Type Quota , fields: id |
DATASTORAGE_LIFECYCLE_ACTION | Type DataStorage , fields id , ruleId , path |
DATASTORAGE_LIFECYCLE_RESTORE_ACTION | Type DataStorage , fields id , path |
FULL_NODE_POOL | Type NodePool , fields: id |
HIGH_CONSUMED_RESOURCES | Type PipelineRun , fields: id |
IDLE_RUN | Type PipelineRun , fields: id |
IDLE_RUN_PAUSED | Type PipelineRun , fields: id |
IDLE_RUN_STOPPED | Type PipelineRun , fields: id |
INACTIVE_USERS | - |
LDAP_BLOCKED_POSTPONED_USERS | - |
LDAP_BLOCKED_USERS | - |
LONG_INIT | Type PipelineRun , fields: id |
LONG_PAUSED | Type PipelineRun , fields: id |
LONG_PAUSED_STOPPED | Type PipelineRun , fields: id |
LONG_RUNNING | Type PipelineRun , fields: id |
LONG_STATUS | Type PipelineRun , fields: id |
NEW_ISSUE | Type Issue , fields: id |
NEW_ISSUE_COMMENT | Type Issue , fields: id |
PIPELINE_RUN_STATUS | Type PipelineRun , fields: id |
STORAGE_QUOTA_EXCEEDING | Type DataStorage , fields id |
Background
Since #3015 is implemented, users have the handy form where all users' related notifications are displayed. Users can view them and manually perform neccessary actions in the Platform based on the information from that notifications - for examlple, to avoid extra spendings on forgotten run and stop it. As further steps - it would be convenient for users to perform some actions explicitly from the notification - to not perform extra actions. For example, user received a notification LONG_RUNNING. Currently, the Platform suggests user to open the run logs page, then manually check the run state and solve what to do with it. In this case, it would be useful to have the list of possible user's actions for this run inside the notification - it may be "STOP"/"PAUSE" actions. Let's add possible actions to notifications where it is possible.
Approach
POSTPONE
- Postpone transition on the predefined number of days.
PAUSE
STOP
- Pause run.
- Stop run.
RESUME
TERMINATE
- Resume run.
- Terminate run.
TERMINATE
- Terminate run.
RESUME
TERMINATE
- Resume run.
- Terminate run.
PAUSE
STOP
- Pause run.
- Stop run.
Show the following actions under conditions (otherwise, hide them):
Actions shall be shown only at the Notifications page as set of buttons for each notification, e.g.:
Other options A clear and concise description of any alternative solutions or features you've considered.