Set up a hosted instance and connect it in one command - Add Instance takes the address it will have, and the instance page gives a ready setup_cli command with the connection code and the client's company name, address, phone, website, tax ID, currency and primary contact as the first admin; setup_cli gains --manager-code and --manager-required (connects after setup, writes the managed line to config.php, exits 3 if it set up but could not connect), --ask-missing, --generate-password, --json and ITFLOW_SETUP_ environment variables for any option, and shows the cron job as a crontab line and for a hosting panel with the full PHP path; Managed Instances shows a connected instance whose cron has never run as Waiting for its cron job with the command to add, and the Managed Instances job says so in its notification; new managedSetupCommand(), the cron command in the instance report and the waiting state in managedInstanceHealth(), changelog updated

This commit is contained in:
johnnyq
2026-11-06 14:29:27 -05:00
parent 172cd4933e
commit 79e616614a
8 changed files with 283 additions and 24 deletions

View File

@@ -47,7 +47,11 @@ if (!managerEnabled()) { ?>
'managed_instance_white_label_key' => '',
'managed_instance_mode' => 'active',
'managed_instance_mode_message' => '',
'managed_instance_url' => '',
'managed_instance_secret_hash' => '',
];
// Its address is typed until it connects - then it's the one it says it has
$address_typed = empty($form['managed_instance_secret_hash']);
$form_id = 'managedInstanceForm' . intval($form['managed_instance_id']);
$value = function ($key) use ($form) {
return escapeHtml((string) ($form[$key] ?? ''));
@@ -92,6 +96,17 @@ if (!managerEnabled()) { ?>
<div class="form-text">What it's called here - its own company name shows from its reports.</div>
</div>
<?php if ($address_typed) { ?>
<div class="mb-3">
<label class="form-label">Address</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-globe"></i></span>
<input type="text" class="form-control" name="url" placeholder="e.g. itflow.ravenwooddental.com" maxlength="240" value="<?= escapeHtml(preg_replace('#^https?://#', '', (string) $form['managed_instance_url'])) ?>">
</div>
<div class="form-text">Where it's reached, without https:// - it goes in the command that sets up a new install for it. Once it connects, it's the address it says it has.</div>
</div>
<?php } ?>
<div class="mb-3">
<label class="form-label">Client</label>
<div class="input-group">