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

Gets the default proxy with the backend #136

Merged
merged 4 commits into from
Jun 7, 2022
Merged

Gets the default proxy with the backend #136

merged 4 commits into from
Jun 7, 2022

Conversation

nkcr
Copy link
Contributor

@nkcr nkcr commented Jun 3, 2022

By default the app uses the default proxy provided by the web backend. However users can freely change it. The proxy is saved on the session store to avoid fetching the proxy each time.

@nkcr nkcr requested review from cmsigrist and badrlarhdir June 3, 2022 13:52
@nkcr nkcr self-assigned this Jun 3, 2022
By default the app uses the default proxy provided by the web backend. However users can freely change it. The proxy is saved on the session store to avoid fetching the proxy each time.
@nkcr nkcr force-pushed the default-proxy-update branch from 8eb4384 to 7d3ac91 Compare June 3, 2022 13:54
@coveralls
Copy link

coveralls commented Jun 3, 2022

Pull Request Test Coverage Report for Build 2455558925

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 13 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 13 84.84%
Totals Coverage Status
Change from base Build 2453858075: -0.3%
Covered Lines: 3116
Relevant Lines: 4928

💛 - Coveralls

Copy link
Contributor

@cmsigrist cmsigrist left a comment

Choose a reason for hiding this comment

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

LGTM ! :)


const fetchFromBackend = async () => {
try {
const response = await fetch('/api/config/proxy');
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const response = await fetch('/api/config/proxy');
const response = await fetch(endpoints.getProxyConfig);

import { CheckIcon, PencilIcon, RefreshIcon } from '@heroicons/react/outline';
import { FlashContext, FlashLevel, ProxyContext } from 'index';
import { ChangeEvent, FC, createRef, useContext, useEffect, 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.

Suggested change
import * as endpoints from './Endpoints';

let proxy = sessionStorage.getItem('proxy');

if (proxy === null) {
const response = await fetch('/api/config/proxy');
Copy link
Contributor

@cmsigrist cmsigrist Jun 6, 2022

Choose a reason for hiding this comment

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

endpoints.getProxyConfig can also be used here :D

Base automatically changed from web-update to main June 7, 2022 10:25
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 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 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@nkcr nkcr merged commit 6f16615 into main Jun 7, 2022
@nkcr nkcr deleted the default-proxy-update branch June 7, 2022 15:20
ineiti added a commit that referenced this pull request Oct 10, 2024
Following latest dela main and fixing local_forms.sh with new JSON format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants