Merge pull request #6338 from ninjadq/fix_chart_ui_related_issues

Fix chart ui related issues
This commit is contained in:
Mia ZHOU 2018-11-29 10:11:44 +08:00 committed by GitHub
commit 3c000f10a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 46 additions and 26 deletions

View File

@ -138,10 +138,10 @@
<table class="table">
<tbody>
<tr>
<th class="left">{{'HELM_CHART.LABELS' | translate }}</th>
<th class="left">{{labels?.length}}</th>
<td class="left">{{'HELM_CHART.LABELS' | translate }}</td>
<td class="left">{{labels?.length}}</td>
</tr>
<tr>
<tr *ngIf="labels?.length > 0">
<td></td>
<td class="left">
<hbr-label-piece *ngFor="let label of labels" [label]="label" [labelWidth]="90"> </hbr-label-piece>

View File

@ -37,10 +37,10 @@ export class ChartDetailSummaryComponent implements OnInit {
) {}
ngOnInit(): void {
this.addCMD = "helm repo add --ca-file <ca file> --cert-file <cert file> --key-file <key file> \
--username <username> --password <password> <repo name> ${this.repoURL}/chartrepo/${this.projectName}";
this.installCMD = "helm install --ca-file <ca file> --cert-file <cert file> --key-file <key file> \
--username=<username> --password=<password> --version ${this.chartVersion} <repo name>/${this.chartName}";
this.addCMD = `helm repo add --ca-file <ca file> --cert-file <cert file> --key-file <key file> \
--username <username> --password <password> <repo name> ${this.repoURL}/chartrepo/${this.projectName}`;
this.installCMD = `helm install --ca-file <ca file> --cert-file <cert file> --key-file <key file> \
--username=<username> --password=<password> --version ${this.chartVersion} <repo name>/${this.chartName}`;
this.verifyCMD = `helm verify --keyring <key path> ${this.chartName}-${this.chartVersion}.tgz`;
}

View File

@ -58,6 +58,7 @@
[projectName]="projectName"
[resource]="selectedRows[0]"
[resourceType]="resourceType"
[addLabelHeaders]="addLabelHeaders"
(changeEvt)="onLabelChange(selectedRows[0])">
</hbr-resource-label-marker>
</clr-dropdown-menu>

View File

@ -81,6 +81,8 @@ export class ChartVersionComponent implements OnInit {
chartFile: File;
provFile: File;
addLabelHeaders = 'HELM_CHART.ADD_LABEL_TO_CHART_VERSION';
@ViewChild("confirmationDialog")
confirmationDialog: ConfirmationDialogComponent;

View File

@ -1,5 +1,5 @@
<div>
<label class="dropdown-header">{{'REPOSITORY.ADD_TO_IMAGE' | translate}}</label>
<label class="dropdown-header">{{addLabelHeaders | translate}}</label>
<div class="form-group filter-div">
<input #filterInput type="text" placeholder="Filter labels" [(ngModel)]="labelFilter">
</div>

View File

@ -20,6 +20,7 @@ export class LabelMarkerComponent implements OnInit {
@Input() projectName: string;
@Input() resource: RepositoryItem | HelmChartVersion;
@Input() resourceType: ResourceType;
@Input() addLabelHeaders: string;
@Output() changeEvt = new EventEmitter<any>();
labelFilter = '';

View File

@ -63,7 +63,7 @@
<button type="button" class="btn btn-sm btn-secondary" clrDropdownTrigger [disabled]="!(selectedRow.length==1 && developerRoleOrAbove)" (click)="addLabels(selectedRow)" ><clr-icon shape="plus" size="16"></clr-icon>{{'REPOSITORY.ADD_LABELS' | translate}}</button>
<clr-dropdown-menu clrPosition="bottom-left" *clrIfOpen>
<div style='display:grid'>
<label class="dropdown-header">{{'REPOSITORY.ADD_TO_IMAGE' | translate}}</label>
<label class="dropdown-header">{{'REPOSITORY.ADD_LABEL_TO_IMAGE' | translate}}</label>
<div class="form-group"><input type="text" placeholder="Filter labels" [(ngModel)]="stickName" (keyup)="handleStickInputFilter()"></div>
<div [hidden]='imageStickLabels.length' style="padding-left:10px;">{{'LABEL.NO_LABELS' | translate }}</div>
<div [hidden]='!imageStickLabels.length' style='max-height:300px;overflow-y: auto;'>

View File

@ -6,11 +6,17 @@
<!-- spinner -->
<div class="spinner spinner-lg search-spinner" [hidden]="done">{{'SEARCH.IN_PROGRESS' | translate}}</div>
<div id="results">
<h2>{{'PROJECT.PROJECTS' | translate}}</h2>
<list-project-ro [projects]="searchResults.project"></list-project-ro>
<h2>{{'PROJECT_DETAIL.REPOSITORIES' | translate}}</h2>
<list-repository-ro [repositories]="searchResults.repository"></list-repository-ro>
<h2>{{'HELM_CHART.HELMCHARTS' | translate}}</h2>
<list-chart-version-ro [charts]="searchResults.Chart"></list-chart-version-ro>
<div class="project-results">
<h2>{{'PROJECT.PROJECTS' | translate}}</h2>
<list-project-ro [projects]="searchResults.project"></list-project-ro>
</div>
<div class="repo-results">
<h2>{{'PROJECT_DETAIL.REPOSITORIES' | translate}}</h2>
<list-repository-ro [repositories]="searchResults.repository"></list-repository-ro>
</div>
<div *ngIf="withHelmChart" class="chart-results">
<h2>{{'HELM_CHART.HELMCHARTS' | translate}}</h2>
<list-chart-version-ro [charts]="searchResults.Chart"></list-chart-version-ro>
</div>
</div>
</div>

View File

@ -18,6 +18,7 @@ import { GlobalSearchService } from './global-search.service';
import { SearchResults } from './search-results';
import { SearchTriggerService } from './search-trigger.service';
import { AppConfigService } from './../../app-config.service';
import { MessageHandlerService } from '../../shared/message-handler/message-handler.service';
@Component({
@ -49,7 +50,8 @@ export class SearchResultComponent implements OnInit, OnDestroy {
constructor(
private search: GlobalSearchService,
private msgHandler: MessageHandlerService,
private searchTrigger: SearchTriggerService) { }
private searchTrigger: SearchTriggerService,
private appConfigService: AppConfigService) { }
ngOnInit() {
this.searchSub = this.searchTrigger.searchTriggerChan$.subscribe(term => {
@ -143,4 +145,7 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.msgHandler.handleError(error);
});
}
get withHelmChart(): boolean {
return this.appConfigService.getConfig().with_chartmuseum;
}
}

View File

@ -68,5 +68,5 @@
#results {
overflow-y: auto;
max-height: 99%;
max-height: 85%;
}

View File

@ -472,7 +472,7 @@
"NO_INFO": "No description for this repo. You can add it to this repository.",
"IMAGE": "Images",
"LABELS": "Labels",
"ADD_TO_IMAGE": "Add labels to this image",
"ADD_LABEL_TO_IMAGE": "Add labels to this image",
"FILTER_BY_LABEL": "Filter images by label",
"ADD_LABELS": "Add labels",
"RETAG": "Retag",
@ -536,7 +536,8 @@
"PROV_FILE": "Prov File",
"READY": "Ready",
"NOT_READY": "Not Ready",
"LABELS": "labels",
"LABELS": "Labels",
"ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version",
"STATUS": "Status"
},
"ALERT": {

View File

@ -470,7 +470,7 @@
"NO_INFO": "Sin información de descripción para este repositorio",
"IMAGE": "Imágenes",
"LABELS": "Labels",
"ADD_TO_IMAGE": "Add labels to this image",
"ADD_LABEL_TO_IMAGE": "Add labels to this image",
"FILTER_BY_LABEL": "Filter images by label",
"ADD_LABELS": "Add labels",
"RETAG": "Retag",
@ -534,7 +534,8 @@
"PROV_FILE": "Prov File",
"READY": "Ready",
"NOT_READY": "Not Ready",
"LABELS": "labels",
"LABELS": "Labels",
"ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version",
"STATUS": "Status"
},
"ALERT": {

View File

@ -448,7 +448,7 @@
"NO_INFO": "No description for this repo. You can add it to this repository.",
"IMAGE": "Images",
"LABELS": "Labels",
"ADD_TO_IMAGE": "Add labels to this image",
"ADD_LABEL_TO_IMAGE": "Add labels to this image",
"FILTER_BY_LABEL": "Filter images by label",
"ADD_LABELS": "Add labels",
"RETAG": "Retag",
@ -511,7 +511,8 @@
"PROV_FILE": "Prov File",
"READY": "Ready",
"NOT_READY": "Not Ready",
"LABELS": "labels",
"LABELS": "Labels",
"ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version",
"STATUS": "Status"
},
"ALERT": {

View File

@ -469,7 +469,7 @@
"NO_INFO": "Nenhuma descrição de informação para esse repositório",
"IMAGE": "Imagens",
"LABELS": "Labels",
"ADD_TO_IMAGE": "Adicionar labels a essa imagem",
"ADD_LABEL_TO_IMAGE": "Adicionar labels a essa imagem",
"FILTER_BY_LABEL": "Filtrar imagens por label",
"ADD_LABELS": "Adicionar labels",
"ACTION": "AÇÃO",
@ -530,6 +530,7 @@
"PROV_FILE": "Arquivo Prov",
"READY": "Pronto",
"NOT_READY": "Não Pronto",
"ADD_LABEL_TO_CHART_VERSION": "Add labels to this chart version",
"STATUS": "Status"
},
"ALERT": {

View File

@ -470,7 +470,7 @@
"NO_INFO": "此镜像仓库没有描述信息",
"IMAGE": "镜像",
"LABELS": "标签",
"ADD_TO_IMAGE": "添加标签到此镜像",
"ADD_LABEL_TO_IMAGE": "添加标签到此镜像",
"ADD_LABELS": "添加标签",
"RETAG": "复制镜像",
"FILTER_BY_LABEL": "过滤标签",
@ -535,6 +535,7 @@
"READY": "就绪",
"NOT_READY": "未就绪",
"LABELS": "标签",
"ADD_LABEL_TO_CHART_VERSION": "添加标签到此 Chart Version",
"STATUS": "状态"
},
"ALERT": {

View File

@ -19,7 +19,7 @@ Upload Chart files
${prometheus_file_path} Set Variable ${current_dir}/${prometheus_chart_filename}
Choose File xpath=${chart_file_browse} ${prometheus_file_path}
Click Element xpath=${upload_action_button}
Sleep 2
Wait Until Element Does Not Contain xpath=${upload_action_button}
Click Element xpath=${upload_chart_button}
${harbor_file_path} Set Variable ${current_dir}/${harbor_chart_filename}