Repository: goauthentik/authentik
File: web/src/admin/endpoints/connectors/agent/AgentConnectorSetup.ts (TypeScript)

Code before:
                            const token = await new EndpointsApi(
                                DEFAULT_CONFIG,
                            ).endpointsAgentsEnrollmentTokensList(args);
                            return token.results;
                        }}
                        .renderElement=${(token: EnrollmentToken): string => {
                            return token.name;
                        }}
                        .renderDescription=${(token: EnrollmentToken) => {
                            return html`${token.name}`;
                        }}
                        .value=${(token: EnrollmentToken | undefined): string | undefined => {
                            return token?.tokenUuid;
                        }}
                        @ak-change=${(ev: CustomEvent) => {
                            this.token = ev.detail.value;
                        }}
                    >
                    </ak-search-select>
                </div>
                <div class="pf-l-grid__item pf-m-12-col">
                    <ul class="pf-c-list pf-m-inline">
                        <li>
                            <ak-endpoints-agent-connector-config
                                class="pf-m-secondary"
                                .request=${{
                                    connectorUuid: this.connector?.connectorUuid || "",
                                    mDMConfigRequest: {
                                        platform: DeviceFactsOSFamily.Windows,
                                        enrollmentToken: this.token?.tokenUuid || "",
                                    },
                                }}
                            >
                                <button
                                    slot="trigger"
                                    class="pf-c-button pf-m-secondary"
                                    ?disabled=${!this.token}
                                >
                                    ${msg("Windows")}
                                </button>
                            </ak-endpoints-agent-connector-config>
                        </li>
                        <li>
                            <ak-endpoints-agent-connector-config
                                class="pf-m-link"
                                .request=${{
                                    connectorUuid: this.connector?.connectorUuid || "",
                                    mDMConfigRequest: {
                                        platform: DeviceFactsOSFamily.MacOs,
                                        enrollmentToken: this.token?.tokenUuid || "",
                                    },

Review comment (suggestion):
After talking to @beryju, we determined that these fields aren't used, and there's nothing in `ak-endpoints-agent-connector-config` to read the `label` attribute.

Code after:
                            ).endpointsAgentsEnrollmentTokensList(args);
                            return token.results;
                        }}
                        .renderElement=${(token: EnrollmentToken): string => {
                            return token.name;
                        }}
                        .renderDescription=${(token: EnrollmentToken) => {
                            return html`${token.name}`;
                        }}
                        .value=${(token: EnrollmentToken | null) => {
                            return token?.tokenUuid;
                        }}
                        @ak-change=${(ev: CustomEvent) => {
                            this.token = ev.detail.value;
                        }}
                    >
                    </ak-search-select>
                </div>
                <div class="pf-l-grid__item pf-m-12-col">
                    <ul class="pf-c-list pf-m-inline">
                        <li>
                            <ak-endpoints-agent-connector-config
                                class="pf-m-secondary"
                                .request=${{
                                    connectorUuid: this.connector?.connectorUuid || "",
                                    mDMConfigRequest: {
                                        platform: DeviceFactsOSFamily.Windows,
                                        enrollmentToken: this.token?.tokenUuid || "",
                                    },
                                }}
                            >
                                <button
                                    slot="trigger"
                                    class="pf-c-button pf-m-secondary"
                                    ?disabled=${!this.token}
                                >
                                    ${msg("Windows")}
                                </button>
                            </ak-endpoints-agent-connector-config>
                        </li>
                        <li>
                            <ak-endpoints-agent-connector-config
                                class="pf-m-link"
                                .request=${{
                                    connectorUuid: this.connector?.connectorUuid || "",
                                    mDMConfigRequest: {
                                        platform: DeviceFactsOSFamily.MacOs,
                                        enrollmentToken: this.token?.tokenUuid || "",
                                    },
                                }}
                            >