-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
ConvertTo-PodeWebPage - add grouping parameters #351
base: develop
Are you sure you want to change the base?
Conversation
add parameter 'Group' to 'ConvertTo-PodeWebPage' as it defined in 'Add-PodeWebPage', group pages by passed key. add parameter 'GroupModule' to 'ConvertTo-PodeWebPage' -- group pages by module name.
ConvertTo-PodeWebPage - add grouping parameters
} | ||
|
||
'GroupByVerbs' { | ||
$group = [string]::Empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safe to remove this line :)
switch ($PSCmdlet.ParameterSetName) { | ||
'NoGrouping' { | ||
$group = [string]::Empty | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The break
s aren't really needed in this switch statement, since only a single value is being supplied to the switch
and not an array.
} | ||
|
||
'GroupByCustomKey' { | ||
$group = $Group -replace "\.","" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering why you were replacing the dots, but I'm guessing it's because it stops the groups expanding? This looks like the same issue as with spaces.
This line here:
Pode.Web/src/Private/Helpers.ps1
Line 347 in 7db656c
return ($Value -replace '\s', '_') |
Changing \s
to [\s\.]
should fix this issue, and mean we can remove these two replace '\.'
parts here :)
Description of the Change
Related Issue
no, its enhancement
Examples
ConvertTo-PodeWebPage -Module 'Custom.ADHelpers' -Group 'AD Tools'
ConvertTo-PodeWebPage -Module 'DBUtils' -GroupModule
Additional Context
In general, I want to add missing parameter ("group") to 'ConvertTo-PodeWebPage' cmdlet.