Merge pull request #9950 from jwangyangls/fix-ui-issue1.10-round3

Fix ui issue about the third round test
This commit is contained in:
jwangyangls 2019-11-21 16:36:09 +08:00 committed by GitHub
commit 3c4aca0fcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 11 deletions

View File

@ -43,7 +43,7 @@
&& endpointList?.length" class="down" shape="caret" dir="down"
(click)="showEndpointList=true"></clr-icon>
<input autocomplete="off" (blur)="blur()" (focus)="showEndpointList=true" class="clr-input endpoint-input" type="text" id="destination_url" [disabled]="testOngoing || urlDisabled" [readonly]="!editable"
[(ngModel)]="target.url" size="30" name="endpointUrl" #targetEndpoint="ngModel" required placeholder="http(s)://192.168.1.1">
[(ngModel)]="target.url" size="28" name="endpointUrl" #targetEndpoint="ngModel" required placeholder="http(s)://192.168.1.1">
<div class="selectBox" (mouseleave)="endpointOnHover=false" (mouseover)="endpointOnHover=true" *ngIf="endpointList?.length && showEndpointList">
<ul>
<li *ngFor="let endpoint of endpointList" (click)="selectedEndpoint(endpoint.value)">{{endpoint.key}}</li>

View File

@ -63,6 +63,5 @@
cursor: pointer;
}
.endpoint-input {
padding-right: 17px;
width: 256px;
padding-right: 21px;
}

View File

@ -94,7 +94,7 @@
<clr-dg-cell class="truncated flex-max-width">
<div class="cell white-normal" [class.immutable]="t.immutable">
<a href="javascript:void(0)" class="max-width-100" (click)="onTagClick(t)" title="{{t.name}}">{{t.name}}</a>
<span *ngIf="t.immutable" class="label label-info ml-5">{{'REPOSITORY.IMMUTABLE' | translate}}</span>
<span *ngIf="t.immutable" class="label label-info ml-8">{{'REPOSITORY.IMMUTABLE' | translate}}</span>
</div>
</clr-dg-cell>
<clr-dg-cell>

View File

@ -254,11 +254,17 @@ clr-datagrid {
height: 100%;
}
.ml-5 {
margin-left: 8px !important;
.ml-8 {
margin-left: 8px;
}
.immutable {
padding-right: 80px;
padding-right: 94px;
position: relative;
span {
position: absolute;
right: 0;
margin-right: 0;
}
}
.white-normal {
white-space: normal;

View File

@ -8,7 +8,7 @@
<div class="clr-control-container" [class.clr-error]="enpointURL.errors && enpointURL.errors.required && (enpointURL.dirty || enpointURL.touched)">
<div class="clr-input-wrapper">
<input class="clr-input" type="text" id="edit_endpoint_url" [disabled]="checking" [(ngModel)]="webhookTarget.address"
size="25" name="edit_endpoint_url" #enpointURL="ngModel" required placeholder="http(s)://192.168.1.1">
size="30" name="edit_endpoint_url" #enpointURL="ngModel" required placeholder="http(s)://192.168.1.1">
<clr-icon class="clr-validate-icon" shape="exclamation-circle"></clr-icon>
</div>
<clr-control-error *ngIf="enpointURL.errors && enpointURL.errors.required && (enpointURL.dirty || enpointURL.touched)" class="tooltip-content">
@ -23,7 +23,7 @@
<div class="clr-control-container">
<div class="clr-input-wrapper">
<input class="clr-input" type="text" id="auth_header" [disabled]="checking"
[(ngModel)]="webhookTarget.auth_header" size="28" name="auth_header">
[(ngModel)]="webhookTarget.auth_header" size="30" name="auth_header">
</div>
</div>
</div>

View File

@ -16,6 +16,7 @@ import { WebhookService } from "../webhook.service";
import { WebhookEventTypes } from '../../../shared/shared.const';
import { InlineAlertComponent } from "../../../shared/inline-alert/inline-alert.component";
import { MessageHandlerService } from "../../../shared/message-handler/message-handler.service";
import { TranslateService } from "@ngx-translate/core";
@Component({
selector: 'add-webhook-form',
@ -42,7 +43,8 @@ export class AddWebhookFormComponent implements OnInit, OnChanges {
constructor(
private webhookService: WebhookService,
private messageHandlerService: MessageHandlerService
private messageHandlerService: MessageHandlerService,
private translate: TranslateService
) { }
ngOnInit() {
@ -70,8 +72,11 @@ export class AddWebhookFormComponent implements OnInit, OnChanges {
message: "WEBHOOK.TEST_ENDPOINT_SUCCESS"
});
} else {
this.checkBtnState = ClrLoadingState.SUCCESS;
this.translate.get("WEBHOOK.TEST_ENDPOINT_SUCCESS").subscribe((res: string) => {
this.messageHandlerService.info(res);
});
}
this.checkBtnState = ClrLoadingState.SUCCESS;
},
error => {
if (this.isModify) {