78 lines
3.1 KiB
HTML
78 lines
3.1 KiB
HTML
<!-- Please remove this disable statement when editing this file! -->
|
|
<!-- eslint-disable @angular-eslint/template/button-has-type -->
|
|
<!-- eslint-disable tailwindcss/no-custom-classname -->
|
|
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
|
<bit-dialog dialogSize="default" disablePadding>
|
|
<ng-container bitDialogTitle>{{ title | i18n }}</ng-container>
|
|
<div bitDialogContent>
|
|
<div *ngIf="loading" class="tw-text-center">
|
|
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
|
|
</div>
|
|
<bit-tab-group *ngIf="!loading">
|
|
<bit-tab [label]="'nameValuePair' | i18n">
|
|
<div class="tw-flex tw-gap-4 tw-pt-4">
|
|
<bit-form-field class="tw-w-1/3">
|
|
<bit-label for="secret-name">{{ "name" | i18n }}</bit-label>
|
|
<input formControlName="name" bitInput />
|
|
</bit-form-field>
|
|
<bit-form-field class="tw-w-full">
|
|
<bit-label>{{ "value" | i18n }}</bit-label>
|
|
<textarea bitInput rows="4" formControlName="value"></textarea>
|
|
</bit-form-field>
|
|
</div>
|
|
<bit-form-field>
|
|
<bit-label>{{ "notes" | i18n }}</bit-label>
|
|
<textarea bitInput rows="4" formControlName="notes"></textarea>
|
|
</bit-form-field>
|
|
</bit-tab>
|
|
<bit-tab [label]="'serviceAccounts' | i18n"></bit-tab>
|
|
<bit-tab [label]="'projects' | i18n">
|
|
<bit-label class="tw-text-md">{{
|
|
"secretProjectAssociationDescription" | i18n
|
|
}}</bit-label>
|
|
<bit-form-field class="tw-mt-3">
|
|
<bit-label>{{ "project" | i18n }}</bit-label>
|
|
<select bitInput name="project" formControlName="project">
|
|
<option *ngFor="let f of projects" [value]="f.id" (change)="updateProjectList()">
|
|
{{ f.name }}
|
|
</option>
|
|
</select>
|
|
</bit-form-field>
|
|
<small class="form-text text-muted">{{ "typeOrSelectProject" | i18n }}</small>
|
|
|
|
<bit-table>
|
|
<ng-container header>
|
|
<tr>
|
|
<th bitCell>{{ "project" | i18n }}</th>
|
|
<th bitCell></th>
|
|
</tr>
|
|
</ng-container>
|
|
<ng-template body *ngIf="selectedProjects != null">
|
|
<tr bitRow *ngFor="let e of selectedProjects">
|
|
<td bitCell>{{ e.name }}</td>
|
|
<td bitCell class="tw-w-0">
|
|
<button
|
|
(click)="removeProjectAssociation(e.id)"
|
|
bitIconButton="bwi-close"
|
|
buttonType="main"
|
|
[title]="'options' | i18n"
|
|
[attr.aria-label]="'options' | i18n"
|
|
></button>
|
|
</td>
|
|
</tr>
|
|
</ng-template>
|
|
</bit-table>
|
|
</bit-tab>
|
|
</bit-tab-group>
|
|
</div>
|
|
<div bitDialogFooter class="tw-flex tw-gap-2">
|
|
<button type="submit" bitButton buttonType="primary" bitFormButton>
|
|
{{ "save" | i18n }}
|
|
</button>
|
|
<button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
|
|
{{ "cancel" | i18n }}
|
|
</button>
|
|
</div>
|
|
</bit-dialog>
|
|
</form>
|