Skip to content

Commit 4e32e8b

Browse files
committed
Add support for private package repositories
Signed-off-by: AbdelH <[email protected]>
1 parent 6f32f12 commit 4e32e8b

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

src/i18n/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@
393393
"consumer_secret": "Consumer secret",
394394
"identifier": "Identifier",
395395
"url": "URL",
396+
"username": "Username",
397+
"password": "Password (or access token)",
396398
"enabled": "Enabled",
397399
"integration_fortify_ssc_enable": "Enable Fortify SSC integration",
398400
"integration_defectdojo_enable": "Enable DefectDojo integration",

src/views/administration/repositories/Repositories.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,24 @@
133133
<c-switch color="primary" v-model="internal" label v-bind="labelIcon" />{{$t('admin.internal')}}
134134
</div>
135135
136+
<div>
137+
<b-validated-input-group-form-input
138+
id="username" :label="$t('admin.username')"
139+
input-group-size="mb-3"
140+
v-model="username"
141+
v-show="internal"
142+
v-debounce:750ms="updateRepository" :debounce-events="'keyup'"/>
143+
</div>
144+
145+
<div>
146+
<b-validated-input-group-form-input
147+
id="password" :label="$t('admin.password')"
148+
input-group-size="mb-3"
149+
v-model="password"
150+
v-show="internal"
151+
v-debounce:750ms="updateRepository" :debounce-events="'keyup'"/>
152+
</div>
153+
136154
<div>
137155
<c-switch color="primary" v-model="enabled" label v-bind="labelIcon" />{{$t('admin.enabled')}}
138156
</div>
@@ -153,6 +171,8 @@
153171
identifier: row.identifier,
154172
url: row.url,
155173
internal: row.internal,
174+
username: row.username,
175+
password: row.password || null,
156176
enabled: row.enabled,
157177
uuid: row.uuid,
158178
labelIcon: {
@@ -185,6 +205,8 @@
185205
identifier: this.identifier,
186206
url: this.url,
187207
internal: this.internal,
208+
username: this.username,
209+
password: this.password || null,
188210
enabled: this.enabled,
189211
uuid: this.uuid
190212
}).then((response) => {

src/views/administration/repositories/RepositoryCreateRepositoryModal.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@
2121
<div>
2222
<c-switch color="primary" v-model="internal" label v-bind="labelIcon" />{{$t('admin.internal')}}
2323
</div>
24+
25+
<b-validated-input-group-form-input
26+
id="username"
27+
:label="$t('admin.username')"
28+
input-group-size="mb-3"
29+
v-model="username"
30+
v-show="internal"
31+
/>
32+
33+
<b-validated-input-group-form-input
34+
id="password"
35+
:label="$t('admin.password')"
36+
input-group-size="mb-3"
37+
v-model="password"
38+
v-show="internal"
39+
/>
40+
2441
<div>
2542
<c-switch color="primary" v-model="enabled" label v-bind="labelIcon" />{{$t('admin.enabled')}}
2643
</div>
@@ -57,6 +74,8 @@
5774
repositoryType: null,
5875
initialRepositoryType: null,
5976
internal: false,
77+
username: null,
78+
password: null,
6079
enabled: true,
6180
labelIcon: {
6281
dataOn: '\u2713',
@@ -83,6 +102,8 @@
83102
identifier: this.identifier,
84103
url: this.url,
85104
internal: this.internal,
105+
username: this.username,
106+
password: this.password || null,
86107
enabled: this.enabled
87108
}).then((response) => {
88109
this.$emit('refreshTable');
@@ -99,6 +120,8 @@
99120
this.identifier = null;
100121
this.url = null;
101122
this.internal = false;
123+
this.username = null;
124+
this.password = null;
102125
this.enabled = true;
103126
}
104127
}

0 commit comments

Comments
 (0)