Skip to content

Commit

Permalink
Merge pull request #830 from kubeshop/olelensmar/fix/140-release-fixes
Browse files Browse the repository at this point in the history
fix: default namespace value typo and removed path from preview resou…
  • Loading branch information
olensmar authored Dec 2, 2021
2 parents df2d00d + 77efc0f commit 7d90037
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/components/molecules/Monaco/codeIntel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {FileMapType, ResourceFilterType, ResourceMapType} from '@models/appstate
import {K8sResource, RefPosition, ResourceRef} from '@models/k8sresource';

import {getResourceFolder} from '@redux/services/fileEntry';
import {isPreviewResource} from '@redux/services/resource';
import {isIncomingRef, isUnsatisfiedRef} from '@redux/services/resourceRefs';

import {ResourceKindHandlers, getIncomingRefMappers} from '@src/kindhandlers';
Expand Down Expand Up @@ -390,13 +391,16 @@ export async function applyForResource(
if (!outgoingRefResource) {
return;
}
const {commandMarkdownLink, commandDisposable} = createCommandMarkdownLink(
`${outgoingRefResource.kind}: ${outgoingRefResource.name} in ${outgoingRefResource.filePath}`,
() => {
// @ts-ignore
selectResource(outgoingRef.target?.resourceId);
}
);

let text = `${outgoingRefResource.kind}: ${outgoingRefResource.name}`;
if (!isPreviewResource(outgoingRefResource)) {
text += ` in ${outgoingRefResource.filePath}`;
}

const {commandMarkdownLink, commandDisposable} = createCommandMarkdownLink(text, () => {
// @ts-ignore
selectResource(outgoingRef.target?.resourceId);
});
commandMarkdownLinkList.push(commandMarkdownLink);
newDisposables.push(commandDisposable);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const NewResourceWizard = () => {
const [shouldSaveToFolder, setShouldSaveState] = useState(true);
const [selectedFolder, setSelectedFolder] = useState(ROOT_FILE_ENTRY);
const [isSubmitDisabled, setSubmitDisabled] = useState(true);
const [inputValue, setInputValue] = useState<string>(' ');
const [inputValue, setInputValue] = useState<string>('');
const lastKindRef = useRef<string>();
const defaultInput = newResourceWizardState.defaultInput;
const defaultValues = defaultInput
Expand Down

0 comments on commit 7d90037

Please sign in to comment.