setup-your-mac / Setup-Your-Mac

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
https://snelson.us/sym
MIT License
238 stars 52 forks source link

Add `messageOnly` option to `welcomeDialog` #66

Closed ryanasik closed 11 months ago

ryanasik commented 1 year ago

When opening the Help Dialog window, Configuration is blank as well as Connection, Download Mbps and Estimate (beta). This is still the same after Testing Connection completes.

dan-snelson commented 1 year ago

Thanks for reporting this, @ryanasik.

Please advise the settings you're using which reproduces the issue.

ryanasik commented 1 year ago

I am only using the Catch all configuration.

dan-snelson commented 1 year ago

Sorry for any Dan-induced confusion …

… what are your settings for Lines 33 through 70 ?

ryanasik commented 1 year ago
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Script Version and Jamf Pro Script Parameters
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

scriptVersion="1.11.0"
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
scriptLog="${4:-"/var/log/org.churchofjesuschrist.log"}"                        # Parameter 4: Script Log Location [ /var/log/org.churchofjesuschrist.log ] (i.e., Your organization's default location for client-side logs)
debugMode="${5:-"verbose"}"                                                     # Parameter 5: Debug Mode [ verbose (default) | true | false ]
welcomeDialog="${6:-"userInput"}"                                               # Parameter 6: Welcome dialog [ userInput (default) | video | false ]
completionActionOption="${7:-"Restart Attended"}"                               # Parameter 7: Completion Action [ wait | sleep (with seconds) | Shut Down | Shut Down Attended | Shut Down Confirm | Restart | Restart Attended (default) | Restart Confirm | Log Out | Log Out Attended | Log Out Confirm ]
requiredMinimumBuild="${8:-"disabled"}"                                         # Parameter 8: Required Minimum Build [ disabled (default) | 22E ] (i.e., Your organization's required minimum build of macOS to allow users to proceed; use "22E" for macOS 13.3)
outdatedOsAction="${9:-"/System/Library/CoreServices/Software Update.app"}"     # Parameter 9: Outdated OS Action [ /System/Library/CoreServices/Software Update.app (default) | jamfselfservice://content?entity=policy&id=117&action=view ] (i.e., Jamf Pro Self Service policy ID for operating system ugprades)
webhookURL="${10:-""}"                                                          # Parameter 10: Microsoft Teams or Slack Webhook URL [ Leave blank to disable (default) | https://microsoftTeams.webhook.com/URL | https://hooks.slack.com/services/URL ] Can be used to send a success or failure message to Microsoft Teams or Slack via Webhook. (Function will automatically detect if Webhook URL is for Slack or Teams; can be modified to include other communication tools that support functionality.)
presetConfiguration="${11:-""}"                                                 # Parameter 11: Specify a Configuration (i.e., `policyJSON`; NOTE: Only used when `welcomeDialog` is set to `video` or `false`)

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Various Feature Variables
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

debugModeSleepAmount="3"    # Delay for various actions when running in Debug Mode
failureDialog="true"        # Display the so-called "Failure" dialog (after the main SYM dialog) [ true | false ]

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Welcome Message User Input Customization Choices (thanks, @rougegoat!)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# These control which user input boxes are added to the first page of Setup Your Mac. If you do not want to ask about a value, set it to any other value
promptForUsername="true"
prefillUsername="true"          # prefills the currently logged in user's username
promptForComputerName="true"
promptForAssetTag="true"
promptForRoom="true"
promptForBuilding="true"
promptForDepartment="true"
promptForConfiguration="true"   # Removes the Configuration dropdown entirely and uses the "Catch-all (i.e., used when `welcomeDialog` is set to `video` or `false`)" policyJSON
dan-snelson commented 1 year ago

@ryanasik:

Will you please reply with (or DM me on Slack) your entire customized SYM script?

With promptForConfiguration="true", you'll most likely observe the following:

Screenshot 2023-05-27 at 7 08 34 AM Screenshot 2023-05-27 at 7 08 49 AM

Sample SYM Script:

Setup-Your-Mac-via-Dialog-2023-05-27-070014.bash.zip

DevliegereM commented 1 year ago

I have the same issue when our Proxy Client is installed. When it is not installed the networkQuality command runs fine. So it might have to be related to that (whatever is running on your network). Maybe try a hotspot?

dan-snelson commented 1 year ago

@ryanasik:

Thanks for sharing your use-case.

As mentioned via DM on the MacAdmins Slack, looks like … welcomeDialog="${6:-"userInput"}" # Parameter 6: Welcome dialog [ userInput (default) | video | false ]

… needs to include an option for messageOnly so helpmessage will only include relevant information.

dan-snelson commented 1 year ago

D-OH! I've overlooked this issue before committing 1.12.0-b9.

dan-snelson commented 1 year ago

@ryanasik: Please test-drive 1.12.0-b10.

dan-snelson commented 11 months ago

Addressed in Setup Your Mac 1.12.0.

ryanasik commented 9 months ago

@dan-snelson Confirmed this is working now when adding messageOnly in the Welcome Dialog (parameter 6). It might be good to update the Wiki to include messageOnly in the example text for others to know its available. Thank you for getting this added in!

dan-snelson commented 9 months ago

Thanks for confirming, @ryanasik.

See: D. Review the default Welcome dialog > Message Only

ryanasik commented 9 months ago

Ok thanks! I was referring to section G. Line 2

dan-snelson commented 9 months ago

Fixed! (Thanks for heads-up.)