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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pqc-free5gc
webconsole
Commits
f2ed194a
Unverified
Commit
f2ed194a
authored
1 year ago
by
Ian Chen
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #79 from yccodr/billing-disable
Disable Billing Server If Needed
parents
c5938bf9
f47d82ef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/factory/config.go
+1
-0
1 addition, 0 deletions
backend/factory/config.go
backend/webui_service/webui_init.go
+7
-4
7 additions, 4 deletions
backend/webui_service/webui_init.go
config/webuicfg.yaml
+1
-0
1 addition, 0 deletions
config/webuicfg.yaml
with
9 additions
and
4 deletions
backend/factory/config.go
+
1
−
0
View file @
f2ed194a
...
...
@@ -64,6 +64,7 @@ type Tls struct {
}
type
BillingServer
struct
{
Enable
bool
`yaml:"enable" valid:"type(bool), default(true)"`
HostIPv4
string
`yaml:"hostIPv4,omitempty" valid:"required,host"`
Port
int
`yaml:"port,omitempty" valid:"optional,port"`
ListenPort
int
`yaml:"listenPort,omitempty" valid:"required,port"`
...
...
This diff is collapsed.
Click to expand it.
backend/webui_service/webui_init.go
+
7
−
4
View file @
f2ed194a
...
...
@@ -77,6 +77,7 @@ func (a *WebuiApp) Start(tlsKeyLogPath string) {
// get config file info from WebUIConfig
mongodb
:=
factory
.
WebuiConfig
.
Configuration
.
Mongodb
webServer
:=
factory
.
WebuiConfig
.
Configuration
.
WebServer
billingServer
:=
factory
.
WebuiConfig
.
Configuration
.
BillingServer
// Connect to MongoDB
if
err
:=
mongoapi
.
SetMongoDB
(
mongodb
.
Name
,
mongodb
.
Url
);
err
!=
nil
{
...
...
@@ -135,11 +136,13 @@ func (a *WebuiApp) Start(tlsKeyLogPath string) {
self
.
UpdateNfProfiles
()
wg
:=
sync
.
WaitGroup
{}
wg
.
Add
(
1
)
self
.
BillingServer
=
billing
.
OpenServer
(
&
wg
)
if
self
.
BillingServer
==
nil
{
logger
.
InitLog
.
Errorln
(
"Billing Server open error."
)
if
billingServer
.
Enable
{
wg
.
Add
(
1
)
self
.
BillingServer
=
billing
.
OpenServer
(
&
wg
)
if
self
.
BillingServer
==
nil
{
logger
.
InitLog
.
Errorln
(
"Billing Server open error."
)
}
}
router
.
NoRoute
(
ReturnPublic
())
...
...
This diff is collapsed.
Click to expand it.
config/webuicfg.yaml
+
1
−
0
View file @
f2ed194a
...
...
@@ -12,6 +12,7 @@ configuration:
ipv4Address
:
0.0.0.0
port
:
5000
billingServer
:
enable
:
true
hostIPv4
:
127.0.0.1
listenPort
:
2122
port
:
2121
...
...
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