Skip to content

Commit

Permalink
Merge branch 'reloaded' into site-creation-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
th0th authored Dec 18, 2024
2 parents 1ef7c48 + be9f298 commit a8e6210
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 30 deletions.
18 changes: 10 additions & 8 deletions chart/templates/statefulset-clickhouse.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "poeticmetric.fullname" . }}-clickhouse
labels:
{{ include "poeticmetric.labels" . | nindent 4 }}
name: {{ include "poeticmetric.fullname" . }}-clickhouse
spec:
{{ if .Values.clickhouse.persistence.enabled }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
{{ end }}
replicas: 1
selector:
matchLabels:
Expand Down Expand Up @@ -43,8 +48,8 @@ spec:
name: clickhouse
resources: {{ toYaml .Values.clickhouse.resources | nindent 10 }}
volumeMounts:
- name: configmap-clickhouse
mountPath: /etc/clickhouse-server/config.d/custom_config.xml
- mountPath: /etc/clickhouse-server/config.d/custom_config.xml
name: configmap-clickhouse
subPath: CONFIG
{{ if .Values.clickhouse.persistence.enabled }}
- mountPath: /var/lib/clickhouse/
Expand All @@ -56,12 +61,9 @@ spec:
name: {{ include "poeticmetric.fullname" . }}-clickhouse
name: configmap-clickhouse
{{ if .Values.clickhouse.persistence.enabled }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
spec:
Expand Down
16 changes: 10 additions & 6 deletions chart/templates/statefulset-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
{{ include "poeticmetric.labels" . | nindent 4 }}
name: {{ include "poeticmetric.fullname" . }}-postgres
spec:
{{ if .Values.postgres.persistence.enabled }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
{{ end }}
replicas: 1
selector:
matchLabels:
Expand Down Expand Up @@ -42,17 +47,16 @@ spec:
imagePullPolicy: {{ .Values.postgres.image.pullPolicy }}
name: postgres
resources: {{ toYaml .Values.postgres.resources | nindent 10 }}
{{ if .Values.postgres.persistence.enabled }}
{{ if .Values.postgres.persistence.enabled }}
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data
subPath: postgres
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
{{ end }}
{{ if .Values.postgres.persistence.enabled }}
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
spec:
Expand Down
8 changes: 5 additions & 3 deletions chart/templates/statefulset-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
{{ include "poeticmetric.labels" . | nindent 4 }}
name: {{ include "poeticmetric.fullname" . }}-redis
spec:
{{ if .Values.redis.persistence.enabled }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
{{ end }}
replicas: 1
selector:
matchLabels:
Expand Down Expand Up @@ -36,9 +41,6 @@ spec:
subPath: redis
{{ end }}
{{ if .Values.redis.persistence.enabled }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Error from "~/components/Error";
import Home from "~/components/Home";
import Manifesto from "~/components/Manifesto";
import PasswordRecovery from "~/components/PasswordRecovery";
import PasswordReset from "~/components/PasswordReset";
import SignIn from "~/components/SignIn";

export default function App() {
Expand All @@ -16,6 +17,7 @@ export default function App() {
<Route component={Home} path="/" />
<Route component={Manifesto} path="/manifesto" />
<Route component={PasswordRecovery} path="/forgot-password" />
<Route component={PasswordReset} path="/password-reset" />
<Route component={SignIn} path="/sign-in" />

<Route>
Expand Down
30 changes: 21 additions & 9 deletions frontend/src/components/Bootstrap/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IconX } from "@tabler/icons-react";
import clsx from "clsx";
import { useEffect, useState } from "react";
import { useErrorBoundary } from "react-error-boundary";
Expand Down Expand Up @@ -155,11 +156,19 @@ export default function Bootstrap() {
<ActivityOverlay isActive={isSubmitting}>
<form className="card-body" onSubmit={handleSubmit(submit)}>
<fieldset className="fieldset" disabled={isSubmitting}>
{errors.root ? (
<div className="alert alert-danger">
<IconX className="icon" size={24} />

{errors.root.message}
</div>
) : null}

<div className="form-group">
<label className="form-label" htmlFor="input-user-name">Full name</label>

<input
className={clsx("input", errors.userName && "input-invalid")}
className={clsx("input", !!errors.userName || !!errors.root && "input-invalid")}
id="input-user-name"
required
{...register("userName")}
Expand All @@ -172,7 +181,7 @@ export default function Bootstrap() {
<label className="form-label" htmlFor="input-user-email">E-mail address</label>

<input
className={clsx("input", errors.userEmail && "input-invalid")}
className={clsx("input", !!errors.userEmail || !!errors.root && "input-invalid")}
id="input-user-email"
required
type="email"
Expand All @@ -183,10 +192,11 @@ export default function Bootstrap() {
</div>

<div className="form-group">
<label className="form-label">New password</label>
<label className="form-label" htmlFor="input-user-password">New password</label>

<input
className={clsx("input", errors.userPassword && "input-invalid")}
className={clsx("input", !!errors.userPassword || !!errors.root && "input-invalid")}
id="input-user-password"
required
type="password"
{...register("userPassword")}
Expand All @@ -196,10 +206,11 @@ export default function Bootstrap() {
</div>

<div className="form-group">
<label className="form-label">New password (again)</label>
<label className="form-label" htmlFor="input-user-password2">New password (again)</label>

<input
className={clsx("input", errors.userPassword2 && "input-invalid")}
className={clsx("input", !!errors.userPassword2 || !!errors.root && "input-invalid")}
id="input-user-password2"
required
type="password"
{...register("userPassword2")}
Expand All @@ -209,10 +220,11 @@ export default function Bootstrap() {
</div>

<div className="form-group">
<label className="form-label">Organization</label>
<label className="form-label" htmlFor="input-organization-name">Organization</label>

<input
className={clsx("input", errors.organizationName && "input-invalid")}
className={clsx("input", !!errors.organizationName || !!errors.root && "input-invalid")}
id="input-organization-name"
required
{...register("organizationName")}
/>
Expand All @@ -223,7 +235,7 @@ export default function Bootstrap() {
<div className="form-group">
<div className="form-group-inline">
<input
className={clsx(errors.createDemoSite && "input-invalid")}
className={clsx(!!errors.createDemoSite || !!errors.root && "input-invalid")}
id="input-create-demo-site"
type="checkbox"
{...register("createDemoSite")}
Expand Down
24 changes: 24 additions & 0 deletions frontend/src/components/PasswordReset/PasswordReset.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import "~/styles/media.css";

.card {
margin-inline: auto;
margin-top: 2rem;
max-width: 28rem;
}

.visually-hidden {
display: none;
}

@media (--min-md) and (orientation: landscape) {
.layout {
display: grid;
flex-grow: 1;
grid-template-rows: repeat(3, 1fr);

> :global(.container) {
align-self: center;
grid-row: 2 span / 3;
}
}
}
Loading

0 comments on commit a8e6210

Please sign in to comment.