mirror of
https://github.com/itflow-org/itflow
synced 2026-12-06 11:08:59 +00:00
Managed instances now report their agents and waiting invites (name, email, role, MFA, last sign-in) at check-in, the manager shows them in an Agents card on the instance page, and the Managed By privacy text lists what is sent
This commit is contained in:
@@ -112,7 +112,7 @@ $lock = '<i class="fas fa-fw fa-lock text-body-secondary ms-1" title="Set by ' .
|
||||
<h3 class="card-title"><i class="fas fa-fw fa-info-circle me-2"></i>What a manager can do</h3>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush small">
|
||||
<li class="list-group-item d-flex gap-2"><i class="fas fa-fw fa-heartbeat text-body-secondary mt-1"></i><span>See how it's doing - versions, updates, cron, backups, errors and seats. No client data leaves here.</span></li>
|
||||
<li class="list-group-item d-flex gap-2"><i class="fas fa-fw fa-heartbeat text-body-secondary mt-1"></i><span>See how it's doing - versions, updates, cron, backups, errors, and who holds its seats. No client data leaves here.</span></li>
|
||||
<li class="list-group-item d-flex gap-2"><i class="fas fa-fw fa-download text-body-secondary mt-1"></i><span>Update it, by hand or automatically - and then updates come only from there.</span></li>
|
||||
<li class="list-group-item d-flex gap-2"><i class="fas fa-fw fa-users text-body-secondary mt-1"></i><span>Set how many agents it can have, and its white-label key.</span></li>
|
||||
<li class="list-group-item d-flex gap-2"><i class="fas fa-fw fa-headset text-body-secondary mt-1"></i><span>Sign in as support, for two hours at a time - each time in the audit log, and you're notified.</span></li>
|
||||
@@ -195,7 +195,8 @@ $lock = '<i class="fas fa-fw fa-lock text-body-secondary ms-1" title="Set by ' .
|
||||
<li>its address, company name and time zone</li>
|
||||
<li>its version, database version, PHP version and branch, and whether an update is waiting</li>
|
||||
<li>how the last update went, whether cron is running, and when the last backup was</li>
|
||||
<li>how many errors were logged today and the categories they were logged under - never what they say - how many agents and clients it has, and its storage</li>
|
||||
<li>how many errors were logged today and the categories they were logged under - never what they say - how many clients it has, and its storage</li>
|
||||
<li>its agents and the invites waiting - name, email, role, whether they sign in with MFA and when they last signed in</li>
|
||||
</ul>
|
||||
<p class="mb-0 text-body-secondary">No tickets, documents, credentials, invoices or contacts.</p>
|
||||
</div>
|
||||
|
||||
@@ -310,6 +310,68 @@ if ($error_count > 0) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<!-- Who holds its seats - its active agents, then the invites waiting -->
|
||||
<div class="card mb-3" data-managed-agents>
|
||||
<div class="card-header py-3">
|
||||
<h3 class="card-title"><i class="fas fa-fw fa-users me-2"></i>Agents</h3>
|
||||
<?php if ($agents) { ?>
|
||||
<div class="card-tools small text-body-secondary pt-1"><?= intval($agents['active'] ?? 0) + intval($agents['invites'] ?? 0) ?><?= intval($agents['limit'] ?? 0) > 0 ? ' of ' . intval($agents['limit']) : '' ?> seats taken</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (!is_array($agents['list'] ?? null)) { ?>
|
||||
<div class="card-body text-body-secondary small">Who they are shows once it runs a version that sends them - until then, only how many.</div>
|
||||
<?php } elseif (!$agents['list']) { ?>
|
||||
<div class="card-body text-body-secondary small">No agents yet.</div>
|
||||
<?php } else { ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm align-middle mb-0 small">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="ps-3">Agent</th>
|
||||
<th>Role</th>
|
||||
<th class="text-center">MFA</th>
|
||||
<th class="d-none d-md-table-cell">Last signed in</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($agents['list'] as $agent) {
|
||||
if (!is_array($agent)) {
|
||||
continue;
|
||||
}
|
||||
$invited = !empty($agent['invited']); ?>
|
||||
<tr>
|
||||
<td class="ps-3">
|
||||
<div class="fw-semibold"><?= escapeHtml((string) ($agent['name'] ?? '')) ?>
|
||||
<?php if ($invited) { ?><span class="badge rounded-pill bg-info-subtle text-info-emphasis border border-info-subtle fw-normal ms-1">Invited</span><?php } ?>
|
||||
<?php if (!empty($agent['service'])) { ?><span class="badge rounded-pill bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle fw-normal ms-1">API account</span><?php } ?>
|
||||
</div>
|
||||
<div class="text-body-secondary text-break"><?= escapeHtml((string) ($agent['email'] ?? '')) ?></div>
|
||||
</td>
|
||||
<td><?= escapeHtml((string) ($agent['role'] ?? '')) ?></td>
|
||||
<td class="text-center">
|
||||
<?php if ($invited) { ?>
|
||||
<span class="text-body-secondary">-</span>
|
||||
<?php } elseif (!empty($agent['mfa'])) { ?>
|
||||
<i class="fas fa-fw fa-lock text-success" title="Signs in with MFA"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fas fa-fw fa-unlock text-warning" title="No MFA"></i>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell text-nowrap">
|
||||
<?php if ($invited) { ?>
|
||||
<span class="text-body-secondary"><?= !empty($agent['expires_at']) ? 'Invite runs out ' . escapeHtml(date('M j', strtotime((string) $agent['expires_at']))) : 'Invite waiting' ?></span>
|
||||
<?php } else { ?>
|
||||
<?= $when($agent['last_login'] ?? null) ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- What it has been asked, and how that went -->
|
||||
|
||||
Reference in New Issue
Block a user