mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-29 13:57:33 +02:00
Merge branch 'main' into add-stop-scan-case
This commit is contained in:
commit
f7b83a8e97
@ -108,7 +108,7 @@
|
|||||||
<clr-dropdown class="width-tag-label">
|
<clr-dropdown class="width-tag-label">
|
||||||
<button type="button" class="width-100 dropdown-toggle btn btn-link statistic-data label-text" clrDropdownTrigger>
|
<button type="button" class="width-100 dropdown-toggle btn btn-link statistic-data label-text" clrDropdownTrigger>
|
||||||
<ng-template ngFor let-label [ngForOf]="filter.value.value" let-m="index">
|
<ng-template ngFor let-label [ngForOf]="filter.value.value" let-m="index">
|
||||||
<span class="label" *ngIf="m<1"> {{label}} </span>
|
<hbr-label-piece [hasIcon]="false" [label]="getLabel(label)" [labelWidth]="84"></hbr-label-piece>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<span class="ellipsis color-white-dark" *ngIf="filter.value.value.length>1">···</span>
|
<span class="ellipsis color-white-dark" *ngIf="filter.value.value.length>1">···</span>
|
||||||
<div *ngFor="let label1 of filter.value.value;let k = index" hidden="true">
|
<div *ngFor="let label1 of filter.value.value;let k = index" hidden="true">
|
||||||
|
@ -181,7 +181,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
trimText(event) {
|
trimText(event) {
|
||||||
if (event.target.value) {
|
if (event.target.value) {
|
||||||
event.target.value = event.target.value.trim();
|
event.target.value = event.target.value.replace(/\s+/g, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
equals(c1: any, c2: any): boolean {
|
equals(c1: any, c2: any): boolean {
|
||||||
@ -706,4 +706,15 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
|
|||||||
return realSpeed ? realSpeed : -1;
|
return realSpeed ? realSpeed : -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getLabel(labelName: string): Label {
|
||||||
|
if (this.supportedFilterLabels?.length) {
|
||||||
|
let label: Label;
|
||||||
|
this.supportedFilterLabels.forEach(item => {
|
||||||
|
if (item.name === labelName) {
|
||||||
|
label = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<label class="label" [ngStyle]="{'background-color': labelColor?.color, 'color': labelColor?.textColor, 'border': labelColor?.color == '#FFFFFF'? '1px solid #A1A1A1': 'none'}" [style.max-width.px]="labelWidth">
|
<label class="label" [ngStyle]="{'background-color': labelColor?.color, 'color': labelColor?.textColor, 'border': labelColor?.color == '#FFFFFF'? '1px solid #A1A1A1': 'none'}" [style.max-width.px]="labelWidth">
|
||||||
<clr-icon *ngIf="label.scope=='p'" shape="organization"></clr-icon>
|
<clr-icon *ngIf="hasIcon && label.scope=='p'" shape="organization"></clr-icon>
|
||||||
<clr-icon *ngIf="label.scope=='g'" shape="administrator"></clr-icon>
|
<clr-icon *ngIf="hasIcon && label.scope=='g'" shape="administrator"></clr-icon>
|
||||||
{{label.name}}
|
{{label.name}}
|
||||||
</label>
|
</label>
|
||||||
|
@ -25,6 +25,7 @@ import { Label } from "../../../../../../ng-swagger-gen/models/label";
|
|||||||
export class LabelPieceComponent implements OnInit, OnChanges {
|
export class LabelPieceComponent implements OnInit, OnChanges {
|
||||||
@Input() label: Label;
|
@Input() label: Label;
|
||||||
@Input() labelWidth: number;
|
@Input() labelWidth: number;
|
||||||
|
@Input() hasIcon: boolean = true;
|
||||||
labelColor: {[key: string]: string};
|
labelColor: {[key: string]: string};
|
||||||
|
|
||||||
ngOnChanges(): void {
|
ngOnChanges(): void {
|
||||||
|
@ -476,4 +476,8 @@ Body Of Stop Scan And Stop Scan All
|
|||||||
Scan All Artifact
|
Scan All Artifact
|
||||||
Stop Scan All Artifact
|
Stop Scan All Artifact
|
||||||
Check Scan All Artifact Job Status Is Stopped
|
Check Scan All Artifact Job Status Is Stopped
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
|
Prepare Image Package Test Files
|
||||||
|
[Arguments] ${files_path}
|
||||||
|
${rc} ${output}= Run And Return Rc And Output bash tests/robot-cases/Group0-Util/prepare_imgpkg_test_files.sh ${files_path}
|
||||||
|
27
tests/robot-cases/Group0-Util/prepare_imgpkg_test_files.sh
Executable file
27
tests/robot-cases/Group0-Util/prepare_imgpkg_test_files.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
FILE_DIRECTORY=$1
|
||||||
|
FILE_PATH=$FILE_DIRECTORY/.imgpkg
|
||||||
|
mkdir "$FILE_DIRECTORY"
|
||||||
|
mkdir "$FILE_PATH"
|
||||||
|
|
||||||
|
cat > "$FILE_PATH"/bundle.yml <<EOF
|
||||||
|
---
|
||||||
|
apiVersion: imgpkg.carvel.dev/v1alpha1
|
||||||
|
kind: Bundle
|
||||||
|
metadata:
|
||||||
|
name: my-app
|
||||||
|
authors:
|
||||||
|
- name: blah
|
||||||
|
email: blah@blah.com
|
||||||
|
websites:
|
||||||
|
- url: blah.com
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > "$FILE_PATH"/images.yml <<EOF
|
||||||
|
---
|
||||||
|
apiVersion: imgpkg.carvel.dev/v1alpha1
|
||||||
|
kind: ImagesLock
|
||||||
|
EOF
|
@ -840,4 +840,21 @@ Test Case - WASM Push And Pull To Harbor
|
|||||||
Wait Unitl Command Success wasm-to-oci push hello.wasm ${ip}/project${d}/wasm-to-oci:v1
|
Wait Unitl Command Success wasm-to-oci push hello.wasm ${ip}/project${d}/wasm-to-oci:v1
|
||||||
Wait Unitl Command Success wasm-to-oci pull ${ip}/project${d}/wasm-to-oci:v1 --out test.wasm
|
Wait Unitl Command Success wasm-to-oci pull ${ip}/project${d}/wasm-to-oci:v1 --out test.wasm
|
||||||
Wait Unitl Command Success docker logout ${ip}
|
Wait Unitl Command Success docker logout ${ip}
|
||||||
Retry file should exist test.wasm
|
Retry file should exist test.wasm
|
||||||
|
|
||||||
|
Test Case - Carvel Imgpkg Push And Pull To Harbor
|
||||||
|
[Tags] imgpkg_push_and_pull
|
||||||
|
Init Chrome Driver
|
||||||
|
${user}= Set Variable user004
|
||||||
|
${pwd}= Set Variable Test1@34
|
||||||
|
${out_path}= Set Variable /tmp/my-bundle
|
||||||
|
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||||
|
${d}= Get Current Date result_format=%m%s
|
||||||
|
Create An New Project And Go Into Project project${d}
|
||||||
|
Prepare Image Package Test Files ${EXECDIR}/config
|
||||||
|
Wait Unitl Command Success docker login -u ${user} -p ${pwd} ${ip}
|
||||||
|
Wait Unitl Command Success imgpkg push -b ${ip}/project${d}/my-bundle:v1.0.0 -f config/
|
||||||
|
Wait Unitl Command Success imgpkg pull -b ${ip}/project${d}/my-bundle:v1.0.0 -o ${out_path}
|
||||||
|
Wait Unitl Command Success docker logout ${ip}
|
||||||
|
Retry File Should Exist ${out_path}/.imgpkg/bundle.yml
|
||||||
|
Retry File Should Exist ${out_path}/.imgpkg/images.yml
|
||||||
|
@ -65,6 +65,9 @@ RUN pwd && mkdir /tool/binary && \
|
|||||||
# Install wasm-to-oci
|
# Install wasm-to-oci
|
||||||
WASM_TO_OCI_VERSION=0.1.2 && wget https://github.com/engineerd/wasm-to-oci/releases/download/v${WASM_TO_OCI_VERSION}/linux-amd64-wasm-to-oci && \
|
WASM_TO_OCI_VERSION=0.1.2 && wget https://github.com/engineerd/wasm-to-oci/releases/download/v${WASM_TO_OCI_VERSION}/linux-amd64-wasm-to-oci && \
|
||||||
chmod +x linux-amd64-wasm-to-oci && mv linux-amd64-wasm-to-oci /tool/binary/wasm-to-oci && \
|
chmod +x linux-amd64-wasm-to-oci && mv linux-amd64-wasm-to-oci /tool/binary/wasm-to-oci && \
|
||||||
|
# Install imgpkg
|
||||||
|
IMGPKG_VERSION=0.22.0 && wget https://github.com/vmware-tanzu/carvel-imgpkg/releases/download/v$IMGPKG_VERSION/imgpkg-linux-amd64 && \
|
||||||
|
mv imgpkg-linux-amd64 /tool/binary/imgpkg && chmod +x /tool/binary/imgpkg && \
|
||||||
pwd
|
pwd
|
||||||
|
|
||||||
#ubuntu
|
#ubuntu
|
||||||
|
@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
tar \
|
tar \
|
||||||
unzip \
|
unzip \
|
||||||
gzip \
|
gzip \
|
||||||
|
jq \
|
||||||
# certutil
|
# certutil
|
||||||
libnss3-tools \
|
libnss3-tools \
|
||||||
google-chrome-stable
|
google-chrome-stable
|
||||||
|
Loading…
Reference in New Issue
Block a user