mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-02 22:18:29 +01:00
Fix tslint fail issues
Fix issues that cause tslint fail Signed-off-by: Qian Deng <dengq@vmware.com>
This commit is contained in:
parent
66e3db3350
commit
8c26f78ae4
@ -86,7 +86,7 @@ before_script:
|
|||||||
- sudo mkdir -p ./make/common/config/registry/ && sudo mv ./tests/reg_config.yml ./make/common/config/registry/config.yml
|
- sudo mkdir -p ./make/common/config/registry/ && sudo mv ./tests/reg_config.yml ./make/common/config/registry/config.yml
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd src/portal && npm run test && cd ../..
|
- cd src/portal && npm run lint && npm run lint:lib && npm run test && cd ../..
|
||||||
- sudo docker-compose -f ./make/docker-compose.test.yml up -d
|
- sudo docker-compose -f ./make/docker-compose.test.yml up -d
|
||||||
- make go_check
|
- make go_check
|
||||||
- ./tests/pushimage.sh
|
- ./tests/pushimage.sh
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
"projects": {
|
"projects": {
|
||||||
"clarity-seed": {
|
"harbor-portal": {
|
||||||
"root": "",
|
"root": "",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
@ -61,18 +61,18 @@
|
|||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "clarity-seed:build"
|
"browserTarget": "harbor-portal:build"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "clarity-seed:build:production"
|
"browserTarget": "harbor-portal:build:production"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "clarity-seed:build"
|
"browserTarget": "harbor-portal:build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
@ -111,7 +111,7 @@
|
|||||||
"tsConfig": [
|
"tsConfig": [
|
||||||
"src/tsconfig.app.json",
|
"src/tsconfig.app.json",
|
||||||
"src/tsconfig.spec.json",
|
"src/tsconfig.spec.json",
|
||||||
"lib/src/tsconfig.json"
|
"lib/tsconfig.lib.json"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/node_modules/**"
|
"**/node_modules/**"
|
||||||
@ -121,7 +121,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"clarity-seed-e2e": {
|
"harbor-portal-e2e": {
|
||||||
"root": "e2e",
|
"root": "e2e",
|
||||||
"sourceRoot": "e2e",
|
"sourceRoot": "e2e",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
@ -130,7 +130,7 @@
|
|||||||
"builder": "@angular-devkit/build-angular:protractor",
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
"options": {
|
"options": {
|
||||||
"protractorConfig": "./protractor.config.js",
|
"protractorConfig": "./protractor.config.js",
|
||||||
"devServerTarget": "clarity-seed:serve"
|
"devServerTarget": "harbor-portal:serve"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@ -164,7 +164,7 @@
|
|||||||
"builder": "@angular-devkit/build-angular:karma",
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
"options": {
|
"options": {
|
||||||
"main": "lib/src/test.ts",
|
"main": "lib/src/test.ts",
|
||||||
"tsConfig": "lib/tsconfig.spec.json",
|
"tsConfig": "lib/tsconfig.lib.json",
|
||||||
"karmaConfig": "lib/karma.conf.js"
|
"karmaConfig": "lib/karma.conf.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -182,7 +182,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "clarity-seed",
|
"defaultProject": "harbor-portal",
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"@schematics/angular:component": {
|
"@schematics/angular:component": {
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
import {ClaritySeedAppHome} from './app.po';
|
import {ClaritySeedAppHome} from './app.po';
|
||||||
|
|
||||||
fdescribe('clarity-seed app', function () {
|
fdescribe('harbor-portal app', function () {
|
||||||
|
|
||||||
let expectedMsg: string = 'This is a Clarity seed application. This is the default page that loads for the application.';
|
let expectedMsg: string = 'This is a Clarity seed application. This is the default page that loads for the application.';
|
||||||
|
|
||||||
|
@ -36,8 +36,10 @@ export class ChartDetailSummaryComponent implements OnInit {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
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.addCMD = "helm repo add --ca-file <ca file> --cert-file <cert file> --key-file <key file> \
|
||||||
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}`;
|
--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`;
|
this.verifyCMD = `helm verify --keyring <key path> ${this.chartName}-${this.chartVersion}.tgz`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ describe('RepositoryComponentGridview (inline template)', () => {
|
|||||||
expect(compRepo).toBeTruthy();
|
expect(compRepo).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
//Will fail after upgrade to angular 6. todo: need to fix it.
|
// Will fail after upgrade to angular 6. todo: need to fix it.
|
||||||
xit('should load and render data', async(() => {
|
xit('should load and render data', async(() => {
|
||||||
fixtureRepo.whenStable().then(() => {
|
fixtureRepo.whenStable().then(() => {
|
||||||
fixtureRepo.detectChanges();
|
fixtureRepo.detectChanges();
|
||||||
@ -152,7 +152,7 @@ describe('RepositoryComponentGridview (inline template)', () => {
|
|||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
//Will fail after upgrade to angular 6. todo: need to fix it.
|
// Will fail after upgrade to angular 6. todo: need to fix it.
|
||||||
xit('should filter data by keyword', async(() => {
|
xit('should filter data by keyword', async(() => {
|
||||||
fixtureRepo.whenStable().then(() => {
|
fixtureRepo.whenStable().then(() => {
|
||||||
fixtureRepo.detectChanges();
|
fixtureRepo.detectChanges();
|
||||||
|
@ -10,8 +10,9 @@ import {
|
|||||||
OnChanges,
|
OnChanges,
|
||||||
SimpleChanges
|
SimpleChanges
|
||||||
} from "@angular/core";
|
} from "@angular/core";
|
||||||
import {Router} from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import {forkJoin} from "rxjs";
|
import { forkJoin } from "rxjs";
|
||||||
|
import { finalize } from "rxjs/operators";
|
||||||
import {TranslateService} from "@ngx-translate/core";
|
import {TranslateService} from "@ngx-translate/core";
|
||||||
import {Comparator, State} from "@clr/angular";
|
import {Comparator, State} from "@clr/angular";
|
||||||
|
|
||||||
@ -258,13 +259,16 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
confirmationDialogSet(summaryTitle: string, signature: string,
|
confirmationDialogSet(summaryTitle: string, signature: string,
|
||||||
repoName: string, repoLists: RepositoryItem[],
|
repoName: string, repoLists: RepositoryItem[],
|
||||||
summaryKey: string, button: ConfirmationButtons): void {
|
summaryKey: string, button: ConfirmationButtons): void {
|
||||||
this.translateService.get(summaryKey,
|
this.translateService.get(summaryKey,
|
||||||
{
|
{
|
||||||
repoName: repoName,
|
repoName: repoName,
|
||||||
signedImages: signature,
|
signedImages: signature,
|
||||||
})
|
}).pipe(finalize(() => {
|
||||||
|
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
||||||
|
setTimeout(() => clearInterval(hnd), 5000);
|
||||||
|
}))
|
||||||
.subscribe((res: string) => {
|
.subscribe((res: string) => {
|
||||||
summaryKey = res;
|
summaryKey = res;
|
||||||
let message = new ConfirmationMessage(
|
let message = new ConfirmationMessage(
|
||||||
@ -276,11 +280,8 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
|
|||||||
button);
|
button);
|
||||||
this.confirmationDialog.open(message);
|
this.confirmationDialog.open(message);
|
||||||
|
|
||||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
|
||||||
setTimeout(() => clearInterval(hnd), 5000);
|
|
||||||
});
|
});
|
||||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
|
||||||
setTimeout(() => clearInterval(hnd), 5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
containsLatestTag(repo: RepositoryItem): Promise<boolean> {
|
containsLatestTag(repo: RepositoryItem): Promise<boolean> {
|
||||||
|
@ -206,7 +206,7 @@ describe('RepositoryComponent (inline template)', () => {
|
|||||||
expect(compRepo).toBeTruthy();
|
expect(compRepo).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
//fail after upgrade to angular 6.
|
// fail after upgrade to angular 6.
|
||||||
xit('should load and render data', async(() => {
|
xit('should load and render data', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
|
@ -149,7 +149,7 @@ describe('TagComponent (inline template)', () => {
|
|||||||
expect(spy.calls.any).toBeTruthy();
|
expect(spy.calls.any).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
//fail after upgrade to angular 6.
|
// fail after upgrade to angular 6.
|
||||||
xit('should load and render data', async(() => {
|
xit('should load and render data', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"start": "ng serve --aot --ssl true --ssl-key ssl/server.key --ssl-cert ssl/server.crt --host 0.0.0.0 --proxy-config proxy.config.json",
|
"start": "ng serve --aot --ssl true --ssl-key ssl/server.key --ssl-cert ssl/server.crt --host 0.0.0.0 --proxy-config proxy.config.json",
|
||||||
"lint": "tslint \"src/**/*.ts\"",
|
"lint": "tslint \"src/**/*.ts\"",
|
||||||
"lint:lib": "tslint \"lib/**/*.ts\" -e \"lib/dist/**/*\" ",
|
"lint:lib": "tslint \"lib/**/*.ts\" -e \"lib/dist/**/*\" ",
|
||||||
"test": "ng test",
|
"test": "ng test harbor-portal",
|
||||||
"pree2e": "webdriver-manager update",
|
"pree2e": "webdriver-manager update",
|
||||||
"e2e": "protractor",
|
"e2e": "protractor",
|
||||||
"build": "ng build --aot",
|
"build": "ng build --aot",
|
||||||
|
@ -71,8 +71,6 @@
|
|||||||
"use-life-cycle-interface": true,
|
"use-life-cycle-interface": true,
|
||||||
"use-pipe-transform-interface": true,
|
"use-pipe-transform-interface": true,
|
||||||
"component-class-suffix": true,
|
"component-class-suffix": true,
|
||||||
"directive-class-suffix": true,
|
"directive-class-suffix": true
|
||||||
"templates-use-public": true,
|
|
||||||
"invoke-injectable": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user