This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 10c9cb5318 Revert disabling run task button (#23038)
10c9cb5318 is described below

commit 10c9cb5318fd8a9e41a7b4338e5052c8feece7ae
Author: Brent Bovenzi <[email protected]>
AuthorDate: Mon Apr 18 16:32:37 2022 -0500

    Revert disabling run task button (#23038)
---
 .../content/taskInstance/taskActions/Run.jsx        | 21 ++++-----------------
 airflow/www/templates/airflow/dag.html              |  5 +----
 2 files changed, 5 insertions(+), 21 deletions(-)

diff --git 
a/airflow/www/static/js/tree/details/content/taskInstance/taskActions/Run.jsx 
b/airflow/www/static/js/tree/details/content/taskInstance/taskActions/Run.jsx
index cfc649e9de..204cec44c2 100644
--- 
a/airflow/www/static/js/tree/details/content/taskInstance/taskActions/Run.jsx
+++ 
b/airflow/www/static/js/tree/details/content/taskInstance/taskActions/Run.jsx
@@ -22,21 +22,15 @@ import {
   Button,
   Flex,
   ButtonGroup,
-  Tooltip,
 } from '@chakra-ui/react';
 
 import { useRunTask } from '../../../../api';
-import { getMetaValue } from '../../../../../utils';
-import { useContainerRef } from '../../../../context/containerRef';
-
-const canRun = getMetaValue('k8s_or_k8scelery_executor') === 'True';
 
 const Run = ({
   dagId,
   runId,
   taskId,
 }) => {
-  const containerRef = useContainerRef();
   const [ignoreAllDeps, setIgnoreAllDeps] = useState(false);
   const onToggleAllDeps = () => setIgnoreAllDeps(!ignoreAllDeps);
 
@@ -58,7 +52,7 @@ const Run = ({
 
   return (
     <Flex justifyContent="space-between" width="100%">
-      <ButtonGroup isAttached variant="outline" isDisabled={!canRun}>
+      <ButtonGroup isAttached variant="outline">
         <Button
           bg={ignoreAllDeps && 'gray.100'}
           onClick={onToggleAllDeps}
@@ -81,16 +75,9 @@ const Run = ({
           Ignore Task Deps
         </Button>
       </ButtonGroup>
-      <Tooltip
-        label="Only works with the Celery, CeleryKubernetes or Kubernetes 
executors"
-        shouldWrapChildren // Will show the tooltip even if the button is 
disabled
-        disabled={canRun}
-        portalProps={{ containerRef }}
-      >
-        <Button colorScheme="blue" onClick={onClick} isLoading={isLoading} 
disabled={!canRun}>
-          Run
-        </Button>
-      </Tooltip>
+      <Button colorScheme="blue" onClick={onClick} isLoading={isLoading}>
+        Run
+      </Button>
     </Flex>
   );
 };
diff --git a/airflow/www/templates/airflow/dag.html 
b/airflow/www/templates/airflow/dag.html
index d946875bd6..dfe8c7ed51 100644
--- a/airflow/www/templates/airflow/dag.html
+++ b/airflow/www/templates/airflow/dag.html
@@ -284,9 +284,6 @@
             <input type="hidden" name="map_index">
             <input type="hidden" name="origin" value="{{ request.base_url }}">
             <div class="row">
-              <span class="col-xs-12 col-sm-9 text-danger" style="font-size: 
12px">
-                {{ "Only works with the Celery, CeleryKubernetes or Kubernetes 
executors" if not k8s_or_k8scelery_executor else "" }}
-            </span>
               <span class="btn-group col-xs-12 col-sm-9 
task-instance-modal-column" data-toggle="buttons">
                 <label
                   class="btn btn-default"
@@ -305,7 +302,7 @@
                 </label>
               </span>
               <span class="col-xs-12 col-sm-3 task-instance-modal-column">
-                <button type="submit" id="btn_run" class="btn btn-primary 
btn-block" title="Runs a single task instance" {{ " disabled" if not 
k8s_or_k8scelery_executor else "" }}>
+                <button type="submit" id="btn_run" class="btn btn-primary 
btn-block" title="Runs a single task instance">
                   Run
                 </button>
               </span>

Reply via email to