-
Notifications
You must be signed in to change notification settings - Fork 16.3k
[DRAFT] [AIRFLOW-3891] Make the Graph View time-zone aware #4893
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| export { formatInSelectedTz } from './base'; | ||
| export { initRefreshButton, update_nodes_states } from './graph'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,10 +32,10 @@ | |
| <div class="form-inline"> | ||
| <form method="get" style="float:left;"> | ||
| {{ state_token }} | ||
| Base date: {{ form.base_date(class_="form-control") }} | ||
| Base date: {{ form.base_date(class_="form-control tz-aware") }} | ||
| Number of runs: {{ form.num_runs(class_="form-control") }} | ||
| Run: | ||
| {{ form.execution_date(class_="form-control") | safe }} | ||
| {{ form.execution_date(class_="form-control tz-aware") | safe }} | ||
| Layout: | ||
| {{ form.arrange(class_="form-control") | safe }} | ||
| <input type="hidden" name="root" value="{{ root }}"> | ||
|
|
@@ -362,6 +362,15 @@ | |
|
|
||
| </script> | ||
| <script src="{{ url_for_asset('graph.js') }}"></script> | ||
| <script src="{{ url_for_asset('index.js') }}"></script> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this play with the import of |
||
| <script type="text/javascript"> | ||
| let dagTz = '{{ dag.timezone.name }}'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've started putting thins like this in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| window.onload = function() { | ||
| AirflowUI.initRefreshButton(dagTz); | ||
| AirflowUI.update_nodes_states(task_instances, dagTz); | ||
| } | ||
| </script> | ||
|
|
||
|
|
||
| {% endblock %} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably call this "base" or "common" or something - "index" is a unmeaningful to work out what might be in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I picked 'index' only because that's the file name that the webpack docs on Libraries used. I'm guessing there's a way to override that - I'll dig in a bit more and see if I can use
base.jsinstead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that important actually.