Skip to content

Commit 1127318

Browse files
committed
added ssh profile check
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
1 parent 96dfbd3 commit 1127318

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

packages/zowe-explorer/src/trees/dataset/DatasetTree.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import { SharedUtils } from "../shared/SharedUtils";
4545
import { FilterDescriptor, FilterItem } from "../../management/FilterManagement";
4646
import { IconUtils } from "../../icons/IconUtils";
4747
import { AuthUtils } from "../../utils/AuthUtils";
48+
import { ProfilesUtils } from "../../utils/ProfilesUtils";
4849
import { DataSetTemplates } from "./DatasetTemplates";
4950
import * as zosfiles from "@zowe/zos-files-for-zowe-sdk";
5051
import { ZowePersistentFilters } from "../../tools/ZowePersistentFilters";
@@ -403,7 +404,8 @@ export class DatasetTree extends ZoweTreeProvider<IZoweDatasetTreeNode> implemen
403404
}
404405
const prevDescription = element.description;
405406
const response = await element.getChildren(
406-
SettingsConfig.getDirectValue<number>(Constants.SETTINGS_DATASETS_PER_PAGE, Constants.DEFAULT_ITEMS_PER_PAGE) > 0
407+
SettingsConfig.getDirectValue<number>(Constants.SETTINGS_DATASETS_PER_PAGE, Constants.DEFAULT_ITEMS_PER_PAGE) > 0 &&
408+
!ProfilesUtils.isSshProfile(element.getProfile())
407409
);
408410

409411
// If getChildren updated the parent node's description,

packages/zowe-explorer/src/utils/AuthUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { ZoweLogger } from "../tools/ZoweLogger";
2828
import { SharedTreeProviders } from "../trees/shared/SharedTreeProviders";
2929
import { SettingsConfig } from "../configuration/SettingsConfig";
3030
import { SharedContext } from "../trees/shared/SharedContext";
31+
import { ProfilesUtils } from "./ProfilesUtils";
3132

3233
interface ErrorContext {
3334
apiType?: ZoweExplorerApiType;
@@ -417,7 +418,8 @@ export class AuthUtils {
417418
nodeToRefresh.dirty = true;
418419
const shouldPaginate =
419420
SharedContext.isDatasetNode(nodeToRefresh) &&
420-
SettingsConfig.getDirectValue<number>(Constants.SETTINGS_DATASETS_PER_PAGE, Constants.DEFAULT_ITEMS_PER_PAGE) > 0;
421+
SettingsConfig.getDirectValue<number>(Constants.SETTINGS_DATASETS_PER_PAGE, Constants.DEFAULT_ITEMS_PER_PAGE) > 0 &&
422+
!ProfilesUtils.isSshProfile(nodeToRefresh.getProfile());
421423
void nodeToRefresh
422424
.getChildren(shouldPaginate)
423425
.then(() => SharedTreeProviders.getProviderForNode(nodeToRefresh).refreshElement(nodeToRefresh));

packages/zowe-explorer/src/utils/ProfilesUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,4 +802,8 @@ export class ProfilesUtils {
802802
public static hasNoAuthType(session: ISession, profile: IProfileLoaded): boolean {
803803
return session.type === SessConstants.AUTH_TYPE_NONE && profile.type !== "ssh";
804804
}
805+
806+
public static isSshProfile(profile: IProfileLoaded): boolean {
807+
return profile?.type === "ssh";
808+
}
805809
}

0 commit comments

Comments
 (0)