Merge branch 'main' into add-stop-scan-case

This commit is contained in:
Yang Jiao 2021-11-11 16:50:55 +08:00 committed by GitHub
commit f7b83a8e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 70 additions and 6 deletions

View File

@ -108,7 +108,7 @@
<clr-dropdown class="width-tag-label">
<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">
<span class="label" *ngIf="m<1"> {{label}} </span>
<hbr-label-piece [hasIcon]="false" [label]="getLabel(label)" [labelWidth]="84"></hbr-label-piece>
</ng-template>
<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">

View File

@ -181,7 +181,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
}
trimText(event) {
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 {
@ -706,4 +706,15 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
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;
}
}
}

View File

@ -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">
<clr-icon *ngIf="label.scope=='p'" shape="organization"></clr-icon>
<clr-icon *ngIf="label.scope=='g'" shape="administrator"></clr-icon>
<clr-icon *ngIf="hasIcon && label.scope=='p'" shape="organization"></clr-icon>
<clr-icon *ngIf="hasIcon && label.scope=='g'" shape="administrator"></clr-icon>
{{label.name}}
</label>

View File

@ -25,6 +25,7 @@ import { Label } from "../../../../../../ng-swagger-gen/models/label";
export class LabelPieceComponent implements OnInit, OnChanges {
@Input() label: Label;
@Input() labelWidth: number;
@Input() hasIcon: boolean = true;
labelColor: {[key: string]: string};
ngOnChanges(): void {

View File

@ -477,3 +477,7 @@ Body Of Stop Scan And Stop Scan All
Stop Scan All Artifact
Check Scan All Artifact Job Status Is Stopped
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}

View 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

View File

@ -841,3 +841,20 @@ Test Case - WASM Push And Pull To Harbor
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}
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

View File

@ -65,6 +65,9 @@ RUN pwd && mkdir /tool/binary && \
# 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 && \
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
#ubuntu

View File

@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
tar \
unzip \
gzip \
jq \
# certutil
libnss3-tools \
google-chrome-stable