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

add option to disable "View in alertmanager" links #6242

Open
anarcat opened this issue Oct 1, 2024 · 0 comments
Open

add option to disable "View in alertmanager" links #6242

anarcat opened this issue Oct 1, 2024 · 0 comments

Comments

@anarcat
Copy link

anarcat commented Oct 1, 2024

Hi!

We're deploying alertmanager through the debian package and do not have the web UI deployed by default. After deploying it by hand, i have found it doesn't bring any additional functionality on top of what Karma actually offered (or did I miss anything?), so I'm left wondering:

Why do we link to alertmanager in karma?

Is there a way to turn this off entirely?

I think there are a couple of places where this happens:

<div className="my-1">
<span className="badge px-1 me-1 components-label silence-detail">
<FontAwesomeIcon
className="text-muted me-1"
icon={faHome}
fixedWidth
/>
View in Alertmanager:
</span>
{alertmanagers.map((alertmanager) => (
<RenderLinkAnnotation
key={alertmanager.name}
name={alertmanager.name}
value={`${alertmanager.publicURI}/#/silences/${silence.id}`}
/>
))}
</div>

useEffect(() => {
if (!inProgress && error !== null) {
silenceFormStore.data.setRequestsByClusterUpdate(cluster, {
isDone: true,
error: error,
});
} else if (!inProgress && response !== null) {
silenceFormStore.data.setRequestsByClusterUpdate(cluster, {
isDone: true,
silenceID: response.silenceID,
silenceLink: `${publicURIs[responseURI as string]}/#/silences/${
response.silenceID
}`,
});
}
}, [cluster, error, inProgress, publicURIs, response, responseURI]); // eslint-disable-line react-hooks/exhaustive-deps

https://github.com/prymitive/karma/blob/main/ui/src/Components/SilenceModal/SilenceSubmit/MultiClusterStatus.tsx#L61-L67

https://github.com/prymitive/karma/blob/main/ui/src/Components/SilenceModal/SilenceSubmit/SingleClusterStatus.tsx#L54-L60

Some of those I don't care about too much (we don't have clustering right now), but the first two are kind of distracting and misleading for our users.

I was hoping I could use some CSS tweaking to get rid of those UI elements, but the tags are not quite set right, at least enough that it would be hard for me to figure out how to hide them.

e.g. the "view in alertmanager" span *does have a silence-detail class, but not the following <a> element, which is really what i want to get rid of). the submission confirmation is similarly cryptic, both in terms of UX (IMHO, it should say, with words "submitted!" or something, instead of just that checkbox and a UUID) and styling (the entire confirmation model doesn't have any styling indication that makes it distinguishible from other modals).

so perhaps a simple, elegant solution would be to pepper a few more UI elements with a silence-alertmanager-reference class that i could just display: hide in our CSS and we'd be fine?

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

No branches or pull requests

1 participant