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 2021/02/09 02:12:56 UTC

[GitHub] [airflow] jhtimmins opened a new pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

jhtimmins opened a new pull request #14144:
URL: https://github.com/apache/airflow/pull/14144


   Deactivate the trigger, refresh, and delete DAG buttons on the DAG details pages if the current user doesn't have the necessary permissions to perform those actions. This was added to the DAGs list page in 2.0.1, and is now being added to the detail page as well (not including it before was an oversight).


----------------------------------------------------------------
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.

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



[GitHub] [airflow] jhtimmins commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-775632912


   Thanks @ryanahamilton 


----------------------------------------------------------------
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.

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



[GitHub] [airflow] jhtimmins commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-775602923


   @kaxil @ashb @ryanahamilton 


----------------------------------------------------------------
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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-806229964


   [The Workflow run](https://github.com/apache/airflow/actions/runs/684652569) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


-- 
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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-790206532


   [The Workflow run](https://github.com/apache/airflow/actions/runs/619473161) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


----------------------------------------------------------------
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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-790206810


   [The Workflow run](https://github.com/apache/airflow/actions/runs/619439234) is cancelling this PR. Building image for the PR has been cancelled


----------------------------------------------------------------
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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-791571070


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


----------------------------------------------------------------
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.

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



[GitHub] [airflow] ryanahamilton commented on a change in pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
ryanahamilton commented on a change in pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#discussion_r572518477



##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -109,13 +109,13 @@ <h4 class="pull-right" style="user-select: none;-moz-user-select: auto;">
       </div>
       <div class="col-md-2">
         <div class="btn-group pull-right">
-          <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only">
+          <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only {{ ' disabled' if not dag.can_trigger }}">
             <span class="material-icons" aria-hidden="true">play_arrow</span>
           </a>
-          <a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}" title="Refresh DAG" aria-label="Refresh DAG" onclick="postAsForm(this.href); return false" class="btn btn-default btn-icon-only">
+          <a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}" title="Refresh DAG" aria-label="Refresh DAG" onclick="postAsForm(this.href); return false" class="btn btn-default btn-icon-only {{ ' disabled' if not dag.can_edit }}">

Review comment:
       ```suggestion
             <a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}" title="Refresh DAG" aria-label="Refresh DAG" onclick="postAsForm(this.href); return false" class="btn btn-default btn-icon-only{{ ' disabled' if not dag.can_edit }}">
   ```

##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -109,13 +109,13 @@ <h4 class="pull-right" style="user-select: none;-moz-user-select: auto;">
       </div>
       <div class="col-md-2">
         <div class="btn-group pull-right">
-          <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only">
+          <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only {{ ' disabled' if not dag.can_trigger }}">

Review comment:
       ```suggestion
             <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only{{ ' disabled' if not dag.can_trigger }}">
   ```

##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -109,13 +109,13 @@ <h4 class="pull-right" style="user-select: none;-moz-user-select: auto;">
       </div>
       <div class="col-md-2">
         <div class="btn-group pull-right">
-          <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only">
+          <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=url_for('Airflow.' + dag.default_view, dag_id=dag.dag_id)) }}" title="Trigger DAG" aria-label="Trigger DAG" class="btn btn-default btn-icon-only {{ ' disabled' if not dag.can_trigger }}">
             <span class="material-icons" aria-hidden="true">play_arrow</span>
           </a>
-          <a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}" title="Refresh DAG" aria-label="Refresh DAG" onclick="postAsForm(this.href); return false" class="btn btn-default btn-icon-only">
+          <a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}" title="Refresh DAG" aria-label="Refresh DAG" onclick="postAsForm(this.href); return false" class="btn btn-default btn-icon-only {{ ' disabled' if not dag.can_edit }}">
             <span class="material-icons" aria-hidden="true">refresh</span>
           </a>
-          <a href="{{ url_for('Airflow.delete', dag_id=dag.dag_id) }}" title="Delete&nbsp;DAG" class="btn btn-default btn-icon-only"
+          <a href="{{ url_for('Airflow.delete', dag_id=dag.dag_id) }}" title="Delete&nbsp;DAG" class="btn btn-default btn-icon-only {{ ' disabled' if not dag.can_delete }}"

Review comment:
       ```suggestion
             <a href="{{ url_for('Airflow.delete', dag_id=dag.dag_id) }}" title="Delete&nbsp;DAG" class="btn btn-default btn-icon-only{{ ' disabled' if not dag.can_delete }}"
   ```




----------------------------------------------------------------
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.

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



[GitHub] [airflow] github-actions[bot] commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-787999944


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


----------------------------------------------------------------
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.

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



[GitHub] [airflow] kaxil merged pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #14144:
URL: https://github.com/apache/airflow/pull/14144


   


-- 
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.

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



[GitHub] [airflow] jhtimmins commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-788566045


   @ashb updated to use the signal


----------------------------------------------------------------
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.

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



[GitHub] [airflow] kaxil commented on pull request #14144: Deactivate trigger, refresh, and delete controls on dag detail view.

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #14144:
URL: https://github.com/apache/airflow/pull/14144#issuecomment-793092422


   Tests are failing @jhtimmins 


----------------------------------------------------------------
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.

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