Skip to content

Commit dbed830

Browse files
committed
feat(core): fix dockerfile bug [SO BOTHERING]
1 parent 6f4da11 commit dbed830

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

core/Dockerfile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
1-
FROM node:18.12.1-alpine as build-stage
2-
1+
FROM node:18.12.1-alpine AS build-stage
32
RUN npm i -g pnpm
4-
53
WORKDIR /app
64
COPY ./frontend/package.json ./frontend/pnpm-lock.yaml ./
75
RUN pnpm install
86
COPY ./frontend/ ./
97
RUN pnpm run build
108

11-
12-
FROM golang:1.22.1-alpine3.19 as backend-stage
13-
9+
FROM golang:1.22.1-alpine3.19 AS backend-stage
1410
RUN apk update && apk add --no-cache gcc musl-dev
15-
1611
WORKDIR /app
1712
COPY ./core/go.mod ./core/go.sum ./
1813
RUN go mod download
1914
COPY ./core/ ./
15+
COPY --from=build-stage /app/build/ ./build/
2016
RUN CGO_ENABLED=1 GOOS=linux go build -o /core
2117

2218
FROM alpine:3.19
23-
2419
RUN apk update && apk add --no-cache ca-certificates
25-
2620
WORKDIR /app
2721
COPY --from=backend-stage /core /core
28-
COPY --from=build-stage /app/build/ ./build/
2922

30-
CMD ["/core"]
23+
CMD ["/core"]

core/src/plugins/mysql/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func DB(config *engine.PluginConfig) (*gorm.DB, error) {
1414
charset := common.GetRecordValueOrDefault(config.Credentials.Advanced, "Charset", "utf8mb4")
1515
parseTime := common.GetRecordValueOrDefault(config.Credentials.Advanced, "Parse Time", "True")
1616
loc := common.GetRecordValueOrDefault(config.Credentials.Advanced, "Loc", "Local")
17-
dsn := fmt.Sprintf("%v:%v@tcp(%v:%v)/%v?charset=%v&parseTime=%v&loc=%v", config.Credentials.Username, config.Credentials.Password, config.Credentials.Hostname, config.Credentials.Database, port, charset, parseTime, loc)
17+
dsn := fmt.Sprintf("%v:%v@tcp(%v:%v)/%v?charset=%v&parseTime=%v&loc=%v", config.Credentials.Username, config.Credentials.Password, config.Credentials.Hostname, port, config.Credentials.Database, charset, parseTime, loc)
1818
db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
1919
if err != nil {
2020
return nil, err

frontend/src/config/routes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export const InternalRoutes = {
4343
component: <GraphPage />,
4444
},
4545
RawExecute: {
46-
name: "Raw Execute",
47-
path: "/raw-execute",
46+
name: "Scratchpad",
47+
path: "/scratchpad",
4848
component: <RawExecutePage />,
4949
},
5050
Logout: {

frontend/src/pages/auth/login.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ export const LoginPage: FC = () => {
110110
},
111111
});
112112
}
113+
setHostName("");
114+
setUsername("");
115+
setPassword("");
116+
setDatabase("");
113117
setDatabaseType(item);
114118
setAdvancedForm(item.extra);
115119
}, [getDatabases]);
@@ -179,8 +183,8 @@ export const LoginPage: FC = () => {
179183

180184
return (
181185
<Page className="justify-center items-center">
182-
<div className={twMerge(BASE_CARD_CLASS, "w-fit h-fit transition-all")}>
183-
<div className="flex flex-col justify-between grow gap-4 transition-all">
186+
<div className={twMerge(BASE_CARD_CLASS, "w-fit h-fit")}>
187+
<div className="flex flex-col justify-between grow gap-4">
184188
<div className="flex grow">
185189
<div className="flex flex-col gap-4 grow w-[350px]">
186190
<div className="flex justify-between">
@@ -210,7 +214,10 @@ export const LoginPage: FC = () => {
210214
</div>
211215
}
212216
</div>
213-
<div className="flex justify-between">
217+
<div className={classNames("flex", {
218+
"justify-end": advancedForm == null,
219+
"justify-between": advancedForm != null,
220+
})}>
214221
<AnimatedButton className={classNames({
215222
"hidden": advancedForm == null,
216223
})} icon={Icons.Adjustments} label={showAdvanced ? "Less Advanced" : "Advanced"} onClick={handleAdvancedToggle} />

0 commit comments

Comments
 (0)