Skip to content
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

Merged
merged 11 commits into from
Jun 7, 2022
Merged

Frontend admin #135

merged 11 commits into from
Jun 7, 2022

Conversation

cmsigrist
Copy link
Contributor

Add the table of the nodes and their associated proxy address to the Admin page.

  • Add a new node-proxy mapping
  • Edit a proxy address
  • Delete a mapping

@cmsigrist cmsigrist requested a review from nkcr June 3, 2022 09:41
@coveralls
Copy link

coveralls commented Jun 3, 2022

Pull Request Test Coverage Report for Build 2433813907

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 15 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 63.231%

Files with Coverage Reduction New Missed Lines %
services/dkg/pedersen/handler.go 15 84.84%
Totals Coverage Status
Change from base Build 2426956435: -0.3%
Covered Lines: 3116
Relevant Lines: 4928

💛 - Coveralls

Copy link
Contributor

@nkcr nkcr left a 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'];
Copy link
Contributor

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';
Copy link
Contributor

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
1.7% 1.7% Duplication

@cmsigrist cmsigrist requested a review from nkcr June 6, 2022 07:01
@cmsigrist cmsigrist merged commit b07e3eb into main Jun 7, 2022
@cmsigrist cmsigrist deleted the frontend-admin branch June 7, 2022 08:49
ineiti pushed a commit that referenced this pull request Oct 10, 2024
EPFL corporate design
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.

3 participants