Upload files to "ui/ui"
Signed-off-by: nestict <icttechnest@gmail.com>
This commit is contained in:
parent
909c867ba5
commit
aa8c6c0b34
66
ui/ui/router-error.tpl
Normal file
66
ui/ui/router-error.tpl
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="https://laravel.com/img/favicon/favicon-16x16.png" type='image/x-icon'>
|
||||
<title>{Lang::T('Login')} - {$_c['CompanyName']}</title>
|
||||
<link rel="stylesheet" href="assets/vendor/chartist/css/chartist.min.css">
|
||||
<link href="assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css" rel="stylesheet">
|
||||
<link href="assets/css/style.css" rel="stylesheet">
|
||||
<meta http-equiv="refresh" content="{$time}; url={$url}">
|
||||
<style>
|
||||
::-moz-selection {
|
||||
/* Code for Firefox */
|
||||
color: red;
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: red;
|
||||
background: yellow;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition skin-blue" style="background-color:#e9ecef;">
|
||||
<div class="container-fluid">
|
||||
<center>
|
||||
<div class="col-md-8" style="margin-top: 80px;">
|
||||
<div class="card card-danger card-solid">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
{$error_title}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body" style="font-size: larger; text-align: start;">
|
||||
<h5 class="text-danger">{$error_message}</h5>
|
||||
<hr>
|
||||
<h5 class="text-info">Mikrotik troubleshooting: </h5>
|
||||
<ol>
|
||||
<li>1. Make sure you use API Port, Default 8728</li>
|
||||
<li>2. Make sure Username and Password are correct</li>
|
||||
<li>3. Make sure your hosting is not blocking port to external</li>
|
||||
<li>4. Make sure your is Mikrotik accessible from MikroPulse</li>
|
||||
</ol>
|
||||
<span class="text-info">Note: </span>If you just update MikroPulse from upload files, try
|
||||
contact admin
|
||||
</div>
|
||||
<!-- <div class="card-footer">
|
||||
<div class="" role="group" aria-label="...">
|
||||
<a href="./update.php?step=4"
|
||||
class="btn btn-info btn-sm btn-block mb-3">Update Database</a>
|
||||
<a href="#" " class="btn btn-success btn-sm btn-block mb-4">Update
|
||||
Mikropulse</a>
|
||||
</div>
|
||||
<a href="javascript::history.back()" onclick="history.back()"
|
||||
class="btn btn-warning btn-block">back</a>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
70
ui/ui/routers-add.tpl
Normal file
70
ui/ui/routers-add.tpl
Normal file
@ -0,0 +1,70 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">{Lang::T('Add Router')}</h5></div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}routers/add-post">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Router Name / Location')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="name" name="name" maxlength="32">
|
||||
<p class="help-block">{Lang::T('Name of Area that router operated')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('IP Address')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" placeholder="192.168.88.1:8728" class="form-control" id="ip_address"
|
||||
name="ip_address">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Username')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="username" name="username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Router Secret')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="password" name="password"
|
||||
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Description')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="description" name="description"></textarea>
|
||||
<p class="help-block">{Lang::T('Explain Coverage of router')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary mb-3"
|
||||
type="submit">{Lang::T('Save Changes')}</button>
|
||||
Or <a class="btn btn-outline-primary" href="{$_url}routers/list">{Lang::T('Cancel')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
70
ui/ui/routers-edit.tpl
Normal file
70
ui/ui/routers-edit.tpl
Normal file
@ -0,0 +1,70 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{Lang::T('Edit Router')}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}routers/edit-post" >
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-8">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['enabled'] == 1}checked{/if} name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['enabled'] == 0}checked{/if} name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Router Name / Location')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="name" name="name" maxlength="32" value="{$d['name']}">
|
||||
<p class="help-block">{Lang::T('Name of Area that router operated')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('IP Address')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" placeholder="192.168.88.1:8728" class="form-control" id="ip_address" name="ip_address" value="{$d['ip_address']}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Username')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="username" name="username" value="{$d['username']}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Router Secret')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" id="password" name="password" value="{$d['password']}" onmouseleave="this.type = 'password'"
|
||||
onmouseenter="this.type = 'text'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 control-label">{Lang::T('Description')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="description" name="description">{$d['description']}</textarea>
|
||||
<p class="help-block">{Lang::T('Explain Coverage of router')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary mb-3" type="submit">{Lang::T('Save Changes')}</button>
|
||||
Or <a class="btn btn-outline-primary" href="{$_url}routers/list">{Lang::T('Cancel')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
210
ui/ui/routers.tpl
Normal file
210
ui/ui/routers.tpl
Normal file
@ -0,0 +1,210 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card card-hovered mb20 card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{Lang::T('Routers')}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}routers/list/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control"
|
||||
placeholder="{Lang::T('Search by Name')}...">
|
||||
<button class="btn btn-success input-group-btn" type="submit">{Lang::T('Search')}</button>
|
||||
<!-- <div class="input-group-btn">
|
||||
</div> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}routers/add" class="btn btn-primary btn-block"><i
|
||||
class="fa fa-add"> </i> {Lang::T('New Router')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{Lang::T('Router Name')}</th>
|
||||
<th>{Lang::T('IP Address')}</th>
|
||||
<th>{Lang::T('Status')}</th>
|
||||
<th>{Lang::T('Uptime')}</th>
|
||||
<th>{Lang::T('Free Memory')}</th>
|
||||
<th>{Lang::T('CPU Load')}</th>
|
||||
<th>{Lang::T('Manage')}</th>
|
||||
<th>ID</th>
|
||||
<th>{Lang::T('Download')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
|
||||
<td>{$ds['name']}</td>
|
||||
<td>{$ds['ip_address']}</td>
|
||||
<td class="router-status" data-router-id="{$ds['id']}"></td>
|
||||
<td class="router-uptime text-success" data-router-id="{$ds['id']}"></td>
|
||||
<td class="router-used-memory text-warning" data-router-id="{$ds['id']}"></td>
|
||||
<td class="router-cpu-load text-primary" data-router-id="{$ds['id']}"></td>
|
||||
<td>
|
||||
<a href="{$_url}routers/edit/{$ds['id']}" class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
|
||||
<a href="{$_url}routers/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{Lang::T('Delete')}?')"
|
||||
class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a>
|
||||
<button class="btn btn-warning btn-xs btn-reboot" data-router-id="{$ds['id']}"><i class="fa fa-refresh"></i> {Lang::T('Reboot')}</button>
|
||||
</td>
|
||||
<td>{$ds['id']}</td>
|
||||
<td>
|
||||
<form action="{$_url}routers/download" method="post" style="display:inline;">
|
||||
<input type="hidden" name="router_id" value="{$ds['id']}">
|
||||
<input type="hidden" name="router_name" value="{$ds['name']}">
|
||||
<button type="submit" class="btn btn-success btn-xs">
|
||||
<i class="fa fa-download"></i> {Lang::T('Download')}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="pagination.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
||||
|
||||
<style>
|
||||
.loader {
|
||||
display: inline-block;
|
||||
animation: loading 1s infinite;
|
||||
margin: 0; /* Added this line */
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% {
|
||||
content: ".";
|
||||
}
|
||||
33% {
|
||||
content: "..";
|
||||
}
|
||||
66% {
|
||||
content: "...";
|
||||
}
|
||||
}
|
||||
|
||||
.router-uptime {
|
||||
color: #28a745; /* Green for uptime */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-used-memory {
|
||||
color: #fd7e14; /* Orange for memory */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-cpu-load {
|
||||
color: #d63384; /* Pink for CPU load */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-status {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-status .status {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.router-status .online {
|
||||
background-color: #28a745;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.router-status .offline {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Fetch router resources asynchronously
|
||||
$('.router-uptime, .router-used-memory, .router-total-memory, .router-cpu-load, .router-status').each(function() {
|
||||
var routerId = $(this).data('router-id');
|
||||
var elementClass = $(this).attr('class').split(' ')[0];
|
||||
var row = $(this).closest('tr');
|
||||
|
||||
$.ajax({
|
||||
url: '{$_url}routers/get_resources',
|
||||
data: { router_id: routerId },
|
||||
dataType: 'json',
|
||||
success: function(resources) {
|
||||
if (resources) {
|
||||
if (elementClass === 'router-uptime') {
|
||||
row.find('.router-uptime').html(resources.uptime);
|
||||
} else if (elementClass === 'router-used-memory') {
|
||||
row.find('.router-used-memory').html(resources.freeMemory);
|
||||
} else if (elementClass === 'router-total-memory') {
|
||||
row.find('.router-total-memory').html(resources.totalMemory);
|
||||
} else if (elementClass === 'router-cpu-load') {
|
||||
row.find('.router-cpu-load').html(resources.cpuLoad);
|
||||
}
|
||||
|
||||
// Update router status
|
||||
var statusElement = row.find('.router-status');
|
||||
if (resources.status === 'Online') {
|
||||
statusElement.html('<span class="status online">Online</span>');
|
||||
} else {
|
||||
statusElement.html('<span class="status offline">Offline</span>');
|
||||
}
|
||||
} else {
|
||||
row.find('.' + elementClass).html('N/A');
|
||||
// Set router status to offline if resources are not available
|
||||
var statusElement = row.find('.router-status');
|
||||
statusElement.html('<span class="status offline">Offline</span>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error cases
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Reboot router
|
||||
$('.btn-reboot').on('click', function() {
|
||||
var routerId = $(this).data('router-id');
|
||||
if (confirm('Are you sure you want to reboot this router?')) {
|
||||
$.ajax({
|
||||
url: '{$_url}routers/reboot',
|
||||
data: { router_id: routerId },
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status === 'Rebooting') {
|
||||
alert(response.message);
|
||||
} else {
|
||||
alert('Error: ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
alert('Failed to send reboot command. Please try again.');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
42
ui/ui/user-activation.tpl
Normal file
42
ui/ui/user-activation.tpl
Normal file
@ -0,0 +1,42 @@
|
||||
{include file="sections/user-header.tpl"}
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-xxl-12">
|
||||
<div class="col-xl-12">
|
||||
<div class="card coin-card">
|
||||
<div class="card-body d-sm-flex d-block align-items-center">
|
||||
<span class="coin-icon">
|
||||
<svg width="38" height="41" viewBox="0 0 38 41" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g><path d="M14.0413 32.5832C15.7416 32.5934 17.4269 32.2659 18.9997 31.6199C20.5708 32.2714 22.2572 32.5991 23.958 32.5832C29.1218 32.5832 33.1663 29.8278 33.1663 26.3088V20.441C33.1663 16.922 29.1218 14.1666 23.958 14.1666C23.7186 14.1666 23.4834 14.1779 23.2497 14.1906V7.55498C23.2497 4.10823 19.2051 1.41656 14.0413 1.41656C8.87759 1.41656 4.83301 4.10823 4.83301 7.55498V26.4448C4.83301 29.8916 8.87759 32.5832 14.0413 32.5832ZM30.333 26.3088C30.333 27.9366 27.715 29.7499 23.958 29.7499C20.201 29.7499 17.583 27.9366 17.583 26.3088V24.9984C19.5015 26.1652 21.7131 26.7604 23.958 26.714C26.203 26.7604 28.4145 26.1652 30.333 24.9984V26.3088ZM23.958 16.9999C27.715 16.9999 30.333 18.8132 30.333 20.441C30.333 22.0687 27.715 23.8807 23.958 23.8807C20.201 23.8807 17.583 22.0673 17.583 20.441C17.583 18.8147 20.201 16.9999 23.958 16.9999ZM14.0413 4.2499C17.7983 4.2499 20.4163 5.9924 20.4163 7.55498C20.4163 9.11757 17.7983 10.8615 14.0413 10.8615C10.2843 10.8615 7.66634 9.11898 7.66634 7.55498C7.66634 5.99098 10.2843 4.2499 14.0413 4.2499ZM7.66634 12.0161C9.59282 13.1601 11.8012 13.7417 14.0413 13.6948C16.2814 13.7417 18.4899 13.1601 20.4163 12.0161V14.6341C18.8724 15.0232 17.4565 15.8078 16.308 16.9107C15.5631 17.0718 14.8034 17.1545 14.0413 17.1572C10.2843 17.1572 7.66634 15.4146 7.66634 13.8521V12.0161ZM7.66634 18.3132C9.59323 19.4561 11.8015 20.0371 14.0413 19.9905C14.2935 19.9905 14.5372 19.9593 14.7851 19.9466C14.764 20.1106 14.7522 20.2756 14.7497 20.441V23.3947C14.5117 23.4089 14.2822 23.4542 14.0413 23.4542C10.2843 23.4542 7.66634 21.7117 7.66634 20.1477V18.3132ZM7.66634 24.6088C9.59282 25.7529 11.8012 26.3344 14.0413 26.2876C14.2793 26.2876 14.5131 26.2692 14.7497 26.2578V26.3088C14.7699 27.5148 15.2334 28.6711 16.0516 29.5572C15.3887 29.6824 14.7159 29.7469 14.0413 29.7499C10.2843 29.7499 7.66634 28.0074 7.66634 26.4448V24.6088Z" fill="#fff"></path></g>
|
||||
</svg>
|
||||
</span>
|
||||
<div>
|
||||
<h3 class="text-white">For cash payment Make sure You Get A Voucher code</h3>
|
||||
{include file="$_path/../pages/Order_Voucher.html"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-12 col-xxl-12">
|
||||
<div class="card">
|
||||
<div class="card-header border-0 pb-0">
|
||||
<div>
|
||||
<h4 class="card-title mb-2">{Lang::T('Voucher Activation')}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}voucher/activation-post">
|
||||
<label class="col-md-2 control-label">{Lang::T('Code Voucher')}</label>
|
||||
<div class="format-slider mb-3">
|
||||
<input type="text" class="form-control" id="code" name="code"
|
||||
placeholder="{Lang::T('Enter voucher code here')}">
|
||||
</div>
|
||||
<div class="border-0 pt-0">
|
||||
<button class="btn btn-primary btn-block btn-lg text-uppercase" type="submit">{Lang::T('Recharge')}</button> Or <a class="btn btn-warning d-block btn-lg text-uppercase" href="{$_url}home">{Lang::T('Cancel')}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/user-footer.tpl"}
|
Loading…
x
Reference in New Issue
Block a user