Skip to content
Snippets Groups Projects
Unverified Commit b652f997 authored by Ian Chen's avatar Ian Chen Committed by GitHub
Browse files

changed to read local config file (#17)


Co-authored-by: default avatarIan Chen <ychen.cs10@nycu.edu.tw>
parent a1e0a86a
Branches
No related tags found
No related merge requests found
......@@ -2,14 +2,12 @@ package webui_service
import (
"github.com/gin-gonic/gin"
"github.com/free5gc/path_util"
)
var PublicPath string
func init() {
PublicPath = path_util.Free5gcPath("free5gc/webconsole/public")
PublicPath = "public"
}
func ReturnPublic() gin.HandlerFunc {
......
......@@ -13,7 +13,6 @@ import (
"github.com/free5gc/MongoDBLibrary"
mongoDBLibLogger "github.com/free5gc/MongoDBLibrary/logger"
openApiLogger "github.com/free5gc/openapi/logger"
"github.com/free5gc/path_util"
pathUtilLogger "github.com/free5gc/path_util/logger"
"github.com/free5gc/webconsole/backend/WebUI"
"github.com/free5gc/webconsole/backend/factory"
......@@ -63,8 +62,7 @@ func (webui *WEBUI) Initialize(c *cli.Context) {
panic(err)
}
} else {
DefaultWebUIConfigPath := path_util.Free5gcPath("free5gc/config/webuicfg.yaml")
if err := factory.InitConfigFactory(DefaultWebUIConfigPath); err != nil {
if err := factory.InitConfigFactory("./config/webuicfg.yaml"); err != nil {
panic(err)
}
}
......@@ -189,8 +187,6 @@ func (webui *WEBUI) Start() {
}
func (webui *WEBUI) Exec(c *cli.Context) error {
// WEBUI.Initialize(cfgPath, c)
initLog.Traceln("args:", c.String("webuicfg"))
args := webui.FilterCli(c)
initLog.Traceln("filter: ", args)
......
info:
version: 1.0.0
description: WebUI initial local configuration
configuration:
mongodb: # the mongodb connected by this webui
name: free5gc # name of the mongodb
url: mongodb://localhost:27017 # a valid URL of the mongodb
# the kind of log output
# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic
# ReportCaller: enable the caller report or not, value: true or false
logger:
WEBUI:
debugLevel: info
ReportCaller: true
PathUtil:
debugLevel: info
ReportCaller: false
OpenApi:
debugLevel: info
ReportCaller: false
MongoDBLibrary:
debugLevel: info
ReportCaller: false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment