Skip to content

Commit

Permalink
feat: add modfied col and timezone info to schedule col (#20165)
Browse files Browse the repository at this point in the history
* feat: add modfied and timezone to to schedule col

* test if test works

* udpate test

* fix test
  • Loading branch information
pkdotson committed Jun 6, 2022
1 parent df00f0e commit 6f0d53e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ describe('alert 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');
});
});
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

0 comments on commit 6f0d53e

Please sign in to comment.