Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
webui
Commits
9e5ed81c
Unverified
Commit
9e5ed81c
authored
2 years ago
by
Evgeny Stepanovych
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
NAS-119035 / 22.12 / enable no-shadow linter rule (#7334)
parent
477d454d
base
NAS-010101
NAS-110800
NAS-119131
NAS-119140
NAS-119180-22.12.1
NAS-119431
NAS-119556-23.10
NAS-119615-22.12.1
NAS-119668
NAS-119695
NAS-119749-bluefin
NAS-119750-22.12.1
NAS-119806
NAS-119812
NAS-119886-22.12.1
NAS-119996
NAS-119996-bluefin
NAS-120045
NAS-120057
NAS-120173-22.12.1
NAS-120181-22.12.1
NAS-120264-22.12.1
NAS-120274
NAS-120296-22.12.1
NAS-120326-22.12.1
NAS-120490_
NAS-120503
NAS-121006-22.12.2
NAS-121124
NAS-121128-22.12.2
NAS-121128-release-22.12.2
NAS-121136
NAS-121177
NAS-121218-22.12.3
NAS-121300
NAS-121316
NAS-121541
NAS-121542
NAS-121686
NAS-121721-22.12.3
NAS-121778
NAS-121827
NAS-121884-22.12.3
NAS-122267-22.12.4
NAS-122372
NAS-122601
NAS-122686
NAS-122706
NAS-122721
NAS-122751-23.10-BETA.1
NAS-122759
NAS-122781
NAS-122794-23.10
NAS-122855
NAS-122870-bluefin
NAS-122969
NAS-122993-22.12.4
NAS-123055-22.12.4
NAS-123278
NAS-123295
NAS-123437
NAS-123478-22.12.4
NAS-123484
NAS-123492
NAS-123526-22.12.4
NAS-123651
NAS-123651-23.10-BETA.1
NAS-123666
NAS-123723
NAS-123723-cobia
NAS-123762
NAS-123762-23.10
NAS-123778-23.10
NAS-123778-23.10-RC.1
NAS-123778-RC.1
NAS-123801
NAS-123810-23.10
NAS-123813-22.12.4
NAS-123836
NAS-123836-23.10-BETA.1
NAS-123836-24.04
NAS-123861
NAS-123911-23.10-BETA.1
NAS-123928-23.10
NAS-123931-22.12.4
NAS-123945
NAS-124044
NAS-124077
NAS-124131-23.10
NAS-124137
NAS-124183
NAS-124231
NAS-124232
NAS-124237-23.10
NAS-124325-23.10.0
NAS-124335
NAS-124354
NAS-124430
NAS-124454
NAS-124481-23.10.0
NAS-124481-23.10.1
NAS-124555-23.10.0
NAS-124555-23.10.1
NAS-124666
NAS-124707-23.10.0
NAS-124707-23.10.1
NAS-124716
NAS-124846-23.10.0
NAS-124846-23.10.1
NAS-124892
NAS-124895-23.10.1
NAS-124908
NAS-124951
NAS-124964
NAS-124999
NAS-125092
NAS-125213-23.10.1
NAS-125307
NAS-125532
NAS-125568
NAS-125607-validator
NAS-125616-23.10.2
NAS-125654
NAS-125703-23.10.2
NAS-125728
NAS-125931
NAS-126699
NAS-126774-24.04-RC.1
NAS-126774-dragonfish
NAS-126795
NAS-126795-test
NAS-126795-test2
NAS-127001
NAS-127002-24.04-RC.1
NAS-127022
NAS-127041-24.04-BETA.1
NAS-127049-24.04-RC.1
NAS-127297-24.04-RC.1
NAS-127297-24.10
NAS-127369
NAS-127551
NAS-127551-alt
NAS-127589-24.04.0
NAS-127593
NAS-127615-24.04.0
NAS-127660
NAS-127794
NAS-127829-24.10
NAS-127854-24.04.0
NAS-128030
NAS-128045
NAS-128071
NAS-128173
NAS-128209
NAS-128287
NAS-128289
TE-1553-dragonfish
TE-1628
auto-129
developer/lyy
llll
master
metrics-enable
patch-1
patch-235
rel-v0.0.1
release/22.12
release/22.12.1
release/22.12.2
release/22.12.3
release/22.12.4
release/23.10-BETA.1
release/23.10-RC.1
release/23.10.0
release/23.10.1
release/23.10.1.1
release/23.10.1.2
release/23.10.1.3
release/23.10.2
release/24.04-BETA.1
release/24.04-RC.1
release/24.04.0
renediepenbroek/master
revert-7745-NAS-120274
stable/bluefin
stable/cobia
stable/dragonfish
test-xxxyyy
testing-refine-branchout-process
testing-refine-branchout-process2
v0.0.2
TS-24.04-RC.1
TS-24.04-BETA.1
TS-23.10.2
TS-23.10.1.3
TS-23.10.1.2
TS-23.10.1.1
TS-23.10.1
TS-23.10.0.1
TS-23.10.0
TS-23.10-RC.1
TS-23.10-BETA.1
TS-22.12.4.2
TS-22.12.4.1
TS-22.12.4
TS-22.12.3.3
TS-22.12.3.2
TS-22.12.3.1
TS-22.12.3
TS-22.12.2
TS-22.12.1
TS-22.12.0
TS-12.12.3
DN110M-CS-v2.0
No related merge requests found
Changes
168
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
.eslintrc.js
+1
-2
.eslintrc.js
src/app/core/testing/interfaces/mock-websocket-responses.interface.ts
+2
-1
.../testing/interfaces/mock-websocket-responses.interface.ts
src/app/helpers/options.helper.ts
+2
-2
src/app/helpers/options.helper.ts
src/app/interfaces/dataset.interface.ts
+0
-1
src/app/interfaces/dataset.interface.ts
src/app/interfaces/system-info.interface.ts
+1
-1
src/app/interfaces/system-info.interface.ts
src/app/modules/alerts/components/alerts-panel/alerts-panel.component.spec.ts
+4
-4
...ts/components/alerts-panel/alerts-panel.component.spec.ts
src/app/modules/entity/entity-form/entity-form.component.ts
+6
-6
src/app/modules/entity/entity-form/entity-form.component.ts
src/app/modules/entity/entity-form/services/field-relation.service.ts
+4
-4
...les/entity/entity-form/services/field-relation.service.ts
src/app/modules/entity/entity-table/entity-table.component.ts
+5
-5
...app/modules/entity/entity-table/entity-table.component.ts
src/app/modules/entity/table/expandable-table/expandable-table.component.html
+1
-1
...ty/table/expandable-table/expandable-table.component.html
src/app/modules/ix-drop-grid/ix-drop-grid.directive.spec.ts
+6
-6
src/app/modules/ix-drop-grid/ix-drop-grid.directive.spec.ts
src/app/modules/layout/components/change-password-dialog/change-password-dialog.component.spec.ts
+2
-2
...-password-dialog/change-password-dialog.component.spec.ts
src/app/modules/layout/components/topbar/directory-services-indicator/directory-services-indicator.component.spec.ts
+2
-2
...-indicator/directory-services-indicator.component.spec.ts
src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts
+2
-2
...w/delete-user-dialog/delete-user-dialog.component.spec.ts
src/app/pages/applications/chart-releases/chart-releases.component.ts
+5
-5
...s/applications/chart-releases/chart-releases.component.ts
src/app/pages/applications/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.ts
+2
-2
...age-delete-dialog/docker-image-delete-dialog.component.ts
src/app/pages/applications/manage-catalogs/manage-catalogs.component.ts
+6
-6
...applications/manage-catalogs/manage-catalogs.component.ts
src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.spec.ts
+2
-2
...credentials-form/cloud-credentials-form.component.spec.ts
src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/one-drive-provider-form/one-drive-provider-form.component.ts
+4
-4
...-drive-provider-form/one-drive-provider-form.component.ts
src/app/pages/credentials/certificates-dash/forms/ca-add.component.ts
+4
-5
...s/credentials/certificates-dash/forms/ca-add.component.ts
with
61 additions
and
63 deletions
+61
-63
.eslintrc.js
View file @
9e5ed81c
...
...
@@ -131,7 +131,7 @@ module.exports = {
],
"
@typescript-eslint/restrict-template-expressions
"
:
[
"
error
"
,
{
allowNumber
:
true
,
allowAny
:
true
}],
// TODO: Aibnb rules that are disabled for now as they cannot be fixed automatically
// TODO: Ai
r
bnb rules that are disabled for now as they cannot be fixed automatically
"
no-underscore-dangle
"
:
"
off
"
,
"
consistent-return
"
:
"
off
"
,
"
no-plusplus
"
:
"
off
"
,
...
...
@@ -153,7 +153,6 @@ module.exports = {
"
no-param-reassign
"
:
"
off
"
,
"
@typescript-eslint/no-loop-func
"
:
"
off
"
,
"
no-await-in-loop
"
:
"
off
"
,
"
@typescript-eslint/no-shadow
"
:
"
off
"
,
"
no-multi-str
"
:
"
off
"
,
"
no-mixed-operators
"
:
[
"
error
"
,
{
groups
:
[
...
...
This diff is collapsed.
Click to expand it.
src/app/core/testing/interfaces/mock-websocket-responses.interface.ts
View file @
9e5ed81c
...
...
@@ -2,6 +2,7 @@ import { ApiMethod } from 'app/interfaces/api-directory.interface';
import
{
Job
}
from
'
app/interfaces/job.interface
'
;
export
enum
MockWebsocketResponseType
{
// eslint-disable-next-line @typescript-eslint/no-shadow
Job
=
'
job
'
,
Call
=
'
call
'
,
}
...
...
@@ -15,5 +16,5 @@ export interface MockWebsocketCallResponse {
export
interface
MockWebsocketJobResponse
{
type
:
MockWebsocketResponseType
.
Job
;
method
:
ApiMethod
;
response
:
Job
<
unknown
>
;
response
:
Job
;
}
This diff is collapsed.
Click to expand it.
src/app/helpers/options.helper.ts
View file @
9e5ed81c
...
...
@@ -4,8 +4,8 @@ import { map } from 'rxjs/operators';
import
{
Choices
}
from
'
app/interfaces/choices.interface
'
;
import
{
MapOption
,
Option
}
from
'
app/interfaces/option.interface
'
;
export
function
mapToOptions
(
m
ap
:
Map
<
string
,
string
>
,
translate
:
TranslateService
):
Option
[]
{
return
Array
.
from
(
m
ap
.
entries
()).
map
(([
value
,
label
])
=>
({
label
:
translate
.
instant
(
label
),
value
}));
export
function
mapToOptions
(
optionM
ap
:
Map
<
string
,
string
>
,
translate
:
TranslateService
):
Option
[]
{
return
Array
.
from
(
optionM
ap
.
entries
()).
map
(([
value
,
label
])
=>
({
label
:
translate
.
instant
(
label
),
value
}));
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/app/interfaces/dataset.interface.ts
View file @
9e5ed81c
...
...
@@ -65,7 +65,6 @@ export interface Dataset {
// Absent if extra.retrieve_children is false
children
?:
Dataset
[];
// TODO: Need to confirm that these properties are valid backend properties
refquota_critical
?:
ZfsProperty
<
number
>
;
refquota_warning
?:
ZfsProperty
<
number
>
;
quota_critical
?:
ZfsProperty
<
number
>
;
...
...
This diff is collapsed.
Click to expand it.
src/app/interfaces/system-info.interface.ts
View file @
9e5ed81c
...
...
@@ -35,7 +35,7 @@ export interface SystemLicense {
features
:
LicenseFeature
[];
legacy_contract_hardware
:
unknown
;
legacy_contract_software
:
unknown
;
model
:
string
;
// TODO: Enum?
model
:
string
;
system_serial
:
string
;
system_serial_ha
:
string
;
}
This diff is collapsed.
Click to expand it.
src/app/modules/alerts/components/alerts-panel/alerts-panel.component.spec.ts
View file @
9e5ed81c
...
...
@@ -143,8 +143,8 @@ describe('AlertsPanelComponent', () => {
it
(
'
adds an alert when websocket alert.list subscription sends an "add" event
'
,
()
=>
{
spectator
.
inject
(
Store
).
dispatch
(
adminUiInitialized
());
const
mockW
ebsocket
=
spectator
.
inject
(
MockWebsocketService
);
mockW
ebsocket
.
emitSubscribeEvent
({
const
w
ebsocket
Mock
=
spectator
.
inject
(
MockWebsocketService
);
w
ebsocket
Mock
.
emitSubscribeEvent
({
msg
:
ApiEventMessage
.
Added
,
collection
:
'
alert.list
'
,
fields
:
{
...
...
@@ -162,8 +162,8 @@ describe('AlertsPanelComponent', () => {
it
(
'
updates an alert when websocket alert.list subscription sends a "change" event
'
,
()
=>
{
spectator
.
inject
(
Store
).
dispatch
(
adminUiInitialized
());
const
mockW
ebsocket
=
spectator
.
inject
(
MockWebsocketService
);
mockW
ebsocket
.
emitSubscribeEvent
({
const
w
ebsocket
Mock
=
spectator
.
inject
(
MockWebsocketService
);
w
ebsocket
Mock
.
emitSubscribeEvent
({
msg
:
ApiEventMessage
.
Changed
,
collection
:
'
alert.list
'
,
fields
:
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/entity/entity-form/entity-form.component.ts
View file @
9e5ed81c
...
...
@@ -253,23 +253,23 @@ export class EntityFormComponent implements OnInit, OnDestroy, OnChanges, AfterV
}
else
if
(
this
.
conf
.
queryCall
)
{
if
(
this
.
pk
)
{
let
pk
=
this
.
pk
;
let
filter
=
[];
let
filter
Param
=
[];
if
(
this
.
conf
.
pk
)
{
filter
.
push
(
this
.
conf
.
pk
);
filter
Param
.
push
(
this
.
conf
.
pk
);
pk
=
this
.
conf
.
pk
;
}
if
(
this
.
conf
.
queryCallOption
)
{
filter
.
push
(
this
.
conf
.
queryCallOption
);
filter
Param
.
push
(
this
.
conf
.
queryCallOption
);
}
if
(
this
.
conf
.
customFilter
)
{
filter
=
this
.
conf
.
customFilter
;
filter
Param
=
this
.
conf
.
customFilter
;
}
if
(
this
.
conf
.
queryKey
)
{
filter
=
[[[
this
.
conf
.
queryKey
,
'
=
'
,
parseInt
(
pk
as
string
,
10
)
||
pk
]]];
// parse pk to int if possible (returns NaN otherwise)
filter
Param
=
[[[
this
.
conf
.
queryKey
,
'
=
'
,
parseInt
(
pk
as
string
,
10
)
||
pk
]]];
// parse pk to int if possible (returns NaN otherwise)
}
this
.
getFunction
=
this
.
ws
.
call
(
this
.
conf
.
queryCall
,
filter
as
ApiParams
<
keyof
ApiDirectory
>
,
filter
Param
as
ApiParams
<
keyof
ApiDirectory
>
,
)
as
Observable
<
Record
<
string
,
unknown
>>
;
}
else
{
this
.
getFunction
=
this
.
ws
.
call
(
this
.
conf
.
queryCall
,
[])
as
Observable
<
Record
<
string
,
unknown
>>
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/entity/entity-form/services/field-relation.service.ts
View file @
9e5ed81c
...
...
@@ -41,10 +41,10 @@ export class FieldRelationService {
}
else
{
const
subControlKeys
=
Object
.
keys
(
controlGroup
.
controls
).
filter
((
key
)
=>
key
.
startsWith
(
`
${
rel
.
name
}
_`
));
subControlKeys
.
forEach
((
key
)
=>
{
const
c
ontrol
=
controlGroup
.
get
(
key
)
as
UntypedFormControl
;
if
(
c
ontrol
&&
!
controls
.
some
((
controlElement
)
=>
controlElement
===
c
ontrol
))
{
controls
.
push
(
c
ontrol
);
const
subC
ontrol
=
controlGroup
.
get
(
key
)
as
UntypedFormControl
;
if
(
subC
ontrol
&&
!
controls
.
some
((
controlElement
)
=>
controlElement
===
subC
ontrol
))
{
controls
.
push
(
subC
ontrol
);
}
});
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/entity/entity-table/entity-table.component.ts
View file @
9e5ed81c
...
...
@@ -1069,12 +1069,12 @@ export class EntityTableComponent<Row extends SomeRow = SomeRow> implements OnIn
cols
:
this
.
conf
.
columns
,
}
as
unknown
as
TableDisplayedColumns
;
this
.
store$
.
pipe
(
select
(
selectPreferencesState
),
take
(
1
),
untilDestroyed
(
this
)).
subscribe
((
s
tate
)
=>
{
if
(
!
s
tate
.
areLoaded
)
{
this
.
store$
.
pipe
(
select
(
selectPreferencesState
),
take
(
1
),
untilDestroyed
(
this
)).
subscribe
((
preferencesS
tate
)
=>
{
if
(
!
preferencesS
tate
.
areLoaded
)
{
return
;
}
const
existingPreferredColumns
=
s
tate
.
preferences
.
tableDisplayedColumns
||
[];
const
existingPreferredColumns
=
preferencesS
tate
.
preferences
.
tableDisplayedColumns
||
[];
const
preferredColumns
=
existingPreferredColumns
.
filter
((
column
)
=>
{
return
column
.
title
!==
this
.
title
;
});
...
...
@@ -1124,9 +1124,9 @@ export class EntityTableComponent<Row extends SomeRow = SomeRow> implements OnIn
// Bring warnings to user's attention even if state is finished or successful.
if
(
row
.
warnings
&&
row
.
warnings
.
length
>
0
)
return
'
fn-theme-orange
'
;
const
state
:
J
obState
=
row
.
state
;
const
j
obState
=
row
.
state
;
switch
(
s
tate
)
{
switch
(
jobS
tate
)
{
case
JobState
.
Pending
:
case
JobState
.
Running
:
case
JobState
.
Aborted
:
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/entity/table/expandable-table/expandable-table.component.html
View file @
9e5ed81c
...
...
@@ -65,7 +65,7 @@
>
<div>
<a
[routerLink]=
"tableConf.detailsHref.split('/')"
>
{{ 'View
Details
' | translate }}
{{ 'View
All
' | translate }}
</a>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/ix-drop-grid/ix-drop-grid.directive.spec.ts
View file @
9e5ed81c
...
...
@@ -39,7 +39,7 @@ describe('IxDropGridDirective', () => {
],
});
function
setupMocks
(
spectator
:
SpectatorDirective
<
IxDropGridDirective
>
):
void
{
function
setupMocks
():
void
{
resolveAndCreateOriginal
=
ReflectiveInjector
.
resolveAndCreate
;
ReflectiveInjector
.
resolveAndCreate
=
jest
.
fn
().
mockReturnValue
(
fakeInjector
);
...
...
@@ -62,7 +62,7 @@ describe('IxDropGridDirective', () => {
describe
(
'
ngOnInit()
'
,
()
=>
{
beforeEach
(()
=>
{
spectator
=
createDirective
(
null
,
{
detectChanges
:
false
});
setupMocks
(
spectator
);
setupMocks
();
});
afterEach
(()
=>
{
...
...
@@ -83,7 +83,7 @@ describe('IxDropGridDirective', () => {
describe
(
'
registerPlaceholder()
'
,
()
=>
{
beforeEach
(()
=>
{
spectator
=
createDirective
(
null
,
{
detectChanges
:
false
});
setupMocks
(
spectator
);
setupMocks
();
});
afterEach
(()
=>
{
restoreMocks
();
...
...
@@ -98,7 +98,7 @@ describe('IxDropGridDirective', () => {
describe
(
'
registerItem()
'
,
()
=>
{
beforeEach
(()
=>
{
spectator
=
createDirective
(
null
,
{
detectChanges
:
false
});
setupMocks
(
spectator
);
setupMocks
();
});
afterEach
(()
=>
{
restoreMocks
();
...
...
@@ -157,7 +157,7 @@ describe('IxDropGridDirective', () => {
beforeEach
(()
=>
{
spectator
=
createDirective
(
null
,
{
detectChanges
:
false
});
setupMocks
(
spectator
);
setupMocks
();
const
fakeSourceParentElement
=
{
removeChild
:
jest
.
fn
(),
...
...
@@ -343,7 +343,7 @@ describe('IxDropGridDirective', () => {
beforeEach
(()
=>
{
spectator
=
createDirective
(
null
,
{
detectChanges
:
false
});
setupMocks
(
spectator
);
setupMocks
();
fakeParentElement
=
{
appendChild
:
jest
.
fn
(),
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/layout/components/change-password-dialog/change-password-dialog.component.spec.ts
View file @
9e5ed81c
...
...
@@ -40,8 +40,8 @@ describe('ChangePasswordDialogComponent', () => {
});
it
(
'
checks current user password and shows an error if it is not correct
'
,
async
()
=>
{
const
mockW
ebsocket
=
spectator
.
inject
(
MockWebsocketService
);
mockW
ebsocket
.
mockCallOnce
(
'
auth.check_user
'
,
false
);
const
w
ebsocket
Mock
=
spectator
.
inject
(
MockWebsocketService
);
w
ebsocket
Mock
.
mockCallOnce
(
'
auth.check_user
'
,
false
);
const
form
=
await
loader
.
getHarness
(
IxFormHarness
);
await
form
.
fillForm
({
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/layout/components/topbar/directory-services-indicator/directory-services-indicator.component.spec.ts
View file @
9e5ed81c
...
...
@@ -65,8 +65,8 @@ describe('DirectoryServicesIndicatorComponent', () => {
const
icon
=
spectator
.
query
(
'
button
'
);
expect
(
icon
).
toExist
();
const
mockW
ebsocket
=
spectator
.
inject
(
MockWebsocketService
);
mockW
ebsocket
.
subscribe
.
mockImplementation
(()
=>
of
({
const
w
ebsocket
Mock
=
spectator
.
inject
(
MockWebsocketService
);
w
ebsocket
Mock
.
subscribe
.
mockImplementation
(()
=>
of
({
fields
:
{
activedirectory
:
DirectoryServiceState
.
Disabled
,
ldap
:
DirectoryServiceState
.
Disabled
,
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/account/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts
View file @
9e5ed81c
...
...
@@ -71,8 +71,8 @@ describe('DeleteUserDialogComponent', () => {
});
it
(
'
shows Delete primary group checkbox if this is the last user in the group
'
,
async
()
=>
{
const
mockW
ebsocket
=
spectator
.
inject
(
MockWebsocketService
);
mockW
ebsocket
.
mockCall
(
'
group.query
'
,
[
const
w
ebsocket
Mock
=
spectator
.
inject
(
MockWebsocketService
);
w
ebsocket
Mock
.
mockCall
(
'
group.query
'
,
[
{
users
:
[
1
],
},
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/applications/chart-releases/chart-releases.component.ts
View file @
9e5ed81c
...
...
@@ -296,18 +296,18 @@ export class ChartReleasesComponent implements AfterViewInit, OnInit, OnDestroy
}
as
ChartUpgradeDialogConfig
,
});
dialogRef
.
afterClosed
().
pipe
(
filter
(
Boolean
),
untilDestroyed
(
this
)).
subscribe
((
version
)
=>
{
const
d
ialogRef
=
this
.
mdDialog
.
open
(
EntityJobComponent
,
{
const
jobD
ialogRef
=
this
.
mdDialog
.
open
(
EntityJobComponent
,
{
data
:
{
title
:
helptext
.
charts
.
upgrade_dialog
.
job
,
},
});
d
ialogRef
.
componentInstance
.
setCall
(
'
chart.release.upgrade
'
,
[
name
,
{
item_version
:
version
}]);
d
ialogRef
.
componentInstance
.
submit
();
d
ialogRef
.
componentInstance
.
success
.
pipe
(
untilDestroyed
(
this
)).
subscribe
(()
=>
{
jobD
ialogRef
.
componentInstance
.
setCall
(
'
chart.release.upgrade
'
,
[
name
,
{
item_version
:
version
}]);
jobD
ialogRef
.
componentInstance
.
submit
();
jobD
ialogRef
.
componentInstance
.
success
.
pipe
(
untilDestroyed
(
this
)).
subscribe
(()
=>
{
this
.
dialogService
.
closeAllDialogs
();
this
.
refreshChartReleases
();
});
d
ialogRef
.
componentInstance
.
failure
.
pipe
(
untilDestroyed
(
this
)).
subscribe
((
error
)
=>
{
jobD
ialogRef
.
componentInstance
.
failure
.
pipe
(
untilDestroyed
(
this
)).
subscribe
((
error
)
=>
{
this
.
dialogService
.
closeAllDialogs
();
new
EntityUtils
().
handleWsError
(
this
,
error
,
this
.
dialogService
);
});
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/applications/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.ts
View file @
9e5ed81c
...
...
@@ -50,13 +50,13 @@ export class DockerImageDeleteDialogComponent {
onSubmit
():
void
{
const
{
force
}
=
this
.
form
.
value
;
const
p
arams
=
this
.
images
.
map
((
image
)
=>
[
image
.
id
,
{
force
}]);
const
deleteP
arams
=
this
.
images
.
map
((
image
)
=>
[
image
.
id
,
{
force
}]);
this
.
images
.
forEach
((
image
)
=>
{
this
.
bulkItems
.
set
(
image
.
id
,
{
state
:
BulkListItemState
.
Running
,
item
:
image
});
});
this
.
ws
.
job
(
'
core.bulk
'
,
[
'
container.image.delete
'
,
p
arams
]).
pipe
(
this
.
ws
.
job
(
'
core.bulk
'
,
[
'
container.image.delete
'
,
deleteP
arams
]).
pipe
(
filter
((
job
:
Job
<
CoreBulkResponse
<
void
>
[],
DeleteContainerImageParams
[]
>
)
=>
!!
job
.
result
),
untilDestroyed
(
this
),
).
subscribe
((
response
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/applications/manage-catalogs/manage-catalogs.component.ts
View file @
9e5ed81c
...
...
@@ -117,10 +117,10 @@ export class ManageCatalogsComponent implements EntityTableConfig<Catalog>, OnIn
this
.
entityList
=
entityList
;
}
getActions
(
row
:
Catalog
):
EntityTableAction
[]
{
getActions
(
catalog
:
Catalog
):
EntityTableAction
[]
{
return
[
{
id
:
row
.
id
,
id
:
catalog
.
id
,
icon
:
'
edit
'
,
label
:
helptext
.
manageCatalogs
.
menu
.
edit
,
name
:
'
edit
'
,
...
...
@@ -129,7 +129,7 @@ export class ManageCatalogsComponent implements EntityTableConfig<Catalog>, OnIn
},
},
{
id
:
row
.
id
,
id
:
catalog
.
id
,
icon
:
'
refresh
'
,
label
:
helptext
.
manageCatalogs
.
menu
.
refresh
,
name
:
'
refresh
'
,
...
...
@@ -138,17 +138,17 @@ export class ManageCatalogsComponent implements EntityTableConfig<Catalog>, OnIn
},
},
{
id
:
row
.
id
,
id
:
catalog
.
id
,
icon
:
'
delete
'
,
label
:
helptext
.
manageCatalogs
.
menu
.
delete
,
name
:
'
delete
'
,
disabled
:
row
.
builtin
,
disabled
:
catalog
.
builtin
,
onClick
:
(
row
:
Catalog
)
=>
{
this
.
entityList
.
doDelete
(
row
);
},
},
{
id
:
row
.
id
,
id
:
catalog
.
id
,
icon
:
'
summary
'
,
label
:
helptext
.
manageCatalogs
.
menu
.
summary
,
name
:
'
summary
'
,
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.spec.ts
View file @
9e5ed81c
...
...
@@ -160,8 +160,8 @@ describe('CloudCredentialsFormComponent', () => {
});
it
(
'
shows an error when verification fails
'
,
async
()
=>
{
const
mockW
ebsocket
=
spectator
.
inject
(
MockWebsocketService
);
mockW
ebsocket
.
mockCall
(
'
cloudsync.credentials.verify
'
,
{
const
w
ebsocket
Mock
=
spectator
.
inject
(
MockWebsocketService
);
w
ebsocket
Mock
.
mockCall
(
'
cloudsync.credentials.verify
'
,
{
valid
:
false
,
excerpt
:
'
Missing some important field
'
,
error
:
'
Some error
'
,
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/one-drive-provider-form/one-drive-provider-form.component.ts
View file @
9e5ed81c
...
...
@@ -84,14 +84,14 @@ export class OneDriveProviderFormComponent extends BaseProviderFormComponent imp
private
setupDriveSelect
():
void
{
this
.
form
.
controls
.
drives
.
valueChanges
.
pipe
(
untilDestroyed
(
this
)).
subscribe
((
driveId
)
=>
{
const
d
rive
=
this
.
drives
.
find
((
drive
)
=>
drive
.
drive_id
===
driveId
);
if
(
!
d
rive
)
{
const
selectedD
rive
=
this
.
drives
.
find
((
drive
)
=>
drive
.
drive_id
===
driveId
);
if
(
!
selectedD
rive
)
{
return
;
}
this
.
form
.
patchValue
({
drive_type
:
d
rive
.
drive_type
,
drive_id
:
d
rive
.
drive_id
,
drive_type
:
selectedD
rive
.
drive_type
,
drive_id
:
selectedD
rive
.
drive_id
,
});
});
}
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/credentials/certificates-dash/forms/ca-add.component.ts
View file @
9e5ed81c
...
...
@@ -630,9 +630,9 @@ export class CertificateAuthorityAddComponent implements WizardConfiguration {
getSummaryValueLabel
(
fieldConfig
:
FieldConfig
,
value
:
unknown
):
unknown
{
if
(
fieldConfig
.
type
===
'
select
'
)
{
const
o
ption
=
fieldConfig
.
options
.
find
((
option
)
=>
option
.
value
===
value
);
if
(
o
ption
)
{
value
=
o
ption
.
label
;
const
selectedO
ption
=
fieldConfig
.
options
.
find
((
option
)
=>
option
.
value
===
value
);
if
(
selectedO
ption
)
{
value
=
selectedO
ption
.
label
;
}
}
...
...
@@ -642,11 +642,10 @@ export class CertificateAuthorityAddComponent implements WizardConfiguration {
addToSummary
(
fieldName
:
string
):
void
{
const
fieldConfig
=
this
.
getTarget
(
fieldName
);
if
(
!
fieldConfig
.
isHidden
)
{
const
fieldName
=
fieldConfig
.
name
;
if
(
fieldConfig
.
value
!==
undefined
)
{
this
.
summary
[
fieldConfig
.
placeholder
]
=
this
.
getSummaryValueLabel
(
fieldConfig
,
fieldConfig
.
value
);
}
this
.
getField
(
field
N
ame
).
valueChanges
.
pipe
(
untilDestroyed
(
this
)).
subscribe
((
res
)
=>
{
this
.
getField
(
field
Config
.
n
ame
).
valueChanges
.
pipe
(
untilDestroyed
(
this
)).
subscribe
((
res
)
=>
{
this
.
summary
[
fieldConfig
.
placeholder
]
=
this
.
getSummaryValueLabel
(
fieldConfig
,
res
);
});
}
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
…
9
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help