-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: support custom env variables in Renku 2.0 (#3227)
- Loading branch information
1 parent
15f1911
commit 5c9eb97
Showing
35 changed files
with
2,433 additions
and
1,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,6 +169,7 @@ | |
"jupyter", | ||
"katex", | ||
"kernelspec", | ||
"kubernetes", | ||
"Keycloak", | ||
"Lausanne", | ||
"linkify", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*! | ||
* Copyright 2024 - Swiss Data Science Center (SDSC) | ||
* A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and | ||
* Eidgenössische Technische Hochschule Zürich (ETHZ). | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import cx from "classnames"; | ||
import { ReactNode, useRef } from "react"; | ||
import { InfoCircleFill } from "react-bootstrap-icons"; | ||
import { PopoverBody, UncontrolledPopover } from "reactstrap"; | ||
|
||
export function MoreInfo({ | ||
trigger = "hover focus", | ||
children, | ||
}: { | ||
trigger?: string; | ||
children?: ReactNode; | ||
}) { | ||
const ref = useRef<HTMLSpanElement>(null); | ||
|
||
return ( | ||
<> | ||
<span ref={ref}> | ||
<InfoCircleFill | ||
className={cx("bi", "ms-1", "cursor-pointer", "text-light-emphasis")} | ||
tabIndex={0} | ||
/> | ||
</span> | ||
<UncontrolledPopover target={ref} placement="right" trigger={trigger}> | ||
<PopoverBody>{children}</PopoverBody> | ||
</UncontrolledPopover> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
client/src/features/admin/SessionEnvironmentAdvancedFields.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/*! | ||
* Copyright 2024 - Swiss Data Science Center (SDSC) | ||
* A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and | ||
* Eidgenössische Technische Hochschule Zürich (ETHZ). | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import cx from "classnames"; | ||
import { useCallback, useState } from "react"; | ||
import { Control, FieldErrors } from "react-hook-form"; | ||
import { Collapse } from "reactstrap"; | ||
import ChevronFlippedIcon from "../../components/icons/ChevronFlippedIcon"; | ||
import { SessionEnvironmentForm } from "./SessionEnvironmentFormContent"; | ||
import { AdvancedSettingsFields } from "../sessionsV2/components/SessionForm/AdvancedSettingsFields"; | ||
|
||
interface SessionEnvironmentAdvancedFieldsProps { | ||
control: Control<SessionEnvironmentForm, unknown>; | ||
errors: FieldErrors<SessionEnvironmentForm>; | ||
} | ||
|
||
export default function SessionEnvironmentAdvancedFields({ | ||
control, | ||
errors, | ||
}: SessionEnvironmentAdvancedFieldsProps) { | ||
const [isAdvancedSettingOpen, setIsAdvancedSettingsOpen] = useState(false); | ||
const toggleIsOpen = useCallback( | ||
() => | ||
setIsAdvancedSettingsOpen( | ||
(isAdvancedSettingOpen) => !isAdvancedSettingOpen | ||
), | ||
[] | ||
); | ||
return ( | ||
<> | ||
<div> | ||
<button | ||
className={cx( | ||
"d-flex", | ||
"align-items-center", | ||
"w-100", | ||
"bg-transparent", | ||
"border-0", | ||
"fw-bold" | ||
)} | ||
type="button" | ||
onClick={toggleIsOpen} | ||
> | ||
Advanced settings{" "} | ||
<ChevronFlippedIcon flipped={isAdvancedSettingOpen} /> | ||
</button> | ||
</div> | ||
<Collapse isOpen={isAdvancedSettingOpen}> | ||
<div className="mt-3"> | ||
<AdvancedSettingsFields<SessionEnvironmentForm> | ||
control={control} | ||
errors={errors} | ||
/> | ||
</div> | ||
</Collapse> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.