Skip to content

CON-72 admin turn device online mutation #454

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Arusey
Copy link
Contributor

@Arusey Arusey commented Jul 16, 2019

Description

This Pull request allows an administrator for the converge web app to turn a device to online after it was offline.

Type of Change

  • New feature (non-breaking change which adds functionality

How can this be tested

  • checkout to the branch and run migrations using make migrate message="migration message"
  • Install dependencies using pip install -r requirements.txt
mutation {
            updateDeviceActivity(deviceId:2){
                device{
                    id
                }
            }
            }

How has this been tested

  • Unit tests
  • Integration tests

Checklist

  • My code follows the style guidelines of this project
  • I have linted my code prior to submission
  • My changes generate no new warnings
  • Existing unit tests pass locally with my changes
  • Implementation works according to expectations

####Screenshots

image

JIRA

CON-72

@Arusey Arusey changed the title Story/con 72 add turn online mutation CON-72 admin turn device online mutation Jul 16, 2019
@Arusey Arusey added the wip label Jul 16, 2019
@Arusey Arusey force-pushed the story/CON-72-add-turn-online-mutation branch 2 times, most recently from d0f43df to 361722d Compare July 16, 2019 19:20
- allow admin to turn device online after it was offline

[Finishes CON-72]
@Arusey Arusey force-pushed the story/CON-72-add-turn-online-mutation branch from 361722d to df85120 Compare July 17, 2019 08:07
@Arusey Arusey removed the wip label Jul 17, 2019
Copy link
Contributor

@IssaIan IssaIan left a comment

Choose a reason for hiding this comment

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

Mutation works as expected. You could consider enhancing the message as I have advised. Good work.

exact_device = result.filter(
DevicesModel.id == device_id
).first()
if not exact_device:
Copy link
Contributor

Choose a reason for hiding this comment

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

@Arusey, you could make the message a bit more specific. When the device is online and the user tries to turn the device online, the message Device not found is a bit confusing. You can make the message to be Device not found or already turned online.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noted

Copy link
Contributor

@vic3king vic3king left a comment

Choose a reason for hiding this comment

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

Hi @Arusey I cant run migrations, are there changes I need to make in order to test out this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants