upgrade clarity components to 1.0 and fix issue

Signed-off-by: Yogi_Wang <Yogiwang@Yogi-WangdeMacBook-Pro.local>
This commit is contained in:
Yogi_Wang 2018-12-29 17:01:43 +08:00 committed by System Administrator
parent f9c1a528cb
commit 10d74eabd7
12 changed files with 59 additions and 43 deletions

View File

@ -48,11 +48,10 @@
[(ngModel)]="target.password" size="20" name="password" #password="ngModel">
</div>
<div class="form-group">
<clr-checkbox-wrapper id="destination_insecure_checkbox" class="clr-control-inline col-md-4 form-group-label-override">
<input type="checkbox" #insecure id="destination_insecure" [disabled]="testOngoing || !editable" name="insecure"
[ngModel]="!target.insecure" (ngModelChange)="setInsecureValue($event)" class="clr-checkbox">
<label for="destination_insecure">{{'CONFIG.VERIFY_REMOTE_CERT' | translate }}</label>
</clr-checkbox-wrapper>
<label for="destination_insecure" id="destination_insecure_checkbox">{{'CONFIG.VERIFY_REMOTE_CERT' |
translate }}</label>
<input type="checkbox" clrCheckbox #insecure id="destination_insecure" [disabled]="testOngoing || !editable"
name="insecure" [ngModel]="!target.insecure" (ngModelChange)="setInsecureValue($event)" class="clr-checkbox">
<clr-tooltip>
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
<clr-tooltip-content clrPosition="top-right" clrSize="md" *clrIfOpen>

View File

@ -140,13 +140,13 @@
</div>
<div [hidden]="!isImmediate" class="clr-form-control rule-width">
<clr-checkbox-wrapper>
<input type="checkbox" [checked]="false" id="ruleDeletion" formControlName="replicate_deletion" class="clr-checkbox">
<input type="checkbox" clrCheckbox [checked]="false" id="ruleDeletion" formControlName="replicate_deletion" class="clr-checkbox">
<label for="ruleDeletion" class="clr-control-label">{{'REPLICATION.DELETE_REMOTE_IMAGES' | translate}}</label>
</clr-checkbox-wrapper>
</div>
<div class="clr-form-control rule-width">
<clr-checkbox-wrapper>
<input type="checkbox" [checked]="true" id="ruleExit" formControlName="replicate_existing_image_now"
<input type="checkbox" clrCheckbox [checked]="true" id="ruleExit" formControlName="replicate_existing_image_now"
class="clr-checkbox">
<label for="ruleExit" class="clr-control-label">{{'REPLICATION.REPLICATE_IMMEDIATE' | translate}}</label>
</clr-checkbox-wrapper>

View File

