Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/app/data-providers/engine-data-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ export const createNamespaceContext = ({
} satisfies DefaultDataProvider;

return {
engineNamespace: namespace,
...dataProvider,
runnersQueryOptions() {
return infiniteQueryOptions({
Expand Down
25 changes: 14 additions & 11 deletions frontend/src/app/dialogs/connect-railway-frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ function FormStepper({ onClose }: { onClose?: () => void }) {
.VITE_APP_API_URL
: cloudEnv()
.VITE_APP_CLOUD_ENGINE_URL
}&RIVET_NAMESPACE=${
dataProvider.engineNamespace
}`}
target="_blank"
rel="noreferrer"
Expand Down Expand Up @@ -167,27 +169,28 @@ function EnvVariablesStep() {
const { data, isLoading } = useQuery(
dataProvider.connectRunnerTokenQueryOptions(),
);

return (
<>
<p>
Set the following environment variables in your Railway project
settings.
</p>
<div className="gap-1 items-center">
<div className="gap-1 items-center grid grid-cols-2">
{__APP_TYPE__ === "engine" ? (
<div className="flex gap-1 items-center border-b border-b-border/40 pb-2 mb-2">
<>
<DiscreteInput value="RIVET_ENGINE" show />
<DiscreteInput value={engineEnv().VITE_APP_API_URL} />
</div>
</>
) : null}
<div className="flex gap-1 items-center">
<DiscreteInput value="RIVET_TOKEN" show />
{isLoading ? (
<Skeleton className="w-56 h-10" />
) : (
<DiscreteInput value={data || ""} />
)}
</div>
<DiscreteInput value="RIVET_TOKEN" show />
{isLoading ? (
<Skeleton className="w-56 h-10" />
) : (
<DiscreteInput value={data || ""} />
)}
<DiscreteInput value="RIVET_NAMESPACE" show />
<DiscreteInput value={dataProvider.engineNamespace} show />
</div>
</>
);
Expand Down
Loading