Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webconsole
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pqc-free5gc
webconsole
Commits
f065f12b
Unverified
Commit
f065f12b
authored
1 year ago
by
CTFang@WireLab
Browse files
Options
Downloads
Patches
Plain Diff
feat: frontend set staticIp UI
parent
d0662ae8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/pages/SubscriberCreate.tsx
+63
-0
63 additions, 0 deletions
frontend/src/pages/SubscriberCreate.tsx
with
63 additions
and
0 deletions
frontend/src/pages/SubscriberCreate.tsx
+
63
−
0
View file @
f065f12b
...
...
@@ -9,6 +9,7 @@ import {
DnnConfiguration
,
AccessAndMobilitySubscriptionData
,
QosFlows
,
IpAddress
,
}
from
"
../api/api
"
;
import
Dashboard
from
"
../Dashboard
"
;
...
...
@@ -28,7 +29,10 @@ import {
TableCell
,
TableRow
,
TextField
,
FormControlLabel
,
Switch
,
}
from
"
@mui/material
"
;
import
{
RawOff
}
from
"
@mui/icons-material
"
;
let
isNewSubscriber
=
false
;
...
...
@@ -117,6 +121,7 @@ export default function SubscriberCreate() {
uplink
:
"
1000 Mbps
"
,
downlink
:
"
1000 Mbps
"
,
},
staticIpAddress
:
[],
},
},
},
...
...
@@ -148,6 +153,7 @@ export default function SubscriberCreate() {
uplink
:
"
1000 Mbps
"
,
downlink
:
"
1000 Mbps
"
,
},
staticIpAddress
:
[],
},
},
},
...
...
@@ -997,6 +1003,17 @@ export default function SubscriberCreate() {
setData
({
...
data
});
}
;
const handleChangeStaticIp = (
event: React.ChangeEvent
<
HTMLInputElement
|
HTMLTextAreaElement
>
,
index: number,
dnn: string,
): void =>
{
data
.
SessionManagementSubscriptionData
!
[
index
].
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]
!
[
0
].
ipv4Addr
=
event
.
target
.
value
;
setData
({
...
data
});
}
;
const handleChangeFilter = (
event: React.ChangeEvent
<
HTMLInputElement
|
HTMLTextAreaElement
>
,
dnn: string,
...
...
@@ -1854,6 +1871,52 @@ export default function SubscriberCreate() {
</
TableRow
>
</
TableBody
>
</
Table
>
<
Table
>
<
TableBody
>
<
TableRow
>
<
TableCell
style
=
{
{
width
:
"
33%
"
}
}
>
<
FormControlLabel
style
=
{
{
justifyItems
:
"
end
"
}
}
control
=
<
Switch
checked
=
{
row
.
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]?.
length
!=
0
}
onChange
=
{
(
event
)
=>
{
if
(
event
.
target
.
checked
)
{
var
ipaddr
:
IpAddress
=
{
ipv4Addr
:
"
10.60.0.1
"
};
data
.
SessionManagementSubscriptionData
!
[
index
].
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]
=
[
ipaddr
];
}
else
{
data
.
SessionManagementSubscriptionData
!
[
index
].
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]
=
[];
}
setData
({
...
data
});
}
}
/>
label="Static IPv4 Address"
/>
</
TableCell
>
<
TableCell
style
=
{
{
width
:
"
66%
"
}
}
>
<
TextField
label
=
"StaticIpv4"
variant
=
"outlined"
fullWidth
disabled
=
{
row
.
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]?.
length
==
0
}
value
=
{
row
.
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]?.
length
!=
0
?
row
.
dnnConfigurations
!
[
dnn
][
"
staticIpAddress
"
]
!
[
0
].
ipv4Addr
!
:
""
}
onChange
=
{
(
ev
)
=>
handleChangeStaticIp
(
ev
,
index
,
dnn
)
}
/>
</
TableCell
>
</
TableRow
>
</
TableBody
>
</
Table
>
{
chargingConfig
(
dnn
,
row
.
singleNssai
!
,
undefined
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment