-
Notifications
You must be signed in to change notification settings - Fork 8
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
Frontend admin #135
Frontend admin #135
Conversation
Pull Request Test Coverage Report for Build 2433813907Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
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.
looks good ! 💯
@@ -18,7 +19,7 @@ type AddAdminUserModalProps = { | |||
handleAddRoleUser(user: object): void; | |||
}; | |||
|
|||
const roles = ['Admin', 'Operator']; |
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.
the ones 😅
@@ -0,0 +1,179 @@ | |||
import React, { FC, Fragment, useContext, useEffect, useRef, useState } from 'react'; |
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.
Modals specific to the admin page should be placed in /pages/admin/components
|
||
const response = await sendFetchRequest(endpoints.editProxyAddress(node), req, setIsPosting); | ||
|
||
if (response) { |
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.
It seems that the user won't be notified if it fails.
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.
I used the usePostCall hook, which takes setPostError as argument, and then if there's an error it's displayed in a flash message using a useEffect with postError as a dependency
Kudos, SonarCloud Quality Gate passed! |
Add the table of the nodes and their associated proxy address to the Admin page.