Skip to content

Commit 5734e95

Browse files
committed
add supportsDsPagination
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
1 parent 1127318 commit 5734e95

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

packages/zowe-explorer-api/src/extend/MainframeInteraction.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ export namespace MainframeInteraction {
418418
* @param dataSetPatterns the list of data set patterns to obtain the total item count for.
419419
*/
420420
getCount?(dataSetPatterns: string[]): Promise<IDataSetCount>;
421+
422+
supportsDsPagination?(): boolean;
421423
}
422424

423425
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ 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";
4948
import { DataSetTemplates } from "./DatasetTemplates";
5049
import * as zosfiles from "@zowe/zos-files-for-zowe-sdk";
5150
import { ZowePersistentFilters } from "../../tools/ZowePersistentFilters";
@@ -403,9 +402,10 @@ export class DatasetTree extends ZoweTreeProvider<IZoweDatasetTreeNode> implemen
403402
return this.loadProfilesForFavorites(this.log, element);
404403
}
405404
const prevDescription = element.description;
405+
const mvsApi = ZoweExplorerApiRegister.getMvsApi(element.getProfile());
406406
const response = await element.getChildren(
407407
SettingsConfig.getDirectValue<number>(Constants.SETTINGS_DATASETS_PER_PAGE, Constants.DEFAULT_ITEMS_PER_PAGE) > 0 &&
408-
!ProfilesUtils.isSshProfile(element.getProfile())
408+
(mvsApi.supportsDsPagination?.() ?? true)
409409
);
410410

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +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";
31+
import { ZoweExplorerApiRegister } from "../extending/ZoweExplorerApiRegister";
3232

3333
interface ErrorContext {
3434
apiType?: ZoweExplorerApiType;
@@ -416,10 +416,11 @@ export class AuthUtils {
416416
}
417417
if (nodeToRefresh) {
418418
nodeToRefresh.dirty = true;
419+
const mvsApi = ZoweExplorerApiRegister.getMvsApi(nodeToRefresh.getProfile());
419420
const shouldPaginate =
420421
SharedContext.isDatasetNode(nodeToRefresh) &&
421422
SettingsConfig.getDirectValue<number>(Constants.SETTINGS_DATASETS_PER_PAGE, Constants.DEFAULT_ITEMS_PER_PAGE) > 0 &&
422-
!ProfilesUtils.isSshProfile(nodeToRefresh.getProfile());
423+
(mvsApi.supportsDsPagination?.() ?? true);
423424
void nodeToRefresh
424425
.getChildren(shouldPaginate)
425426
.then(() => SharedTreeProviders.getProviderForNode(nodeToRefresh).refreshElement(nodeToRefresh));

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,4 @@ 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-
}
809805
}

packages/zowex-for-zowe-explorer/src/api/SshMvsApi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export class SshMvsApi extends SshCommonApi implements MainframeInteraction.IMvs
6262
});
6363
}
6464

65+
public supportsDsPagination(): boolean {
66+
return false;
67+
}
68+
6569
public async allMembers(dataSetName: string, options?: zosfiles.IListOptions): Promise<zosfiles.IZosFilesResponse> {
6670
const response = await (
6771
await this.client

0 commit comments

Comments
 (0)