Skip to content

Commit

Permalink
Feature/cldn 1609 (#195)
Browse files Browse the repository at this point in the history
* Add row number option to CCCS-Grid (#181)

* Add row number option to CCCS-Grid

* Have row numbers show by default

Co-authored-by: cccs-Dustin <96579982+cccs-Dustin@users.noreply.github.com>

Co-authored-by: cccs-Dustin <96579982+cccs-Dustin@users.noreply.github.com>

* Use new build agent (#187)

* Use new build agent

* Remove quotes

* Display datahub link for datasets with defined URN (#177)

* Display datahub link for datasets with defined URN

* Add datahub SVG

* Reorder imports

* Add datahub link to dashboards

* Convert to camel case

* Add tests for DatasetList

* Add tests for dashboard header

* Provide explanation for empty catch

* [CLDN-1540] Added ability for multiple user emails to be filtered on at once

* [CLDN-1540] temp update to docker image tag so that we can deploy code changes to PB-stg

* [CLDN-1540] revert of temp update to docker image tag so that we can deploy code changes to PB-stg

* Add path to url (#193)

* [CLDN-1609] Fixing post merge build errors

* Update cccs-build/superset-base/azure-pipelines.yml

Co-authored-by: Reese <10563996+reesercollins@users.noreply.github.com>

* Update superset-frontend/src/cccs-viz/plugins/plugin-chart-at-a-glance-user-id/src/styles.js

Co-authored-by: Reese <10563996+reesercollins@users.noreply.github.com>

Co-authored-by: Reese <10563996+reesercollins@users.noreply.github.com>
Co-authored-by: cccs-Dustin <96579982+cccs-Dustin@users.noreply.github.com>
  • Loading branch information
3 people authored and cccs-RyanK committed Apr 19, 2023
1 parent d17a11d commit 34ad6b7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 15 deletions.
1 change: 1 addition & 0 deletions cccs-build/superset/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG VAULT_CA_CONTAINER=uchimera.azurecr.io/cccs/hogwarts/vault-ca:master_2921_22
FROM $VAULT_CA_CONTAINER AS vault_ca
FROM uchimera.azurecr.io/cccs/superset-base:cccs-2.0_20220808144709_b4476


USER root

COPY *requirements.txt /tmp/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,22 +318,24 @@ export default function transformProps(chartProps: CccsGridChartProps) {
params.node ? params.node.rowIndex + 1 : null,
} as any);
}
let parsed_jump_action_configs = {}
jump_action_configs?.forEach( (e: any) =>
{
const parsed_jump_action_configs = {};
jump_action_configs?.forEach((e: any) => {
if (e.dashboardID in parsed_jump_action_configs) {
parsed_jump_action_configs[e.dashboardID] = parsed_jump_action_configs[e.dashboardID].concat({
parsed_jump_action_configs[e.dashboardID] = parsed_jump_action_configs[
e.dashboardID
].concat({
advancedDataType: e.advancedDataType,
nativefilters: e.filters,
name: e.dashBoardName
})
}
else {
parsed_jump_action_configs[e.dashboardID] = [{
advancedDataType: e.advancedDataType,
nativefilters: e.filters,
name: e.dashBoardName
}]
name: e.dashBoardName,
});
} else {
parsed_jump_action_configs[e.dashboardID] = [
{
advancedDataType: e.advancedDataType,
nativefilters: e.filters,
name: e.dashBoardName,
},
];
}
});

Expand All @@ -357,6 +359,6 @@ export default function transformProps(chartProps: CccsGridChartProps) {
column_state,
agGridLicenseKey,
datasetColumns: columns,
jumpActionConfigs: parsed_jump_action_configs
jumpActionConfigs: parsed_jump_action_configs,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface CccsGridTransformedProps extends CccsGridStylesProps {
// add typing here for the props you pass in from transformProps.ts!
agGridLicenseKey: string;
datasetColumns: Column[];
jumpActionConfigs?: any[]
jumpActionConfigs?: any[];
}

export type EventHandlers = Record<string, { (props: any): void }>;
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,9 @@ test('should render an extension component if one is supplied', () => {
screen.getByText('dashboard.nav.right extension component'),
).toBeInTheDocument();
});

test('should show datahub link', async () => {
const mockedProps = createProps();
setup(mockedProps);
expect(screen.getByTestId('datahub_link')).toBeInTheDocument();
});
30 changes: 30 additions & 0 deletions superset-frontend/src/views/CRUD/data/dataset/DatasetList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,36 @@ describe('DatasetList', () => {
it('renders a SubMenu with no tabs', () => {
expect(wrapper.find(SubMenu).props().tabs).toBeUndefined();
});

it('renders datahub link when urn is defined', async () => {
await waitForComponentToPaint(wrapper);
expect(
wrapper
.find('[data-test="cell-text"]')
.filterWhere(
e =>
e.childAt(0).props().cell.column.id === 'datahub_link' &&
e.childAt(0).props().cell.row.index === 0,
)
.childAt(0)
.children(),
).toHaveLength(1);
});

it('does not render datahub link when urn is undefined', async () => {
await waitForComponentToPaint(wrapper);
expect(
wrapper
.find('[data-test="cell-text"]')
.filterWhere(
e =>
e.childAt(0).props().cell.column.id === 'datahub_link' &&
e.childAt(0).props().cell.row.index === 1,
)
.childAt(0)
.children(),
).toHaveLength(0);
});
});

jest.mock('react-router-dom', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import WarningIconWithTooltip from 'src/components/WarningIconWithTooltip';
import { isUserAdmin } from 'src/dashboard/util/permissionUtils';
import { GenericLink } from 'src/components/GenericLink/GenericLink';
import { datahubUrl } from 'src/preamble';

import {
PAGE_SIZE,
Expand Down

0 comments on commit 34ad6b7

Please sign in to comment.