fix: more grammar and spelling mistakes

This commit is contained in:
Tam Nguyen
2026-03-30 09:34:27 +11:00
parent 6d17f62942
commit 9a1bee5287
18 changed files with 43 additions and 43 deletions
@@ -40,12 +40,12 @@ interface Props {
type: "application" | "mariadb" | "mongo" | "mysql" | "postgres" | "redis"; type: "application" | "mariadb" | "mongo" | "mysql" | "postgres" | "redis";
} }
const AddRedirectchema = z.object({ const AddRedirectSchema = z.object({
replicas: z.number().min(1, "Replicas must be at least 1"), replicas: z.number().min(1, "Replicas must be at least 1"),
registryId: z.string().optional(), registryId: z.string().optional(),
}); });
type AddCommand = z.infer<typeof AddRedirectchema>; type AddCommand = z.infer<typeof AddRedirectSchema>;
export const ShowClusterSettings = ({ id, type }: Props) => { export const ShowClusterSettings = ({ id, type }: Props) => {
const queryMap = { const queryMap = {
@@ -87,7 +87,7 @@ export const ShowClusterSettings = ({ id, type }: Props) => {
: {}), : {}),
replicas: data?.replicas || 1, replicas: data?.replicas || 1,
}, },
resolver: zodResolver(AddRedirectchema), resolver: zodResolver(AddRedirectSchema),
}); });
useEffect(() => { useEffect(() => {
@@ -37,13 +37,13 @@ import { Separator } from "@/components/ui/separator";
import { Switch } from "@/components/ui/switch"; import { Switch } from "@/components/ui/switch";
import { api } from "@/utils/api"; import { api } from "@/utils/api";
const AddRedirectchema = z.object({ const AddRedirectSchema = z.object({
regex: z.string().min(1, "Regex required"), regex: z.string().min(1, "Regex required"),
permanent: z.boolean().default(false), permanent: z.boolean().default(false),
replacement: z.string().min(1, "Replacement required"), replacement: z.string().min(1, "Replacement required"),
}); });
type AddRedirect = z.infer<typeof AddRedirectchema>; type AddRedirect = z.infer<typeof AddRedirectSchema>;
// Default presets // Default presets
const redirectPresets = [ const redirectPresets = [
@@ -110,7 +110,7 @@ export const HandleRedirect = ({
regex: "", regex: "",
replacement: "", replacement: "",
}, },
resolver: zodResolver(AddRedirectchema), resolver: zodResolver(AddRedirectSchema),
}); });
useEffect(() => { useEffect(() => {
@@ -483,7 +483,7 @@ export const HandleVolumeBackups = ({
</SelectContent> </SelectContent>
</Select> </Select>
<FormDescription> <FormDescription>
Choose the volume to backup, if you dont see the Choose the volume to backup. If you do not see the
volume here, you can type the volume name manually volume here, you can type the volume name manually
</FormDescription> </FormDescription>
<FormMessage /> <FormMessage />
@@ -518,7 +518,7 @@ export const HandleVolumeBackups = ({
</SelectContent> </SelectContent>
</Select> </Select>
<FormDescription> <FormDescription>
Choose the volume to backup, if you dont see the volume Choose the volume to backup. If you do not see the volume
here, you can type the volume name manually here, you can type the volume name manually
</FormDescription> </FormDescription>
<FormMessage /> <FormMessage />
@@ -11,11 +11,11 @@ import {
import type { DockerStatsJSON } from "./show-free-container-monitoring"; import type { DockerStatsJSON } from "./show-free-container-monitoring";
interface Props { interface Props {
acummulativeData: DockerStatsJSON["block"]; accumulativeData: DockerStatsJSON["block"];
} }
export const DockerBlockChart = ({ acummulativeData }: Props) => { export const DockerBlockChart = ({ accumulativeData }: Props) => {
const transformedData = acummulativeData.map((item, index) => { const transformedData = accumulativeData.map((item, index) => {
return { return {
time: item.time, time: item.time,
name: `Point ${index + 1}`, name: `Point ${index + 1}`,
@@ -11,11 +11,11 @@ import {
import type { DockerStatsJSON } from "./show-free-container-monitoring"; import type { DockerStatsJSON } from "./show-free-container-monitoring";
interface Props { interface Props {
acummulativeData: DockerStatsJSON["cpu"]; accumulativeData: DockerStatsJSON["cpu"];
} }
export const DockerCpuChart = ({ acummulativeData }: Props) => { export const DockerCpuChart = ({ accumulativeData }: Props) => {
const transformedData = acummulativeData.map((item, index) => { const transformedData = accumulativeData.map((item, index) => {
return { return {
name: `Point ${index + 1}`, name: `Point ${index + 1}`,
time: item.time, time: item.time,
@@ -11,12 +11,12 @@ import {
import type { DockerStatsJSON } from "./show-free-container-monitoring"; import type { DockerStatsJSON } from "./show-free-container-monitoring";
interface Props { interface Props {
acummulativeData: DockerStatsJSON["disk"]; accumulativeData: DockerStatsJSON["disk"];
diskTotal: number; diskTotal: number;
} }
export const DockerDiskChart = ({ acummulativeData, diskTotal }: Props) => { export const DockerDiskChart = ({ accumulativeData, diskTotal }: Props) => {
const transformedData = acummulativeData.map((item, index) => { const transformedData = accumulativeData.map((item, index) => {
return { return {
time: item.time, time: item.time,
name: `Point ${index + 1}`, name: `Point ${index + 1}`,
@@ -12,15 +12,15 @@ import type { DockerStatsJSON } from "./show-free-container-monitoring";
import { convertMemoryToBytes } from "./show-free-container-monitoring"; import { convertMemoryToBytes } from "./show-free-container-monitoring";
interface Props { interface Props {
acummulativeData: DockerStatsJSON["memory"]; accumulativeData: DockerStatsJSON["memory"];
memoryLimitGB: number; memoryLimitGB: number;
} }
export const DockerMemoryChart = ({ export const DockerMemoryChart = ({
acummulativeData, accumulativeData,
memoryLimitGB, memoryLimitGB,
}: Props) => { }: Props) => {
const transformedData = acummulativeData.map((item, index) => { const transformedData = accumulativeData.map((item, index) => {
return { return {
time: item.time, time: item.time,
name: `Point ${index + 1}`, name: `Point ${index + 1}`,
@@ -11,11 +11,11 @@ import {
import type { DockerStatsJSON } from "./show-free-container-monitoring"; import type { DockerStatsJSON } from "./show-free-container-monitoring";
interface Props { interface Props {
acummulativeData: DockerStatsJSON["network"]; accumulativeData: DockerStatsJSON["network"];
} }
export const DockerNetworkChart = ({ acummulativeData }: Props) => { export const DockerNetworkChart = ({ accumulativeData }: Props) => {
const transformedData = acummulativeData.map((item, index) => { const transformedData = accumulativeData.map((item, index) => {
return { return {
time: item.time, time: item.time,
name: `Point ${index + 1}`, name: `Point ${index + 1}`,
@@ -124,7 +124,7 @@ export const ContainerFreeMonitoring = ({
refetchOnWindowFocus: false, refetchOnWindowFocus: false,
}, },
); );
const [acummulativeData, setAcummulativeData] = useState<DockerStatsJSON>({ const [accumulativeData, setAccumulativeData] = useState<DockerStatsJSON>({
cpu: [], cpu: [],
memory: [], memory: [],
block: [], block: [],
@@ -136,7 +136,7 @@ export const ContainerFreeMonitoring = ({
useEffect(() => { useEffect(() => {
setCurrentData(defaultData); setCurrentData(defaultData);
setAcummulativeData({ setAccumulativeData({
cpu: [], cpu: [],
memory: [], memory: [],
block: [], block: [],
@@ -155,7 +155,7 @@ export const ContainerFreeMonitoring = ({
network: data.network[data.network.length - 1] ?? currentData.network, network: data.network[data.network.length - 1] ?? currentData.network,
disk: data.disk[data.disk.length - 1] ?? currentData.disk, disk: data.disk[data.disk.length - 1] ?? currentData.disk,
}); });
setAcummulativeData({ setAccumulativeData({
block: data?.block || [], block: data?.block || [],
cpu: data?.cpu || [], cpu: data?.cpu || [],
disk: data?.disk || [], disk: data?.disk || [],
@@ -184,7 +184,7 @@ export const ContainerFreeMonitoring = ({
setCurrentData(data); setCurrentData(data);
const MAX_DATA_POINTS = 300; const MAX_DATA_POINTS = 300;
setAcummulativeData((prevData) => ({ setAccumulativeData((prevData) => ({
cpu: [...prevData.cpu, data.cpu].slice(-MAX_DATA_POINTS), cpu: [...prevData.cpu, data.cpu].slice(-MAX_DATA_POINTS),
memory: [...prevData.memory, data.memory].slice(-MAX_DATA_POINTS), memory: [...prevData.memory, data.memory].slice(-MAX_DATA_POINTS),
block: [...prevData.block, data.block].slice(-MAX_DATA_POINTS), block: [...prevData.block, data.block].slice(-MAX_DATA_POINTS),
@@ -228,7 +228,7 @@ export const ContainerFreeMonitoring = ({
)} )}
className="w-[100%]" className="w-[100%]"
/> />
<DockerCpuChart acummulativeData={acummulativeData.cpu} /> <DockerCpuChart accumulativeData={accumulativeData.cpu} />
</div> </div>
</CardContent> </CardContent>
</Card> </Card>
@@ -252,7 +252,7 @@ export const ContainerFreeMonitoring = ({
className="w-[100%]" className="w-[100%]"
/> />
<DockerMemoryChart <DockerMemoryChart
acummulativeData={acummulativeData.memory} accumulativeData={accumulativeData.memory}
memoryLimitGB={ memoryLimitGB={
// @ts-ignore // @ts-ignore
convertMemoryToBytes(currentData.memory.value.total) / convertMemoryToBytes(currentData.memory.value.total) /
@@ -277,7 +277,7 @@ export const ContainerFreeMonitoring = ({
className="w-[100%]" className="w-[100%]"
/> />
<DockerDiskChart <DockerDiskChart
acummulativeData={acummulativeData.disk} accumulativeData={accumulativeData.disk}
diskTotal={currentData.disk.value.diskTotal} diskTotal={currentData.disk.value.diskTotal}
/> />
</div> </div>
@@ -294,7 +294,7 @@ export const ContainerFreeMonitoring = ({
<span className="text-sm text-muted-foreground"> <span className="text-sm text-muted-foreground">
{`Read: ${currentData.block.value.readMb} / Write: ${currentData.block.value.writeMb} `} {`Read: ${currentData.block.value.readMb} / Write: ${currentData.block.value.writeMb} `}
</span> </span>
<DockerBlockChart acummulativeData={acummulativeData.block} /> <DockerBlockChart accumulativeData={accumulativeData.block} />
</div> </div>
</CardContent> </CardContent>
</Card> </Card>
@@ -307,7 +307,7 @@ export const ContainerFreeMonitoring = ({
<span className="text-sm text-muted-foreground"> <span className="text-sm text-muted-foreground">
{`In MB: ${currentData.network.value.inputMb} / Out MB: ${currentData.network.value.outputMb} `} {`In MB: ${currentData.network.value.inputMb} / Out MB: ${currentData.network.value.outputMb} `}
</span> </span>
<DockerNetworkChart acummulativeData={acummulativeData.network} /> <DockerNetworkChart accumulativeData={accumulativeData.network} />
</div> </div>
</CardContent> </CardContent>
</Card> </Card>
@@ -283,7 +283,7 @@ export const AddGitlabProvider = () => {
</FormLabel> </FormLabel>
<FormControl> <FormControl>
<Input <Input
placeholder="For organization/group access use the slugish name of the group eg: my-org" placeholder="For organization/group access use the sluggish name of the group eg: my-org"
{...field} {...field}
/> />
</FormControl> </FormControl>
@@ -192,7 +192,7 @@ export const EditGitlabProvider = ({ gitlabId }: Props) => {
</FormLabel> </FormLabel>
<FormControl> <FormControl>
<Input <Input
placeholder="For organization/group access use the slugish name of the group eg: my-org" placeholder="For organization/group access use the sluggish name of the group eg: my-org"
{...field} {...field}
/> />
</FormControl> </FormControl>
@@ -48,7 +48,7 @@ import { ShowMonitoringModal } from "./show-monitoring-modal";
import { ShowSchedulesModal } from "./show-schedules-modal"; import { ShowSchedulesModal } from "./show-schedules-modal";
import { ShowSwarmOverviewModal } from "./show-swarm-overview-modal"; import { ShowSwarmOverviewModal } from "./show-swarm-overview-modal";
import { ShowTraefikFileSystemModal } from "./show-traefik-file-system-modal"; import { ShowTraefikFileSystemModal } from "./show-traefik-file-system-modal";
import { Welcomesubscription } from "./welcome-stripe/welcome-subscription"; import { WelcomeSubscription } from "./welcome-stripe/welcome-subscription";
export const ShowServers = () => { export const ShowServers = () => {
const router = useRouter(); const router = useRouter();
@@ -63,7 +63,7 @@ export const ShowServers = () => {
return ( return (
<div className="w-full"> <div className="w-full">
{query?.success && isCloud && <Welcomesubscription />} {query?.success && isCloud && <WelcomeSubscription />}
<Card className="h-full p-2.5 rounded-xl max-w-5xl mx-auto"> <Card className="h-full p-2.5 rounded-xl max-w-5xl mx-auto">
<div className="rounded-xl bg-background shadow-md "> <div className="rounded-xl bg-background shadow-md ">
<CardHeader className=""> <CardHeader className="">
@@ -51,7 +51,7 @@ export const { useStepper, steps, Scoped } = defineStepper(
{ id: "complete", title: "Complete", description: "Checkout complete" }, { id: "complete", title: "Complete", description: "Checkout complete" },
); );
export const Welcomesubscription = () => { export const WelcomeSubscription = () => {
const [showConfetti, setShowConfetti] = useState(false); const [showConfetti, setShowConfetti] = useState(false);
const stepper = useStepper(); const stepper = useStepper();
const [isOpen, setIsOpen] = useState(true); const [isOpen, setIsOpen] = useState(true);
@@ -153,7 +153,7 @@ export const ChangeRole = ({ memberId, currentRole, userEmail }: Props) => {
)} )}
<br /> <br />
<em className="text-muted-foreground text-xs"> <em className="text-muted-foreground text-xs">
Note: Owner role is intransferible. Note: Owner role is nontransferable.
</em> </em>
</FormDescription> </FormDescription>
<FormMessage /> <FormMessage />
@@ -122,7 +122,7 @@ export const ShowUsers = () => {
// Can change role based on hierarchy: // Can change role based on hierarchy:
// - Owner: Can change anyone's role (except themselves and other owners) // - Owner: Can change anyone's role (except themselves and other owners)
// - Admin: Can only change member/custom roles (not other admins or owners) // - Admin: Can only change member/custom roles (not other admins or owners)
// - Owner role is intransferible // - Owner role is nontransferable
const canChangeRole = const canChangeRole =
member.role !== "owner" && member.role !== "owner" &&
member.user.id !== session?.user?.id && member.user.id !== session?.user?.id &&
+1 -1
View File
@@ -101,7 +101,7 @@ const BreadcrumbEllipsis = ({
<span className="sr-only">More</span> <span className="sr-only">More</span>
</span> </span>
); );
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis"; BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
export { export {
Breadcrumb, Breadcrumb,
@@ -409,11 +409,11 @@ export const organizationRouter = createTRPCRouter({
}); });
} }
// Owner role is intransferible - cannot change to or from owner // Owner role is nontransferable - cannot change to or from owner
if (target.role === "owner" || input.role === "owner") { if (target.role === "owner" || input.role === "owner") {
throw new TRPCError({ throw new TRPCError({
code: "FORBIDDEN", code: "FORBIDDEN",
message: "The owner role is intransferible", message: "The owner role is nontransferable",
}); });
} }
+1 -1
View File
@@ -106,7 +106,7 @@ export const createTRPCContext = async (opts: CreateNextContextOptions) => {
* 2. INITIALIZATION * 2. INITIALIZATION
* *
* This is where the tRPC API is initialized, connecting the context and transformer. We also parse * This is where the tRPC API is initialized, connecting the context and transformer. We also parse
* ZodErrors so that you get typesafety on the frontend if your procedure fails due to validation * ZodErrors so that you get type safety on the frontend if your procedure fails due to validation
* errors on the backend. * errors on the backend.
*/ */