Skip to content

UI: Display an error message and disable salt actions when salt is unavailable #3117

Open
@JBWatenbergScality

Description

@JBWatenbergScality

Component:

ui

Why this is needed:

When salt API is unavailable we currently logout the user and redirect to login screen losing access to any monitoring information.

What should be done:

We should redirect the user to login screen only if salt API answers back with a 401 status code and in other cases the user should be logged in the ui and the UI should prompt a message disclaiming salt API unavailability and disabling Slat related actions (deploying nodes, environments, ...)

Implementation proposal (strongly recommended):

In ui/src/ducks/login.js authenticateSaltApi handle the cases when result.error.response.status :
1. equals 401 : LogOut the user
2. equals 403 : ensure salt actions are disabled (it might be done through permissions checks in groups claim)
3. other : toast an error notification and disable salt actions

Test plan:

Add an integration test mocking Salt failure and check the behavior of the UI

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:mediumSomething that requires one or few days to fixtopic:uiUI-related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions