Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ds): Typecast known numeric values if present #2595

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

### Bug fixes

- Fixed dataset allocation issue when secondary space (or other numeric values that did not exists in the dataset-template) where specified [#2591](https://github.com/zowe/vscode-extension-for-zowe/issues/2591)

## `2.12.2`

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/dataset/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
* @param {IZoweDatasetTreeNode} node - The node selected for deletion
* @param {DatasetTree} datasetProvider - the tree which contains the nodes
*/
export async function deleteDatasetPrompt(datasetProvider: api.IZoweTree<api.IZoweDatasetTreeNode>, node?: api.IZoweDatasetTreeNode): Promise<void> {

Check warning on line 248 in packages/zowe-explorer/src/dataset/actions.ts

View workflow job for this annotation

GitHub Actions / lint

Async function 'deleteDatasetPrompt' has a complexity of 24. Maximum allowed is 15
ZoweLogger.trace("dataset.actions.deleteDatasetPrompt called.");
let nodes: api.IZoweDatasetTreeNode[];
const treeView = datasetProvider.getTreeView();
Expand Down Expand Up @@ -444,7 +444,7 @@
*
* @param {IZoweDatasetTreeNode} node
*/
export async function openPS(

Check warning on line 447 in packages/zowe-explorer/src/dataset/actions.ts

View workflow job for this annotation

GitHub Actions / lint

Async function 'openPS' has a complexity of 20. Maximum allowed is 15
node: api.IZoweDatasetTreeNode,
previewMember: boolean,
datasetProvider?: api.IZoweTree<api.IZoweDatasetTreeNode>
Expand Down Expand Up @@ -631,7 +631,7 @@
if (property.key === `dsName`) {
dsName = property.value;
} else {
if (typeof propertiesFromDsType[property.key] === "number") {
if (typeof propertiesFromDsType[property.key] === "number" || property.type === "number") {
dsPropsForAPI[property.key] = Number(property.value);
} else {
dsPropsForAPI[property.key] = property.value;
Expand Down Expand Up @@ -733,7 +733,7 @@
const templates = datasetProvider.getDsTemplates();
const templateNames: string[] = [];
templates?.forEach((template) => {
Object.entries(template).forEach(([key, value]) => {

Check warning on line 736 in packages/zowe-explorer/src/dataset/actions.ts

View workflow job for this annotation

GitHub Actions / lint

'value' is defined but never used. Allowed unused args must match /^_/u
templateNames.push(key);
});
});
Expand Down
6 changes: 6 additions & 0 deletions packages/zowe-explorer/src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ export const DATA_SET_PROPERTIES = [
key: `avgblk`,
label: `Average Block Length`,
value: null,
type: `number`,
placeHolder: localize("createFile.attribute.avgblk", `Enter the average block length (if allocation unit = BLK)`),
},
{
key: `blksize`,
label: `Block Size`,
value: null,
type: `number`,
placeHolder: localize("createFile.attribute.blksize", `Enter a block size`),
},
{
Expand All @@ -170,6 +172,7 @@ export const DATA_SET_PROPERTIES = [
key: `dirblk`,
label: `Directory Blocks`,
value: null,
type: `number`,
placeHolder: localize("createFile.attribute.dirblk", `Enter the number of directory blocks`),
},
{
Expand Down Expand Up @@ -200,6 +203,7 @@ export const DATA_SET_PROPERTIES = [
key: `primary`,
label: `Primary Space`,
value: null,
type: `number`,
placeHolder: localize("createFile.attribute.primary", `Enter the primary space allocation`),
},
{
Expand All @@ -212,12 +216,14 @@ export const DATA_SET_PROPERTIES = [
key: `lrecl`,
label: `Record Length`,
value: null,
type: `number`,
placeHolder: localize("createFile.attribute.lrecl", `Enter the logical record length`),
},
{
key: `secondary`,
label: `Secondary Space`,
value: null,
type: `number`,
placeHolder: localize("createFile.attribute.secondary", `Enter the secondary space allocation`),
},
{
Expand Down
Loading