diff --git a/src/portal/src/app/account/sign-in/sign-in.component.ts b/src/portal/src/app/account/sign-in/sign-in.component.ts index 2ad7bae89d..0bf236a47a 100644 --- a/src/portal/src/app/account/sign-in/sign-in.component.ts +++ b/src/portal/src/app/account/sign-in/sign-in.component.ts @@ -11,9 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { Component, OnInit } from '@angular/core'; -import { Router, ActivatedRoute } from '@angular/router'; -import { Input, ViewChild, AfterViewChecked } from '@angular/core'; +import { AfterViewChecked, Component, Input, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; import { NgForm } from '@angular/forms'; import { SessionService } from '../../shared/services/session.service'; import { SignUpComponent } from '../sign-up/sign-up.component'; @@ -21,11 +20,11 @@ import { ForgotPasswordComponent } from '../../base/password-setting/forgot-pass import { AppConfigService } from '../../services/app-config.service'; import { AppConfig } from '../../services/app-config'; import { User } from '../../base/left-side-nav/user/user'; -import { CookieService, CookieOptions } from 'ngx-cookie'; +import { CookieOptions, CookieService } from 'ngx-cookie'; import { SkinableConfig } from "../../services/skinable-config.service"; -import {ModalEvent} from "../../base/modal-event"; -import {modalEvents} from "../../base/modal-events.const"; -import {AboutDialogComponent} from "../../shared/components/about-dialog/about-dialog.component"; +import { ModalEvent } from "../../base/modal-event"; +import { modalEvents } from "../../base/modal-events.const"; +import { AboutDialogComponent } from "../../shared/components/about-dialog/about-dialog.component"; import { CommonRoutes, CONFIG_AUTH_MODE } from "../../shared/entities/shared.const"; import { SignInCredential } from "./sign-in-credential"; import { UserPermissionService } from "../../shared/services"; diff --git a/src/portal/src/app/account/sign-in/top-repo/top-repo.component.spec.ts b/src/portal/src/app/account/sign-in/top-repo/top-repo.component.spec.ts index 286382d12b..4dd7b07ca8 100644 --- a/src/portal/src/app/account/sign-in/top-repo/top-repo.component.spec.ts +++ b/src/portal/src/app/account/sign-in/top-repo/top-repo.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { TopRepoComponent } from './top-repo.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; @@ -10,6 +10,7 @@ import { of } from 'rxjs'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { MessageHandlerService } from '../../../shared/services/message-handler.service'; import { TopRepoService } from './top-repository.service'; + describe('TopRepoComponent', () => { let component: TopRepoComponent; let fixture: ComponentFixture; diff --git a/src/portal/src/app/account/sign-in/top-repo/top-repository.service.ts b/src/portal/src/app/account/sign-in/top-repo/top-repository.service.ts index 79e2fd3652..59403038e7 100644 --- a/src/portal/src/app/account/sign-in/top-repo/top-repository.service.ts +++ b/src/portal/src/app/account/sign-in/top-repo/top-repository.service.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { map, catchError } from "rxjs/operators"; +import { catchError, map } from "rxjs/operators"; import { Observable, throwError as observableThrowError } from "rxjs"; import { Repository } from "../../../../../ng-swagger-gen/models/repository"; import { CURRENT_BASE_HREF, HTTP_GET_OPTIONS } from "../../../shared/units/utils"; diff --git a/src/portal/src/app/account/sign-up/sign-up-page.component.ts b/src/portal/src/app/account/sign-up/sign-up-page.component.ts index 2c793e07a9..7fb1ca6241 100644 --- a/src/portal/src/app/account/sign-up/sign-up-page.component.ts +++ b/src/portal/src/app/account/sign-up/sign-up-page.component.ts @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { Component, ViewChild, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { NewUserFormComponent } from '../../shared/components/new-user-form/new-user-form.component'; diff --git a/src/portal/src/app/account/sign-up/sign-up.component.ts b/src/portal/src/app/account/sign-up/sign-up.component.ts index 92ab61efb9..74cf635b08 100644 --- a/src/portal/src/app/account/sign-up/sign-up.component.ts +++ b/src/portal/src/app/account/sign-up/sign-up.component.ts @@ -11,8 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { Component, Output, ViewChild, EventEmitter } from '@angular/core'; -import { Modal } from '../../shared/services/interface'; +import { Component, EventEmitter, Output, ViewChild } from '@angular/core'; +import { Modal } from '../../shared/services'; import { NewUserFormComponent } from '../../shared/components/new-user-form/new-user-form.component'; import { User } from '../../base/left-side-nav/user/user'; import { SessionService } from '../../shared/services/session.service'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts index bdd3a0d5f8..073909ee8f 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ActivatedRoute, Router } from "@angular/router"; import { SessionService } from '../../../../shared/services/session.service'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.ts index cfd0447f75..609cfca6c4 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.ts @@ -1,9 +1,4 @@ -import { - Component, - OnInit, - Input, - ChangeDetectionStrategy -} from "@angular/core"; +import { ChangeDetectionStrategy, Component, Input, OnInit } from "@angular/core"; import { HelmChartDependency } from "../helm-chart.interface.service"; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts index e8180f8465..5b7505cf88 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts @@ -1,12 +1,13 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateService } from '@ngx-translate/core'; import { ChartDetailSummaryComponent } from './chart-detail-summary.component'; import { CUSTOM_ELEMENTS_SCHEMA, SecurityContext } from '@angular/core'; -import { MarkedOptions, MarkdownModule } from 'ngx-markdown'; +import { MarkdownModule, MarkedOptions } from 'ngx-markdown'; import { HelmChartService } from '../helm-chart.service'; import { ErrorHandler } from "../../../../../shared/units/error-handler"; import { MessageHandlerService } from "../../../../../shared/services/message-handler.service"; import { SharedTestingModule } from "../../../../../shared/shared.module"; + describe('ChartDetailSummaryComponent', () => { let component: ChartDetailSummaryComponent; let fixture: ComponentFixture; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.ts index e7ed014634..b108d1cb6c 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.ts @@ -1,9 +1,4 @@ -import { - Component, - OnInit, - ChangeDetectionStrategy, - Input -} from "@angular/core"; +import { ChangeDetectionStrategy, Component, Input, OnInit } from "@angular/core"; import { HelmChartMetaData, HelmChartSecurity } from "../helm-chart.interface.service"; import { HelmChartService } from "../helm-chart.service"; import { Label } from "../../../../../shared/services"; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts index 5269079e0b..b7a1c3070d 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts @@ -1,10 +1,10 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ChartDetailValueComponent } from './chart-detail-value.component'; import { CUSTOM_ELEMENTS_SCHEMA, SecurityContext } from '@angular/core'; import { ClarityModule } from '@clr/angular'; import { FormsModule } from '@angular/forms'; -import { MarkdownModule, MarkedOptions } from 'ngx-markdown'; +import { MarkdownModule, MarkedOptions } from 'ngx-markdown'; import { BrowserModule } from '@angular/platform-browser'; describe('ChartDetailValueComponent', () => { diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.ts index d53fb9b85e..11f16797f6 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.ts @@ -1,9 +1,4 @@ -import { - Component, - Input, - OnInit, - ChangeDetectionStrategy -} from "@angular/core"; +import { ChangeDetectionStrategy, Component, Input, OnInit } from "@angular/core"; @Component({ selector: "hbr-chart-detail-value", diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts index 95da4fee8f..609f87b1c2 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ChartDetailComponent } from './chart-detail.component'; import { ClarityModule } from '@clr/angular'; @@ -8,6 +8,7 @@ import { HelmChartService } from "../helm-chart.service"; import { of } from 'rxjs'; import { ErrorHandler } from "../../../../../shared/units/error-handler"; import { SystemInfoService } from "../../../../../shared/services"; + describe('ChartDetailComponent', () => { let component: ChartDetailComponent; let fixture: ComponentFixture; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts index 015da9d01d..0cc49ded5d 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts @@ -1,8 +1,4 @@ -import { - Component, - OnInit, - Input, -} from "@angular/core"; +import { Component, Input, OnInit, } from "@angular/core"; import { Project } from "../../../project"; import { HelmChartService } from "../helm-chart.service"; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.spec.ts index 3bf486f52e..3f4d850b8c 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, inject } from '@angular/core/testing'; +import { inject, TestBed } from '@angular/core/testing'; import { HelmChartService } from './helm-chart.service'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.ts index bc6408a8cb..9aee0c1a97 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/helm-chart.service.ts @@ -1,9 +1,8 @@ -import {throwError as observableThrowError, Observable } from "rxjs"; -import { Injectable, Inject } from "@angular/core"; -import { HttpClient } from "@angular/common/http"; -import { map, catchError } from "rxjs/operators"; -import {HttpErrorResponse} from "@angular/common/http"; -import { HelmChartItem, HelmChartVersion, HelmChartDetail } from "./helm-chart.interface.service"; +import { Observable, throwError as observableThrowError } from "rxjs"; +import { Injectable } from "@angular/core"; +import { HttpClient, HttpErrorResponse } from "@angular/common/http"; +import { catchError, map } from "rxjs/operators"; +import { HelmChartDetail, HelmChartItem, HelmChartVersion } from "./helm-chart.interface.service"; import { RequestQueryParams } from "../../../../shared/services"; import { HTTP_GET_OPTIONS, HTTP_JSON_OPTIONS, V1_BASE_HREF } from "../../../../shared/units/utils"; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.spec.ts index 0158a83cbd..91e0e63e14 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { LabelFilterComponent } from './label-filter.component'; import { ClarityModule } from '@clr/angular'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.ts index b6e0172a2e..6fd28df53c 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-filter/label-filter.component.ts @@ -1,5 +1,5 @@ -import { OnInit, Input, EventEmitter, Component, ViewChild, ElementRef, ChangeDetectorRef } from '@angular/core'; -import {ClrDatagridFilterInterface} from "@clr/angular"; +import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnInit, ViewChild } from '@angular/core'; +import { ClrDatagridFilterInterface } from "@clr/angular"; import { fromEvent } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; import { HelmChartVersion } from '../helm-chart.interface.service'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.spec.ts index 136c69c5b3..695934ef28 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { LabelMarkerComponent } from './label-marker.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.ts index a765404bf7..db8a919888 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/label-marker/label-marker.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Output, OnInit, EventEmitter, ChangeDetectorRef, ViewChild, ElementRef } from '@angular/core'; +import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; import { fromEvent, Subject } from 'rxjs'; import { debounceTime, finalize } from 'rxjs/operators'; import { HelmChartVersion } from '../helm-chart.interface.service'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts index 27026f4d8d..0dc665901b 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts @@ -1,9 +1,6 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; -import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ChartVersionComponent } from './helm-chart-version.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { ClarityModule } from '@clr/angular'; -import { FormsModule } from '@angular/forms'; import { HelmChartService } from "../../helm-chart.service"; import { LabelFilterComponent } from "../../label-filter/label-filter.component"; import { of } from 'rxjs'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.ts index a508282eba..e2773aba94 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.ts @@ -1,29 +1,24 @@ -import { - Component, - Input, - OnInit, - ViewChild, - Output, - EventEmitter -} from "@angular/core"; -import { Observable, forkJoin, throwError as observableThrowError } from "rxjs"; -import { finalize, map, catchError } from "rxjs/operators"; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from "@angular/core"; +import { forkJoin, Observable, throwError as observableThrowError } from "rxjs"; +import { catchError, finalize, map } from "rxjs/operators"; import { TranslateService } from "@ngx-translate/core"; -import { HelmChartVersion, HelmChartMaintainer } from "../../helm-chart.interface.service"; +import { HelmChartMaintainer, HelmChartVersion } from "../../helm-chart.interface.service"; import { HelmChartService } from "../../helm-chart.service"; import { LabelService as OldLabelService, State, SystemInfo, SystemInfoService, - UserPermissionService, USERSTATICPERMISSION + UserPermissionService, + USERSTATICPERMISSION } from "../../../../../../shared/services"; import { DEFAULT_PAGE_SIZE, downloadFile } from "../../../../../../shared/units/utils"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; import { OperationService } from "../../../../../../shared/components/operation/operation.service"; import { operateChanges, OperateInfo, OperationState } from "../../../../../../shared/components/operation/operate"; import { - ConfirmationButtons, ConfirmationState, + ConfirmationButtons, + ConfirmationState, ConfirmationTargets, DefaultHelmIcon, ResourceType @@ -34,6 +29,7 @@ import { ConfirmationMessage } from "../../../../../global-confirmation-dialog/c import { ConfirmationAcknowledgement } from "../../../../../global-confirmation-dialog/confirmation-state-message"; import { Label } from "../../../../../../../../ng-swagger-gen/models/label"; import { LabelService } from "../../../../../../../../ng-swagger-gen/services/label.service"; + const PAGE_SIZE: number = 100; @Component({ selector: "hbr-helm-chart-version", diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.spec.ts index 658d6c8117..26a42cd6e1 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.spec.ts @@ -1,9 +1,8 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ClarityModule } from '@clr/angular'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; -import { ActivatedRoute } from '@angular/router'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { SessionService } from '../../../../../shared/services/session.service'; import { ListChartVersionsComponent } from './list-chart-versions.component'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.ts index 5f619411d1..63452a44aa 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-detail/list-chart-versions/list-chart-versions.component.ts @@ -1,5 +1,4 @@ -import { Router } from '@angular/router'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Component, OnInit } from '@angular/core'; import { Project } from '../../../project'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.spec.ts index 9151e2d3c8..5fdd76058d 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { HelmChartComponent } from './helm-chart.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.ts index afbfd169ac..6826c7dd45 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts-detail/helm-chart.component.ts @@ -1,30 +1,18 @@ -import { - Component, - Input, - OnInit, - Output, - EventEmitter, - ViewChild, -} from "@angular/core"; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild, } from "@angular/core"; import { NgForm } from '@angular/forms'; import { TranslateService } from "@ngx-translate/core"; -import { forkJoin, throwError as observableThrowError, Observable } from "rxjs"; -import { finalize, map, catchError } from "rxjs/operators"; +import { forkJoin, Observable, throwError as observableThrowError } from "rxjs"; +import { catchError, finalize, map } from "rxjs/operators"; import { HelmChartItem } from "../../helm-chart-detail/helm-chart.interface.service"; import { HelmChartService } from "../../helm-chart-detail/helm-chart.service"; -import { - State, - SystemInfo, - SystemInfoService, - UserPermissionService, - USERSTATICPERMISSION -} from "../../../../../shared/services"; +import { State, SystemInfo, SystemInfoService, UserPermissionService, USERSTATICPERMISSION } from "../../../../../shared/services"; import { DEFAULT_PAGE_SIZE, downloadFile } from "../../../../../shared/units/utils"; import { ErrorHandler } from "../../../../../shared/units/error-handler"; import { OperationService } from "../../../../../shared/components/operation/operation.service"; import { operateChanges, OperateInfo, OperationState } from "../../../../../shared/components/operation/operate"; import { - ConfirmationButtons, ConfirmationState, + ConfirmationButtons, + ConfirmationState, ConfirmationTargets, DefaultHelmIcon, Roles diff --git a/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts.component.spec.ts b/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts.component.spec.ts index 41b230376e..16be95e7b9 100644 --- a/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts.component.spec.ts +++ b/src/portal/src/app/base/project/helm-chart/helm-chart-list/list-charts.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { SessionService } from '../../../../shared/services/session.service'; diff --git a/src/portal/src/app/base/project/member/add-group/add-group.component.spec.ts b/src/portal/src/app/base/project/member/add-group/add-group.component.spec.ts index 1c23c19140..7b4fad8aa5 100644 --- a/src/portal/src/app/base/project/member/add-group/add-group.component.spec.ts +++ b/src/portal/src/app/base/project/member/add-group/add-group.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ClarityModule } from '@clr/angular'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { FormsModule } from '@angular/forms'; diff --git a/src/portal/src/app/base/project/member/add-group/add-group.component.ts b/src/portal/src/app/base/project/member/add-group/add-group.component.ts index 0dbc4c96aa..93d927eadb 100644 --- a/src/portal/src/app/base/project/member/add-group/add-group.component.ts +++ b/src/portal/src/app/base/project/member/add-group/add-group.component.ts @@ -1,19 +1,18 @@ -import { of as observableOf, forkJoin } from "rxjs"; -import { mergeMap, catchError } from 'rxjs/operators'; -import { ChangeDetectorRef, ChangeDetectionStrategy, ViewChild } from "@angular/core"; -import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core"; +import { forkJoin, of as observableOf, throwError as observableThrowError } from "rxjs"; +import { catchError, mergeMap } from 'rxjs/operators'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild } from "@angular/core"; import { NgForm } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { UserGroup } from "../../../left-side-nav/group/group"; import { MemberService } from "../member.service"; import { GroupService } from "../../../left-side-nav/group/group.service"; import { MessageHandlerService } from '../../../../shared/services/message-handler.service'; -import { throwError as observableThrowError } from "rxjs"; import { OperationService } from "../../../../shared/components/operation/operation.service"; import { operateChanges, OperateInfo, OperationState } from "../../../../shared/components/operation/operate"; import { ProjectRoles } from "../../../../shared/entities/shared.const"; import { errorHandler } from "../../../../shared/units/shared.utils"; import { ProjectMemberEntity } from "../../../../../../ng-swagger-gen/models/project-member-entity"; + @Component({ selector: "add-group", templateUrl: "./add-group.component.html", diff --git a/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.spec.ts b/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.spec.ts index f7f33c6976..4980aca1b6 100644 --- a/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.spec.ts +++ b/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { of } from "rxjs"; import { MemberService } from '../member.service'; import { AppConfigService } from "../../../../services/app-config.service"; diff --git a/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.ts b/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.ts index 0ef4a6e0fa..1f041c03a7 100644 --- a/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.ts +++ b/src/portal/src/app/base/project/member/add-http-auth-group/add-http-auth-group.component.ts @@ -12,14 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. import { finalize } from 'rxjs/operators'; -import { - Component, - Input, - EventEmitter, - Output, - ViewChild, - OnInit -} from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; import { NgForm } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { UserService } from '../../../left-side-nav/user/user.service'; diff --git a/src/portal/src/app/base/project/member/add-member/add-member.component.spec.ts b/src/portal/src/app/base/project/member/add-member/add-member.component.spec.ts index 815ee8f391..7772ade917 100644 --- a/src/portal/src/app/base/project/member/add-member/add-member.component.spec.ts +++ b/src/portal/src/app/base/project/member/add-member/add-member.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AddMemberComponent } from './add-member.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { MemberService } from '../member.service'; diff --git a/src/portal/src/app/base/project/member/add-member/add-member.component.ts b/src/portal/src/app/base/project/member/add-member/add-member.component.ts index bcf0f1cd91..0c4179a0fc 100644 --- a/src/portal/src/app/base/project/member/add-member/add-member.component.ts +++ b/src/portal/src/app/base/project/member/add-member/add-member.component.ts @@ -11,20 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { finalize, debounceTime } from 'rxjs/operators'; -import { - Component, - Input, - EventEmitter, - Output, - ViewChild, - AfterViewChecked, - OnInit, - OnDestroy, -} from '@angular/core'; +import { debounceTime, finalize } from 'rxjs/operators'; +import { AfterViewChecked, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, } from '@angular/core'; import { NgForm } from '@angular/forms'; import { ActivatedRoute } from "@angular/router"; -import { Subject, forkJoin } from "rxjs"; +import { forkJoin, Subject } from "rxjs"; import { TranslateService } from '@ngx-translate/core'; import { MessageHandlerService } from '../../../../shared/services/message-handler.service'; import { UserService } from '../../../left-side-nav/user/user.service'; diff --git a/src/portal/src/app/base/project/member/member.component.spec.ts b/src/portal/src/app/base/project/member/member.component.spec.ts index ea19614107..1e779cfd20 100644 --- a/src/portal/src/app/base/project/member/member.component.spec.ts +++ b/src/portal/src/app/base/project/member/member.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { MemberComponent } from './member.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ActivatedRoute } from "@angular/router"; diff --git a/src/portal/src/app/base/project/member/member.component.ts b/src/portal/src/app/base/project/member/member.component.ts index 114516206a..a9254a80d2 100644 --- a/src/portal/src/app/base/project/member/member.component.ts +++ b/src/portal/src/app/base/project/member/member.component.ts @@ -11,10 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { finalize } from 'rxjs/operators'; -import { Component, OnInit, ViewChild, OnDestroy } from "@angular/core"; +import { catchError, finalize, map } from 'rxjs/operators'; +import { Component, OnDestroy, OnInit, ViewChild } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; -import { Subscription, forkJoin, Observable } from "rxjs"; +import { forkJoin, Observable, Subscription, throwError as observableThrowError } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; import { MessageHandlerService } from "../../../shared/services/message-handler.service"; import { SessionService } from "../../../shared/services/session.service"; @@ -23,18 +23,11 @@ import { AddGroupComponent } from './add-group/add-group.component'; import { AddHttpAuthGroupComponent } from './add-http-auth-group/add-http-auth-group.component'; import { AddMemberComponent } from "./add-member/add-member.component"; import { AppConfigService } from "../../../services/app-config.service"; -import { map, catchError } from "rxjs/operators"; -import { throwError as observableThrowError } from "rxjs"; import { OperationService } from "../../../shared/components/operation/operation.service"; import { UserPermissionService, USERSTATICPERMISSION } from "../../../shared/services"; import { ErrorHandler } from "../../../shared/units/error-handler"; import { operateChanges, OperateInfo, OperationState } from "../../../shared/components/operation/operate"; -import { - ConfirmationButtons, - ConfirmationState, - ConfirmationTargets, - RoleInfo -} from "../../../shared/entities/shared.const"; +import { ConfirmationButtons, ConfirmationState, ConfirmationTargets, RoleInfo } from "../../../shared/entities/shared.const"; import { ConfirmationDialogService } from "../../global-confirmation-dialog/confirmation-dialog.service"; import { errorHandler } from "../../../shared/units/shared.utils"; import { ConfirmationMessage } from "../../global-confirmation-dialog/confirmation-message"; @@ -42,6 +35,7 @@ import { DEFAULT_PAGE_SIZE } from "../../../shared/units/utils"; import { MemberService } from "../../../../../ng-swagger-gen/services/member.service"; import { ClrDatagridStateInterface } from "@clr/angular"; import { ProjectMemberEntity } from "../../../../../ng-swagger-gen/models/project-member-entity"; + @Component({ templateUrl: "member.component.html", styleUrls: ["./member.component.scss"], diff --git a/src/portal/src/app/base/project/member/member.service.spec.ts b/src/portal/src/app/base/project/member/member.service.spec.ts index 8174bbbd95..4c89b84a9e 100644 --- a/src/portal/src/app/base/project/member/member.service.spec.ts +++ b/src/portal/src/app/base/project/member/member.service.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, inject } from '@angular/core/testing'; +import { inject, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { MemberService } from './member.service'; diff --git a/src/portal/src/app/base/project/member/member.service.ts b/src/portal/src/app/base/project/member/member.service.ts index a5e02454cb..1986a1c16a 100644 --- a/src/portal/src/app/base/project/member/member.service.ts +++ b/src/portal/src/app/base/project/member/member.service.ts @@ -15,8 +15,8 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { User } from '../../left-side-nav/user/user'; import { Member } from './member'; -import {throwError as observableThrowError, Observable } from "rxjs"; -import {map, catchError} from 'rxjs/operators'; +import { Observable, throwError as observableThrowError } from "rxjs"; +import { catchError, map } from 'rxjs/operators'; import { CURRENT_BASE_HREF, HTTP_GET_OPTIONS, HTTP_JSON_OPTIONS } from "../../../shared/units/utils"; @Injectable() diff --git a/src/portal/src/app/base/project/project-log/audit-log.component.ts b/src/portal/src/app/base/project/project-log/audit-log.component.ts index 8a39e9becd..7bdb950004 100644 --- a/src/portal/src/app/base/project/project-log/audit-log.component.ts +++ b/src/portal/src/app/base/project/project-log/audit-log.component.ts @@ -19,8 +19,8 @@ import { ProjectService } from "../../../../../ng-swagger-gen/services/project.s import { AuditLog } from "../../../../../ng-swagger-gen/models/audit-log"; import { Project } from "../project"; import { finalize } from "rxjs/operators"; -import {DEFAULT_PAGE_SIZE} from "../../../shared/units/utils"; -import {ClrDatagridStateInterface} from "@clr/angular"; +import { DEFAULT_PAGE_SIZE } from "../../../shared/units/utils"; +import { ClrDatagridStateInterface } from "@clr/angular"; const optionalSearch: {} = { 0: 'AUDIT_LOG.ADVANCED', 1: 'AUDIT_LOG.SIMPLE' }; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/additions.service.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/additions.service.spec.ts index f9964f8a4b..a5b006854f 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/additions.service.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/additions.service.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, inject } from '@angular/core/testing'; +import { inject, TestBed } from '@angular/core/testing'; import { AdditionsService } from "./additions.service"; import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.spec.ts index f319adba54..b018c5c8cc 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ArtifactAdditionsComponent } from './artifact-additions.component'; import { AdditionLinks } from "../../../../../../../ng-swagger-gen/models/addition-links"; import { CURRENT_BASE_HREF } from "../../../../../shared/units/utils"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts index 8f920350f0..0179f303e4 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-additions.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ADDITIONS } from "./models"; import { AdditionLinks } from "../../../../../../../ng-swagger-gen/models/addition-links"; import { AdditionLink } from "../../../../../../../ng-swagger-gen/models/addition-link"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.spec.ts index f7eb52cee1..06e05f6e28 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ArtifactVulnerabilitiesComponent } from './artifact-vulnerabilities.component'; import { NO_ERRORS_SCHEMA } from "@angular/core"; import { ClarityModule } from "@clr/angular"; @@ -16,9 +16,9 @@ import { import { AdditionLink } from "../../../../../../../../ng-swagger-gen/models/addition-link"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; import { ChannelService } from "../../../../../../shared/services/channel.service"; -import {SessionService} from "../../../../../../shared/services/session.service"; -import {SessionUser} from "../../../../../../shared/entities/session-user"; -import {delay} from "rxjs/operators"; +import { SessionService } from "../../../../../../shared/services/session.service"; +import { SessionUser } from "../../../../../../shared/entities/session-user"; +import { delay } from "rxjs/operators"; describe('ArtifactVulnerabilitiesComponent', () => { diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts index 4c79424efa..4e64a21442 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-vulnerabilities/artifact-vulnerabilities.component.ts @@ -6,21 +6,19 @@ import { AdditionLink } from "../../../../../../../../ng-swagger-gen/models/addi import { ProjectService, ScannerVo, - ScanningResultService, SystemInfoService, + ScanningResultService, + SystemInfoService, UserPermissionService, USERSTATICPERMISSION, VulnerabilityItem } from "../../../../../../shared/services"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; -import { - SEVERITY_LEVEL_MAP, - VULNERABILITY_SEVERITY -} from "../../../../../../shared/units/utils"; +import { SEVERITY_LEVEL_MAP, VULNERABILITY_SEVERITY } from "../../../../../../shared/units/utils"; import { ChannelService } from "../../../../../../shared/services/channel.service"; import { ResultBarChartComponent } from "../../vulnerability-scanning/result-bar-chart.component"; import { Subscription } from "rxjs"; import { Artifact } from "../../../../../../../../ng-swagger-gen/models/artifact"; -import {SessionService} from "../../../../../../shared/services/session.service"; +import { SessionService } from "../../../../../../shared/services/session.service"; @Component({ selector: 'hbr-artifact-vulnerabilities', diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/build-history/build-history.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/build-history/build-history.component.spec.ts index 26c49a32b5..8de814cce3 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/build-history/build-history.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/build-history/build-history.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { NO_ERRORS_SCHEMA } from "@angular/core"; import { AdditionsService } from "../additions.service"; import { of } from "rxjs"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.spec.ts index 0e5a1fd5b0..d595006a0d 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DependenciesComponent } from "./dependencies.component"; import { AdditionsService } from '../additions.service'; @@ -7,7 +7,6 @@ import { ArtifactDependency } from "../models"; import { AdditionLink } from "../../../../../../../../ng-swagger-gen/models/addition-link"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; import { ClarityModule } from "@clr/angular"; -import { CURRENT_BASE_HREF } from "../../../../../../shared/units/utils"; describe('DependenciesComponent', () => { diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.ts index a1b737f326..8a2515d75e 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/dependencies/dependencies.component.ts @@ -1,8 +1,4 @@ -import { - Component, - OnInit, - Input, -} from "@angular/core"; +import { Component, Input, OnInit, } from "@angular/core"; import { ArtifactDependency } from "../models"; import { AdditionsService } from "../additions.service"; import { AdditionLink } from "../../../../../../../../ng-swagger-gen/models/addition-link"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.spec.ts index 835f5c407c..fb0aa12137 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { NO_ERRORS_SCHEMA } from "@angular/core"; import { AdditionsService } from "../additions.service"; import { of } from "rxjs"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.ts index e5caf6099a..e71c99f311 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/summary/summary.component.ts @@ -1,8 +1,4 @@ -import { - Component, - OnInit, - Input -} from "@angular/core"; +import { Component, Input, OnInit } from "@angular/core"; import { AdditionsService } from "../additions.service"; import { AdditionLink } from "../../../../../../../../ng-swagger-gen/models/addition-link"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.spec.ts index 815eb123e9..fed24cd284 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { CUSTOM_ELEMENTS_SCHEMA, SecurityContext } from '@angular/core'; import { ClarityModule } from '@clr/angular'; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.ts index e51c9007da..38e5a38722 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/values/values.component.ts @@ -1,12 +1,8 @@ -import { - Component, - Input, - OnInit, -} from "@angular/core"; +import { Component, Input, OnInit, } from "@angular/core"; import { AdditionsService } from "../additions.service"; import { AdditionLink } from "../../../../../../../../ng-swagger-gen/models/addition-link"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; -import * as yaml from "js-yaml"; +import * as yaml from "js-yaml"; import { finalize } from "rxjs/operators"; import { isObject } from "../../../../../../shared/units/utils"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.spec.ts index ab903c3a84..342ccd46c1 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ArtifactCommonPropertiesComponent } from './artifact-common-properties.component'; import { ClarityModule } from "@clr/angular"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.ts index 03132ade76..2068da3eaf 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-common-properties/artifact-common-properties.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import { DatePipe } from "@angular/common"; import { Artifact } from "../../../../../../../ng-swagger-gen/models/artifact"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.spec.ts index a3cc4f4681..4be3676dfd 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ArtifactListPageComponent } from './artifact-list-page.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; @@ -12,7 +12,6 @@ import { SessionService } from "../../../../../shared/services/session.service"; import { AppConfigService } from "../../../../../services/app-config.service"; import { ArtifactService } from "../../../../../../../ng-swagger-gen/services/artifact.service"; import { ArtifactDefaultService } from "../artifact.service"; -import { CURRENT_BASE_HREF } from "../../../../../shared/units/utils"; describe('ArtifactListPageComponent', () => { let component: ArtifactListPageComponent; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.ts index 314cf01ba7..de12a92e36 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list-page.component.ts @@ -17,7 +17,6 @@ import { ArtifactListComponent } from "./artifact-list/artifact-list.component"; import { ArtifactDefaultService } from "../artifact.service"; import { AppConfigService } from "../../../../../services/app-config.service"; import { SessionService } from "../../../../../shared/services/session.service"; -import { ArtifactClickEvent } from "../../../../../shared/services"; import { Project } from "../../../project"; @Component({ diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.spec.ts index 9d1d9b6bca..2215d27cdc 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.spec.ts @@ -8,7 +8,6 @@ import { ActivatedRoute, Router } from "@angular/router"; import { ArtifactDefaultService, ArtifactService } from "../../../artifact.service"; import { Label, - LabelDefaultService, ProjectDefaultService, ProjectService, ScanningResultDefaultService, diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts index 2de0f745c9..c680533dbb 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component.ts @@ -11,35 +11,25 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { - Component, - ElementRef, - Input, OnDestroy, - OnInit, - ViewChild, - -} from "@angular/core"; -import { forkJoin, Observable, Subject, of, Subscription } from "rxjs"; +import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild, } from "@angular/core"; +import { forkJoin, Observable, of, Subject, Subscription } from "rxjs"; import { catchError, debounceTime, distinctUntilChanged, finalize, map } from 'rxjs/operators'; import { TranslateService } from "@ngx-translate/core"; -import { ClrLoadingState, ClrDatagridStateInterface, ClrDatagridComparatorInterface } from "@clr/angular"; +import { ClrDatagridComparatorInterface, ClrDatagridStateInterface, ClrLoadingState } from "@clr/angular"; import { ActivatedRoute, Router } from "@angular/router"; -import { - Comparator, ScanningResultService, - UserPermissionService, USERSTATICPERMISSION, -} from "../../../../../../../shared/services"; +import { Comparator, ScanningResultService, UserPermissionService, USERSTATICPERMISSION, } from "../../../../../../../shared/services"; import { calculatePage, clone, CustomComparator, - DEFAULT_PAGE_SIZE, - formatSize, - VULNERABILITY_SCAN_STATUS, dbEncodeURIComponent, - doSorting, + DEFAULT_PAGE_SIZE, DEFAULT_SUPPORTED_MIME_TYPES, - getSortingString + doSorting, + formatSize, + getSortingString, + VULNERABILITY_SCAN_STATUS } from "../../../../../../../shared/units/utils"; import { ImageNameInputComponent } from "../../../../../../../shared/components/image-name-input/image-name-input.component"; import { CopyInputComponent } from "../../../../../../../shared/components/push-image/copy-input.component"; @@ -47,18 +37,9 @@ import { ErrorHandler } from "../../../../../../../shared/units/error-handler"; import { ArtifactService } from "../../../artifact.service"; import { OperationService } from "../../../../../../../shared/components/operation/operation.service"; import { ChannelService } from "../../../../../../../shared/services/channel.service"; -import { - ConfirmationButtons, - ConfirmationState, - ConfirmationTargets -} from "../../../../../../../shared/entities/shared.const"; +import { ConfirmationButtons, ConfirmationState, ConfirmationTargets } from "../../../../../../../shared/entities/shared.const"; import { operateChanges, OperateInfo, OperationState } from "../../../../../../../shared/components/operation/operate"; -import { - ArtifactFront as Artifact, - mutipleFilter, - artifactPullCommands, - artifactDefault, ArtifactFront -} from '../../../artifact'; +import { artifactDefault, ArtifactFront as Artifact, ArtifactFront, artifactPullCommands, mutipleFilter } from '../../../artifact'; import { Project } from "../../../../../project"; import { ArtifactService as NewArtifactService } from "../../../../../../../../../ng-swagger-gen/services/artifact.service"; import { ADDITIONS } from "../../../artifact-additions/models"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.spec.ts index 16799a5f38..9a539664de 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.spec.ts @@ -4,16 +4,11 @@ import { ArtifactListComponent } from './artifact-list.component'; import { of } from "rxjs"; import { delay } from 'rxjs/operators'; import { ActivatedRoute } from '@angular/router'; -import { - SystemInfo, SystemInfoDefaultService, - SystemInfoService, -} from "../../../../../../shared/services"; +import { SystemInfo, SystemInfoDefaultService, SystemInfoService, } from "../../../../../../shared/services"; import { ArtifactDefaultService, ArtifactService } from "../../artifact.service"; import { ChannelService } from "../../../../../../shared/services/channel.service"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; -import { - RepositoryService as NewRepositoryService -} from "../../../../../../../../ng-swagger-gen/services/repository.service"; +import { RepositoryService as NewRepositoryService } from "../../../../../../../../ng-swagger-gen/services/repository.service"; import { SharedTestingModule } from "../../../../../../shared/shared.module"; import { HttpClientTestingModule } from "@angular/common/http/testing"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.ts index c499bd8392..73b87b2f1f 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-list-page/artifact-list/artifact-list.component.ts @@ -11,23 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { Component, OnInit, ViewChild, Input, Output, EventEmitter, OnDestroy } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { ArtifactClickEvent, State, SystemInfo, SystemInfoService } from "../../../../../../shared/services"; -import { - ConfirmationDialogComponent, -} from "../../../../../../shared/components/confirmation-dialog"; +import { ConfirmationDialogComponent, } from "../../../../../../shared/components/confirmation-dialog"; import { ErrorHandler } from "../../../../../../shared/units/error-handler"; import { ArtifactService } from "../../artifact.service"; import { ConfirmationState, ConfirmationTargets } from "../../../../../../shared/entities/shared.const"; import { ActivatedRoute } from "@angular/router"; import { Project } from '../../../../project'; -import { - RepositoryService as NewRepositoryService -} from "../../../../../../../../ng-swagger-gen/services/repository.service"; +import { RepositoryService as NewRepositoryService } from "../../../../../../../../ng-swagger-gen/services/repository.service"; import { dbEncodeURIComponent } from '../../../../../../shared/units/utils'; import { ConfirmationMessage } from "../../../../../global-confirmation-dialog/confirmation-message"; import { ConfirmationAcknowledgement } from "../../../../../global-confirmation-dialog/confirmation-state-message"; + const TabLinkContentMap: { [index: string]: string } = { 'repo-info': 'info', 'repo-image': 'image' diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.spec.ts index dcfacc69f9..02cfda23f8 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ArtifactSummaryComponent } from "./artifact-summary.component"; import { of } from "rxjs"; import { NO_ERRORS_SCHEMA } from "@angular/core"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.ts index 9cac9e490b..0e2deb5762 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-summary.component.ts @@ -1,4 +1,4 @@ -import { Component, Output, EventEmitter, OnInit } from "@angular/core"; +import { Component, EventEmitter, OnInit, Output } from "@angular/core"; import { Artifact } from "../../../../../../ng-swagger-gen/models/artifact"; import { ErrorHandler } from "../../../../shared/units/error-handler"; import { Label } from "../../../../../../ng-swagger-gen/models/label"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.spec.ts index 2b13066f9c..7a4f4586b1 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ArtifactTagComponent } from './artifact-tag.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HttpClientTestingModule } from '@angular/common/http/testing'; @@ -8,8 +8,11 @@ import { ErrorHandler } from "../../../../../shared/units/error-handler"; import { ArtifactService } from '../../../../../../../ng-swagger-gen/services/artifact.service'; import { OperationService } from "../../../../../shared/components/operation/operation.service"; import { - USERSTATICPERMISSION, - UserPermissionService, UserPermissionDefaultService, SystemInfoService } from '../../../../../shared/services'; + SystemInfoService, + UserPermissionDefaultService, + UserPermissionService, + USERSTATICPERMISSION +} from '../../../../../shared/services'; import { delay } from 'rxjs/operators'; import { AppConfigService } from "../../../../../services/app-config.service"; import { SharedTestingModule } from "../../../../../shared/shared.module"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.ts index 9880f7971e..1f26c4aa83 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-tag/artifact-tag.component.ts @@ -1,6 +1,6 @@ -import { Component, OnInit, Input, ViewChild, OnDestroy } from '@angular/core'; -import { Observable, of, forkJoin, Subject, Subscription } from 'rxjs'; -import { map, catchError, finalize, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators'; +import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; +import { forkJoin, Observable, of, Subject, Subscription } from 'rxjs'; +import { catchError, debounceTime, distinctUntilChanged, finalize, map, switchMap } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; import { NgForm } from '@angular/forms'; import { AVAILABLE_TIME } from "../artifact-list-page/artifact-list/artifact-list-tab/artifact-list-tab.component"; @@ -11,16 +11,15 @@ import { operateChanges, OperateInfo, OperationState } from "../../../../../shar import { ArtifactFront as Artifact, artifactImages, artifactPullCommands } from '../artifact'; import { ArtifactService } from '../../../../../../../ng-swagger-gen/services/artifact.service'; import { Tag } from '../../../../../../../ng-swagger-gen/models/tag'; -import { - UserPermissionService, USERSTATICPERMISSION, SystemInfoService, SystemInfo -} from "../../../../../shared/services"; +import { SystemInfo, SystemInfoService, UserPermissionService, USERSTATICPERMISSION } from "../../../../../shared/services"; import { ClrDatagridStateInterface } from '@clr/angular'; import { - DEFAULT_PAGE_SIZE, calculatePage, dbEncodeURIComponent, + DEFAULT_PAGE_SIZE, doFiltering, - doSorting, getSortingString + doSorting, + getSortingString } from '../../../../../shared/units/utils'; import { AppConfigService } from "../../../../../services/app-config.service"; import { errorHandler } from "../../../../../shared/units/shared.utils"; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact.service.spec.ts b/src/portal/src/app/base/project/repository/artifact/artifact.service.spec.ts index 3eab81c633..7a3f9f0ffe 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact.service.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact.service.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, inject } from '@angular/core/testing'; +import { inject, TestBed } from '@angular/core/testing'; import { ArtifactDefaultService, ArtifactService } from "./artifact.service"; import { IconService } from '../../../../../../ng-swagger-gen/services/icon.service'; import { DomSanitizer } from '@angular/platform-browser'; diff --git a/src/portal/src/app/base/project/repository/artifact/artifact.service.ts b/src/portal/src/app/base/project/repository/artifact/artifact.service.ts index 4a2c7a633c..8ac25ad8a2 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact.service.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact.service.ts @@ -1,4 +1,4 @@ -import { Injectable, Inject } from "@angular/core"; +import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; import { Artifact } from '../../../../../../ng-swagger-gen/models/artifact'; diff --git a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.spec.ts index abb2aead3d..08d9d3e474 100644 --- a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HistogramChartComponent } from './histogram-chart.component'; import { TranslateModule } from "@ngx-translate/core"; diff --git a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.ts b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.ts index 4d4716a129..515368fc5a 100644 --- a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/histogram-chart/histogram-chart.component.ts @@ -1,13 +1,4 @@ -import { - AfterViewInit, - ChangeDetectionStrategy, - Component, - DoCheck, - ElementRef, - Input, - OnInit, - ViewChild -} from '@angular/core'; +import { AfterViewInit, ChangeDetectionStrategy, Component, DoCheck, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; import { TranslateService } from "@ngx-translate/core"; import { forkJoin } from "rxjs"; diff --git a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.spec.ts index 5ff726804a..35ea0d7a16 100644 --- a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.spec.ts @@ -1,15 +1,10 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ResultBarChartComponent } from './result-bar-chart.component'; import { ResultTipComponent } from './result-tip.component'; import { ResultTipHistogramComponent } from "./result-tip-histogram/result-tip-histogram.component"; import { HistogramChartComponent } from "./histogram-chart/histogram-chart.component"; -import { - JobLogDefaultService, - JobLogService, - ScanningResultDefaultService, - ScanningResultService, -} from "../../../../../shared/services"; -import { CURRENT_BASE_HREF, VULNERABILITY_SCAN_STATUS } from "../../../../../shared/units/utils"; +import { JobLogDefaultService, JobLogService, ScanningResultDefaultService, ScanningResultService, } from "../../../../../shared/services"; +import { VULNERABILITY_SCAN_STATUS } from "../../../../../shared/units/utils"; import { ErrorHandler } from "../../../../../shared/units/error-handler"; import { ChannelService } from "../../../../../shared/services/channel.service"; import { ArtifactDefaultService, ArtifactService } from "../artifact.service"; diff --git a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.ts b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.ts index 9156331270..1ca6ac598b 100644 --- a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-bar-chart.component.ts @@ -1,21 +1,10 @@ -import { - Component, - Input, - OnInit, - OnDestroy, - Output, EventEmitter, -} from '@angular/core'; -import { Subscription , timer} from "rxjs"; +import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, } from '@angular/core'; +import { Subscription, timer } from "rxjs"; import { finalize } from "rxjs/operators"; import { ScannerVo, ScanningResultService } from "../../../../../shared/services"; import { ErrorHandler } from "../../../../../shared/units/error-handler"; import { ChannelService } from "../../../../../shared/services/channel.service"; -import { - clone, - CURRENT_BASE_HREF, - VULNERABILITY_SCAN_STATUS, - dbEncodeURIComponent -} from "../../../../../shared/units/utils"; +import { clone, CURRENT_BASE_HREF, dbEncodeURIComponent, VULNERABILITY_SCAN_STATUS } from "../../../../../shared/units/utils"; import { ArtifactService } from "../../../../../../../ng-swagger-gen/services/artifact.service"; import { Artifact } from "../../../../../../../ng-swagger-gen/models/artifact"; import { NativeReportSummary } from "../../../../../../../ng-swagger-gen/models/native-report-summary"; diff --git a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip-histogram/result-tip-histogram.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip-histogram/result-tip-histogram.component.spec.ts index 30b850725a..1d0c6338ff 100644 --- a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip-histogram/result-tip-histogram.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip-histogram/result-tip-histogram.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ResultTipHistogramComponent } from './result-tip-histogram.component'; import { ClarityModule } from "@clr/angular"; import { TranslateModule, TranslateService } from "@ngx-translate/core"; diff --git a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip.component.spec.ts index 6007043cdd..a30f0cf962 100644 --- a/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/vulnerability-scanning/result-tip.component.spec.ts @@ -1,7 +1,7 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ResultTipComponent } from './result-tip.component'; import { UserPermissionDefaultService, UserPermissionService, VulnerabilitySummary } from "../../../../../shared/services"; -import { CURRENT_BASE_HREF, VULNERABILITY_SCAN_STATUS } from "../../../../../shared/units/utils"; +import { VULNERABILITY_SCAN_STATUS } from "../../../../../shared/units/utils"; import { SharedTestingModule } from "../../../../../shared/shared.module"; diff --git a/src/portal/src/app/base/project/repository/gridview/grid-view.component.spec.ts b/src/portal/src/app/base/project/repository/gridview/grid-view.component.spec.ts index 303265ad95..d096d59c07 100644 --- a/src/portal/src/app/base/project/repository/gridview/grid-view.component.spec.ts +++ b/src/portal/src/app/base/project/repository/gridview/grid-view.component.spec.ts @@ -9,7 +9,7 @@ * conditions of the subcomponent's license, as noted in the LICENSE file. */ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { GridViewComponent } from './grid-view.component'; import { SharedTestingModule } from "../../../../shared/shared.module"; diff --git a/src/portal/src/app/base/project/repository/gridview/grid-view.component.ts b/src/portal/src/app/base/project/repository/gridview/grid-view.component.ts index 70bdd78210..7d54ead2e8 100644 --- a/src/portal/src/app/base/project/repository/gridview/grid-view.component.ts +++ b/src/portal/src/app/base/project/repository/gridview/grid-view.component.ts @@ -10,17 +10,17 @@ */ import { + AfterViewInit, Component, + ContentChild, + EventEmitter, + HostListener, Input, Output, - ContentChild, + TemplateRef, ViewChild, ViewChildren, - TemplateRef, - HostListener, - ViewEncapsulation, - EventEmitter, - AfterViewInit + ViewEncapsulation } from "@angular/core"; import { Subscription } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; diff --git a/src/portal/src/app/base/project/repository/repository-gridview.component.spec.ts b/src/portal/src/app/base/project/repository/repository-gridview.component.spec.ts index 44981f1345..62ebb19c02 100644 --- a/src/portal/src/app/base/project/repository/repository-gridview.component.spec.ts +++ b/src/portal/src/app/base/project/repository/repository-gridview.component.spec.ts @@ -2,18 +2,13 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { of } from "rxjs"; import { RepositoryService as NewRepositoryService } from "../../../../../ng-swagger-gen/services/repository.service"; import { RepositoryGridviewComponent } from "./repository-gridview.component"; -import { - ProjectDefaultService, - ProjectService, - SystemInfo, SystemInfoService, - UserPermissionService -} from "../../../shared/services"; +import { ProjectDefaultService, ProjectService, SystemInfo, SystemInfoService, UserPermissionService } from "../../../shared/services"; import { delay } from 'rxjs/operators'; import { ErrorHandler } from "../../../shared/units/error-handler"; import { ActivatedRoute } from "@angular/router"; import { Repository as NewRepository } from "../../../../../ng-swagger-gen/models/repository"; import { SharedTestingModule } from "../../../shared/shared.module"; -import {GridViewComponent} from "./gridview/grid-view.component"; +import { GridViewComponent } from "./gridview/grid-view.component"; describe('RepositoryComponentGridview (inline template)', () => { diff --git a/src/portal/src/app/base/project/repository/repository-gridview.component.ts b/src/portal/src/app/base/project/repository/repository-gridview.component.ts index 2ea39e8480..e59ea9dc99 100644 --- a/src/portal/src/app/base/project/repository/repository-gridview.component.ts +++ b/src/portal/src/app/base/project/repository/repository-gridview.component.ts @@ -1,47 +1,31 @@ -import { - Component, - Input, - Output, - OnInit, - ViewChild, - EventEmitter, - OnChanges, - SimpleChanges, - OnDestroy -} from "@angular/core"; -import {forkJoin, of, Subscription} from "rxjs"; -import {debounceTime, distinctUntilChanged, finalize, switchMap} from "rxjs/operators"; +import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from "@angular/core"; +import { forkJoin, Observable, of, Subscription } from "rxjs"; +import { catchError, debounceTime, distinctUntilChanged, finalize, map, switchMap } from "rxjs/operators"; import { TranslateService } from "@ngx-translate/core"; -import { map, catchError } from "rxjs/operators"; -import { Observable } from "rxjs"; import { ClrDatagridStateInterface } from "@clr/angular"; -import { - RepositoryService as NewRepositoryService -} from "../../../../../ng-swagger-gen/services/repository.service"; -import { - SystemInfo, - SystemInfoService, - UserPermissionService, USERSTATICPERMISSION -} from "../../../shared/services"; +import { RepositoryService as NewRepositoryService } from "../../../../../ng-swagger-gen/services/repository.service"; +import { SystemInfo, SystemInfoService, UserPermissionService, USERSTATICPERMISSION } from "../../../shared/services"; import { FilterComponent } from "../../../shared/components/filter/filter.component"; import { calculatePage, clone, - DEFAULT_PAGE_SIZE, + CURRENT_BASE_HREF, dbEncodeURIComponent, - doFiltering, CURRENT_BASE_HREF, getSortingString + DEFAULT_PAGE_SIZE, + doFiltering, + getSortingString } from "../../../shared/units/utils"; import { ErrorHandler } from "../../../shared/units/error-handler"; import { CARD_VIEW_LOCALSTORAGE_KEY, ConfirmationButtons, ConfirmationState, - ConfirmationTargets, FALSE_STR, TRUE_STR + ConfirmationTargets, + FALSE_STR, + TRUE_STR } from "../../../shared/entities/shared.const"; import { operateChanges, OperateInfo, OperationState } from "../../../shared/components/operation/operate"; -import { - ConfirmationDialogComponent, -} from "../../../shared/components/confirmation-dialog"; +import { ConfirmationDialogComponent, } from "../../../shared/components/confirmation-dialog"; import { OperationService } from "../../../shared/components/operation/operation.service"; import { Project } from "../project"; import { ActivatedRoute, Router } from "@angular/router"; diff --git a/src/portal/src/app/base/project/scanner/scanner.component.spec.ts b/src/portal/src/app/base/project/scanner/scanner.component.spec.ts index 8cccf3f34e..10bd448f0e 100644 --- a/src/portal/src/app/base/project/scanner/scanner.component.spec.ts +++ b/src/portal/src/app/base/project/scanner/scanner.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { of } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; import { MessageHandlerService } from "../../../shared/services/message-handler.service"; diff --git a/src/portal/src/app/base/project/summary/summary.component.spec.ts b/src/portal/src/app/base/project/summary/summary.component.spec.ts index 70b2ea6e0f..5886539950 100644 --- a/src/portal/src/app/base/project/summary/summary.component.spec.ts +++ b/src/portal/src/app/base/project/summary/summary.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { of } from 'rxjs'; diff --git a/src/portal/src/app/base/project/summary/summary.component.ts b/src/portal/src/app/base/project/summary/summary.component.ts index 0d3c3f60aa..83f57918af 100644 --- a/src/portal/src/app/base/project/summary/summary.component.ts +++ b/src/portal/src/app/base/project/summary/summary.component.ts @@ -1,19 +1,9 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { AppConfigService } from "../../../services/app-config.service"; -import { - Endpoint, - ProjectService, - UserPermissionService, - USERSTATICPERMISSION -} from '../../../shared/services'; +import { Endpoint, ProjectService, UserPermissionService, USERSTATICPERMISSION } from '../../../shared/services'; import { ErrorHandler } from "../../../shared/units/error-handler"; -import { - DefaultHelmIcon, - FALSE_STR, - PROJECT_SUMMARY_CARD_VIEW_LOCALSTORAGE_KEY, - TRUE_STR -} from "../../../shared/entities/shared.const"; +import { DefaultHelmIcon, FALSE_STR, PROJECT_SUMMARY_CARD_VIEW_LOCALSTORAGE_KEY, TRUE_STR } from "../../../shared/entities/shared.const"; import { RepositoryService } from "../../../../../ng-swagger-gen/services/repository.service"; import { Project } from "../../../../../ng-swagger-gen/models/project"; import { Repository } from "../../../../../ng-swagger-gen/models/repository"; diff --git a/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts b/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts index eea10dd353..b7926e6eeb 100644 --- a/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts +++ b/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AddWebhookFormComponent } from './add-webhook-form.component'; import { ProjectWebhookService } from "../webhook.service"; import { MessageHandlerService } from "../../../../shared/services/message-handler.service"; diff --git a/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.ts b/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.ts index c2ef26be81..fcf8dc079d 100644 --- a/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.ts +++ b/src/portal/src/app/base/project/webhook/add-webhook-form/add-webhook-form.component.ts @@ -1,11 +1,4 @@ -import { - Component, - OnInit, - Input, - ViewChild, - Output, - EventEmitter, OnDestroy, -} from "@angular/core"; +import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, } from "@angular/core"; import { NgForm } from "@angular/forms"; import { debounceTime, distinctUntilChanged, filter, finalize, switchMap } from "rxjs/operators"; import { ProjectWebhookService } from "../webhook.service"; diff --git a/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.spec.ts b/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.spec.ts index b61345fe8b..3d91dbfc63 100644 --- a/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.spec.ts +++ b/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.spec.ts @@ -1,7 +1,8 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AddWebhookComponent } from './add-webhook.component'; import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core'; import { SharedTestingModule } from "../../../../shared/shared.module"; + describe('AddWebhookComponent', () => { let component: AddWebhookComponent; let fixture: ComponentFixture; diff --git a/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.ts b/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.ts index 5f190e969c..29de6d461e 100644 --- a/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.ts +++ b/src/portal/src/app/base/project/webhook/add-webhook/add-webhook.component.ts @@ -1,11 +1,4 @@ -import { - Component, - OnInit, - Input, - ViewChild, - Output, - EventEmitter, -} from "@angular/core"; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild, } from "@angular/core"; import { AddWebhookFormComponent } from "../add-webhook-form/add-webhook-form.component"; import { WebhookPolicy } from "../../../../../../ng-swagger-gen/models/webhook-policy"; diff --git a/src/portal/src/app/base/project/webhook/last-trigger/last-trigger.component.ts b/src/portal/src/app/base/project/webhook/last-trigger/last-trigger.component.ts index 49c842aa77..28c728b8de 100644 --- a/src/portal/src/app/base/project/webhook/last-trigger/last-trigger.component.ts +++ b/src/portal/src/app/base/project/webhook/last-trigger/last-trigger.component.ts @@ -1,7 +1,4 @@ -import { - Component, Input, OnChanges, - OnInit, SimpleChanges -} from "@angular/core"; +import { Component, Input, OnChanges, OnInit, SimpleChanges } from "@angular/core"; import { ProjectWebhookService } from "../webhook.service"; import { WebhookLastTrigger } from "../../../../../../ng-swagger-gen/models/webhook-last-trigger"; diff --git a/src/portal/src/app/base/project/webhook/webhook.component.spec.ts b/src/portal/src/app/base/project/webhook/webhook.component.spec.ts index 4c81f177d4..d098a88043 100644 --- a/src/portal/src/app/base/project/webhook/webhook.component.spec.ts +++ b/src/portal/src/app/base/project/webhook/webhook.component.spec.ts @@ -1,4 +1,4 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { WebhookComponent } from './webhook.component'; import { ActivatedRoute } from '@angular/router'; import { ProjectWebhookService } from './webhook.service'; diff --git a/src/portal/src/app/base/project/webhook/webhook.service.spec.ts b/src/portal/src/app/base/project/webhook/webhook.service.spec.ts index 3a5b9c050c..b1f251be05 100644 --- a/src/portal/src/app/base/project/webhook/webhook.service.spec.ts +++ b/src/portal/src/app/base/project/webhook/webhook.service.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, inject } from '@angular/core/testing'; +import { inject, TestBed } from '@angular/core/testing'; import { ProjectWebhookService } from './webhook.service'; describe('WebhookService', () => {