Managed Instances - the ITFlow installs this one manages (functions/managed.php). * Each row says what it is and whose, the version it runs and whether an update is waiting, * how it's doing (from the report it sends every minute), its agents against the seat limit * set here, whether it's active, read-only or suspended, and when it last checked in. Removed * instances sit under Removed, where they can be deleted. Add Instance makes one and its * connection code; the handlers are admin/post/managed_instances.php. */ // Default Column Sortby Filter $sort = "managed_instance_name"; $order = "ASC"; require_once "includes/inc_all_admin.php"; // Off unless config.php turns it on (managerEnabled()) if (!managerEnabled()) { ?>
Managing other ITFlow installs is off. To turn it on, add this line to the end of config.php: $config_enable_managed_instances = true;
Managing other ITFlow installs needs this install's database update - apply it from Maintenance > Update first.
"managed_instance_name $order", 'managed_instance_version' => "managed_instance_version IS NULL, INET_ATON(CONCAT(managed_instance_version, '.0')) $order, managed_instance_version $order, managed_instance_name ASC", 'managed_instance_last_checkin_at' => "managed_instance_last_checkin_at IS NULL, managed_instance_last_checkin_at $order, managed_instance_name ASC", 'client_name' => "client_name IS NULL, client_name $order, managed_instance_name ASC", ]; if (!isset($sortable_columns[$sort])) { $sort = 'managed_instance_name'; } $search = "(managed_instance_name LIKE '%$q%' OR managed_instance_url LIKE '%$q%' OR client_name LIKE '%$q%' OR managed_instance_version LIKE '%$q%')"; $sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS managed_instances.*, client_name FROM managed_instances LEFT JOIN clients ON client_id = managed_instance_client_id WHERE $search AND managed_instance_archived_at IS " . ($show_removed ? 'NOT NULL' : 'NULL') . " ORDER BY {$sortable_columns[$sort]}, managed_instance_id ASC LIMIT $record_from, $record_to"); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $counts = mysqli_fetch_row(mysqli_query($mysqli, "SELECT COALESCE(SUM(managed_instance_archived_at IS NULL), 0), COALESCE(SUM(managed_instance_archived_at IS NOT NULL), 0) FROM managed_instances LEFT JOIN clients ON client_id = managed_instance_client_id WHERE $search")); $sort_link = function ($column, $label) use ($url_query_strings_sort, $sort, $disp, $order_icon) { return '' . $label . ($sort === $column ? " $order_icon" : '') . ''; }; $csrf = $_SESSION['csrf_token']; ?>

Managed Instances

"> 'success', 'offline' => 'danger', 'pending' => 'secondary', 'waiting' => 'warning'][$health['state']]; $last = $row['managed_instance_last_checkin_at']; $last_html = $health['state'] === 'pending' ? 'Not connected yet' : ($health['state'] === 'waiting' ? 'Waiting for its cron job' : ($last ? '' . escapeHtml(timeAgo($last)) . '' : 'Never')); $page = "managed_instance.php?id=$instance_id"; ?>
Health Agents
—
— All good
2) { ?>
and more
0 ? ' of ' . $seat_limit : '' ?>
0 ? 'seats' : 'agents, no limit' ?>
—
'managed instances', 'icon' => 'fa-network-wired', 'filtered' => $q !== '', 'archived' => $show_removed, 'archived_title' => 'No removed instances', 'views' => ['show'], 'text' => 'Manage other ITFlow installs from here - a client\'s, a reseller\'s or your own hosted ones. Each checks in every minute with how it\'s doing; from here you set its seat limit, white label and updates, update it, make it read-only or suspend it, and sign in to it as support.', 'actions' => [['label' => 'Add Instance', 'modal' => 'modals/managed_instance/managed_instance_form.php']], ]; require_once "../includes/filter_footer.php"; ?>