Skip to content

[dashboard] Hide PVC feature section when feat flag not set #11674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2022
Merged
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
35 changes: 19 additions & 16 deletions components/dashboard/src/projects/ProjectSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,25 @@ export default function () {
checked={!project.settings?.keepOutdatedPrebuildsRunning}
onChange={({ target }) => updateProjectSettings({ keepOutdatedPrebuildsRunning: !target.checked })}
/>
<br></br>
<h3 className="mt-12">Workspace Persistence</h3>
<CheckBox
title={
<span>
Enable Persistent Volume Claim{" "}
<PillLabel type="warn" className="font-semibold mt-2 ml-2 py-0.5 px-2 self-center">
Experimental
</PillLabel>
</span>
}
desc={<span>Experimental feature that is still under development.</span>}
checked={project.settings?.usePersistentVolumeClaim ?? false}
disabled={!showPersistentVolumeClaimUI}
onChange={({ target }) => updateProjectSettings({ usePersistentVolumeClaim: target.checked })}
/>
{showPersistentVolumeClaimUI && (
<>
<br></br>
<h3 className="mt-12">Workspace Persistence</h3>
<CheckBox
title={
<span>
Enable Persistent Volume Claim{" "}
<PillLabel type="warn" className="font-semibold mt-2 ml-2 py-0.5 px-2 self-center">
Experimental
</PillLabel>
</span>
}
desc={<span>Experimental feature that is still under development.</span>}
checked={project.settings?.usePersistentVolumeClaim ?? false}
onChange={({ target }) => updateProjectSettings({ usePersistentVolumeClaim: target.checked })}
/>
</>
)}
</ProjectSettingsPage>
);
}