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
fe69f274
Commit
fe69f274
authored
3 years ago
by
AlexKarpov
Browse files
Options
Download
Email Patches
Plain Diff
NAS-114389: Updated feedback
parent
74233e83
base
DOCS
DOCS-3538
NAS-010101
NAS-110777
NAS-110800
NAS-111962-master
NAS-112343
NAS-112995-22.12
NAS-113044
NAS-113464
NAS-113464-alt
NAS-113511
NAS-113903-2
NAS-113904-2
NAS-114098
NAS-114179
NAS-114179-2
NAS-114389
NAS-114447
NAS-114448-bluefin
NAS-114471
NAS-114549
NAS-114554
NAS-114607
NAS-114639
NAS-114659
NAS-114660
NAS-114751
NAS-114769
NAS-114806
NAS-114845
NAS-114846
NAS-114881
NAS-114915
NAS-114950
NAS-115146
NAS-115162
NAS-115254
NAS-115271
NAS-115339
NAS-115340
NAS-115357
NAS-115488
NAS-115546
NAS-115547
NAS-115593
NAS-115593-2
NAS-115593-3
NAS-115593-4
NAS-115593-5
NAS-115593-6
NAS-115593-7
NAS-115713-22-12
NAS-115759
NAS-115759-22.12
NAS-116151
NAS-116162
NAS-116334-1
NAS-116334-2
NAS-116393
NAS-116395
NAS-116397
NAS-116397-2
NAS-116397-3
NAS-116398
NAS-116405
NAS-116406
NAS-116410
NAS-116469
NAS-116715
NAS-116715-mobile
NAS-116715-v2
NAS-116724
NAS-116915
NAS-116916
NAS-117017
NAS-117019
NAS-117028-22.12-BETA.2
NAS-117060
NAS-117098
NAS-117149-22.12
NAS-117216
NAS-117233
NAS-117239
NAS-117253
NAS-117278
NAS-117317
NAS-117323
NAS-117333
NAS-117401
NAS-117439
NAS-117475
NAS-117476
NAS-117481-test
NAS-117520
NAS-117573-v2
NAS-117594
NAS-117628
NAS-117688-bluefin
NAS-117700
NAS-117714
NAS-117718
NAS-117734
NAS-117768
NAS-117813
NAS-117823
NAS-117841-2
NAS-117846
NAS-117959
NAS-118036
NAS-118044
NAS-118113
NAS-118165
NAS-118303
NAS-118454-22.12
NAS-118505-22.12
NAS-118545
NAS-118548
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-120047
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
back
bugfix/NAS-117859-sidebar-menu-fix
bugfix/NAS-117941-error-when-removing-pools-and-visit-datasets
bugfix/NAS-118171-rsynk-task-local-path
bugfix/NAS-118260-boot-env-keep-table-row
bugfix/NAS-118282-search-input-fixes
bugfix/NAS-118404-dataset-icon-role-double-toooltip
bugfix/NAS-118414-warning-modal-icon
bugfix/NAS-118415-tree-select-undefined
bugfix/NAS-118454-acl-manager-after-dataset-creation-fix
bugfix/NAS-118470-multiselext-styles-are-broken
bugfix/NAS-118503-datasets-glitch-fix
bugfix/NAS-118504-redirect-to-correct-dataset-after-permissions-submit
bugfix/NAS-118510-redirect-url-fix-after-manual-change
bugfix/NAS-118530-advanced-settings-box-duplicates
bugfix/NAS-118541-progress-bar-oberflows
bugfix/NAS-118557-replication-task-forbid-custom-retention-policy-cases
bugfix/NAS-118600-smb-share-redirect
bugfix/NAS-118601-remove-mixed-for-zfs-datasets
cpu-pinning
dataset-tree-tooltips
developer/lyy
feature/NAS-117754-font-rendering
feature/NAS-117968-tooltips-to-status-icons-on-pools
feature/NAS-118058-improve-dashboard-icons-sync-pool-and-storage
feature/NAS-118147-html-refactoring
feature/NAS-118269-improve-ui
feature/NAS-118303
feature/NAS-118333-storage-dashboard-icons-update
feature/NAS-118334-screentype-enum
feature/NAS-118335-improve-spinners-look
feature/NAS-118349-datasets-long-names
feature/NAS-118360-handle-clipboard-api-not-available
feature/NAS-118412-pool-processing-modal
feature/NAS-118466-root-path-mnt
feature/NAS-118543-user-password-field
feauture/NAS-117474-datasets-table-header-sticky
l10n_master
llll
master
master-old
metrics-enable
patch-1
patch-235
rel-v0.0.1
release/22.12
release/22.12-BETA.1
release/22.12-BETA.2
release/22.12-RC.1
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-6783-NAS-116405
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-22.12-RC.1
TS-22.12-BETA.2
TS-22.12-BETA.1
TS-22.12-ALPHA.1
TS-12.12.3
DN110M-CS-v2.0
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/app/helpers/options.helper.ts
+7
-1
src/app/helpers/options.helper.ts
src/app/interfaces/api-directory.interface.ts
+2
-2
src/app/interfaces/api-directory.interface.ts
src/app/interfaces/network-configuration.interface.ts
+22
-5
src/app/interfaces/network-configuration.interface.ts
src/app/interfaces/option.interface.ts
+5
-0
src/app/interfaces/option.interface.ts
src/app/modules/ix-forms/components/ix-slide-in/ix-slide-in.component.html
+1
-1
...x-forms/components/ix-slide-in/ix-slide-in.component.html
src/app/pages/network/configuration/configuration.component.ts
+36
-32
...pp/pages/network/configuration/configuration.component.ts
with
73 additions
and
41 deletions
+73
-41
src/app/helpers/options.helper.ts
View file @
fe69f274
import
{
OperatorFunction
}
from
'
rxjs
'
;
import
{
map
}
from
'
rxjs/operators
'
;
import
{
Choices
}
from
'
app/interfaces/choices.interface
'
;
import
{
Option
}
from
'
app/interfaces/option.interface
'
;
import
{
MapOption
,
Option
}
from
'
app/interfaces/option.interface
'
;
export
function
mapToOptions
(
map
:
Map
<
string
,
string
>
):
Option
[]
{
return
Array
.
from
(
map
.
entries
()).
map
(([
value
,
label
])
=>
({
label
,
value
}));
...
...
@@ -12,3 +12,9 @@ export function choicesToOptions(): OperatorFunction<Choices, Option[]> {
return
Object
.
entries
(
choices
).
map
(([
value
,
label
])
=>
({
label
,
value
}));
});
}
export
function
arrayToOptions
():
OperatorFunction
<
MapOption
[],
Option
[]
>
{
return
map
((
choices
)
=>
{
return
choices
.
map
(([
value
,
label
])
=>
({
label
,
value
}));
});
}
This diff is collapsed.
Click to expand it.
src/app/interfaces/api-directory.interface.ts
View file @
fe69f274
...
...
@@ -144,7 +144,6 @@ import { LdapConfig, LdapConfigUpdate, LdapConfigUpdateResult } from 'app/interf
import
{
LldpConfig
,
LldpConfigUpdate
}
from
'
app/interfaces/lldp-config.interface
'
;
import
{
MailConfig
,
MailConfigUpdate
,
SendMailParams
}
from
'
app/interfaces/mail-config.interface
'
;
import
{
NetworkActivityChoice
,
NetworkConfiguration
,
NetworkConfigurationUpdate
,
}
from
'
app/interfaces/network-configuration.interface
'
;
...
...
@@ -155,6 +154,7 @@ import { NfsShare, NfsShareUpdate } from 'app/interfaces/nfs-share.interface';
import
{
CreateNtpServer
,
NtpServer
}
from
'
app/interfaces/ntp-server.interface
'
;
import
{
OpenvpnClientConfig
,
OpenvpnClientConfigUpdate
}
from
'
app/interfaces/openvpn-client-config.interface
'
;
import
{
OpenvpnServerConfig
,
OpenvpnServerConfigUpdate
}
from
'
app/interfaces/openvpn-server-config.interface
'
;
import
{
MapOption
}
from
'
app/interfaces/option.interface
'
;
import
{
PeriodicSnapshotTask
,
PeriodSnapshotTaskUpdate
}
from
'
app/interfaces/periodic-snapshot-task.interface
'
;
import
{
PoolAttachment
}
from
'
app/interfaces/pool-attachment.interface
'
;
import
{
PoolExportParams
}
from
'
app/interfaces/pool-export.interface
'
;
...
...
@@ -583,7 +583,7 @@ export type ApiDirectory = {
// Network
'
network.general.summary
'
:
{
params
:
void
;
response
:
NetworkSummary
};
'
network.configuration.activity_choices
'
:
{
params
:
void
;
response
:
NetworkActivityChoice
[]
};
'
network.configuration.activity_choices
'
:
{
params
:
void
;
response
:
MapOption
[]
};
'
network.configuration.update
'
:
{
params
:
[
NetworkConfigurationUpdate
];
response
:
NetworkConfiguration
};
'
network.configuration.config
'
:
{
params
:
void
;
response
:
NetworkConfiguration
};
...
...
This diff is collapsed.
Click to expand it.
src/app/interfaces/network-configuration.interface.ts
View file @
fe69f274
...
...
@@ -22,6 +22,28 @@ export interface NetworkConfiguration {
state
:
NetworkConfigurationState
;
}
export
interface
NetworkConfigurationConfig
{
domain
:
string
;
domains
:
string
[];
hostname
:
string
;
hostname_b
:
string
;
hostname_virtual
:
string
;
hosts
:
string
[];
httpproxy
:
string
;
ipv4gateway
:
string
;
ipv6gateway
:
string
;
nameserver1
:
string
;
nameserver2
:
string
;
nameserver3
:
string
;
netwait_enabled
:
boolean
;
netwait_ip
:
string
[];
netbios
:
false
;
mdns
:
true
;
wsd
:
true
;
outbound_network_activity
:
NetworkActivityType
;
outbound_network_value
:
string
[];
}
export
interface
NetworkConfigurationState
{
ipv4gateway
:
string
;
ipv6gateway
:
string
;
...
...
@@ -41,11 +63,6 @@ export interface NetworkConfigurationActivity {
activities
:
string
[];
}
export
type
NetworkActivityChoice
=
[
value
:
string
,
label
:
string
,
];
export
interface
NetworkConfigurationUpdate
{
activity
:
NetworkConfigurationActivity
;
domain
:
string
;
...
...
This diff is collapsed.
Click to expand it.
src/app/interfaces/option.interface.ts
View file @
fe69f274
...
...
@@ -3,6 +3,11 @@ export interface Option {
value
:
string
|
number
;
}
export
type
MapOption
=
[
value
:
string
,
label
:
string
,
];
export
interface
RadioOption
extends
Option
{
tooltip
:
string
;
}
This diff is collapsed.
Click to expand it.
src/app/modules/ix-forms/components/ix-slide-in/ix-slide-in.component.html
View file @
fe69f274
<div
class=
"ix-{{id}} ix-slide-in-form
{{wide ? 'wide' : ''}}
"
[class.open]=
"isSlideInOpen"
>
<div
class=
"ix-{{id}} ix-slide-in-form"
[class.open]=
"isSlideInOpen"
[class.wide]=
"wide"
>
<div
class=
"ix-slide-in-body"
>
<ng-template
#body
></ng-template>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/network/configuration/configuration.component.ts
View file @
fe69f274
...
...
@@ -5,12 +5,12 @@ import { Validators } from '@angular/forms';
import
{
FormBuilder
}
from
'
@ngneat/reactive-forms
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
of
}
from
'
rxjs
'
;
import
{
map
}
from
'
rxjs/operators
'
;
import
{
NetworkActivityType
}
from
'
app/enums/network-activity-type.enum
'
;
import
{
ProductType
}
from
'
app/enums/product-type.enum
'
;
import
{
arrayToOptions
}
from
'
app/helpers/options.helper
'
;
import
helptext
from
'
app/helptext/network/configuration/configuration
'
;
import
{
NetworkConfiguration
,
NetworkConfigurationActivity
,
NetworkConfigurationUpdate
,
NetworkConfiguration
,
NetworkConfigurationActivity
,
NetworkConfigurationConfig
,
NetworkConfigurationUpdate
,
}
from
'
app/interfaces/network-configuration.interface
'
;
import
{
ipv4Validator
,
ipv6Validator
}
from
'
app/modules/entity/entity-form/validators/ip-validation
'
;
import
{
EntityUtils
}
from
'
app/modules/entity/utils
'
;
...
...
@@ -41,7 +41,7 @@ export class NetworkConfigurationComponent implements OnInit {
nameserver3
:
[
''
],
ipv4gateway
:
[
''
,
ipv4Validator
()],
ipv6gateway
:
[
''
,
ipv6Validator
()],
outbound_network_activity
:
[
'
DENY
'
],
outbound_network_activity
:
[
NetworkActivityType
.
Deny
],
outbound_network_value
:
[[]
as
string
[]],
httpproxy
:
[
''
],
netwait_enabled
:
[
false
],
...
...
@@ -160,11 +160,7 @@ export class NetworkConfigurationComponent implements OnInit {
fcName
:
'
outbound_network_value
'
,
label
:
''
,
tooltip
:
helptext
.
outbound_network_value
.
tooltip
,
options
:
this
.
ws
.
call
(
'
network.configuration.activity_choices
'
).
pipe
(
map
((
choices
)
=>
{
return
choices
.
map
(([
value
,
label
])
=>
({
label
,
value
}));
}),
),
options
:
this
.
ws
.
call
(
'
network.configuration.activity_choices
'
).
pipe
(
arrayToOptions
()),
hidden
:
true
,
};
...
...
@@ -208,10 +204,7 @@ export class NetworkConfigurationComponent implements OnInit {
this
.
form
.
controls
.
outbound_network_activity
.
valueChanges
.
pipe
(
untilDestroyed
(
this
)).
subscribe
(
(
value
:
NetworkActivityType
)
=>
{
if
(
value
===
NetworkActivityType
.
Allow
||
value
===
NetworkActivityType
.
Deny
)
{
if
([
NetworkActivityType
.
Allow
,
NetworkActivityType
.
Deny
].
includes
(
value
))
{
this
.
outbound_network_value
.
hidden
=
true
;
}
else
{
this
.
outbound_network_value
.
hidden
=
false
;
...
...
@@ -241,24 +234,38 @@ export class NetworkConfigurationComponent implements OnInit {
.
pipe
(
untilDestroyed
(
this
))
.
subscribe
(
(
config
:
NetworkConfiguration
)
=>
{
const
transformed
:
any
=
{
...
config
};
if
(
transformed
.
hosts
&&
transformed
.
hosts
!==
''
)
{
transformed
.
hosts
=
transformed
.
hosts
.
split
(
'
\n
'
);
}
else
{
transformed
.
hosts
=
[];
const
transformed
:
NetworkConfigurationConfig
=
{
hostname
:
config
.
hostname
,
hostname_b
:
config
.
hostname_b
,
hostname_virtual
:
config
.
hostname_virtual
,
domain
:
config
.
domain
,
domains
:
config
.
domains
,
nameserver1
:
config
.
nameserver1
,
nameserver2
:
config
.
nameserver2
,
nameserver3
:
config
.
nameserver3
,
ipv4gateway
:
config
.
ipv4gateway
,
ipv6gateway
:
config
.
ipv6gateway
,
outbound_network_activity
:
NetworkActivityType
.
Allow
,
outbound_network_value
:
[],
httpproxy
:
config
.
httpproxy
,
netwait_enabled
:
config
.
netwait_enabled
,
netwait_ip
:
config
.
netwait_ip
,
hosts
:
[],
netbios
:
config
.
service_announcement
.
netbios
,
mdns
:
config
.
service_announcement
.
mdns
,
wsd
:
config
.
service_announcement
.
wsd
,
};
if
(
config
.
hosts
&&
config
.
hosts
!==
''
)
{
transformed
.
hosts
=
config
.
hosts
.
split
(
'
\n
'
);
}
transformed
.
netbios
=
transformed
.
service_announcement
.
netbios
;
transformed
.
mdns
=
transformed
.
service_announcement
.
mdns
;
transformed
.
wsd
=
transformed
.
service_announcement
.
wsd
;
if
(
transformed
.
activity
)
{
if
(
transformed
.
activity
.
activities
.
length
===
0
)
{
transformed
.
outbound_network_activity
=
transformed
.
activity
.
type
;
}
else
if
(
transformed
.
activity
.
type
===
NetworkActivityType
.
Allow
)
{
transformed
.
outbound_network_activity
=
'
SPECIFIC
'
;
transformed
.
outbound_network_value
=
transformed
.
activity
.
activities
;
if
(
config
.
activity
)
{
if
(
config
.
activity
.
activities
.
length
===
0
)
{
transformed
.
outbound_network_activity
=
config
.
activity
.
type
;
}
else
if
(
config
.
activity
.
type
===
NetworkActivityType
.
Allow
)
{
transformed
.
outbound_network_activity
=
'
SPECIFIC
'
as
NetworkActivityType
;
transformed
.
outbound_network_value
=
config
.
activity
.
activities
;
}
}
...
...
@@ -278,10 +285,7 @@ export class NetworkConfigurationComponent implements OnInit {
const
values
=
this
.
form
.
value
;
let
activity
:
NetworkConfigurationActivity
;
if
(
values
.
outbound_network_activity
===
NetworkActivityType
.
Allow
||
values
.
outbound_network_activity
===
NetworkActivityType
.
Deny
)
{
if
([
NetworkActivityType
.
Allow
,
NetworkActivityType
.
Deny
].
includes
(
values
.
outbound_network_activity
))
{
activity
=
{
type
:
values
.
outbound_network_activity
,
activities
:
[]
};
}
else
{
activity
=
{
type
:
NetworkActivityType
.
Allow
,
activities
:
values
.
outbound_network_value
};
...
...
This diff is collapsed.
Click to expand it.
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