fix(ui): fix descr position, fix card click, rm unneeded code
This commit is contained in:
parent
07d2c0427d
commit
8e58e68607
4 changed files with 8 additions and 8 deletions
|
|
@ -35,7 +35,7 @@ const cols = [
|
|||
@widgetHOC('slowestImages', { fitContent: true })
|
||||
export default class SlowestImages extends React.PureComponent {
|
||||
render() {
|
||||
const { data: images, loading, isTemplate } = this.props;
|
||||
const { data: images, loading } = this.props;
|
||||
return (
|
||||
<Loader loading={ loading } size="small">
|
||||
<NoContent
|
||||
|
|
@ -45,7 +45,6 @@ export default class SlowestImages extends React.PureComponent {
|
|||
<Table
|
||||
cols={ cols }
|
||||
rows={ images }
|
||||
isTemplate={isTemplate}
|
||||
/>
|
||||
</NoContent>
|
||||
</Loader>
|
||||
|
|
|
|||
|
|
@ -91,11 +91,10 @@ function DashboardView(props: Props) {
|
|||
focusTitle={focusTitle}
|
||||
/>
|
||||
<div className="flex items-center mb-4 justify-between">
|
||||
<div className="flex items-center" style={{ flex: 4 }}>
|
||||
<div className="flex items-center" style={{ flex: 3 }}>
|
||||
<PageTitle
|
||||
title={dashboard?.name}
|
||||
className="mr-3"
|
||||
subTitle={dashboard?.description}
|
||||
actionButton={
|
||||
<Button primary size="small" onClick={onAddWidgets}>Add Metric</Button>
|
||||
}
|
||||
|
|
@ -125,6 +124,9 @@ function DashboardView(props: Props) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2 className="my-4 font-normal color-gray-dark">{dashboard?.description}</h2>
|
||||
</div>
|
||||
<DashboardWidgetGrid
|
||||
siteId={siteId}
|
||||
dashboardId={dashboardId}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ import stl from './widgetWrapper.css';
|
|||
|
||||
interface IProps {
|
||||
isTemplate?: boolean;
|
||||
onClick: () => void;
|
||||
}
|
||||
function TemplateOverlay(props: IProps) {
|
||||
return (
|
||||
<div className={cn('absolute cursor-pointer z-10', stl.overlay, { [stl.overlayDashboard]: !props.isTemplate } )} />
|
||||
<div onClick={props.onClick} className={cn('absolute cursor-pointer z-10', stl.overlay, { [stl.overlayDashboard]: !props.isTemplate } )} />
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ function WidgetWrapper(props: Props) {
|
|||
|
||||
const addOverlay = isTemplate || !isPredefined
|
||||
|
||||
console.log(widget, isTemplate, addOverlay)
|
||||
|
||||
return useObserver(() => (
|
||||
<div
|
||||
className={
|
||||
|
|
@ -108,7 +106,7 @@ function WidgetWrapper(props: Props) {
|
|||
flip={["top"]}
|
||||
html={<span>Click to select</span>}
|
||||
>
|
||||
{addOverlay && <TemplateOverlay isTemplate={isTemplate} />}
|
||||
{addOverlay && <TemplateOverlay onClick={onChartClick} isTemplate={isTemplate} />}
|
||||
<div
|
||||
className={cn("p-3 flex items-center justify-between", { "cursor-move" : !isTemplate })}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue