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

feat: add modfied col and timezone info to schedule col #20165

Merged
merged 7 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ describe('alert list view', () => {

cy.get('[data-test="listview-table"]').should('be.visible');
// check alert list view header
cy.wait(500);
/// cy.get('[data-test="sort-header"]').debug()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a debug line here, this should be deleted right?

cy.get('[data-test="sort-header"]').eq(1).contains('Last run');
cy.get('[data-test="sort-header"]').eq(2).contains('Name');
cy.get('[data-test="sort-header"]').eq(3).contains('Schedule');
cy.get('[data-test="sort-header"]').eq(4).contains('Notification method');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Active');
cy.get('[data-test="sort-header"]').eq(7).contains('Modified');
// TODO: this assert is flaky, we need to find a way to make it work consistenly
// cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
cy.get('[data-test="sort-header"]').eq(7).contains('Active');
cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ describe('report list view', () => {
cy.get('[data-test="sort-header"]').eq(4).contains('Notification method');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Active');
cy.get('[data-test="sort-header"]').eq(7).contains('Modified');
// TODO: this assert is flaky, we need to find a way to make it work consistenly
// cy.get('[data-test="sort-header"]').eq(7).contains('Active');
// cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
});
});
19 changes: 16 additions & 3 deletions superset-frontend/src/views/CRUD/alert/AlertList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,14 @@ function AlertList({
size: 'xl',
Cell: ({
row: {
original: { crontab_humanized = '' },
original: { crontab_humanized = '', timezone },
},
}: any) => (
<Tooltip title={crontab_humanized} placement="topLeft">
<span>{crontab_humanized}</span>
<Tooltip
title={`${crontab_humanized} (${timezone})`}
placement="topLeft"
>
<span>{`${crontab_humanized} (${timezone})`}</span>
</Tooltip>
),
},
Expand Down Expand Up @@ -283,6 +286,16 @@ function AlertList({
disableSortBy: true,
size: 'xl',
},
{
Cell: ({
row: {
original: { changed_on_delta_humanized: changedOn },
},
}: any) => <span className="no-wrap">{changedOn}</span>,
Header: t('Modified'),
accessor: 'changed_on_delta_humanized',
size: 'xl',
},
{
Cell: ({ row: { original } }: any) => (
<Switch
Expand Down