|
124 | 124 |
|
125 | 125 | log = logging.getLogger(__name__) |
126 | 126 |
|
127 | | -DEFAULT_VIEW_PRESETS = ["grid", "graph", "duration", "gantt", "landing_times"] |
128 | 127 | ORIENTATION_PRESETS = ["LR", "TB", "RL", "BT"] |
129 | 128 |
|
130 | 129 | AssetT = TypeVar("AssetT", bound=BaseAsset) |
@@ -380,8 +379,6 @@ class DAG(TaskSDKDag, LoggingMixin): |
380 | 379 | :param dagrun_timeout: Specify the duration a DagRun should be allowed to run before it times out or |
381 | 380 | fails. Task instances that are running when a DagRun is timed out will be marked as skipped. |
382 | 381 | :param sla_miss_callback: DEPRECATED - The SLA feature is removed in Airflow 3.0, to be replaced with a new implementation in 3.1 |
383 | | - :param default_view: Specify DAG default view (grid, graph, duration, |
384 | | - gantt, landing_times), default grid |
385 | 382 | :param orientation: Specify DAG orientation in graph view (LR, TB, RL, BT), default LR |
386 | 383 | :param catchup: Perform scheduler catchup (or only run latest)? Defaults to True |
387 | 384 | :param on_failure_callback: A function or list of functions to be called when a DagRun of this dag fails. |
@@ -428,7 +425,6 @@ class DAG(TaskSDKDag, LoggingMixin): |
428 | 425 | partial: bool = False |
429 | 426 | last_loaded: datetime | None = attrs.field(factory=timezone.utcnow) |
430 | 427 |
|
431 | | - default_view: str = airflow_conf.get_mandatory_value("webserver", "dag_default_view").lower() |
432 | 428 | orientation: str = airflow_conf.get_mandatory_value("webserver", "dag_orientation") |
433 | 429 |
|
434 | 430 | # this will only be set at serialization time |
@@ -1901,13 +1897,6 @@ def sync_to_db(self, session=NEW_SESSION): |
1901 | 1897 | bundle_version = self.get_bundle_version(session=session) |
1902 | 1898 | self.bulk_write_to_db(bundle_name, bundle_version, [self], session=session) |
1903 | 1899 |
|
1904 | | - def get_default_view(self): |
1905 | | - """Allow backward compatible jinja2 templates.""" |
1906 | | - if self.default_view is None: |
1907 | | - return airflow_conf.get("webserver", "dag_default_view").lower() |
1908 | | - else: |
1909 | | - return self.default_view |
1910 | | - |
1911 | 1900 | @staticmethod |
1912 | 1901 | @provide_session |
1913 | 1902 | def deactivate_unknown_dags(active_dag_ids, session=NEW_SESSION): |
@@ -2084,8 +2073,6 @@ class DagModel(Base): |
2084 | 2073 | _dag_display_property_value = Column("dag_display_name", String(2000), nullable=True) |
2085 | 2074 | # Description of the dag |
2086 | 2075 | description = Column(Text) |
2087 | | - # Default view of the DAG inside the webserver |
2088 | | - default_view = Column(String(25)) |
2089 | 2076 | # Timetable summary |
2090 | 2077 | timetable_summary = Column(Text, nullable=True) |
2091 | 2078 | # Timetable description |
@@ -2235,11 +2222,6 @@ def get_paused_dag_ids(dag_ids: list[str], session: Session = NEW_SESSION) -> se |
2235 | 2222 | paused_dag_ids = {paused_dag_id for (paused_dag_id,) in paused_dag_ids} |
2236 | 2223 | return paused_dag_ids |
2237 | 2224 |
|
2238 | | - def get_default_view(self) -> str: |
2239 | | - """Get the Default DAG View, returns the default config value if DagModel does not have a value.""" |
2240 | | - # This is for backwards-compatibility with old dags that don't have None as default_view |
2241 | | - return self.default_view or airflow_conf.get_mandatory_value("webserver", "dag_default_view").lower() |
2242 | | - |
2243 | 2225 | @property |
2244 | 2226 | def safe_dag_id(self): |
2245 | 2227 | return self.dag_id.replace(".", "__dot__") |
|
0 commit comments