Adds internal anchor links in the config page

main
Yasen Pramatarov 2024-09-23 19:33:10 +03:00
parent 1acb7126ec
commit 950ea8ff95
6 changed files with 6 additions and 46 deletions

View File

@ -1,42 +0,0 @@
<!-- widget "agents" -->
<div class="card text-center w-75 mx-lef">
<p class="h4 card-header">Jilo Agents on platform <strong>"<?= htmlspecialchars($platformDetails[0]['name']) ?>"</strong></p>
<div class="card-body">
<p class="card-text">agents configuration &nbsp;<a class="btn btn-secondary" style="padding: 0px;" href="<?= $app_root ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=agents&action=add">add</a></p>
<?php foreach ($agentDetails as $agent_array) { ?>
<div class="row mb-3" style="padding-left: 0px;">
<div class="border bg-light" style="padding-left: 50px; padding-bottom: 20px; padding-top: 20px;">
<div class="row mb-1" style="padding-left: 0px;">
<div class="col-md-4 text-end">
agent id <?= $agent_array['id'] ?>:
</div>
<div class="col-md-8 text-start">
<a class="btn btn-secondary" style="padding: 2px;" href="<?= $app_root ?>?platform=<?= htmlspecialchars($agent_array['platform_id']) ?>&page=agents&agent=<?= htmlspecialchars($agent_array['id']) ?>&action=edit">edit</a>
<a class="btn btn-danger" style="padding: 2px;" href="<?= $app_root ?>?platform=<?= htmlspecialchars($agent_array['platform_id'])?>&page=agents&agent=<?= htmlspecialchars($agent_array['id']) ?>&action=delete">delete</a>
</div>
<div style="padding-left: 100px; padding-bottom: 20px;">
<?php foreach ($agent_array as $key => $value) {
if ($key === 'id') continue;
?>
<div class="row mb-1" style="padding-left: 100px;">
<div class="col-md-4 text-end">
<?= $key ?>:
</div>
<div class="border col-md-8 text-start">
<?= $value ?>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<!-- /widget "agents" -->

View File

@ -24,7 +24,7 @@ foreach ($agentDetails[0] as $key => $value) {
<input type="hidden" name="delete" value="true" /> <input type="hidden" name="delete" value="true" />
<p class="h5 text-danger">Are you sure you want to delete this agent?</p> <p class="h5 text-danger">Are you sure you want to delete this agent?</p>
<br /> <br />
<a class="btn btn-secondary" href="<?= $app_root ?>?page=config" />Cancel</a> <a class="btn btn-secondary" href="<?= $app_root ?>?page=config#platform<?= htmlspecialchars($platform_id) ?>agent<?= htmlspecialchars($agentDetails[0]['id']) ?>" />Cancel</a>
<input type="submit" class="btn btn-danger" value="Delete" /> <input type="submit" class="btn btn-danger" value="Delete" />
</form> </form>
</div> </div>

View File

@ -24,7 +24,7 @@ foreach ($platformDetails[0] as $key => $value) {
<input type="hidden" name="delete" value="true" /> <input type="hidden" name="delete" value="true" />
<p class="h5 text-danger">Are you sure you want to delete this platform?</p> <p class="h5 text-danger">Are you sure you want to delete this platform?</p>
<br /> <br />
<a class="btn btn-secondary" href="<?= $app_root ?>?page=config" />Cancel</a> <a class="btn btn-secondary" href="<?= $app_root ?>?page=config#platform<?= htmlspecialchars($platform_id) ?>" />Cancel</a>
<input type="submit" class="btn btn-danger" value="Delete" /> <input type="submit" class="btn btn-danger" value="Delete" />
</form> </form>
</div> </div>

View File

@ -42,7 +42,7 @@
<br /> <br />
<input type="hidden" name="agent" value="<?= htmlspecialchars($agentDetails[0]['id']) ?>" /> <input type="hidden" name="agent" value="<?= htmlspecialchars($agentDetails[0]['id']) ?>" />
<a class="btn btn-secondary" href="<?= $app_root ?>?page=config" />Cancel</a> <a class="btn btn-secondary" href="<?= $app_root ?>?page=config#platform<?= htmlspecialchars($platform_id) ?>agent<?= htmlspecialchars($agentDetails[0]['id']) ?>" />Cancel</a>
<input type="submit" class="btn btn-primary" value="Save" /> <input type="submit" class="btn btn-primary" value="Save" />
</form> </form>
</div> </div>

View File

@ -28,7 +28,7 @@ foreach ($platformDetails[0] as $key => $value) {
<?php } ?> <?php } ?>
<br /> <br />
<input type="hidden" name="platform" value="<?= htmlspecialchars($platform_id) ?>" /> <input type="hidden" name="platform" value="<?= htmlspecialchars($platform_id) ?>" />
<a class="btn btn-secondary" href="<?= $app_root ?>?page=config" />Cancel</a> <a class="btn btn-secondary" href="<?= $app_root ?>?page=config#platform<?= htmlspecialchars($platform_id) ?>" />Cancel</a>
<input type="submit" class="btn btn-primary" value="Save" /> <input type="submit" class="btn btn-primary" value="Save" />
</form> </form>
</div> </div>

View File

@ -17,6 +17,7 @@ echo "\n";
$agents = $agentObject->getAgentDetails($platform_array['id']); $agents = $agentObject->getAgentDetails($platform_array['id']);
?> ?>
<a name="platform<?= $platform_array['id'] ?>"></a>
<div class="row mb-3" style="padding-left: 0px;"> <div class="row mb-3" style="padding-left: 0px;">
<div class="border bg-light" style="padding-left: 50px; padding-bottom: 0px; padding-top: 0px;"> <div class="border bg-light" style="padding-left: 50px; padding-bottom: 0px; padding-top: 0px;">
<a style="text-decoration: none;" data-toggle="collapse" href="#collapsePlatform<?= $platform_array['id'] ?>" role="button" aria-expanded="true" aria-controls="collapsePlatform<?= $platform_array['id'] ?>"> <a style="text-decoration: none;" data-toggle="collapse" href="#collapsePlatform<?= $platform_array['id'] ?>" role="button" aria-expanded="true" aria-controls="collapsePlatform<?= $platform_array['id'] ?>">
@ -68,6 +69,7 @@ echo "\n";
<?php foreach ($agents as $agent_array) { ?> <?php foreach ($agents as $agent_array) { ?>
<a name="platform<?= $platform_array['id'] ?>agent<?= $agent_array['id'] ?>"></a>
<div class="row mb-3" style="padding-left: 0px;"> <div class="row mb-3" style="padding-left: 0px;">
<div class="border rounded bg-light" style="padding-left: 50px; padding-bottom: 20px; padding-top: 20px;"> <div class="border rounded bg-light" style="padding-left: 50px; padding-bottom: 20px; padding-top: 20px;">
<div class="row mb-1" style="padding-left: 0px;"> <div class="row mb-1" style="padding-left: 0px;">