Skip to content

Commit

Permalink
ts compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik1729 committed Dec 24, 2023
1 parent 522f1c2 commit 41d79b7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const HandleBackendResources = ({
};
}, {}),
}),
onSubmit: async (val) => {
onSubmit: async (_) => {
try {
const { errors: e } = await api.createManagedResource({
mres: {
Expand All @@ -113,17 +113,20 @@ const HandleBackendResources = ({
namespace: parseTargetNs(workspace),
},
spec: {
mresKind: {
kind: selectedType?.resource.kind || '',
},
msvcRef: {
apiVersion: template.apiVersion || '',
name: parseName(backendService),
kind: template.kind!,
},
inputs: {
...val,
resourceTemplate: {
spec: ``,
msvcRef: {
apiVersion: template.apiVersion || '',
name: parseName(backendService),
kind: template.kind!,
},
},
// mresKind: {
// kind: selectedType?.resource.kind || '',
// },
// inputs: {
// ...val,
// },
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ const BackingResources = () => {
template={
getManagedTemplate({
templates: managedTemplates,
kind: backendService.spec.msvcKind.kind || '',
apiVersion: backendService.spec.msvcKind.apiVersion,
kind: backendService.spec.serviceTemplate.kind || '',
apiVersion: backendService.spec.serviceTemplate.apiVersion,
})!
}
setShow={setShowBackendResourceDialog}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const parseItem = (
) => {
const template = getManagedTemplate({
templates,
kind: item.spec.msvcKind.kind || '',
apiVersion: item.spec.msvcKind.apiVersion,
kind: item.spec.serviceTemplate.kind || '',
apiVersion: item.spec.serviceTemplate.apiVersion,
});
return {
name: item?.displayName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,18 @@ const HandleBackendService = ({
annotations: {},
},
spec: {
msvcKind: {
apiVersion: selectedService?.service.apiVersion || '',
kind: selectedService?.service.kind || '',
},
inputs: {
...tempVal,
serviceTemplate: {
spec: {
...tempVal,
},
},
// msvcKind: {
// apiVersion: selectedService?.service.apiVersion || '',
// kind: selectedService?.service.kind || '',
// },
// inputs: {
// ...tempVal,
// },
},
},
});
Expand Down

0 comments on commit 41d79b7

Please sign in to comment.