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

(#770) Provide ability to "see" saved installation parameters #834

Merged
merged 4 commits into from
Jan 21, 2022

Conversation

steviecoaster
Copy link
Contributor

  • Adds PackageArgumentsService Interface
  • Adds button to PackageViewModel
  • Adds method for decrypting .arguments file

@steviecoaster
Copy link
Contributor Author

Lots of work yet to do here. We need to make this look "pretty", but I'm no WPF/XAML expert, so right now functionality just uses a MessageBox.Show() method.

Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

This is a great start, thanks so much for picking this up!

@gep13
Copy link
Member

gep13 commented Apr 14, 2021

@steviecoaster I have taken the liberty of making some changes to this PR, based on the comments that I made above. Let me know if you have any questions about what I did.

@punker76 currently, this looks like the following:

for_github

Do you have any suggestions on a better UI to use here for this purpose? One thing that we are going to want to include is the ability to have a custom button on whatever UI we select, to allow the deletion of the .arguments file for the selected package.

Any ideas?

@AdmiringWorm
Copy link
Member

@gep13 I have rebased and updated the code in this PR, and it should now be ready for another review.

Do note that if PR #844 is merged first, then this PR needs additional changes to use the new dynamic language classes.

@gep13 gep13 changed the title (#770) Begins to scaffold a Package Arguments button (#770) Provide ability to "see" saved installation parameters Jan 20, 2022
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13
Copy link
Member

gep13 commented Jan 20, 2022

@AdmiringWorm I rebased this one, and the build is failing, but I don't know whether it as failing before the rebase. Can you take a look and let me know if this is something that can be fixed up. Thanks

@AdmiringWorm
Copy link
Member

AdmiringWorm commented Jan 20, 2022

hmm, looks like the resource string defined in the Designer for PackageViewModel_ArgumentsForPackageFormat somehow got lost during the rebase (not sure how, unless you had a conflict).

Should be enough to just open the .resx file in Visual Studio and save it again.
I would do it now, but unfortunately don't have access to VS at the moment.

EDIT: It actually looks like I had not included that string in the Designer when checking in 🤦

@gep13
Copy link
Member

gep13 commented Jan 20, 2022

No, there was no conflict. I will get it fixed up, but might be tomorrow morning now.

@AdmiringWorm
Copy link
Member

@gep13 yeah, I looked through the history on AppVeyor, so it seems it was a mistake on my part to forget to include the Designer change for that string.

I'll get that fixed up tomorrow when I log on unless you are able to do that before me.

gep13 and others added 4 commits January 21, 2022 07:50
This allows the viewing of the contents of the .arguments file, which
is stored on a per package version, and contains the arguments that
were passed into the choco install command for that package.

This file is encrypted, and can't be viewed directly, but this allows
decryption of the contents for viewing.

Co-authored-by: steviecoaster <stephen@chocolatey.io>
This commit updates the behavior used when parsing package arguments
to use the same logic as Chocolatey itself when it is parsing persisted
upgrade arguments.
This commit removes the use of a normal Windows MessageBox
to instead use the Dialog service to show a message instead.

This flows better into how the styling is used in the rest of the application.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13
Copy link
Member

gep13 commented Jan 21, 2022

@AdmiringWorm thank you for getting this over the finishing line! 👍🏻

@gep13 gep13 merged commit e704b2d into chocolatey:develop Jan 21, 2022
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

Successfully merging this pull request may close these issues.

Provide ability to "see" persisted arguments for installed package
3 participants