You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "RodrigoGanancia (via GitHub)" <gi...@apache.org> on 2024/05/10 14:47:26 UTC
Re: [PR] Fix Mark Instance state buttons stay disabled if user lacks permission (#37451) [airflow]
RodrigoGanancia commented on code in PR #38732:
URL: https://github.com/apache/airflow/pull/38732#discussion_r1596853665
##########
airflow/www/static/js/dag/details/taskInstance/taskActions/ClearInstance.tsx:
##########
@@ -242,21 +243,23 @@ const ClearInstance = ({
useKeysPress(keyboardShortcutIdentifier.taskRunClear, onOpen);
const clearLabel = "Clear and retry task.";
+ const canEdit = getMetaValue("can_edit") === "True";
Review Comment:
Coming back to this, after some rethinking canEdit and canEditTaskInstance should just be declared once at the start of the file. This changes were only made for being able to create tests, which I find them not that necessary since these changes are so small. Should I remove the tests files and move the declarations to the top of the file? What do you think?
--
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