|
440 | 440 | </v-expansion-panel-text> |
441 | 441 | </v-expansion-panel> |
442 | 442 |
|
| 443 | + <!-- AUTHENTICATION --> |
| 444 | + <v-expansion-panel bg-color="rgb(var(--v-theme-on-surface-variant))" :style="advanced ? 'display: block;' : 'display: none;'"> |
| 445 | + <v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="secondary">Authentication</v-expansion-panel-title> |
| 446 | + <v-expansion-panel-text color="secondary"> |
| 447 | + |
| 448 | + |
| 449 | + <v-row> |
| 450 | + <v-col |
| 451 | + cols="12" |
| 452 | + md="6" |
| 453 | + > |
| 454 | + <v-text-field |
| 455 | + v-model="basicAuth.realm" |
| 456 | + label="name" |
| 457 | + :counter="60" |
| 458 | + ></v-text-field> |
| 459 | + </v-col> |
| 460 | + </v-row> |
| 461 | + |
| 462 | + |
| 463 | + <v-row v-for="(account, index) in basicAuth.accounts" :key="index"> |
| 464 | + <v-col |
| 465 | + cols="12" |
| 466 | + md="5" |
| 467 | + > |
| 468 | + <v-text-field |
| 469 | + v-model="account.user" |
| 470 | + label="Username" |
| 471 | + :counter="60" |
| 472 | + ></v-text-field> |
| 473 | + </v-col> |
| 474 | + <v-col |
| 475 | + cols="12" |
| 476 | + md="6" |
| 477 | + > |
| 478 | + <v-text-field |
| 479 | + v-model="account.pass" |
| 480 | + label="Password" |
| 481 | + ></v-text-field> |
| 482 | + </v-col> |
| 483 | + <v-col |
| 484 | + cols="12" |
| 485 | + md="1" |
| 486 | + > |
| 487 | + <v-btn |
| 488 | + elevation="2" |
| 489 | + icon |
| 490 | + small |
| 491 | + @click="removeAuthLine(account.user)" |
| 492 | + > |
| 493 | + <v-icon dark > |
| 494 | + mdi-minus |
| 495 | + </v-icon> |
| 496 | + </v-btn> |
| 497 | + </v-col> |
| 498 | + </v-row> |
| 499 | + |
| 500 | + <v-row> |
| 501 | + <v-col |
| 502 | + cols="12" |
| 503 | + > |
| 504 | + <v-btn |
| 505 | + elevation="2" |
| 506 | + icon |
| 507 | + small |
| 508 | + @click="addAuthLine()" |
| 509 | + > |
| 510 | + <v-icon dark > |
| 511 | + mdi-plus |
| 512 | + </v-icon> |
| 513 | + </v-btn> |
| 514 | + </v-col> |
| 515 | + </v-row> |
| 516 | + |
| 517 | + </v-expansion-panel-text> |
| 518 | + </v-expansion-panel> |
| 519 | + |
443 | 520 | <!-- SECURITY --> |
444 | 521 | <v-expansion-panel bg-color="rgb(var(--v-theme-on-surface-variant))" :style="advanced ? 'display: block;' : 'display: none;'"> |
445 | 522 | <v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="secondary">Security</v-expansion-panel-title> |
@@ -1370,6 +1447,10 @@ export default defineComponent({ |
1370 | 1447 | sleepEnabled: false, |
1371 | 1448 | envFile: [], |
1372 | 1449 | buildpacks: [] as { text: string, value: Buildpack }[], |
| 1450 | + basicAuth: { |
| 1451 | + realm: 'Authentication required', |
| 1452 | + accounts: [] as { user: string, pass: string }[], |
| 1453 | + }, |
1373 | 1454 | buildpack: { |
1374 | 1455 | run: { |
1375 | 1456 | readOnlyAppStorage: true, |
@@ -1969,6 +2050,7 @@ export default defineComponent({ |
1969 | 2050 | this.buildstrategy = response.data.spec.buildstrategy || 'plain'; |
1970 | 2051 | this.appname = response.data.spec.name; |
1971 | 2052 | this.sleep = response.data.spec.sleep; |
| 2053 | + this.basicAuth = response.data.spec.basicAuth || { realm: 'Authentication required', accounts: [] }; |
1972 | 2054 | this.buildpack = { |
1973 | 2055 | run: response.data.spec.image.run, |
1974 | 2056 | build: response.data.spec.image.build, |
@@ -2091,6 +2173,7 @@ export default defineComponent({ |
2091 | 2173 | buildpack: this.buildpack, |
2092 | 2174 | appname: this.appname, |
2093 | 2175 | sleep: this.sleep, |
| 2176 | + basicAuth: this.basicAuth, |
2094 | 2177 | gitrepo: this.gitrepo, |
2095 | 2178 | branch: this.branch, |
2096 | 2179 | deploymentstrategy: this.deploymentstrategy, |
@@ -2190,6 +2273,7 @@ export default defineComponent({ |
2190 | 2273 | phase: this.phase, |
2191 | 2274 | appname: this.appname.toLowerCase(), |
2192 | 2275 | sleep: this.sleep, |
| 2276 | + basicAuth: this.basicAuth, |
2193 | 2277 | gitrepo: this.gitrepo, |
2194 | 2278 | branch: this.branch, |
2195 | 2279 | deploymentstrategy: this.deploymentstrategy, |
@@ -2270,6 +2354,19 @@ export default defineComponent({ |
2270 | 2354 | console.log(error); |
2271 | 2355 | }); |
2272 | 2356 | }, |
| 2357 | + addAuthLine() { |
| 2358 | + this.basicAuth.accounts.push({ |
| 2359 | + user: '', |
| 2360 | + pass: '', |
| 2361 | + }); |
| 2362 | + }, |
| 2363 | + removeAuthLine(index: string) { |
| 2364 | + for (let i = 0; i < this.basicAuth.accounts.length; i++) { |
| 2365 | + if (this.basicAuth.accounts[i].user === index) { |
| 2366 | + this.basicAuth.accounts.splice(i, 1); |
| 2367 | + } |
| 2368 | + } |
| 2369 | + }, |
2273 | 2370 | addEnvLine() { |
2274 | 2371 | this.envvars.push({ |
2275 | 2372 | name: '', |
|
0 commit comments