@ -155,7 +155,7 @@ h4 {
}
.form-select {
margin-right: 30px;
margin-right: 120px;
}
.goLink {

View File

@ -39,9 +39,9 @@
padding-left: 0;
.jobsRow {
height: 60px;
display: flex;
.option-left-down {
margin-top: 36px;
margin-left: 14px;
}
.option-right-down {
padding-right: 16px;

View File

@ -49,25 +49,33 @@
<div class="icon-position">
<clr-icon shape="error" size="24" class="is-error"></clr-icon>
</div>
<span class="detail-count">{{highCount}}</span> {{packageText(highCount) | translate}} {{haveText(highCount) | translate}} {{'VULNERABILITY.SEVERITY.HIGH' | translate }} {{suffixForHigh | translate }}
<span class="detail-count">{{highCount}}</span> {{packageText(highCount) | translate}}
{{haveText(highCount) | translate}} {{'VULNERABILITY.SEVERITY.HIGH' | translate }}
{{suffixForHigh | translate }}
</div>
<div class="second-row row-flex">
<div class="icon-position">
<clr-icon shape="exclamation-triangle" size="24" class="tip-icon-medium"></clr-icon>
</div>
<span class="detail-count">{{mediumCount}}</span> {{packageText(mediumCount) | translate}} {{haveText(mediumCount) | translate}} {{'VULNERABILITY.SEVERITY.MEDIUM' | translate }} {{suffixForMedium | translate }}
<span class="detail-count">{{mediumCount}}</span> {{packageText(mediumCount) | translate}}
{{haveText(mediumCount) | translate}} {{'VULNERABILITY.SEVERITY.MEDIUM' | translate }}
{{suffixForMedium | translate }}
</div>
<div class="second-row row-flex">
<div class="icon-position">
<clr-icon shape="play" size="22" class="tip-icon-low rotate-90"></clr-icon>
</div>
<span class="detail-count">{{lowCount}}</span> {{packageText(lowCount) | translate}} {{haveText(lowCount) | translate}} {{'VULNERABILITY.SEVERITY.LOW' | translate }} {{suffixForLow | translate }}
<span class="detail-count">{{lowCount}}</span> {{packageText(lowCount) | translate}}
{{haveText(lowCount) | translate}} {{'VULNERABILITY.SEVERITY.LOW' | translate }}
{{suffixForLow | translate }}
</div>
<div class="second-row row-flex">
<div class="icon-position">
<clr-icon shape="help" size="20"></clr-icon>
</div>
<span class="detail-count">{{unknownCount}}</span> {{packageText(unknownCount) | translate}} {{haveText(unknownCount) | translate}} {{'VULNERABILITY.SEVERITY.UNKNOWN' | translate }} {{suffixForUnknown | translate }}
<span class="detail-count">{{unknownCount}}</span> {{packageText(unknownCount) |
translate}} {{haveText(unknownCount) | translate}} {{'VULNERABILITY.SEVERITY.UNKNOWN' |
translate }} {{suffixForUnknown | translate }}
</div>
</div>
</div>
@ -82,23 +90,21 @@
</div>
</div>
</section>
<ul id="configTabs" class="nav" role="tablist">
<li *ngIf="withClair" role="presentation" class="nav-item">
<button id="tag-vulnerability" class="btn btn-link nav-link" aria-controls="vulnerability" [class.active]='isCurrentTabLink("tag-vulnerability")' type="button" (click)='tabLinkClick("tag-vulnerability")'>{{'REPOSITORY.VULNERABILITY' | translate}}</button>
</li>
<li role="presentation" class="nav-item">
<button id="tag-history" class="btn btn-link nav-link" aria-controls="history" [class.active]='isCurrentTabLink("tag-history")' type="button" (click)='tabLinkClick("tag-history")'>{{ 'REPOSITORY.BUILD_HISTORY' | translate }}</button>
</li>
</ul>
<section class="detail-section" id="vulnerability" role="tabpanel" aria-labelledby="tag-vulnerability" [hidden]='!isCurrentTabContent("vulnerability")'>
<div class="vulnerability-block">
<hbr-vulnerabilities-grid [repositoryId]="repositoryId" [tagId]="tagId" [withAdminRole]="withAdminRole"></hbr-vulnerabilities-grid>
</div>
<div>
<ng-content></ng-content>
</div>
</section>
<section class="detail-section" id="history" role="tabpanel" aria-labelledby="tag-history" [hidden]='!isCurrentTabContent("history")'>
<hbr-tag-history [repositoryId]="repositoryId" [tagId]="tagId"></hbr-tag-history>
</section>
<clr-tabs>
<clr-tab *ngIf="withClair">
<button clrTabLink class="btn btn-link nav-link" id="tag-vulnerability" [class.active]='isCurrentTabLink("tag-vulnerability")'
type="button" (click)='tabLinkClick("tag-vulnerability")'>{{'REPOSITORY.VULNERABILITY' | translate}}</button>
<clr-tab-content id="content1" *clrIfActive="true">
<hbr-vulnerabilities-grid [repositoryId]="repositoryId" [tagId]="tagId" [withAdminRole]="withAdminRole"></hbr-vulnerabilities-grid>
</clr-tab-content>
</clr-tab>
<clr-tab>
<button id="tag-history" clrTabLink class="btn btn-link nav-link" [class.active]='isCurrentTabLink("tag-history")'
type="button" (click)='tabLinkClick("tag-history")'>{{ 'REPOSITORY.BUILD_HISTORY' | translate }}</button>
<clr-tab-content *clrIfActive>
<hbr-tag-history [repositoryId]="repositoryId" [tagId]="tagId">{{ 'REPOSITORY.BUILD_HISTORY' |
translate }}</hbr-tag-history>
</clr-tab-content>
</clr-tab>
</clr-tabs>
</div>

View File

@ -55,7 +55,7 @@
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<clr-datagrid [clrDgLoading]="loading" [class.embeded-datagrid]="isEmbedded" [(clrDgSelected)]="selectedRow">
<clr-datagrid [clrDgLoading]="loading" class="datagrid-top" [class.embeded-datagrid]="isEmbedded" [(clrDgSelected)]="selectedRow">
<clr-dg-action-bar>
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!(canScanNow(selectedRow) && selectedRow.length==1)" (click)="scanNow(selectedRow)"><clr-icon shape="shield-check" size="16"></clr-icon>&nbsp;{{'VULNERABILITY.SCAN_NOW' | translate}}</button>
<button type="button" class="btn btn-sm btn-secondary" [disabled]="!(selectedRow.length==1)" (click)="showDigestId(selectedRow)" ><clr-icon shape="copy" size="16"></clr-icon>&nbsp;{{'REPOSITORY.COPY_DIGEST_ID' | translate}}</button>

View File

@ -239,13 +239,14 @@ hbr-image-name-input {
width: 160px;
}
.flex-width {
min-width: 100px;
max-width: 220px;
}
.flex-min-width {
min-width: 130px;
.datagrid-top {
.flex-width {
min-width: 100px;
max-width: 220px;
}
.flex-min-width {
min-width: 130px;
}
}
.color-green {

View File

@ -1,6 +1,6 @@
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 log-top">
<div class="row flex-items-xs-right option-right">
<div class="row flex-items-xs-right option-right display-f">
<div class="flex-xs-middle">
<button class="btn btn-link" (click)="toggleOptionalName(currentOption)">{{toggleName[currentOption] | translate}}</button>
<hbr-filter [withDivider]="true" filterPlaceholder='{{"AUDIT_LOG.FILTER_PLACEHOLDER" | translate}}' (filterEvt)="doSearchAuditLogs($event)"></hbr-filter>

View File

@ -21,4 +21,8 @@
.check-span {
display: inline-block;
width: 16px;
}
.display-f{
display: flex;
}

View File

@ -60,6 +60,8 @@
#right_statistic_panel {
margin-right: 18px;
margin-top: 8px;
display: flex;
justify-content: flex-end;
div:nth-of-type(2) {
margin-left: 16px;
}

View File

@ -74,4 +74,8 @@ body {
.custom-h2 {
margin-top: 0 !important;
line-height: 24px;
}
.datagrid-header{
z-index: 1 !important;
}

View File

@ -27,7 +27,7 @@ ${destination_username_xpath} //*[@id='destination_username']
${destination_password_xpath} //*[@id='destination_password']
${replication_save_xpath} //button[contains(.,'OK')]
${replication_xpath} //clr-vertical-nav-group-children/a[contains(.,'Replication')]
${destination_insecure_xpath} //clr-checkbox-wrapper[@id="destination_insecure_checkbox"]//label
${destination_insecure_xpath} //label[@id="destination_insecure_checkbox"]
${new_replication-rule_button} //button[contains(.,'New Replication Rule')]
${link_to_registries} //clr-modal//span[contains(.,'Endpoint')]
@ -42,7 +42,7 @@ ${rule_trigger_select} //select[@id="ruleTrigger"]
${schedule_type_select} //select[@name="scheduleType"]
${schedule_day_select} //select[@name="scheduleDay"]
${shcedule_time} //input[@type="time"]
${destination_insecure_checkbox} //hbr-create-edit-endpoint/clr-modal//clr-checkbox-wrapper/input[@id="clr-checkbox-destination_insecure"]
${destination_insecure_checkbox} //hbr-create-edit-endpoint/clr-modal//input[@id="clr-checkbox-destination_insecure"]
${ping_test_button} //button[contains(.,'Test')]
${nav_to_registries} //clr-vertical-nav//span[contains(.,'Registries')]
${nav_to_replications} //clr-vertical-nav//span[contains(.,'Replications')]