mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 04:35:16 +01:00
Merge pull request #8341 from AllForNothing/robot-ui
UI Modification: When New Robot
This commit is contained in:
commit
d38a08b15a
@ -44,42 +44,46 @@
|
||||
{{'ROBOT_ACCOUNT.PERMISSIONS' | translate}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="clr-col">
|
||||
<div class="form-group padding-left-120">
|
||||
<label>{{'ROBOT_ACCOUNT.PERMISSIONS_IMAGE' | translate}}</label>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="image-permission"
|
||||
id="image-permission-pull"
|
||||
value="pull"
|
||||
[(ngModel)]="imagePermission">
|
||||
<label for="image-permission-pull">{{'ROBOT_ACCOUNT.PULL' | translate}}</label>
|
||||
</div>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="image-permission"
|
||||
id="image-permission-push-and-pull"
|
||||
value="push-and-pull"
|
||||
[(ngModel)]="imagePermission">
|
||||
<label for="image-permission-push-and-pull">{{'ROBOT_ACCOUNT.PUSH' | translate}}
|
||||
& {{'ROBOT_ACCOUNT.PULL' | translate}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group padding-left-120">
|
||||
<label>{{'ROBOT_ACCOUNT.PERMISSIONS_HELMCHART' | translate}}</label>
|
||||
<div class="checkbox-inline">
|
||||
<input type="checkbox" id="helm-permission-push"
|
||||
[checked]="robot.access.isPushChart"
|
||||
[(ngModel)]="robot.access.isPushChart"
|
||||
name="helm-permission">
|
||||
<label for="helm-permission-push">{{'ROBOT_ACCOUNT.PUSH' | translate}}</label>
|
||||
</div>
|
||||
<div class="checkbox-inline">
|
||||
<input type="checkbox" id="helm-permission-pull"
|
||||
[checked]="robot.access.isPullChart"
|
||||
[(ngModel)]="robot.access.isPullChart"
|
||||
name="helm-permission">
|
||||
<label for="helm-permission-pull">{{'ROBOT_ACCOUNT.PULL' | translate}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr-col p-0">
|
||||
<table class="table table-noborder m-0 w-90">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="left">{{'ROBOT_ACCOUNT.PUSH' | translate}}</th>
|
||||
<th class="left">{{'ROBOT_ACCOUNT.PULL' | translate}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">
|
||||
<span>{{'ROBOT_ACCOUNT.PERMISSIONS_IMAGE' | translate}}</span>
|
||||
<clr-tooltip>
|
||||
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
|
||||
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
|
||||
<span>{{'ROBOT_ACCOUNT.PULL_IS_MUST' | translate}}</span>
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="image-permission-push"
|
||||
[(ngModel)]="imagePermissionPush" clrCheckbox>
|
||||
</td>
|
||||
<td class="clr-form-control-disabled">
|
||||
<input disabled type="checkbox" name="image-permission-pull"
|
||||
[(ngModel)]="imagePermissionPull" clrCheckbox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left">{{'ROBOT_ACCOUNT.PERMISSIONS_HELMCHART' | translate}}</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
[(ngModel)]="robot.access.isPushChart"
|
||||
name="helm-permission" clrCheckbox>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
[(ngModel)]="robot.access.isPullChart"
|
||||
name="helm-permission" clrCheckbox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -42,5 +42,8 @@
|
||||
}
|
||||
|
||||
.padding-left-120{
|
||||
padding-left: 120px;
|
||||
padding-left: 126px;
|
||||
}
|
||||
.w-90{
|
||||
width: 90%;
|
||||
}
|
@ -38,7 +38,8 @@ export class AddRobotComponent implements OnInit, OnDestroy {
|
||||
robotNameChecker: Subject<string> = new Subject<string>();
|
||||
nameTooltipText = "ROBOT_ACCOUNT.ROBOT_NAME";
|
||||
robotForm: NgForm;
|
||||
imagePermission: string = "push-and-pull";
|
||||
imagePermissionPush: boolean = true;
|
||||
imagePermissionPull: boolean = true;
|
||||
@Input() projectId: number;
|
||||
@Input() projectName: string;
|
||||
@Output() create = new EventEmitter<boolean>();
|
||||
@ -99,6 +100,8 @@ export class AddRobotComponent implements OnInit, OnDestroy {
|
||||
this.robot.name = "";
|
||||
this.robot.description = "";
|
||||
this.addRobotOpened = true;
|
||||
this.imagePermissionPush = true;
|
||||
this.imagePermissionPull = true;
|
||||
this.isRobotNameValid = true;
|
||||
this.robot = new Robot();
|
||||
this.nameTooltipText = "ROBOT_ACCOUNT.ROBOT_NAME";
|
||||
@ -118,12 +121,12 @@ export class AddRobotComponent implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
// set value to robot.access.isPullImage and robot.access.isPushOrPullImage when submit
|
||||
if ( this.imagePermission === 'pull' ) {
|
||||
this.robot.access.isPullImage = true;
|
||||
this.robot.access.isPushOrPullImage = false;
|
||||
} else {
|
||||
if ( this.imagePermissionPush && this.imagePermissionPull) {
|
||||
this.robot.access.isPullImage = false;
|
||||
this.robot.access.isPushOrPullImage = true;
|
||||
} else {
|
||||
this.robot.access.isPullImage = true;
|
||||
this.robot.access.isPushOrPullImage = false;
|
||||
}
|
||||
this.isSubmitOnGoing = true;
|
||||
this.robotService
|
||||
|
@ -322,7 +322,8 @@
|
||||
"CREATED_SUCCESS": "Created '{{param}}' successfully.",
|
||||
"COPY_SUCCESS": "Copy token successfully of '{{param}}'",
|
||||
"DELETION_TITLE": "Confirm removal of robot accounts",
|
||||
"DELETION_SUMMARY": "Do you want to delete robot accounts {{param}}?"
|
||||
"DELETION_SUMMARY": "Do you want to delete robot accounts {{param}}?",
|
||||
"PULL_IS_MUST" : "Pull permission is checked by default and can not be modified."
|
||||
},
|
||||
"GROUP": {
|
||||
"GROUP": "Group",
|
||||
|
@ -323,7 +323,8 @@
|
||||
"CREATED_SUCCESS": "Created '{{param}}' successfully.",
|
||||
"COPY_SUCCESS": "Copy token successfully of '{{param}}'",
|
||||
"DELETION_TITLE": "Confirm removal of robot accounts",
|
||||
"DELETION_SUMMARY": "Do you want to delete robot accounts {{param}}?"
|
||||
"DELETION_SUMMARY": "Do you want to delete robot accounts {{param}}?",
|
||||
"PULL_IS_MUST" : "Pull permission is checked by default and can not be modified."
|
||||
},
|
||||
"GROUP": {
|
||||
"GROUP": "Group",
|
||||
|
@ -315,7 +315,8 @@
|
||||
"CREATED_SUCCESS": "Created '{{param}}' successfully.",
|
||||
"COPY_SUCCESS": "Copy token successfully of '{{param}}'",
|
||||
"DELETION_TITLE": "confirmer l'enlèvement des comptes du robot ",
|
||||
"DELETION_SUMMARY": "Voulez-vous supprimer la règle {{param}}?"
|
||||
"DELETION_SUMMARY": "Voulez-vous supprimer la règle {{param}}?",
|
||||
"PULL_IS_MUST" : "Pull permission is checked by default and can not be modified."
|
||||
},
|
||||
"GROUP": {
|
||||
"Group": "Group",
|
||||
|
@ -320,7 +320,8 @@
|
||||
"CREATED_SUCCESS": "Created '{{param}}' successfully.",
|
||||
"COPY_SUCCESS": "Copy token successfully of '{{param}}'",
|
||||
"DELETION_TITLE": "Confirmar a remoção do robô Contas",
|
||||
"DELETION_SUMMARY": "Você quer remover a regra {{param}}?"
|
||||
"DELETION_SUMMARY": "Você quer remover a regra {{param}}?",
|
||||
"PULL_IS_MUST" : "Pull permission is checked by default and can not be modified."
|
||||
},
|
||||
"GROUP": {
|
||||
"GROUP": "Grupo",
|
||||
|
@ -321,7 +321,8 @@
|
||||
"CREATED_SUCCESS": "创建账户 '{{param}}' 成功。",
|
||||
"COPY_SUCCESS": "成功复制 '{{param}}' 的令牌",
|
||||
"DELETION_TITLE": "删除账户确认",
|
||||
"DELETION_SUMMARY": "你确认删除机器人账户 {{param}}?"
|
||||
"DELETION_SUMMARY": "你确认删除机器人账户 {{param}}?",
|
||||
"PULL_IS_MUST" : "拉取权限默认选中且不可修改。"
|
||||
},
|
||||
"GROUP": {
|
||||
"GROUP": "组",
|
||||
|
Loading…
Reference in New Issue
Block a user