change(ui) - errors and sessions widget click
This commit is contained in:
parent
0fb37ab695
commit
5d9cc9b7ea
4 changed files with 8 additions and 6 deletions
|
|
@ -18,7 +18,8 @@ function CustomMetricTableErrors(props: RouteComponentProps<Props>) {
|
|||
const errorId = new URLSearchParams(props.location.search).get("errorId");
|
||||
const { showModal, hideModal } = useModal();
|
||||
|
||||
const onErrorClick = (error: any) => {
|
||||
const onErrorClick = (e: any, error: any) => {
|
||||
e.stopPropagation();
|
||||
props.history.replace({search: (new URLSearchParams({errorId : error.errorId})).toString()});
|
||||
}
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ function CustomMetricTableErrors(props: RouteComponentProps<Props>) {
|
|||
if (!errorId) return;
|
||||
|
||||
showModal(<ErrorDetailsModal errorId={errorId} />, { right: true, onClose: () => {
|
||||
if (props.history.location.pathname.includes("/metric")) {
|
||||
if (props.history.location.pathname.includes("/dashboard")) {
|
||||
props.history.replace({search: ""});
|
||||
}
|
||||
}});
|
||||
|
|
@ -44,7 +45,7 @@ function CustomMetricTableErrors(props: RouteComponentProps<Props>) {
|
|||
size="small"
|
||||
>
|
||||
{metric.data.errors && metric.data.errors.map((error: any, index: any) => (
|
||||
<ErrorListItem key={index} error={error} onClick={() => onErrorClick(error)} />
|
||||
<ErrorListItem key={index} error={error} onClick={(e) => onErrorClick(e, error)} />
|
||||
))}
|
||||
|
||||
{isEdit && (
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ function WidgetChart(props: Props) {
|
|||
metric={metric}
|
||||
data={data[0]}
|
||||
colors={colors}
|
||||
params={params}
|
||||
// params={params}
|
||||
onClick={onChartClick}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { withSiteId, dashboardMetricDetails } from 'App/routes';
|
|||
import TemplateOverlay from './TemplateOverlay';
|
||||
import AlertButton from './AlertButton';
|
||||
import stl from './widgetWrapper.module.css';
|
||||
import { FilterKey } from 'App/types/filter/filterType';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
|
|
@ -66,7 +67,7 @@ function WidgetWrapper(props: Props) {
|
|||
|
||||
const ref: any = useRef(null)
|
||||
const dragDropRef: any = dragRef(dropRef(ref))
|
||||
const addOverlay = isTemplate || (!isPredefined && isWidget)
|
||||
const addOverlay = isTemplate || (!isPredefined && isWidget && widget.metricOf !== FilterKey.ERRORS && widget.metricOf !== FilterKey.SESSIONS)
|
||||
|
||||
return useObserver(() => (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function SessionItem(props: RouteComponentProps<Props>) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div className={ cn(stl.sessionItem, "flex flex-col p-2") } id="session-item" >
|
||||
<div className={ cn(stl.sessionItem, "flex flex-col p-2") } id="session-item" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="flex items-start">
|
||||
<div className={ cn('flex items-center w-full')}>
|
||||
<div className="flex items-center pr-2" style={{ width: "30%"}}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue