Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/dashboard/non-majors…
Browse files Browse the repository at this point in the history
…-5d1e29067b
  • Loading branch information
eyemono-moe authored Jul 16, 2024
2 parents 4d93108 + f665eaf commit ce53d1c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ FROM --platform=$BUILDPLATFORM builder AS builder-ns
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build \
go build -o /app/ns -ldflags "-s -w -X main.version=$APP_VERSION -X main.revision=$APP_REVISION" ./cmd

FROM alpine:3 as base
FROM alpine:3 AS base
WORKDIR /app

ARG APP_VERSION=dev
ARG APP_REVISION=local
ENV APP_VERSION=$APP_VERSION
ENV APP_REVISION=$APP_REVISION

FROM base as ns-migrate
FROM base AS ns-migrate

COPY ./migrations/entrypoint.sh ./
COPY ./migrations/schema.sql ./
Expand All @@ -50,20 +50,20 @@ FROM base AS ns
COPY --from=builder-ns /app/ns ./
ENTRYPOINT ["/app/ns"]

FROM ns as ns-auth-dev
FROM ns AS ns-auth-dev
ENTRYPOINT ["/app/ns", "auth-dev"]

FROM ns as ns-builder
FROM ns AS ns-builder
ENTRYPOINT ["/app/ns", "builder"]

FROM ns as ns-controller
FROM ns AS ns-controller
ENTRYPOINT ["/app/ns", "controller"]

FROM ns as ns-gateway
FROM ns AS ns-gateway
ENTRYPOINT ["/app/ns", "gateway"]

FROM ns as ns-gitea-integration
FROM ns AS ns-gitea-integration
ENTRYPOINT ["/app/ns", "gitea-integration"]

FROM ns as ns-ssgen
FROM ns AS ns-ssgen
ENTRYPOINT ["/app/ns", "ssgen"]
16 changes: 12 additions & 4 deletions dashboard/src/pages/apps/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ const WebsiteStep: Component<{
backToGeneralStep: () => void
submit: () => Promise<void>
}> = (props) => {
const [isSubmitting, setIsSubmitting] = createSignal(false)
const addWebsiteForm = () => {
const form = createFormStore<WebsiteFormStatus>({
initialValues: {
Expand All @@ -437,9 +438,16 @@ const WebsiteStep: Component<{
}

const handleSubmit = async () => {
const isValid = (await Promise.all(props.websiteForms().map((form) => validate(form)))).every((v) => v)
if (!isValid) return
await props.submit()
try {
const isValid = (await Promise.all(props.websiteForms().map((form) => validate(form)))).every((v) => v)
if (!isValid) return
setIsSubmitting(true)
await props.submit()
} catch (err) {
console.error(err)
} finally {
setIsSubmitting(false)
}
}

return (
Expand Down Expand Up @@ -500,6 +508,7 @@ const WebsiteStep: Component<{
size="medium"
variants="primary"
onClick={handleSubmit}
disabled={isSubmitting()}
// TODO: hostが空の状態でsubmitして一度requiredエラーが出たあとhostを入力してもエラーが消えない
// disabled={props.websiteForms().some((form) => form.invalid)}
>
Expand Down Expand Up @@ -589,7 +598,6 @@ export default () => {
setCurrentStep(formStep.repository)
// 選択していたリポジトリをリセットする
setParam({ repositoryID: undefined })
mutateRepo(undefined)
}
const GoToGeneralStep = () => {
setCurrentStep(formStep.general)
Expand Down

0 comments on commit ce53d1c

Please sign in to comment.