-
Notifications
You must be signed in to change notification settings - Fork 1
Grant logs permission on a machine and restart #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Deployed to Cloudflare Pages
|
src/pages/Dashboard/MachinesDetails/GrantLogsPermissionDialog.tsx
Outdated
Show resolved
Hide resolved
src/pages/Dashboard/MachinesDetails/GrantLogsPermissionDialog.tsx
Outdated
Show resolved
Hide resolved
| <DialogTrigger asChild> | ||
| <Button variant="outline" className="w-full md:w-auto" disabled={disabled}> | ||
| <FileText /> | ||
| Grant logs permission |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit misleading, after I granted logs permissions, I am suddenly able to restart/top-up the machine on the granted account - I would not expect this to happen. I am also able to modify the secrets of the app, even though it fails - here it would be nice that UI would be hidden, for actions I can not complete.
And then recursively I am able to grant logs permissions, on the "log permissioned account", which means, that that account can add another account. But on that account I am only able to top up and restart the machine. And not able to actually see the logs.
Not sure what about this is expected or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. Should discuss on slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe restart machine failed but frontend didn't check and alert you. I think topup foreign machine is always allowed. And maybe recursively granting failed, but you switched accounts but stayed on the URL, but View Logs button wouldn't appear (e.g. I can open Peter's https://dev.rofl.app/dashboard/machines/oasis1qzc8pldvm8vm3duvdrj63wgvkw34y9ucfcxzetqr/instances/000000000000006e and click things)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that it works as expected. I am pretty sure I was able to restart the machine, but unable to reproduce anymore. Anyway, looks ok now. UX would need some work - to disable all machine and app functionality you can't interact with.
| <GrantLogsPermissionDialog | ||
| disabled={isMachineRemoved(machine)} | ||
| onConfirm={async evmAddress => { | ||
| await grantLogsPermission.mutateAsync({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some kind of loader would be nice, so that you are aware that you need to confirm the tx. And subsequently that you can't trigger another grant logs dialog, until previous action is completed.
| <DialogTrigger asChild> | ||
| <Button variant="outline" className="w-full md:w-auto" disabled={disabled}> | ||
| <FileText /> | ||
| Grant logs permission |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that it works as expected. I am pretty sure I was able to restart the machine, but unable to reproduce anymore. Anyway, looks ok now. UX would need some work - to disable all machine and app functionality you can't interact with.

Part of #367
Closes #370
Limitations: