EnxDev commented on code in PR #36987:
URL: https://github.com/apache/superset/pull/36987#discussion_r3191066132


##########
superset-frontend/src/pages/AlertReportList/index.tsx:
##########
@@ -382,7 +404,23 @@ function AlertList({
             original.owners.map((o: Owner) => o.id).includes(user.userId) ||
             isUserAdmin(user);
 
+          const isRunning = original.last_state === AlertState.Working;
+          const runNowTooltip = isRunning
+            ? t('Currently running, please wait')
+            : t('Run now');
+          const runNowIcon = isRunning
+            ? 'LoadingOutlined'
+            : 'PlayCircleOutlined';
+
           const actions = [
+            {
+              label: 'run-now-action',
+              tooltip: runNowTooltip,
+              placement: 'bottom',
+              icon: runNowIcon,
+              onClick: () => runReportNow(original),
+              disabled: isRunning,
+            },

Review Comment:
   I'm wondering if it should be under the `canEdit` permission



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to