mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-16 23:35:20 +01:00
Fix lint errors in portal (#16799)
This PR fixes all lint errors reported by TSLint (`npm run lint` in `src/portal/`). TSLint also reports multiple warnings (see #16798), but this PR doesn't fix any of them. Signed-off-by: Simon Alling <alling.simon@gmail.com>
This commit is contained in:
parent
bb007f70bb
commit
16f38bc591
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
import { SharedModule } from "../../../shared/shared.module";;
|
import { SharedModule } from "../../../shared/shared.module";
|
||||||
import { RouterModule, Routes } from "@angular/router";
|
import { RouterModule, Routes } from "@angular/router";
|
||||||
import { LabelsComponent } from "./labels.component";
|
import { LabelsComponent } from "./labels.component";
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import { InlineAlertComponent } from "../../shared/components/inline-alert/inlin
|
|||||||
export class PasswordSettingComponent implements AfterViewChecked {
|
export class PasswordSettingComponent implements AfterViewChecked {
|
||||||
showOldPwd: boolean = false;
|
showOldPwd: boolean = false;
|
||||||
showNewPwd: boolean = false;
|
showNewPwd: boolean = false;
|
||||||
showReNewPwd: boolean =false;
|
showReNewPwd: boolean = false;
|
||||||
opened: boolean = false;
|
opened: boolean = false;
|
||||||
oldPwd: string = "";
|
oldPwd: string = "";
|
||||||
newPwd: string = "";
|
newPwd: string = "";
|
||||||
|
@ -11,7 +11,7 @@ describe('ChartDetailValueComponent', () => {
|
|||||||
let component: ChartDetailValueComponent;
|
let component: ChartDetailValueComponent;
|
||||||
let fixture: ComponentFixture<ChartDetailValueComponent>;
|
let fixture: ComponentFixture<ChartDetailValueComponent>;
|
||||||
|
|
||||||
beforeEach(async ()=> {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
|
@ -177,9 +177,9 @@ export class HelmChartDefaultService extends HelmChartService {
|
|||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
})
|
})
|
||||||
.pipe(map(response => {
|
.pipe(map(response => {
|
||||||
let parts = filename.split('/')
|
let parts = filename.split('/');
|
||||||
return {
|
return {
|
||||||
filename: parts[parts.length-1],
|
filename: parts[parts.length - 1],
|
||||||
data: response
|
data: response
|
||||||
};
|
};
|
||||||
}))
|
}))
|
||||||
|
@ -14,7 +14,7 @@ describe('ListChartsComponent', () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(()=> {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ListChartsComponent],
|
declarations: [ListChartsComponent],
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -150,5 +150,5 @@ describe('ProjectPolicyConfigComponent', () => {
|
|||||||
})
|
})
|
||||||
class TestHostComponent {
|
class TestHostComponent {
|
||||||
@ViewChild(ProjectPolicyConfigComponent)
|
@ViewChild(ProjectPolicyConfigComponent)
|
||||||
projectPolicyConfigComponent: ProjectPolicyConfigComponent
|
projectPolicyConfigComponent: ProjectPolicyConfigComponent;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ describe('PushImageButtonComponent (inline template)', () => {
|
|||||||
imports: [
|
imports: [
|
||||||
SharedTestingModule
|
SharedTestingModule
|
||||||
],
|
],
|
||||||
declarations: [InlineAlertComponent, CopyInputComponent, PushImageButtonComponent,TestHostComponent],
|
declarations: [InlineAlertComponent, CopyInputComponent, PushImageButtonComponent, TestHostComponent],
|
||||||
providers: [
|
providers: [
|
||||||
ErrorHandler
|
ErrorHandler
|
||||||
]
|
]
|
||||||
|
@ -27,7 +27,7 @@ export function portValidator(): ValidatorFn {
|
|||||||
if (!regExp.test(value)) {
|
if (!regExp.test(value)) {
|
||||||
return { 'port': 65535 };
|
return { 'port': 65535 };
|
||||||
} else {
|
} else {
|
||||||
const portV = Number.parseInt(value);
|
const portV = Number.parseInt(value, 10);
|
||||||
if (portV <= 0 || portV > 65535) {
|
if (portV <= 0 || portV > 65535) {
|
||||||
return { 'port': 65535 };
|
return { 'port': 65535 };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user