Skip to content

Adds 'pa environment get' script, solving #2109#2143

Closed
appieschot wants to merge 1 commit intopnp:mainfrom
appieschot:feature/cmd-2109
Closed

Adds 'pa environment get' script, solving #2109#2143
appieschot wants to merge 1 commit intopnp:mainfrom
appieschot:feature/cmd-2109

Conversation

@appieschot
Copy link
Copy Markdown
Member

Adds 'pa environment get' script, solving #2109

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling f08b74a on appieschot:feature/cmd-2109 into 30366a8 on pnp:main.

@waldekmastykarz waldekmastykarz force-pushed the main branch 5 times, most recently from 9c69c74 to 35c16a0 Compare February 5, 2021 12:43
@plamber plamber self-assigned this Feb 7, 2021
@plamber plamber self-requested a review February 7, 2021 09:18
Copy link
Copy Markdown
Contributor

@plamber plamber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @appieschot,
thank you for the contribution.

I reviewed the command and noticed few minor things that might require your attention.

When outputting the contents in "text" output mode I get a JSON in a properties object. Is there a way to reduce the output to the most important properties there and get the full output when using the JSON output?

Thank you

Comment on lines +50 to +54
const options: CommandOption[] = [
{
option: '-n, --name <name>'
}
];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is required but the script is not giving me a warning if I do not specify a value.

I am receiving a 404 from the service

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which command did you run exactly?

m365 pa environment get

or

m365 pa environment get --name

If the latter, then name is defined and its value is set to true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant reproduce this issue on Windows or Linux other then with how @waldekmastykarz described it.

Comment thread docs/docs/cmd/pa/environment/environment-get.md
@plamber plamber marked this pull request as draft February 7, 2021 09:23
@plamber plamber removed their assignment Feb 7, 2021
@appieschot
Copy link
Copy Markdown
Member Author

@plamber thanks for the review! Will pick up the points, will also create an issue for https://github.com/pnp/cli-microsoft365/blob/main/src/m365/flow/commands/environment/environment-get.ts as that contains the same issues ;-) Will pick those up as well.

@appieschot
Copy link
Copy Markdown
Member Author

So regarding the output @plamber

When outputting the contents in "text" output mode I get a JSON in a properties object. Is there a way to reduce the output to the most important properties there and get the full output when using the JSON output?

I did the same implementation as the flow environment text output, see previous comment meaning everything. What do you feel should be important features to surface as text only?

@plamber
Copy link
Copy Markdown
Contributor

plamber commented Feb 8, 2021

So regarding the output @plamber

When outputting the contents in "text" output mode I get a JSON in a properties object. Is there a way to reduce the output to the most important properties there and get the full output when using the JSON output?

I did the same implementation as the flow environment text output, see previous comment meaning everything. What do you feel should be important features to surface as text only?

@appieschot: we had a similar discussion about the Yammer Search WebPart. Long story short we decided about some important properties to promote in the text output and keep the rest in the JSON output.

To be honest, I do not have any preferences about which property should be promoted. Maybe you have some suggestions what might be appropriate to see immediately for every environment. It's your call.

@waldekmastykarz
Copy link
Copy Markdown
Member

Since both commands are similar, I think it makes sense to keep them similar for now. If the output is still too long, let's align both of them as another iteration so that they are in sync.

@appieschot
Copy link
Copy Markdown
Member Author

Lets keep this PR as is then, and ill create a new enhancement issue for both commands.

@appieschot appieschot marked this pull request as ready for review February 10, 2021 10:12
@waldekmastykarz waldekmastykarz self-assigned this Feb 10, 2021
Copy link
Copy Markdown
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nicely done with two little things I've adjusted when merging the PR 👏


## Examples

Get information about the Microsoft Apps environment named _Default-d87a7535-dd31-4437-bfe1-95340acd55c5_
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft Power Apps

@@ -0,0 +1,31 @@
# pa environment ga
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pa environment get

@waldekmastykarz
Copy link
Copy Markdown
Member

Merged manually. Thank you! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants