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

Remove old gantt chart and redirect to grid views gantt tab #32908

Merged
merged 2 commits into from
Jul 28, 2023
Merged
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
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(MIT License) normalize.css v3.0.2 (http://necolas.github.io/normalize.css/)
(MIT License) ElasticMock v1.3.2 (https://github.com/vrcmarcos/elasticmock)
(MIT License) MomentJS v2.24.0 (http://momentjs.com/)
(MIT License) moment-strftime v0.5.0 (https://github.com/benjaminoakes/moment-strftime)
(MIT License) eonasdan-bootstrap-datetimepicker v4.17.49 (https://github.com/eonasdan/bootstrap-datetimepicker/)

========================================================================
Expand Down
50 changes: 0 additions & 50 deletions airflow/www/static/css/gantt.css

This file was deleted.

1 change: 1 addition & 0 deletions airflow/www/static/js/api/useDatasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default function useDatasets({
const updatedAfterParam =
updatedAfter && updatedAfter.count && updatedAfter.unit
? {
// @ts-ignore
updated_after: moment()
.subtract(updatedAfter.count, updatedAfter.unit)
.toISOString(),
Expand Down
2 changes: 2 additions & 0 deletions airflow/www/static/js/cluster-activity/nav/FilterBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const FilterBar = () => {
useFilters();

const { timezone } = useTimezone();
// @ts-ignore
const startDate = moment(filters.startDate);
// @ts-ignore
const endDate = moment(filters.endDate);
const formattedStartDate = startDate.tz(timezone).format(isoFormatWithoutTZ);
const formattedEndDate = endDate.tz(timezone).format(isoFormatWithoutTZ);
Expand Down
3 changes: 3 additions & 0 deletions airflow/www/static/js/cluster-activity/useFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const useFilters = (): FilterHookReturn => {
const endDate = searchParams.get(END_DATE_PARAM) || now;
const startDate =
searchParams.get(START_DATE_PARAM) ||
// @ts-ignore
moment(endDate).subtract(1, "d").toISOString();

const makeOnChangeFn =
Expand All @@ -68,10 +69,12 @@ const useFilters = (): FilterHookReturn => {

const onStartDateChange = makeOnChangeFn(
START_DATE_PARAM,
// @ts-ignore
(localDate: string) => moment(localDate).utc().format()
);

const onEndDateChange = makeOnChangeFn(END_DATE_PARAM, (localDate: string) =>
// @ts-ignore
moment(localDate).utc().format()
);

Expand Down
1 change: 1 addition & 0 deletions airflow/www/static/js/dag/details/gantt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const Gantt = ({ openGroupIds, gridScrollRef, ganttScrollRef }: Props) => {
ml={-9}
>
<Time
// @ts-ignore
dateTime={moment(startDate)
.add(i * intervals, "milliseconds")
.format()}
Expand Down
1 change: 1 addition & 0 deletions airflow/www/static/js/dag/nav/FilterBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const FilterBar = () => {
} = useFilters();

const { timezone } = useTimezone();
// @ts-ignore
const time = moment(filters.baseDate);
const formattedTime = time.tz(timezone).format(isoFormatWithoutTZ);

Expand Down
1 change: 1 addition & 0 deletions airflow/www/static/js/dag/useFilters.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe("Test useFilters hook", () => {
{
fnName: "onBaseDateChange" as keyof UtilFunctions,
paramName: "baseDate" as keyof Filters,
// @ts-ignore
paramValue: moment.utc().format(),
},
{
Expand Down
1 change: 1 addition & 0 deletions airflow/www/static/js/dag/useFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const useFilters = (): FilterHookReturn => {

const onBaseDateChange = makeOnChangeFn(
BASE_DATE_PARAM,
// @ts-ignore
(localDate: string) => moment(localDate).utc().format()
);
const onNumRunsChange = makeOnChangeFn(NUM_RUNS_PARAM);
Expand Down
Loading