Skip to content

Commit de01d7f

Browse files
rushk014lsongsuse
authored andcommitted
[Ag20] chore: auto-fix prettier formatting and disable opinionated lint rules
1 parent 37a16b1 commit de01d7f

429 files changed

Lines changed: 562 additions & 1222 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

admin/webapp/eslint.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export default defineConfig([
4242
createDefaultProgram: true,
4343
},
4444
},
45-
rules: {},
45+
rules: {
46+
'@angular-eslint/prefer-standalone': 'off',
47+
'@angular-eslint/prefer-inject': 'off',
48+
},
4649
},
4750

4851
{

admin/webapp/websrc/app/app.component.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { MapConstant } from '@common/constants/map.constant';
2525
@Component({
2626
standalone: false,
2727
selector: 'app-root',
28-
28+
2929
templateUrl: './app.component.html',
3030
styleUrls: ['./app.component.scss'],
3131
})
@@ -198,9 +198,12 @@ export class AppComponent implements OnInit {
198198
fn(...args);
199199
if (GlobalVariable.user) {
200200
if (timeout) clearTimeout(timeout);
201-
timeout = setTimeout(() => {
202-
fn(...args);
203-
}, GlobalVariable.user.token.timeout * 1000 + 10000);
201+
timeout = setTimeout(
202+
() => {
203+
fn(...args);
204+
},
205+
GlobalVariable.user.token.timeout * 1000 + 10000
206+
);
204207
}
205208
timerId = null;
206209
}, delay);

admin/webapp/websrc/app/app.module.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import { GlobalVariable } from '@common/variables/global.variable';
1313
import { GlobalConstant } from '@common/constants/global.constant';
1414
import { LOCAL_STORAGE, StorageService } from 'ngx-webstorage-service';
1515
import { BrowserModule } from '@angular/platform-browser';
16-
import { HTTP_INTERCEPTORS, withInterceptorsFromDi } from '@angular/common/http';
16+
import {
17+
HTTP_INTERCEPTORS,
18+
withInterceptorsFromDi,
19+
} from '@angular/common/http';
1720
import { AuthInterceptor } from '@core/interceptor/auth.interceptor';
1821
import { provideAnimations } from '@angular/platform-browser/animations';
1922

@@ -44,9 +47,7 @@ export function getWindow() {
4447
}),
4548
],
4649
providers: [
47-
provideHttpClient(
48-
withInterceptorsFromDi(),
49-
),
50+
provideHttpClient(withInterceptorsFromDi()),
5051
{ provide: WindowWrapper, useFactory: getWindow },
5152
{
5253
provide: HTTP_INTERCEPTORS,

admin/webapp/websrc/app/common/api/assets-http.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,17 @@ export class AssetsHttpService {
128128
isShowingAccepted ? { platform, show: 'accepted' } : { platform }
129129
) as any;
130130
return GlobalVariable.http
131-
.get<VulnerabilityReportResponse>(PathConstant.SCAN_PLATFORM_URL, { params })
131+
.get<VulnerabilityReportResponse>(PathConstant.SCAN_PLATFORM_URL, {
132+
params,
133+
})
132134
.pipe(map(r => r.report.vulnerabilities));
133135
}
134136

135137
getNodeWorkloads(id: string): Observable<Workload[]> {
136138
return GlobalVariable.http
137-
.get<WorkloadResponse>(PathConstant.NODE_WORKLOADS_URL, { params: { id } })
139+
.get<WorkloadResponse>(PathConstant.NODE_WORKLOADS_URL, {
140+
params: { id },
141+
})
138142
.pipe(map(r => r.workloads));
139143
}
140144

admin/webapp/websrc/app/common/api/auth-http.service.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { GlobalVariable } from '@common/variables/global.variable';
2222
import { Observable } from 'rxjs';
2323
import { map } from 'rxjs/operators';
2424

25-
2625
interface SsoServerResponse {
2726
redirect: SsoServer;
2827
}
@@ -51,7 +50,6 @@ interface PermissionOptionsResponse {
5150
options: PermissionOptionResponse;
5251
}
5352

54-
5553
@Injectable()
5654
export class AuthHttpService {
5755
getSamlSLOServer(): Observable<SsoServer> {
@@ -197,9 +195,10 @@ export class AuthHttpService {
197195

198196
getPwdProfile(): Observable<PasswordProfile> {
199197
return GlobalVariable.http
200-
.get<{ pwd_profiles: PasswordProfile[]; active_profile_name: string }>(
201-
PathConstant.PASSWORD_PROFILE
202-
)
198+
.get<{
199+
pwd_profiles: PasswordProfile[];
200+
active_profile_name: string;
201+
}>(PathConstant.PASSWORD_PROFILE)
203202
.pipe(
204203
map(pwdProfileResponse => {
205204
const active_profile_name =

admin/webapp/websrc/app/common/api/config-http.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class ConfigHttpService {
3434
options = Object.assign(options, { params: { source: source } });
3535
return GlobalVariable.http
3636
.get<ConfigResponse>(PathConstant.CONFIG_V2_URL, options)
37-
.pipe(map(r=> r.config));
37+
.pipe(map(r => r.config));
3838
}
3939

4040
getFedConfig(): Observable<any> {

admin/webapp/websrc/app/common/directives/maskInput.directive.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ export class MaskInputDirective implements OnInit {
1616
private value: any;
1717
private element: HTMLInputElement;
1818

19-
constructor(private el: ElementRef, private form: ControlContainer) {
19+
constructor(
20+
private el: ElementRef,
21+
private form: ControlContainer
22+
) {
2023
this.element = el.nativeElement;
2124
}
2225

admin/webapp/websrc/app/common/directives/observe/observe.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { NgModule } from '@angular/core';
22
import { ObserveDirective } from '@common/directives/observe/observe.directive';
33

44
@NgModule({
5-
declarations: [ ObserveDirective ],
5+
declarations: [ObserveDirective],
66
imports: [],
7-
exports: [ ObserveDirective ],
7+
exports: [ObserveDirective],
88
})
99
export class ObserveModule {}

admin/webapp/websrc/app/common/guards/pending-changes.guard.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ export interface ComponentCanDeactivate {
77
}
88

99
@Injectable()
10-
export class PendingChangesGuard
11-
implements CanDeactivate<ComponentCanDeactivate>
12-
{
10+
export class PendingChangesGuard implements CanDeactivate<ComponentCanDeactivate> {
1311
canDeactivate(
1412
component: ComponentCanDeactivate
1513
): boolean | Observable<boolean> {

admin/webapp/websrc/app/common/neuvector-formly/button/button.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FieldType, FieldTypeConfig } from '@ngx-formly/core';
44
@Component({
55
standalone: false,
66
selector: 'app-button',
7-
7+
88
templateUrl: './button.component.html',
99
styleUrls: ['./button.component.scss'],
1010
})

0 commit comments

Comments
 (0)