Website: update configuration builder download modal (#29781)

Changes:
- Updated the download modal on the configuration builder to match
wireframes.
This commit is contained in:
Eric 2025-06-05 17:32:08 -05:00 committed by GitHub
parent d0861a33dd
commit 2028396a63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 48 additions and 11 deletions

View file

@ -464,7 +464,6 @@ parasails.registerPage('configuration-builder', {
<key>PayloadContent</key>
<array>
`;
let uuidForThisProfile = crypto.randomUUID();
// Iterate through the selcted payloads
// group selected payloads by their payload type value.
let payloadsToCreateDictonariesFor = _.groupBy(this.selectedPayloads, 'payloadType');
@ -515,11 +514,11 @@ parasails.registerPage('configuration-builder', {
<key>PayloadDescription</key>
<string>${this.downloadProfileFormData.description}</string>
<key>PayloadIdentifier</key>
<string>Fleet-profile-generator.${uuidForThisProfile}</string>
<string>${this.downloadProfileFormData.identifier}.${this.downloadProfileFormData.uuid}</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>${uuidForThisProfile}</string>
<string>${this.downloadProfileFormData.uuid}</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>TargetDeviceType</key>
@ -567,9 +566,22 @@ parasails.registerPage('configuration-builder', {
if(_.keysIn(this.selectedPayloadsGroupedByCategory).length > 1) {
this.modal = 'multiple-payloads-selected';
} else {
this.modal = 'download-profile';
this.openDownloadModal();
}
},
openDownloadModal: function() {
this.modal = 'download-profile';
if(this.selectedPlatform === 'macos'){
this.downloadProfileFormRules = {
name: {required: true},
uuid: {required: true},
identifier: {required: true},
};
// Generate a uuid to prefill for the download profile form.
this.downloadProfileFormData.uuid = crypto.randomUUID();
}
this._enableToolTips();
},
clickClearOneFormError: async function(field) {
await this.forceRender();
if(this.formErrors[field]){
@ -578,9 +590,9 @@ parasails.registerPage('configuration-builder', {
},
clickSelectPayloadCategory: function(payloadGroup) {
this.selectedPayloadCategory = payloadGroup;
this._enablePayloadToolTips();
this._enableToolTips();
},
_enablePayloadToolTips: async function() {
_enableToolTips: async function() {
await setTimeout(()=>{
$('[data-toggle="tooltip"]').tooltip({
container: '#configuration-builder',

View file

@ -806,6 +806,20 @@
}
[purpose='modal-form-option'] {
margin-bottom: 24px;
input {
display: flex;
height: 40px;
padding: 8px 12px;
align-items: flex-start;
font-size: 13px;
}
input, textarea {
color: #515774;
font-size: 13px;
&:focus {
border-color: #192147;
}
}
}
}

View file

@ -294,7 +294,7 @@
<p>Are you sure you want to continue?</p>
<div purpose="modal-form-buttons">
<div purpose="modal-button-primary" @click="modal = 'download-profile'">
<div purpose="modal-button-primary" @click="openDownloadModal()">
Continue
</div>
<div purpose="modal-button-secondary" @click="modal = undefined">
@ -310,12 +310,23 @@
<h3>Download your configuration file</h3>
<ajax-form :handle-submitting="handleSubmittingDownloadProfileForm" :form-errors.sync="formErrors" :form-data="downloadProfileFormData" :form-rules="downloadProfileFormRules" :syncing.sync="syncing" :cloud-error.sync="cloudError">
<div purpose="modal-form-option">
<label for="profile-name">Profile name</label>
<input type="text" class="form-control" id="profile-name" v-model="downloadProfileFormData.name">
<label for="profile-name">Profile name <img style="margin-left: 6px; height: 14px" class="d-inline" purpose="tooltip-icon" src="/images/icon-more-info-14x14@2x.png" alt="More info" data-toggle="tooltip" tabindex="0" data-placement="top" title="The name shown to users in their settings. It does not need to be unique."></label>
<input type="text" :class="[formErrors.name ? 'is-invalid' : '']" class="form-control" id="name" v-model="downloadProfileFormData.name">
<div class="invalid-feedback">Please enter a name for this profile.</div>
</div>
<div purpose="modal-form-option" v-if="selectedPlatform === 'macos'">
<label for="profile-identifier">Identifier <img style="margin-left: 6px; height: 14px" class="d-inline" purpose="tooltip-icon" src="/images/icon-more-info-14x14@2x.png" alt="More info" data-toggle="tooltip" tabindex="0" data-placement="top" title="A unique reverse-DNS identifier for this payload. It's usually the same as the profile's top-level identifier with an extra part added to describe the specific payload (e.g. .gatekeeper, .wifi). macOS uses it to manage and update individual settings."></label>
<input type="text" :class="[formErrors.identifier ? 'is-invalid' : '']" class="form-control" id="identifier" v-model="downloadProfileFormData.identifier">
<div class="invalid-feedback">Please enter a identifier for this profile.</div>
</div>
<div purpose="modal-form-option" v-if="selectedPlatform === 'macos'">
<label for="profile-uuid">UUID <img style="margin-left: 6px; height: 14px" class="d-inline" purpose="tooltip-icon" src="/images/icon-more-info-14x14@2x.png" alt="More info" data-toggle="tooltip" tabindex="0" data-placement="top" title="A unique identifier for this payload, used to track and update the payload during profile replacements. Must be globally unique."></label>
<input type="text" :class="[formErrors.uuid ? 'is-invalid' : '']" class="form-control" id="uuid" v-model="downloadProfileFormData.uuid">
<div class="invalid-feedback">Please enter a UUID for this profile.</div>
</div>
<div purpose="modal-form-option">
<label for="profile-description">Description</label>
<textarea class="form-control mb-3" id="profile-description" v-model="downloadProfileFormData.description"></textarea>
<label for="profile-description">Description <img style="margin-left: 6px; height: 14px" class="d-inline" purpose="tooltip-icon" src="/images/icon-more-info-14x14@2x.png" alt="More info" data-toggle="tooltip" tabindex="0" data-placement="top" title="A unique identifier for this payload, used to track and update the payload during profile replacements. Must be globally unique."></label>
<textarea class="form-control" id="description" v-model="downloadProfileFormData.description"></textarea>
</div>
<div purpose="modal-form-buttons">
<ajax-button purpose="download-button" style="max-width: 130px; color: #FFF;" type="submit">