You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/26 10:37:15 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #25244: Add dataset-triggered run type icon

ashb commented on code in PR #25244:
URL: https://github.com/apache/airflow/pull/25244#discussion_r929804711


##########
airflow/www/static/js/dag/details/Header.tsx:
##########
@@ -54,33 +53,21 @@ const Header = () => {
 
   let runLabel;
   if (dagRun && runId) {
-    if (runId.includes('manual__') || runId.includes('scheduled__') || runId.includes('backfill__')) {
-      runLabel = (<Time dateTime={dagRun.dataIntervalStart || dagRun.executionDate} />);
-    } else {
-      runLabel = runId;
-    }
-    if (dagRun.runType === 'manual') {
-      runLabel = (
-        <>
-          <MdPlayArrow style={{ display: 'inline' }} />
-          {runLabel}
-        </>
-      );
-    } else if (dagRun.runType === 'backfill') {
-      runLabel = (
-        <>
-          <RiArrowGoBackFill style={{ display: 'inline' }} />
-          {runLabel}
-        </>
-      );
-    } else if (dagRun.runType === 'scheduled') {
-      runLabel = (
-        <>
-          <MdOutlineSchedule style={{ display: 'inline' }} />
-          {runLabel}
-        </>
-      );
-    }
+    // If a runId includes the runtype then parse the time, otherwise use the custom run id
+    const runName = (
+      runId.includes('manual__')
+      || runId.includes('scheduled__')
+      || runId.includes('backfill__')
+      || runId.includes('dataset_triggered__')

Review Comment:
   Don't make any deicisions based on the `run_id` column -- `run_type` exists for this very purpose.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org