Skip to content

Commit 4740d62

Browse files
committed
fix connection string expansion, css
1 parent 582389e commit 4740d62

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FROM golang:1.17 AS build-go
99
COPY . /src
1010

1111
COPY --from=build-ui /src/ui/public/js/app.js /src/ui/public/js/app.js
12+
COPY --from=build-ui /src/ui/public/js/app.css /src/ui/public/js/app.css
1213
RUN cd /src/ && go build -x -ldflags "-linkmode external -extldflags -static"
1314

1415
FROM alpine:3

api/data_connections.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ func (api *API) ReadDataConnection(id string) (*config.DataConnection, error) {
2020
if err != nil {
2121
return nil, err
2222
}
23+
conn.ExpandConnectionString()
2324
return conn, nil
2425
}

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type DataSource struct {
4141
Query string `yaml:"query" json:"query"`
4242
}
4343

44-
func (dc *DataConnection) expandConnectionString() {
44+
func (dc *DataConnection) ExpandConnectionString() {
4545
if strings.HasPrefix(dc.ConnectionString, "$") {
4646
dc.ConnectionString = os.ExpandEnv(dc.ConnectionString)
4747
}
@@ -92,7 +92,7 @@ func (c *Config) Parse(content []byte, dir string) error {
9292
}
9393

9494
for i, dataConnection := range c.DataConnections {
95-
dataConnection.expandConnectionString()
95+
dataConnection.ExpandConnectionString()
9696
if dataConnection.Path != "" {
9797
if !filepath.IsAbs(dataConnection.Path) {
9898
c.DataConnections[i].Path = filepath.Join(dir, dataConnection.Path)

0 commit comments

Comments
 (0)