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

Bug/cldn 2053 #436

Open
wants to merge 8 commits into
base: cccs-3.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cccs-build/superset/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Vault CA container import
ARG VAULT_CA_CONTAINER=uchimera.azurecr.io/cccs/hogwarts/vault-ca:master_11376_a25c34e1
FROM $VAULT_CA_CONTAINER AS vault_ca
FROM uchimera.azurecr.io/cccs/superset-base:bug_CLDN-2445_20240521191045_b10149
FROM uchimera.azurecr.io/cccs/superset-base:bug_cldn-2053_20240708212153_b10442

USER root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {
ChangeEvent,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
Expand Down Expand Up @@ -35,6 +36,8 @@ import { addWarningToast } from 'src/components/MessageToasts/actions';
import ChartContextMenu, {
Ref as ContextRef,
} from './ContextMenu/AGGridContextMenu';
import CustomHeader from './CustomHeader/customHeader';
import './CustomHeader/customHeaderStyles.css';

import CopyMenuItem from './ContextMenu/MenuItems/CopyMenuItem';
import CopyWithHeaderMenuItem from './ContextMenu/MenuItems/CopyWithHeaderMenuItem';
Expand Down Expand Up @@ -69,11 +72,6 @@ const RETENTION_LIMIT = 100;
const SUBMISSION_LIMIT = 10;
const DOWNLOAD_LIMIT = 10;

const headerStyles = css`
display: flex;
flex-direction: row;
`;

const paginationStyles = css`
margin-right: 0.5rem;
`;
Expand Down Expand Up @@ -614,6 +612,13 @@ export default function AGGridViz({
return menuItems;
};

const components = useMemo(
() => ({
agColumnHeader: CustomHeader,
}),
[],
);

return !isDestroyed ? (
<>
<ChartContextMenu
Expand All @@ -637,7 +642,7 @@ export default function AGGridViz({
className="form-inline"
style={{ flex: '0 1 auto', paddingBottom: '0.5em' }}
>
<div css={headerStyles}>
<div className="headerStyles">
{pageLength > 0 && (
<span
className="dt-select-page-size form-inline"
Expand Down Expand Up @@ -690,6 +695,7 @@ export default function AGGridViz({
enableRangeSelection
rowData={rowData}
enableBrowserTooltips
components={components}
onRangeSelectionChanged={onRangeSelectionChanged}
cacheQuickFilter
suppressRowClickSelection
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { useRef } from 'react';

export default props => {
const refButton = useRef(null);
const refLabel = useRef(null);

const onMenuClicked = () => {
props.showColumnMenu(refButton.current);
};

return (
<div className="headerWrapper">
<div
ref={refButton}
className="customHeaderMenuButton"
onClick={() => onMenuClicked()}
role="button"
tabIndex="0"
>
<i className="fa fa-bars" />
</div>
<div ref={refLabel} className="customHeaderLabel">
{props.displayName}
</div>
</div>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.headerWrapper {
display: flex;
overflow: hidden;
gap: 0.7rem;
}

.customHeaderLabel {
overflow: hidden;
text-overflow: ellipsis;
}

.customSortRemoveLabel {
font-size: 11px;
}

.active {
color: cornflowerblue;
}

.headerStyles {
display: flex;
flex-direction: row;
}
Loading