Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 42a0294

Browse files
committedAug 3, 2021
revert: remove username and password functionality
1 parent 1f67a66 commit 42a0294

File tree

6 files changed

+4
-82
lines changed

6 files changed

+4
-82
lines changed
 

‎__tests__/test-utils/mock-data/manager.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ export function makeMockDeployment (
6161
skipOsmExtract: false,
6262
tripPlannerVersion: 'OTP_1',
6363
peliasUpdate: null,
64-
peliasUsername: null,
65-
peliasPassword: null,
6664
peliasWebhookUrl: null,
6765
peliasCsvFiles: [],
6866
user: null

‎lib/manager/actions/__tests__/__snapshots__/projects.js.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ Object {
114114
"otpCommit": null,
115115
"otpVersion": null,
116116
"peliasCsvFiles": Array [],
117-
"peliasPassword": null,
118117
"peliasUpdate": null,
119-
"peliasUsername": null,
120118
"peliasWebhookUrl": null,
121119
"pinnedfeedVersionIds": Array [],
122120
"projectBounds": Object {

‎lib/manager/components/deployment/PeliasPanel.js

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,21 @@ type Props = {
2222
}
2323

2424
type State = {
25-
fileToDeleteOnSuccesfulUpload: string,
26-
peliasPassword: string,
27-
peliasUsername: string,
25+
fileToDeleteOnSuccesfulUpload: string | null,
2826
peliasWebhookUrl: string
2927
}
3028

3129
class PeliasPanel extends Component<Props, State> {
3230
state = {
3331
fileToDeleteOnSuccesfulUpload: null,
34-
peliasWebhookUrl: '',
35-
peliasPassword: '',
36-
peliasUsername: ''
32+
peliasWebhookUrl: ''
3733
};
3834

3935
componentDidMount = () => {
4036
const { deployment, project } = this.props
4137
this.setState({
4238
// Auto-populate blank field if project has webhook URL in it
43-
peliasWebhookUrl: deployment.peliasWebhookUrl || project.lastUsedPeliasWebhookUrl || '',
44-
peliasPassword: deployment.peliasPassword || '',
45-
peliasUsername: deployment.peliasUsername || ''
39+
peliasWebhookUrl: deployment.peliasWebhookUrl || project.lastUsedPeliasWebhookUrl || ''
4640
})
4741
};
4842

@@ -169,7 +163,7 @@ class PeliasPanel extends Component<Props, State> {
169163

170164
render () {
171165
const { deployment } = this.props
172-
const { peliasWebhookUrl, peliasPassword, peliasUsername } = this.state
166+
const { peliasWebhookUrl } = this.state
173167

174168
const optionsEnabled = peliasWebhookUrl !== ''
175169

@@ -192,28 +186,6 @@ class PeliasPanel extends Component<Props, State> {
192186
onChange={this._onChangeTextInput}
193187
onBlur={this._onBlurTextInput}
194188
/>
195-
<h5>Username</h5>
196-
<FormControl
197-
type='text'
198-
id='peliasUsername'
199-
disabled={!optionsEnabled}
200-
autoComplete='off'
201-
placeholder='Webhook Username'
202-
value={peliasUsername}
203-
onChange={this._onChangeTextInput}
204-
onBlur={this._onBlurTextInput}
205-
/>
206-
<h5>Password</h5>
207-
<FormControl
208-
type='password'
209-
id='peliasPassword'
210-
disabled={!optionsEnabled}
211-
autoComplete='off'
212-
placeholder='Webhook Password'
213-
value={peliasPassword}
214-
onChange={this._onChangeTextInput}
215-
onBlur={this._onBlurTextInput}
216-
/>
217189
</ListGroupItem>
218190
<ListGroupItem>
219191
<h5>Send GTFS feeds to custom geocoder</h5>

‎lib/manager/containers/__tests__/__snapshots__/DeploymentsPanel.js.snap

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
127127
"otpCommit": null,
128128
"otpVersion": null,
129129
"peliasCsvFiles": Array [],
130-
"peliasPassword": null,
131130
"peliasUpdate": null,
132-
"peliasUsername": null,
133131
"peliasWebhookUrl": null,
134132
"pinnedfeedVersionIds": Array [],
135133
"projectBounds": Object {
@@ -164,9 +162,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
164162
"otpCommit": null,
165163
"otpVersion": null,
166164
"peliasCsvFiles": Array [],
167-
"peliasPassword": null,
168165
"peliasUpdate": null,
169-
"peliasUsername": null,
170166
"peliasWebhookUrl": null,
171167
"pinnedfeedVersionIds": Array [],
172168
"projectBounds": Object {
@@ -364,9 +360,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
364360
"otpCommit": null,
365361
"otpVersion": null,
366362
"peliasCsvFiles": Array [],
367-
"peliasPassword": null,
368363
"peliasUpdate": null,
369-
"peliasUsername": null,
370364
"peliasWebhookUrl": null,
371365
"pinnedfeedVersionIds": Array [],
372366
"projectBounds": Object {
@@ -401,9 +395,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
401395
"otpCommit": null,
402396
"otpVersion": null,
403397
"peliasCsvFiles": Array [],
404-
"peliasPassword": null,
405398
"peliasUpdate": null,
406-
"peliasUsername": null,
407399
"peliasWebhookUrl": null,
408400
"pinnedfeedVersionIds": Array [],
409401
"projectBounds": Object {
@@ -653,9 +645,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
653645
"otpCommit": null,
654646
"otpVersion": null,
655647
"peliasCsvFiles": Array [],
656-
"peliasPassword": null,
657648
"peliasUpdate": null,
658-
"peliasUsername": null,
659649
"peliasWebhookUrl": null,
660650
"pinnedfeedVersionIds": Array [],
661651
"projectBounds": Object {
@@ -690,9 +680,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
690680
"otpCommit": null,
691681
"otpVersion": null,
692682
"peliasCsvFiles": Array [],
693-
"peliasPassword": null,
694683
"peliasUpdate": null,
695-
"peliasUsername": null,
696684
"peliasWebhookUrl": null,
697685
"pinnedfeedVersionIds": Array [],
698686
"projectBounds": Object {
@@ -820,9 +808,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
820808
"otpCommit": null,
821809
"otpVersion": null,
822810
"peliasCsvFiles": Array [],
823-
"peliasPassword": null,
824811
"peliasUpdate": null,
825-
"peliasUsername": null,
826812
"peliasWebhookUrl": null,
827813
"pinnedfeedVersionIds": Array [],
828814
"projectBounds": Object {
@@ -857,9 +843,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
857843
"otpCommit": null,
858844
"otpVersion": null,
859845
"peliasCsvFiles": Array [],
860-
"peliasPassword": null,
861846
"peliasUpdate": null,
862-
"peliasUsername": null,
863847
"peliasWebhookUrl": null,
864848
"pinnedfeedVersionIds": Array [],
865849
"projectBounds": Object {
@@ -1199,9 +1183,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
11991183
"otpCommit": null,
12001184
"otpVersion": null,
12011185
"peliasCsvFiles": Array [],
1202-
"peliasPassword": null,
12031186
"peliasUpdate": null,
1204-
"peliasUsername": null,
12051187
"peliasWebhookUrl": null,
12061188
"pinnedfeedVersionIds": Array [],
12071189
"projectBounds": Object {
@@ -1329,9 +1311,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
13291311
"otpCommit": null,
13301312
"otpVersion": null,
13311313
"peliasCsvFiles": Array [],
1332-
"peliasPassword": null,
13331314
"peliasUpdate": null,
1334-
"peliasUsername": null,
13351315
"peliasWebhookUrl": null,
13361316
"pinnedfeedVersionIds": Array [],
13371317
"projectBounds": Object {
@@ -1366,9 +1346,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
13661346
"otpCommit": null,
13671347
"otpVersion": null,
13681348
"peliasCsvFiles": Array [],
1369-
"peliasPassword": null,
13701349
"peliasUpdate": null,
1371-
"peliasUsername": null,
13721350
"peliasWebhookUrl": null,
13731351
"pinnedfeedVersionIds": Array [],
13741352
"projectBounds": Object {
@@ -1614,9 +1592,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
16141592
"otpCommit": null,
16151593
"otpVersion": null,
16161594
"peliasCsvFiles": Array [],
1617-
"peliasPassword": null,
16181595
"peliasUpdate": null,
1619-
"peliasUsername": null,
16201596
"peliasWebhookUrl": null,
16211597
"pinnedfeedVersionIds": Array [],
16221598
"projectBounds": Object {
@@ -1744,9 +1720,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
17441720
"otpCommit": null,
17451721
"otpVersion": null,
17461722
"peliasCsvFiles": Array [],
1747-
"peliasPassword": null,
17481723
"peliasUpdate": null,
1749-
"peliasUsername": null,
17501724
"peliasWebhookUrl": null,
17511725
"pinnedfeedVersionIds": Array [],
17521726
"projectBounds": Object {
@@ -1781,9 +1755,7 @@ exports[`lib > manager > DeploymentsPanel should render with the list of deploym
17811755
"otpCommit": null,
17821756
"otpVersion": null,
17831757
"peliasCsvFiles": Array [],
1784-
"peliasPassword": null,
17851758
"peliasUpdate": null,
1786-
"peliasUsername": null,
17871759
"peliasWebhookUrl": null,
17881760
"pinnedfeedVersionIds": Array [],
17891761
"projectBounds": Object {

‎lib/manager/containers/__tests__/__snapshots__/FeedSourceTable.js.snap

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
126126
"otpCommit": null,
127127
"otpVersion": null,
128128
"peliasCsvFiles": Array [],
129-
"peliasPassword": null,
130129
"peliasUpdate": null,
131-
"peliasUsername": null,
132130
"peliasWebhookUrl": null,
133131
"pinnedfeedVersionIds": Array [],
134132
"projectBounds": Object {
@@ -422,9 +420,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
422420
"otpCommit": null,
423421
"otpVersion": null,
424422
"peliasCsvFiles": Array [],
425-
"peliasPassword": null,
426423
"peliasUpdate": null,
427-
"peliasUsername": null,
428424
"peliasWebhookUrl": null,
429425
"pinnedfeedVersionIds": Array [],
430426
"projectBounds": Object {
@@ -697,9 +693,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
697693
"otpCommit": null,
698694
"otpVersion": null,
699695
"peliasCsvFiles": Array [],
700-
"peliasPassword": null,
701696
"peliasUpdate": null,
702-
"peliasUsername": null,
703697
"peliasWebhookUrl": null,
704698
"pinnedfeedVersionIds": Array [],
705699
"projectBounds": Object {
@@ -903,9 +897,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
903897
"otpCommit": null,
904898
"otpVersion": null,
905899
"peliasCsvFiles": Array [],
906-
"peliasPassword": null,
907900
"peliasUpdate": null,
908-
"peliasUsername": null,
909901
"peliasWebhookUrl": null,
910902
"pinnedfeedVersionIds": Array [],
911903
"projectBounds": Object {
@@ -1127,9 +1119,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
11271119
"otpCommit": null,
11281120
"otpVersion": null,
11291121
"peliasCsvFiles": Array [],
1130-
"peliasPassword": null,
11311122
"peliasUpdate": null,
1132-
"peliasUsername": null,
11331123
"peliasWebhookUrl": null,
11341124
"pinnedfeedVersionIds": Array [],
11351125
"projectBounds": Object {
@@ -3005,9 +2995,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
30052995
"otpCommit": null,
30062996
"otpVersion": null,
30072997
"peliasCsvFiles": Array [],
3008-
"peliasPassword": null,
30092998
"peliasUpdate": null,
3010-
"peliasUsername": null,
30112999
"peliasWebhookUrl": null,
30123000
"pinnedfeedVersionIds": Array [],
30133001
"projectBounds": Object {
@@ -3274,9 +3262,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
32743262
"otpCommit": null,
32753263
"otpVersion": null,
32763264
"peliasCsvFiles": Array [],
3277-
"peliasPassword": null,
32783265
"peliasUpdate": null,
3279-
"peliasUsername": null,
32803266
"peliasWebhookUrl": null,
32813267
"pinnedfeedVersionIds": Array [],
32823268
"projectBounds": Object {
@@ -3828,9 +3814,7 @@ exports[`lib > manager > FeedSourceTable should render with a project with feeds
38283814
"otpCommit": null,
38293815
"otpVersion": null,
38303816
"peliasCsvFiles": Array [],
3831-
"peliasPassword": null,
38323817
"peliasUpdate": null,
3833-
"peliasUsername": null,
38343818
"peliasWebhookUrl": null,
38353819
"pinnedfeedVersionIds": Array [],
38363820
"projectBounds": Object {

‎lib/types/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ export type Deployment = {
248248
osmExtractUrl: ?string,
249249
otpVersion: ?string,
250250
peliasCsvFiles: ?Array<string>,
251-
peliasPassword: ?string,
252251
peliasUpdate: ?boolean,
253-
peliasUsername: ?string,
254252
peliasWebhookUrl: ?string,
255253
pinnedfeedVersionIds: Array<string>,
256254
projectBounds: Bounds,

0 commit comments

Comments
 (0)
Please sign in to comment.