@@ -19,7 +19,6 @@ import { useOrgSettingsQuery } from "../data/organizations/org-settings-query";
19
19
import { useCurrentOrg , useOrganizationsInvalidator } from "../data/organizations/orgs-query" ;
20
20
import { useUpdateOrgMutation } from "../data/organizations/update-org-mutation" ;
21
21
import { useUpdateOrgSettingsMutation } from "../data/organizations/update-org-settings-mutation" ;
22
- import { useDefaultWorkspaceImageQuery } from "../data/workspaces/default-workspace-image-query" ;
23
22
import { useOnBlurError } from "../hooks/use-onblur-error" ;
24
23
import { ReactComponent as Stack } from "../icons/Stack.svg" ;
25
24
import { organizationClient } from "../service/public-api" ;
@@ -28,6 +27,7 @@ import { useCurrentUser } from "../user-context";
28
27
import { OrgSettingsPage } from "./OrgSettingsPage" ;
29
28
import { ErrorCode } from "@gitpod/gitpod-protocol/lib/messaging/error" ;
30
29
import { Button } from "@podkit/buttons/Button" ;
30
+ import { useInstallationDefaultWorkspaceImageQuery } from "../data/installation/default-workspace-image-query" ;
31
31
32
32
export default function TeamSettingsPage ( ) {
33
33
const user = useCurrentUser ( ) ;
@@ -176,7 +176,7 @@ export default function TeamSettingsPage() {
176
176
function OrgSettingsForm ( props : { org ?: Organization ; isOwner : boolean } ) {
177
177
const { org, isOwner } = props ;
178
178
const { data : settings , isLoading } = useOrgSettingsQuery ( ) ;
179
- const { data : imageInfo } = useDefaultWorkspaceImageQuery ( ) ;
179
+ const { data : installationDefaultImage } = useInstallationDefaultWorkspaceImageQuery ( ) ;
180
180
const updateTeamSettings = useUpdateOrgSettingsMutation ( ) ;
181
181
182
182
const [ showImageEditModal , setShowImageEditModal ] = useState ( false ) ;
@@ -238,14 +238,14 @@ function OrgSettingsForm(props: { org?: Organization; isOwner: boolean }) {
238
238
< WorkspaceImageButton
239
239
disabled = { ! isOwner }
240
240
settings = { settings }
241
- defaultWorkspaceImage = { imageInfo ?. image }
241
+ installationDefaultWorkspaceImage = { installationDefaultImage }
242
242
onClick = { ( ) => setShowImageEditModal ( true ) }
243
243
/>
244
244
245
245
{ showImageEditModal && (
246
246
< OrgDefaultWorkspaceImageModal
247
247
settings = { settings }
248
- globalDefaultImage = { imageInfo ?. image }
248
+ installationDefaultWorkspaceImage = { installationDefaultImage }
249
249
onClose = { ( ) => setShowImageEditModal ( false ) }
250
250
/>
251
251
) }
@@ -255,7 +255,7 @@ function OrgSettingsForm(props: { org?: Organization; isOwner: boolean }) {
255
255
256
256
function WorkspaceImageButton ( props : {
257
257
settings ?: OrganizationSettings ;
258
- defaultWorkspaceImage ?: string ;
258
+ installationDefaultWorkspaceImage ?: string ;
259
259
onClick : ( ) => void ;
260
260
disabled ?: boolean ;
261
261
} ) {
@@ -282,7 +282,7 @@ function WorkspaceImageButton(props: {
282
282
} ;
283
283
}
284
284
285
- const image = props . settings ?. defaultWorkspaceImage || props . defaultWorkspaceImage || "" ;
285
+ const image = props . settings ?. defaultWorkspaceImage || props . installationDefaultWorkspaceImage || "" ;
286
286
287
287
const descList = useMemo ( ( ) => {
288
288
const arr : ReactNode [ ] = [ < span > Default image</ span > ] ;
@@ -335,7 +335,7 @@ function WorkspaceImageButton(props: {
335
335
}
336
336
337
337
interface OrgDefaultWorkspaceImageModalProps {
338
- globalDefaultImage : string | undefined ;
338
+ installationDefaultWorkspaceImage : string | undefined ;
339
339
settings : OrganizationSettings | undefined ;
340
340
onClose : ( ) => void ;
341
341
}
@@ -385,7 +385,7 @@ function OrgDefaultWorkspaceImageModal(props: OrgDefaultWorkspaceImageModalProps
385
385
< TextInputField
386
386
label = "Default Image"
387
387
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 }
389
389
value = { defaultWorkspaceImage }
390
390
onChange = { setDefaultWorkspaceImage }
391
391
/>
0 commit comments