这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@soorajshankar
Copy link
Member

@soorajshankar soorajshankar commented May 13, 2020

Description

Actions in Hasura console will now respond to read only mode. This will hide/disable components when read only mode is enabled in the global state.

Changelog

  • CHANGELOG.md is updated with user-facing content relevant to this PR.

Affected components

  • Console

Related Issues

close #4656

Solution and Design

Referring to Data and Remote Schema, read only mode is implemented.
Solution will

  • Hide components if the action is just a button or navigation components (Edit, Create, Remove Buttons)
  • When there an action components which also shows information, component will be disabled but the information will still show up. (Editors, text area, input etc.)

Steps to test and verify

  1. Go to Hasura Console in read only mode (for testing you may have to set it in the main redux state )
  2. Go to Actions
  3. Create Table buttons from both sidebar and landing page should not be visible.
  4. Select any existing actions (create without read only mode if there is nothing)
  5. Modify
    • All inputs should be disabled.
    • Buttons should be hidden.
  6. Relationships
    • Edit & Add Relationships button should be disabled.
      &. Permissions
    • No Create/Edit operations should work (Similar to Data module)

@soorajshankar soorajshankar requested review from a team as code owners May 13, 2020 16:13
@CLAassistant
Copy link

CLAassistant commented May 13, 2020

CLA assistant check
All committers have signed the CLA.

@hasura-bot
Copy link
Contributor

Review app for commit 1bd1bb6 deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-1bd1bb62

wawhal
wawhal previously requested changes May 15, 2020
Copy link
Contributor

@wawhal wawhal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, just added some tiny nitpicks.

@netlify
Copy link

netlify bot commented May 18, 2020

Deploy preview for hasura-docs ready!

Built with commit 4d00f3f

https://deploy-preview-4764--hasura-docs.netlify.app

@hasura-bot
Copy link
Contributor

Review app for commit d5ba5de deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-d5ba5de8

@soorajshankar soorajshankar added the c/console Related to console label May 19, 2020
@beerose beerose self-requested a review June 1, 2020 09:41
@beerose beerose assigned beerose and unassigned rikinsk Jun 1, 2020
@hasura-bot
Copy link
Contributor

Review app for commit cd6bab8 deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-cd6bab8e

Copy link
Contributor

@beerose beerose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's one issue in the Permission tab — left a not in the comment. Also, let's disable the input as this page doesn't feel to be disabled.

Another thing — I guess we should also handle Read only mode in Custom Types page and disable Save and Reset buttons:
Screenshot 2020-06-03 at 16 37 22

@beerose beerose dismissed wawhal’s stale review June 3, 2020 14:39

Code review take over

@beerose beerose assigned kolharsam and soorajshankar and unassigned beerose and kolharsam Jun 3, 2020
@hasura-bot
Copy link
Contributor

Review app for commit 55379c6 deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-55379c6e

@soorajshankar soorajshankar removed their assignment Jun 5, 2020
@soorajshankar soorajshankar requested a review from beerose June 5, 2020 08:46
@hasura-bot
Copy link
Contributor

Review app for commit d77a318 deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-d77a3186

@beerose beerose assigned soorajshankar and unassigned beerose Jun 5, 2020
@hasura-bot
Copy link
Contributor

Review app for commit 42cfc6e deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-42cfc6ef

@beerose beerose assigned rikinsk and unassigned soorajshankar Jun 9, 2020
@hasura-bot
Copy link
Contributor

Review app for commit 6074358 deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-60743582

@rikinsk rikinsk assigned beerose and unassigned rikinsk Jun 9, 2020
@beerose beerose changed the title Added read only mode to Actions module close #4656 console: respect read-only mode in actions pages (close #4656) Jun 9, 2020
@hasura-bot
Copy link
Contributor

Review app for commit cad78a5 deployed to Heroku: https://hge-ci-pull-4764.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4764-cad78a5a

@beerose beerose merged commit 0df38f0 into hasura:master Jun 9, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-4764.herokuapp.com is deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console: make actions respect read-only mode

7 participants