-
Notifications
You must be signed in to change notification settings - Fork 45
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
[WIP] VPN desktop client #603
Conversation
The last commit includes the following changes:
|
The last commit adds the design for the main page of the VPN client. |
The last commit includes the following changes:
|
The last commit includes the following changes:
|
The last commits include the following changes:
|
The last commits include the following changes:
|
The last commits include the following changes:
|
The last commit includes several changes, including:
|
The last commits include the following changes:
|
The last commit includes the following changes:
|
While creating the last commit, most of the code was reviewed and commented. Apart from the code comments, it includes various small fixes and the Spanish translation. Some additional problems were detected and will be fixed next. |
The last commit includes the following changes:
|
The last commit includes several additional improvements for the Skywire VPN desktop client, including the following:
|
The last commit includes the following changes:
|
The last commit includes the following changes:
|
The last commit includes the following changes:
|
}, | ||
{ | ||
icon: 'settings', | ||
label: 'vpn.settings', |
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.
Codacy has a fix for the issue: Strings must use doublequote.
label: 'vpn.settings', | |
label: "vpn.settings", |
import { BackendState, VpnClientService, VpnServiceStates } from 'src/app/services/vpn-client.service'; | ||
import { SnackbarService } from 'src/app/services/snackbar.service'; | ||
import { AppsService } from 'src/app/services/apps.service'; | ||
import { processServiceError } from 'src/app/utils/errors'; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
import { processServiceError } from 'src/app/utils/errors'; | |
import { processServiceError } from "src/app/utils/errors"; |
import { SortingModes, SortingColumn, DataSorter } from 'src/app/utils/lists/data-sorter'; | ||
import { DataFilterer } from 'src/app/utils/lists/data-filterer'; | ||
import { FilterProperties, FilterFieldTypes, PrintableLabel } from 'src/app/utils/filters'; | ||
import { countriesList } from 'src/app/utils/countries-list'; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
import { countriesList } from 'src/app/utils/countries-list'; | |
import { countriesList } from "src/app/utils/countries-list"; |
(newServerFromDiscovery && (newServerFromHistory || newServerManually)) || | ||
(newServerManually && (newServerFromHistory || newServerFromDiscovery)) | ||
) { | ||
throw new Error('Invalid call'); |
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.
Codacy has a fix for the issue: Strings must use doublequote.
throw new Error('Invalid call'); | |
throw new Error("Invalid call"); |
this.listId = 'vbs'; | ||
} else if (params.get('type') === Lists.History) { | ||
this.currentList = Lists.History; | ||
this.listId = 'vhs'; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
this.listId = 'vhs'; | |
this.listId = "vhs"; |
* must be used in the canActivate and canActivateChild properties of the routing module. | ||
*/ | ||
@Injectable({ | ||
providedIn: 'root' |
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.
Codacy has a fix for the issue: Strings must use doublequote.
providedIn: 'root' | |
providedIn: "root" |
* KnownProblems.UnableToConnectWithTheVpnClientApp is used. | ||
*/ | ||
@Component({ | ||
selector: 'app-vpn-error', |
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.
Codacy has a fix for the issue: Strings must use doublequote.
selector: 'app-vpn-error', | |
selector: "app-vpn-error", |
import { Injectable } from '@angular/core'; | ||
import { Observable, of } from 'rxjs'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { retryWhen, delay, map } from 'rxjs/operators'; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
import { retryWhen, delay, map } from 'rxjs/operators'; | |
import { retryWhen, delay, map } from "rxjs/operators"; |
* Page for changing the configuration of the VPN client. | ||
*/ | ||
@Component({ | ||
selector: 'app-vpn-settings-list', |
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.
Codacy has a fix for the issue: Strings must use doublequote.
selector: 'app-vpn-settings-list', | |
selector: "app-vpn-settings-list", |
|
||
// Get the PK of the current local visor. | ||
if (params.has('key')) { | ||
this.currentLocalPk = params.get('key'); |
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.
Codacy has a fix for the issue: Strings must use doublequote.
this.currentLocalPk = params.get('key'); | |
this.currentLocalPk = params.get("key"); |
// Check if the local visor already has a transport for connecting with the server. | ||
let transportFound = false; | ||
if (nodeInfo.transports && nodeInfo.transports.length > 0) { | ||
(nodeInfo.transports as any[]).forEach(transport => { |
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.
Codacy has a fix for the issue: Expected parentheses around arrow function argument.
(nodeInfo.transports as any[]).forEach(transport => { | |
(nodeInfo.transports as any[]).forEach((transport) => { |
* Page for showing the vpn server lists. | ||
*/ | ||
@Component({ | ||
selector: 'app-vpn-server-list', |
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.
Codacy has a fix for the issue: Strings must use doublequote.
selector: 'app-vpn-server-list', | |
selector: "app-vpn-server-list", |
private static readonly accumulatedMeasurements = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; | ||
private static readonly measurementsPerSec = ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s', 'PB/s', 'EB/s', 'ZB/s', 'YB/s']; | ||
private static readonly accumulatedMeasurementsInBits = ['b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb']; | ||
private static readonly measurementsPerSecInBits = ['b/s', 'Kb/s', 'Mb/s', 'Gb/s', 'Tb/s', 'Pb/s', 'Eb/s', 'Zb/s', 'Yb/s']; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
private static readonly measurementsPerSecInBits = ['b/s', 'Kb/s', 'Mb/s', 'Gb/s', 'Tb/s', 'Pb/s', 'Eb/s', 'Zb/s', 'Yb/s']; | |
private static readonly measurementsPerSecInBits = ["b/s", 'Kb/s', 'Mb/s', 'Gb/s', 'Tb/s', 'Pb/s', 'Eb/s', 'Zb/s', 'Yb/s']; |
@@ -0,0 +1,102 @@ | |||
import { Component, ViewChild, ElementRef, Inject, OnInit } from '@angular/core'; | |||
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
import { FormBuilder, FormGroup, Validators } from "@angular/forms"; |
this.vpnData.stateClass = 'red-clear-text'; | ||
} else if (data.vpnClientAppData.appState === AppState.Connecting) { | ||
this.vpnData.state = 'vpn.connection-info.state-connecting'; | ||
this.vpnData.stateClass = 'yellow-clear-text'; |
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.
Codacy has a fix for the issue: Strings must use doublequote.
this.vpnData.stateClass = 'yellow-clear-text'; | |
this.vpnData.stateClass = "yellow-clear-text"; |
@Senyoret1 as discussed, I will merge this as it works reasonably well and will make a ticket to address the rest of the open issues in another PR. |
Did you run
make format && make check
?The go code was not changed.
npm run lint
andnpm run build
were used.Changes:
How to test this PR:
Recompile the Skywire manager, open it and navigate to
{URL}/#/vpn
.Note: some changes affect the Skywire manager, modifications will be made later to revert the changes for the manager, if appropriate.