Skip to content

Commit

Permalink
feat(matchExpr): match expression visualizer (#914)
Browse files Browse the repository at this point in the history
* feat(matchExpr): topology-based match expression evaluator

Signed-off-by: Thuan Vo <[email protected]>

* test(matchExpr): fixing affected tests

* feat(matchExpr): allow hide alert actions

* feat(matchExpr): respond to target modification events

* fix(topology): fix reduce func errors

* chore(topology): hide action menu if no actions are available

* fix(actions): fix menu append location

* chore(cred): reword modal title

* fix(matchExpr): remove action to reset match expression

* chore(matchExpr): rename components

* chore(matchExpr): clean up and save graph positions

Signed-off-by: Thuan Vo <[email protected]>

---------

Signed-off-by: Thuan Vo <[email protected]>
  • Loading branch information
Thuan Vo authored Mar 22, 2023
1 parent 3912e4c commit 547a37d
Show file tree
Hide file tree
Showing 31 changed files with 1,545 additions and 917 deletions.
4 changes: 2 additions & 2 deletions src/app/AppLayout/AuthModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { Modal, ModalVariant, Text } from '@patternfly/react-core';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { filter, first, map, mergeMap } from 'rxjs';
import { JmxAuthForm } from './JmxAuthForm';
import { CredentialAuthForm } from './CredentialAuthForm';

export interface AuthModalProps {
visible: boolean;
Expand Down Expand Up @@ -103,7 +103,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({ onDismiss, onSave: onProps
</Text>
}
>
<JmxAuthForm onSave={onSave} onDismiss={onDismiss} focus={true} loading={loading} />
<CredentialAuthForm onSave={onSave} onDismiss={onDismiss} focus={true} loading={loading} />
</Modal>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ import { LoadingPropsType } from '@app/Shared/ProgressIndicator';
import { ActionGroup, Button, Form, FormGroup, TextInput } from '@patternfly/react-core';
import * as React from 'react';

export interface JmxAuthFormProps {
export interface CredentialAuthFormProps {
onDismiss: () => void;
onSave: (username: string, password: string) => void;
focus?: boolean;
loading?: boolean;
children?: React.ReactNode;
}

export const JmxAuthForm: React.FC<JmxAuthFormProps> = ({ onDismiss, onSave, ...props }) => {
export const CredentialAuthForm: React.FC<CredentialAuthFormProps> = ({ onDismiss, onSave, ...props }) => {
const [username, setUsername] = React.useState('');
const [password, setPassword] = React.useState('');

Expand Down
11 changes: 3 additions & 8 deletions src/app/BreadcrumbPage/BreadcrumbPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,9 @@ export const BreadcrumbPage: React.FC<BreadcrumbPageProps> = (props) => {
<PageSection>
<Breadcrumb>
{(props.breadcrumbs || []).map(({ title, path }) => (
<BreadcrumbItem
key={path}
render={() => (
<>
<Link to={path}>{title}</Link>
</>
)}
></BreadcrumbItem>
<BreadcrumbItem key={path}>
<Link to={path}>{title}</Link>
</BreadcrumbItem>
))}
<BreadcrumbHeading>{props.pageTitle}</BreadcrumbHeading>
</Breadcrumb>
Expand Down
14 changes: 7 additions & 7 deletions src/app/Modal/DeleteWarningUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export enum DeleteOrDisableWarningType {
DeleteEventTemplates = 'DeleteEventTemplates',
DeleteProbeTemplates = 'DeleteProbeTemplates',
DeleteActiveProbes = 'DeleteActiveProbes',
DeleteJMXCredentials = 'DeleteJMXCredentials',
DeleteCredentials = 'DeleteCredentials',
DeleteCustomTargets = 'DeleteCustomTargets',
DeleteDashboardLayout = 'DeleteDashboardLayout',
}
Expand Down Expand Up @@ -112,12 +112,12 @@ export const DeleteActiveProbes: DeleteOrDisableWarning = {
ariaLabel: 'Active Probes remove warning',
};

export const DeleteJMXCredentials: DeleteOrDisableWarning = {
id: DeleteOrDisableWarningType.DeleteJMXCredentials,
title: 'Permanently delete JMX Credentials?',
label: 'Delete JMX Credentials',
export const DeleteCredentials: DeleteOrDisableWarning = {
id: DeleteOrDisableWarningType.DeleteCredentials,
title: 'Permanently delete Credentials?',
label: 'Delete Credentials',
description: `Credential data for this target will be lost.`,
ariaLabel: 'JMX Credentials delete warning',
ariaLabel: 'Credentials delete warning',
};

export const DeleteCustomTargets: DeleteOrDisableWarning = {
Expand All @@ -144,7 +144,7 @@ export const DeleteWarningKinds: DeleteOrDisableWarning[] = [
DeleteEventTemplates,
DeleteProbeTemplates,
DeleteActiveProbes,
DeleteJMXCredentials,
DeleteCredentials,
DeleteCustomTargets,
DeleteDashboardLayout,
];
Expand Down
Loading

0 comments on commit 547a37d

Please sign in to comment.