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
|
||||
|
||||
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
|
||||
- make go_check
|
||||
- ./tests/pushimage.sh
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"clarity-seed": {
|
||||
"harbor-portal": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
@ -61,18 +61,18 @@
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "clarity-seed:build"
|
||||
"browserTarget": "harbor-portal:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "clarity-seed:build:production"
|
||||
"browserTarget": "harbor-portal:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "clarity-seed:build"
|
||||
"browserTarget": "harbor-portal:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
@ -111,7 +111,7 @@
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json",
|
||||
"lib/src/tsconfig.json"
|
||||
"lib/tsconfig.lib.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
@ -121,7 +121,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"clarity-seed-e2e": {
|
||||
"harbor-portal-e2e": {
|
||||
"root": "e2e",
|
||||
"sourceRoot": "e2e",
|
||||
"projectType": "application",
|
||||
@ -130,7 +130,7 @@
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "./protractor.config.js",
|
||||
"devServerTarget": "clarity-seed:serve"
|
||||
"devServerTarget": "harbor-portal:serve"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
@ -164,7 +164,7 @@
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "lib/src/test.ts",
|
||||
"tsConfig": "lib/tsconfig.spec.json",
|
||||
"tsConfig": "lib/tsconfig.lib.json",
|
||||
"karmaConfig": "lib/karma.conf.js"
|
||||
}
|
||||
},
|
||||
@ -182,7 +182,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "clarity-seed",
|
||||
"defaultProject": "harbor-portal",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "app",
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
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.';
|
||||
|
||||
|
@ -36,8 +36,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`;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ describe('RepositoryComponentGridview (inline template)', () => {
|
||||
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(() => {
|
||||
fixtureRepo.whenStable().then(() => {
|
||||
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(() => {
|
||||
fixtureRepo.whenStable().then(() => {
|
||||
fixtureRepo.detectChanges();
|
||||
|
@ -10,8 +10,9 @@ import {
|
||||
OnChanges,
|
||||
SimpleChanges
|
||||
} from "@angular/core";
|
||||
import {Router} from "@angular/router";
|
||||
import {forkJoin} from "rxjs";
|
||||
import { Router } from "@angular/router";
|
||||
import { forkJoin } from "rxjs";
|
||||
import { finalize } from "rxjs/operators";
|
||||
import {TranslateService} from "@ngx-translate/core";
|
||||
import {Comparator, State} from "@clr/angular";
|
||||
|
||||
@ -264,7 +265,10 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
|
||||
{
|
||||
repoName: repoName,
|
||||
signedImages: signature,
|
||||
})
|
||||
}).pipe(finalize(() => {
|
||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
||||
setTimeout(() => clearInterval(hnd), 5000);
|
||||
}))
|
||||
.subscribe((res: string) => {
|
||||
summaryKey = res;
|
||||
let message = new ConfirmationMessage(
|
||||
@ -276,11 +280,8 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
|
||||
button);
|
||||
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> {
|
||||
|
@ -206,7 +206,7 @@ describe('RepositoryComponent (inline template)', () => {
|
||||
expect(compRepo).toBeTruthy();
|
||||
});
|
||||
|
||||
//fail after upgrade to angular 6.
|
||||
// fail after upgrade to angular 6.
|
||||
xit('should load and render data', async(() => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
|
@ -149,7 +149,7 @@ describe('TagComponent (inline template)', () => {
|
||||
expect(spy.calls.any).toBeTruthy();
|
||||
}));
|
||||
|
||||
//fail after upgrade to angular 6.
|
||||
// fail after upgrade to angular 6.
|
||||
xit('should load and render data', async(() => {
|
||||
fixture.detectChanges();
|
||||
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",
|
||||
"lint": "tslint \"src/**/*.ts\"",
|
||||
"lint:lib": "tslint \"lib/**/*.ts\" -e \"lib/dist/**/*\" ",
|
||||
"test": "ng test",
|
||||
"test": "ng test harbor-portal",
|
||||
"pree2e": "webdriver-manager update",
|
||||
"e2e": "protractor",
|
||||
"build": "ng build --aot",
|
||||
|
@ -71,8 +71,6 @@
|
||||
"use-life-cycle-interface": true,
|
||||
"use-pipe-transform-interface": true,
|
||||
"component-class-suffix": true,
|
||||
"directive-class-suffix": true,
|
||||
"templates-use-public": true,
|
||||
"invoke-injectable": true
|
||||
"directive-class-suffix": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user