Skip to content

Commit 2021282

Browse files
gaticigab-arrobo
andauthored
chore: Parameterise webui URL (#70)
* Parameterise webui URL Signed-off-by: gatici <[email protected]> * Update config5g dependency --------- Signed-off-by: gatici <[email protected]> Co-authored-by: Arrobo, Gabriel <[email protected]>
1 parent c3eff69 commit 2021282

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

factory/config.example.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ configuration:
1717
url: http://dummy
1818
authKeysDbName: authentication
1919
authUrl: http://dummy
20+
webuiUri: webui:9876
2021
plmnSupportList:
2122
- plmnId:
2223
mcc: "208"

factory/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type Configuration struct {
4242
Sbi *Sbi `yaml:"sbi"`
4343
Mongodb *Mongodb `yaml:"mongodb"`
4444
NrfUri string `yaml:"nrfUri"`
45+
WebuiUri string `yaml:"webuiUri"`
4546
PlmnSupportList []PlmnSupportItem `yaml:"plmnSupportList,omitempty"`
4647
}
4748

factory/factory.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ func InitConfigFactory(f string) error {
5757
if UdrConfig.Configuration.Mongodb.AuthKeysDbName == "" {
5858
UdrConfig.Configuration.Mongodb.AuthKeysDbName = "authentication"
5959
}
60+
if UdrConfig.Configuration.WebuiUri == "" {
61+
UdrConfig.Configuration.WebuiUri = "webui:9876"
62+
}
6063
roc := os.Getenv("MANAGED_BY_CONFIG_POD")
6164
if roc == "true" {
6265
initLog.Infoln("MANAGED_BY_CONFIG_POD is true")
63-
commChannel := client.ConfigWatcher()
66+
commChannel := client.ConfigWatcher(UdrConfig.Configuration.WebuiUri)
6467
ConfigUpdateDbTrigger = make(chan *UpdateDb, 10)
6568
go UdrConfig.updateConfig(commChannel, ConfigUpdateDbTrigger)
6669
} else {

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/gin-gonic/gin v1.9.1
99
github.com/google/uuid v1.6.0
1010
github.com/mitchellh/mapstructure v1.5.0
11-
github.com/omec-project/config5g v1.3.0
11+
github.com/omec-project/config5g v1.3.1
1212
github.com/omec-project/http2_util v1.2.0
1313
github.com/omec-project/logger_util v1.2.0
1414
github.com/omec-project/openapi v1.2.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v6
8181
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
8282
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
8383
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
84-
github.com/omec-project/config5g v1.3.0 h1:e/oMZlQsef8bOpHT56uAMKIag3epCOW0jpmyadFC+30=
85-
github.com/omec-project/config5g v1.3.0/go.mod h1:h6eaDdWEY7432L9rZAg1Za6HrvFvDWRNolAn5GK/5No=
84+
github.com/omec-project/config5g v1.3.1 h1:hSvFHXh/J0mslsWR82PPnmpF0WzkmLa6AOdvEPve9e8=
85+
github.com/omec-project/config5g v1.3.1/go.mod h1:lN/Jc2BZkE/smOGPCXxeo1dJ7s+s9Wgp34crNLH4YeE=
8686
github.com/omec-project/http2_util v1.2.0 h1:ggQ1GjY2x6VRpKuRhZj0t9dh6eISY6LRBv4rlMD++8s=
8787
github.com/omec-project/http2_util v1.2.0/go.mod h1:KLgvU3o7qmG/i5XO/qITscFql2tWCAmjE6glX+dxe7M=
8888
github.com/omec-project/logger_conf v1.1.1 h1:qo0cF5gnPfth8wy+I/QjiOx+F5jB6h4GLSOdyS+ted8=

0 commit comments

Comments
 (0)