dan-snelson / dialog-scripts

Scripts with leverage Bart Reardon's swiftDialog
MIT License
110 stars 35 forks source link

Add a user help button #6

Closed master-vodawagner closed 2 years ago

master-vodawagner commented 2 years ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like It would be useful to have a Help button or ? button which could be configured to show a company IT helpdesk number to call on the main Installing policy dialog screen.

Describe alternatives you've considered Currently if a failure is detected, I use the bottom text field to instruct users on things to capture like which policy failed etc. This is the helpdesk number to call

Additional context Add any other context or screenshots about the feature request here.

dan-snelson commented 2 years ago

Thanks for the suggestion, @master-vodawagner.

I don't think it's currently possible to swap --infotext for --infobutton; perhaps we just open another "failed-specific" dialog.

dan-snelson commented 2 years ago

@master-vodawagner:

Please take a look at 1.2.7 (in the development branch) for a test-drive and let me know if it will meet your needs.

Screenshot 2022-09-10 at 8 38 49 PM Screenshot 2022-09-10 at 8 38 59 PM
master-vodawagner commented 2 years ago

It certainly looks the part to fix my issues.

dan-snelson commented 2 years ago

Addressed by 1.2.7

dan-snelson commented 2 years ago

https://snelson.us/2022/09/setup-your-mac-via-swiftdialog-1-2-7/#dedicated-failure-dialog

master-vodawagner commented 2 years ago

Hmm odd, I'm using this version of code but can't get the 2nd dialog prompt to appear after a failure

master-vodawagner commented 2 years ago

So when I click the contact support button, the dialog window quits as expected, logging shows the failed items but the failure dialog never shows up

dan-snelson commented 2 years ago

Sorry its not working as expected for you, @master-vodawagner.

In a single test for me on macOS Ventura (where Sophos Endpoint currently fails to install), an unaltered download of 1.2.7 fails and shows the "Failure Detected" dialog as expected.

What are you seeing in /private/var/log/enrollment.log ?

dan-snelson commented 2 years ago

In case it helps, here's how I just tested on a device which is already enrolled and successfully completed Setup Your Mac in my environment:

  1. Save version 1.2.7
  2. Replace Info.plist with Info.plist.failed
  3. Change Line 39 from debugMode="${4}" to debugMode="true"
  4. Elevate a Terminal session and execute the script
Screenshot 2022-09-15 at 11 54 01 AM Screenshot 2022-09-15 at 11 53 21 AM Screenshot 2022-09-15 at 11 53 29 AM

(This all may be working as expected for me because I don't have to modify anything else to test.)

master-vodawagner commented 2 years ago

So I’ve isolated my issue to line 422, if I hash that line out the second prompt appears but doesn’t show the list of failed policies

master-vodawagner commented 2 years ago

B09F2105-809E-4CB9-915E-45F28D484291

dan-snelson commented 2 years ago

Excellent find!

What value are you using for Completion Action ? (The default is wait, which requires user-interaction.)

The list of failed policies is built on Line 698

… and displayed to the user on Line 428.

master-vodawagner commented 2 years ago

Hi

using the default value.

I’m stumped why the failed detected prompt has none of the failed policies.

it doesn’t seem to like new lines C08E2AA6-F076-4E86-9363-54FA59913EFB

dan-snelson commented 2 years ago

Please DM me your modified script via Slack.

dan-snelson commented 2 years ago

Which version of swiftDialog is installed?

❯ dialog --version
1.11.2.3095
master-vodawagner commented 2 years ago

Well I’ve fixed it, started from scratch with your version and just pasted in my changes.

No idea what went wrong 🤪

dan-snelson commented 2 years ago

Glad it's working, @master-vodawagner!

Thanks again for the excellent suggestion.