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

add "Load option" to the main settings into "MS Graph General" section #300

Open
Mykhailo-Roit opened this issue Jan 10, 2025 · 4 comments

Comments

@Mykhailo-Roit
Copy link
Contributor

Please add "Load option" with values:

  • 20 (default)
  • 100 (max)
  • All (to load All)
    image

It looks like it should be located in "MS Graph General" section
image

@Mykhailo-Roit
Copy link
Contributor Author

without "Load All" now I have an issue #299

@Mykhailo-Roit
Copy link
Contributor Author

draft code:

MSGraph.psm1. function Invoke-InitializeModule

    $script:lstLoadOptions = @(
        [PSCustomObject]@{
            Name = "20"
            Value = "20"
        },
        [PSCustomObject]@{
            Name = "100"
            Value = "100"
        },
        [PSCustomObject]@{
            Name = "All"
            Value = "All"
        }
    )




    Add-SettingsObject (New-Object PSObject -Property @{
        Title = "Load options"
        Key = "LoadOptions"
        Type = "List"
        ItemsSource = $script:lstLoadOptions
        DefaultValue = "20"
        Description = "How many items load at a time"
    }) "GraphGeneral"

possible next steps:

  • save this value in the config file
  • adopt load data function

@Mykhailo-Roit
Copy link
Contributor Author

prepared PR #301

@Micke-K
Copy link
Owner

Micke-K commented Jan 12, 2025

Hello,

This is not exactly that I how would have implemented this. I'll think about it :)

I have implemented this in the Next version. However, that is a complete redesign/rewrite so I can't just port the code back.

Settings Catalog is a pain with paging. The return size does not always match the request eg. I set pages size to 10 and requested all pages. The return values I got was 5,0,2,2. It called it many times even though the page size was larger than the return count. Not sure what that is about though.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants