@scalio-cloud/ui 0.98.0 → 0.98.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/react/agents.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalio-cloud/ui",
3
- "version": "0.98.0",
3
+ "version": "0.98.1",
4
4
  "description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "private": false,
package/react/agents.js CHANGED
@@ -480,7 +480,9 @@ function AgentsPanel(props) {
480
480
  }, [load, props.refreshMs]);
481
481
 
482
482
  const offered = (data && data.roles) || [];
483
- const selectedRoles = codeRoles || []; // none preselected: the admin picks the roles (no Active Directory by default)
483
+ // several roles offered: none preselected, the admin picks (no Active Directory by default);
484
+ // a single offered role has no checkbox, so it is the only possible choice
485
+ const selectedRoles = codeRoles || (offered.length === 1 ? [offered[0].name] : []);
484
486
 
485
487
  const run = async (fn, okText) => {
486
488
  setBusy(true);