@@ -19,7 +19,6 @@ import { useOrgSettingsQuery } from "../data/organizations/org-settings-query";
1919import { useCurrentOrg , useOrganizationsInvalidator } from "../data/organizations/orgs-query" ;
2020import { useUpdateOrgMutation } from "../data/organizations/update-org-mutation" ;
2121import { useUpdateOrgSettingsMutation } from "../data/organizations/update-org-settings-mutation" ;
22- import { useDefaultWorkspaceImageQuery } from "../data/workspaces/default-workspace-image-query" ;
2322import { useOnBlurError } from "../hooks/use-onblur-error" ;
2423import { ReactComponent as Stack } from "../icons/Stack.svg" ;
2524import { organizationClient } from "../service/public-api" ;
@@ -28,6 +27,7 @@ import { useCurrentUser } from "../user-context";
2827import { OrgSettingsPage } from "./OrgSettingsPage" ;
2928import { ErrorCode } from "@gitpod/gitpod-protocol/lib/messaging/error" ;
3029import { Button } from "@podkit/buttons/Button" ;
30+ import { useInstallationDefaultWorkspaceImageQuery } from "../data/installation/default-workspace-image-query" ;
3131
3232export default function TeamSettingsPage ( ) {
3333 const user = useCurrentUser ( ) ;
@@ -176,7 +176,7 @@ export default function TeamSettingsPage() {
176176function OrgSettingsForm ( props : { org ?: Organization ; isOwner : boolean } ) {
177177 const { org, isOwner } = props ;
178178 const { data : settings , isLoading } = useOrgSettingsQuery ( ) ;
179- const { data : imageInfo } = useDefaultWorkspaceImageQuery ( ) ;
179+ const { data : installationDefaultImage } = useInstallationDefaultWorkspaceImageQuery ( ) ;
180180 const updateTeamSettings = useUpdateOrgSettingsMutation ( ) ;
181181
182182 const [ showImageEditModal , setShowImageEditModal ] = useState ( false ) ;
@@ -238,14 +238,14 @@ function OrgSettingsForm(props: { org?: Organization; isOwner: boolean }) {
238238 < WorkspaceImageButton
239239 disabled = { ! isOwner }
240240 settings = { settings }
241- defaultWorkspaceImage = { imageInfo ?. image }
241+ installationDefaultWorkspaceImage = { installationDefaultImage }
242242 onClick = { ( ) => setShowImageEditModal ( true ) }
243243 />
244244
245245 { showImageEditModal && (
246246 < OrgDefaultWorkspaceImageModal
247247 settings = { settings }
248- globalDefaultImage = { imageInfo ?. image }
248+ installationDefaultWorkspaceImage = { installationDefaultImage }
249249 onClose = { ( ) => setShowImageEditModal ( false ) }
250250 />
251251 ) }
@@ -255,7 +255,7 @@ function OrgSettingsForm(props: { org?: Organization; isOwner: boolean }) {
255255
256256function WorkspaceImageButton ( props : {
257257 settings ?: OrganizationSettings ;
258- defaultWorkspaceImage ?: string ;
258+ installationDefaultWorkspaceImage ?: string ;
259259 onClick : ( ) => void ;
260260 disabled ?: boolean ;
261261} ) {
@@ -282,7 +282,7 @@ function WorkspaceImageButton(props: {
282282 } ;
283283 }
284284
285- const image = props . settings ?. defaultWorkspaceImage || props . defaultWorkspaceImage || "" ;
285+ const image = props . settings ?. defaultWorkspaceImage || props . installationDefaultWorkspaceImage || "" ;
286286
287287 const descList = useMemo ( ( ) => {
288288 const arr : ReactNode [ ] = [ < span > Default image</ span > ] ;
@@ -335,7 +335,7 @@ function WorkspaceImageButton(props: {
335335}
336336
337337interface OrgDefaultWorkspaceImageModalProps {
338- globalDefaultImage : string | undefined ;
338+ installationDefaultWorkspaceImage : string | undefined ;
339339 settings : OrganizationSettings | undefined ;
340340 onClose : ( ) => void ;
341341}
@@ -385,7 +385,7 @@ function OrgDefaultWorkspaceImageModal(props: OrgDefaultWorkspaceImageModalProps
385385 < TextInputField
386386 label = "Default Image"
387387 hint = "Use any official or custom workspace image from Docker Hub or any private container registry that the Gitpod instance can access."
388- placeholder = { props . globalDefaultImage }
388+ placeholder = { props . installationDefaultWorkspaceImage }
389389 value = { defaultWorkspaceImage }
390390 onChange = { setDefaultWorkspaceImage }
391391 />
0 commit comments