|
| 1 | +<!-- |
| 2 | + Copyright (c) 2025 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. |
| 3 | +
|
| 4 | + This program and the accompanying materials are made available under the |
| 5 | + terms of the Apache License, Version 2.0 which is available at |
| 6 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +
|
| 8 | + SPDX-License-Identifier: Apache-2.0 |
| 9 | +
|
| 10 | + Contributors: |
| 11 | + Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. - initial API and implementation |
| 12 | +--> |
| 13 | + |
| 14 | +<fieldset class="fieldset" [formGroup]="formGroup"> |
| 15 | + @for (property of viewData; track property[0]) { |
| 16 | + <legend class="fieldset-label">{{ property[1].displayName }}</legend> |
| 17 | + <label |
| 18 | + class="input w-full" |
| 19 | + [ngClass]=" |
| 20 | + formGroup.get(property[0])?.invalid |
| 21 | + ? property[1].tooltip |
| 22 | + ? 'input-error tooltip tooltip-top tooltip-info' |
| 23 | + : 'input-error' |
| 24 | + : property[1].tooltip |
| 25 | + ? 'tooltip tooltip-top tooltip-info' |
| 26 | + : '' |
| 27 | + " |
| 28 | + [attr.data-tip]="property[1].tooltip" |
| 29 | + > |
| 30 | + @if (property[1].icon) { |
| 31 | + <span class="material-symbols-rounded opacity-50">{{ property[1].icon }}</span> |
| 32 | + } |
| 33 | + <input |
| 34 | + [type]="property[1].inputType ?? 'text'" |
| 35 | + [placeholder]="property[1].displayName" |
| 36 | + [name]="property[0]" |
| 37 | + [formControlName]="property[0]" |
| 38 | + /> |
| 39 | + </label> |
| 40 | + } |
| 41 | + |
| 42 | + <legend class="fieldset-label"> |
| 43 | + <span>Multiple Objects</span> |
| 44 | + </legend> |
| 45 | + <div class="flex items-center"> |
| 46 | + <input |
| 47 | + type="checkbox" |
| 48 | + name="multi-object-switch" |
| 49 | + [checked]="multiObject" |
| 50 | + class="toggle toggle-primary" |
| 51 | + (change)="onMultiDataSwitch()" |
| 52 | + /> |
| 53 | + <div |
| 54 | + class="tooltip tooltip-info tooltip-right ml-2 h-[1.3rem]" |
| 55 | + data-tip="When folderName and objectPrefix are not present, transfer only the object with a key matching the objectPath property. When folderName, objectPrefix and objectPath are empty and/or null an entire s3 bucket transfer is triggered. Precedence: folderName and/or objectPrefix take precedence over objectPath when determining which objects to transfer. It allows for both multiple object transfers and fetching a single object when necessary." |
| 56 | + > |
| 57 | + <span class="material-symbols-rounded !text-[1.3rem] text-info">info</span> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + @if (multiObject) { |
| 61 | + @for (property of multiObjectViewData; track property[0]) { |
| 62 | + <legend class="fieldset-label">{{ property[1].displayName }}</legend> |
| 63 | + <label |
| 64 | + class="input w-full" |
| 65 | + [ngClass]=" |
| 66 | + formGroup.get(property[0])?.invalid |
| 67 | + ? property[1].tooltip |
| 68 | + ? 'input-error tooltip tooltip-top tooltip-info' |
| 69 | + : 'input-error' |
| 70 | + : property[1].tooltip |
| 71 | + ? 'tooltip tooltip-top tooltip-info' |
| 72 | + : '' |
| 73 | + " |
| 74 | + [attr.data-tip]="property[1].tooltip" |
| 75 | + > |
| 76 | + @if (property[1].icon) { |
| 77 | + <span class="material-symbols-rounded opacity-50">{{ property[1].icon }}</span> |
| 78 | + } |
| 79 | + <input |
| 80 | + [type]="property[1].inputType ?? 'text'" |
| 81 | + [placeholder]="property[1].displayName" |
| 82 | + [name]="property[0]" |
| 83 | + [formControlName]="property[0]" |
| 84 | + /> |
| 85 | + </label> |
| 86 | + } |
| 87 | + } |
| 88 | + |
| 89 | + <legend class="fieldset-label"> |
| 90 | + <span>Plain Text Credentials</span> |
| 91 | + </legend> |
| 92 | + <div class="flex items-center"> |
| 93 | + <input |
| 94 | + type="checkbox" |
| 95 | + name="plain-credentials-switch" |
| 96 | + [checked]="plainCredentials" |
| 97 | + class="toggle toggle-primary" |
| 98 | + (change)="plainCredentials = !plainCredentials" |
| 99 | + /> |
| 100 | + <div |
| 101 | + class="tooltip tooltip-info tooltip-right ml-2 h-[1.3rem]" |
| 102 | + data-tip="This feature has been introduced to provide flexibility by not mandating the use of a vault. However, it is important to note that this functionality is not recommended for production environments. Do not set the key name because it has higher priority." |
| 103 | + > |
| 104 | + <span class="material-symbols-rounded !text-[1.3rem] text-info">info</span> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + @if (plainCredentials) { |
| 108 | + @for (property of plainCredentialsViewData; track property[0]) { |
| 109 | + <legend class="fieldset-label">{{ property[1].displayName }}</legend> |
| 110 | + <label class="input w-full"> |
| 111 | + @if (property[1].icon) { |
| 112 | + <span class="material-symbols-rounded opacity-50">{{ property[1].icon }}</span> |
| 113 | + } |
| 114 | + <input |
| 115 | + [type]="property[1].inputType ?? 'text'" |
| 116 | + [placeholder]="property[1].displayName" |
| 117 | + [name]="property[0]" |
| 118 | + [formControlName]="property[0]" |
| 119 | + /> |
| 120 | + </label> |
| 121 | + } |
| 122 | + } |
| 123 | +</fieldset> |
0 commit comments