2020-04-20 13:53:46 +02:00
|
|
|
<?php ob_start() ?>
|
|
|
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
|
|
|
<input type="submit" class="btn btn-outline btn-primary" name="savewgsettings" value="<?php echo _("Save settings"); ?>">
|
2020-04-22 11:02:07 +02:00
|
|
|
<?php if ($wg_state) : ?>
|
|
|
|
<input type="submit" class="btn btn-warning" name="stopwg" value="<?php echo _("Stop WireGuard"); ?>">
|
2020-04-20 13:53:46 +02:00
|
|
|
<?php else : ?>
|
|
|
|
<input type="submit" class="btn btn-success" name="startwg" value="<?php echo _("Start WireGuard"); ?>">
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php $buttons = ob_get_clean(); ob_end_clean() ?>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2020-04-22 11:02:07 +02:00
|
|
|
<span class="ra-wireguard mr-2"></span><?php echo _("WireGuard"); ?>
|
2020-04-20 13:53:46 +02:00
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
<button class="btn btn-light btn-icon-split btn-sm service-status float-right">
|
|
|
|
<span class="icon text-gray-600"><i class="fas fa-circle service-status-<?php echo $serviceStatus ?>"></i></span>
|
|
|
|
<span class="text service-status">wg <?php echo _($serviceStatus) ?></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- /.card-header -->
|
|
|
|
<div class="card-body">
|
|
|
|
<?php $status->showMessages(); ?>
|
2023-02-05 13:53:18 +01:00
|
|
|
<form role="form" action="wg_conf" enctype="multipart/form-data" method="POST">
|
2020-04-20 13:53:46 +02:00
|
|
|
<?php echo CSRFTokenFieldTag() ?>
|
|
|
|
<!-- Nav tabs -->
|
|
|
|
<ul class="nav nav-tabs">
|
2020-04-22 11:02:07 +02:00
|
|
|
<li class="nav-item"><a class="nav-link active" id="settingstab" href="#wgsettings" data-toggle="tab"><?php echo _("Settings"); ?></a></li>
|
2020-08-25 23:10:50 +02:00
|
|
|
<li class="nav-item"><a class="nav-link" id="peertab" href="#wgpeers" data-toggle="tab"><?php echo _("Peer"); ?></a></li>
|
2020-04-22 11:02:07 +02:00
|
|
|
<li class="nav-item"><a class="nav-link" id="loggingtab" href="#wglogging" data-toggle="tab"><?php echo _("Logging"); ?></a></li>
|
2020-04-20 13:53:46 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
<?php echo renderTemplate("wg/general", $__template_data) ?>
|
2020-04-22 11:02:07 +02:00
|
|
|
<?php echo renderTemplate("wg/peers", $__template_data) ?>
|
2020-04-20 13:53:46 +02:00
|
|
|
<?php echo renderTemplate("wg/logging", $__template_data) ?>
|
|
|
|
</div><!-- /.tab-content -->
|
|
|
|
|
|
|
|
<?php echo $buttons ?>
|
|
|
|
</form>
|
|
|
|
</div><!-- /.card-body -->
|
|
|
|
<div class="card-footer"><?php echo _("Information provided by wireguard"); ?></div>
|
|
|
|
</div><!-- /.card -->
|
|
|
|
</div><!-- /.col-lg-12 -->
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|