mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-27 14:44:45 +02:00
Preparation for TLD management in panel
This commit is contained in:
parent
6c7c3960ee
commit
f564d3b800
6 changed files with 247 additions and 137 deletions
|
@ -29,4 +29,15 @@ class SystemController extends Controller
|
|||
'tlds' => $tlds,
|
||||
]);
|
||||
}
|
||||
|
||||
public function manageTlds(Request $request, Response $response)
|
||||
{
|
||||
if ($_SESSION["auth_roles"] != 0) {
|
||||
return $response->withHeader('Location', '/dashboard')->withStatus(302);
|
||||
}
|
||||
|
||||
$db = $this->container->get('db');
|
||||
|
||||
return view($response,'admin/system/manageTlds.twig');
|
||||
}
|
||||
}
|
95
cp/resources/views/admin/system/manageTlds.twig
Normal file
95
cp/resources/views/admin/system/manageTlds.twig
Normal file
|
@ -0,0 +1,95 @@
|
|||
{% extends "layouts/app.twig" %}
|
||||
|
||||
{% block title %}{{ __('TLD Management') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-wrapper">
|
||||
<!-- Page header -->
|
||||
<div class="page-header d-print-none">
|
||||
<div class="container-xl">
|
||||
<div class="row g-2 align-items-center">
|
||||
<div class="col">
|
||||
<!-- Page pre-title -->
|
||||
<div class="page-pretitle">
|
||||
{{ __('Overview') }}
|
||||
</div>
|
||||
<h2 class="page-title">
|
||||
{{ __('TLD Management') }}
|
||||
</h2>
|
||||
</div>
|
||||
<!-- Page title actions -->
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
<div class="btn-list">
|
||||
<span class="d-none d-sm-inline">
|
||||
<a href="{{route('checkDomain')}}" class="btn btn-secondary">
|
||||
{{ __('Manage Reserved Names') }}
|
||||
</a>
|
||||
</span>
|
||||
<a href="{{route('createDomain')}}" class="btn btn-primary d-none d-sm-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></svg>
|
||||
{{ __('Create New TLD') }}
|
||||
</a>
|
||||
<a href="{{route('createDomain')}}" class="btn btn-primary d-sm-none btn-icon" aria-label="{{ __('Create New TLD') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page body -->
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
<div class="col-12">
|
||||
{% if subject is defined %}
|
||||
<div class="alert alert-important alert-success alert-dismissible" role="alert">
|
||||
<div class="d-flex">
|
||||
<div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /><path d="M12 8v4" /><path d="M12 16h.01" /></svg>
|
||||
</div>
|
||||
<div>
|
||||
{{ __('Support ticket') }} <strong>{{ subject }}</strong> {{ __('was created!') }}
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn-close" data-bs-dismiss="alert" aria-label="close"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card">
|
||||
<div class="card-body border-bottom py-3">
|
||||
<div class="d-flex">
|
||||
<div class="text-secondary">
|
||||
<button class="btn btn-info btn-icon" onclick="downloadCSV()"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path><path d="M17 8l2 8l2 -8"></path><path d="M7 10a2 2 0 1 0 -4 0v4a2 2 0 1 0 4 0"></path></svg></button>
|
||||
<button class="btn btn-info btn-icon" onclick="downloadJSON()"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M20 16v-8l3 8v-8"></path><path d="M15 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path><path d="M1 8h3v6.5a1.5 1.5 0 0 1 -3 0v-.5"></path><path d="M7 15a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h1a1 1 0 0 1 1 1"></path></svg></button>
|
||||
<button class="btn btn-green btn-icon" onclick="downloadXLSX()"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"></path><path d="M4 15l4 6"></path><path d="M4 21l4 -6"></path><path d="M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"></path><path d="M11 15v6h3"></path></svg></button>
|
||||
<button class="btn btn-red btn-icon" onclick="downloadPDF()"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 8v8h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-2z"></path><path d="M3 12h2a2 2 0 1 0 0 -4h-2v8"></path><path d="M17 12h3"></path><path d="M21 8h-4v8"></path></svg></button>
|
||||
</div>
|
||||
<div class="ms-auto text-secondary">
|
||||
Search:
|
||||
<div class="ms-2 d-inline-block">
|
||||
<input id="search-input" type="text" class="form-control" aria-label="Search tickets">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive mt-3">
|
||||
<div id="tldTable"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer footer-transparent d-print-none">
|
||||
<div class="container-xl">
|
||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||
<ul class="list-inline list-inline-dots mb-0">
|
||||
<li class="list-inline-item">
|
||||
Copyright © 2023
|
||||
<a href="https://namingo.org" target="_blank" class="link-secondary">Namingo</a>.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -17,6 +17,23 @@
|
|||
{{ __('Registry Configuration') }}
|
||||
</h2>
|
||||
</div>
|
||||
<!-- Page title actions -->
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
<div class="btn-list">
|
||||
<span class="d-none d-sm-inline">
|
||||
<a href="{{route('checkDomain')}}" class="btn btn-secondary">
|
||||
{{ __('Manage Reserved Names') }}
|
||||
</a>
|
||||
</span>
|
||||
<a href="{{route('createDomain')}}" class="btn btn-primary d-none d-sm-inline-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></svg>
|
||||
{{ __('Create New TLD') }}
|
||||
</a>
|
||||
<a href="{{route('createDomain')}}" class="btn btn-primary d-sm-none btn-icon" aria-label="{{ __('Create New TLD') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,142 +42,30 @@
|
|||
<div class="container-xl">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs nav-fill" data-bs-toggle="tabs">
|
||||
<li class="nav-item">
|
||||
<a href="#tabs-general" class="nav-link active" data-bs-toggle="tab">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M6 4v4" /><path d="M6 12v8" /><path d="M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M12 4v10" /><path d="M12 18v2" /><path d="M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M18 4v1" /><path d="M18 9v11" /></svg>
|
||||
General</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#tabs-tlds" class="nav-link" data-bs-toggle="tab">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005 .195v12.666c0 1.96 -1.537 3.56 -3.472 3.662l-.195 .005h-12.666a3.667 3.667 0 0 1 -3.662 -3.472l-.005 -.195v-12.666c0 -1.96 1.537 -3.56 3.472 -3.662l.195 -.005h12.666zm-6.333 8.5a1.5 1.5 0 1 0 0 3a1.5 1.5 0 0 0 0 -3z" stroke-width="0" fill="currentColor" /></svg>
|
||||
TLDs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#tabs-dns" class="nav-link" data-bs-toggle="tab">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 20h7" /><path d="M14 20h7" /><path d="M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M12 16v2" /><path d="M8 16.004h-1.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-2.535" /></svg>
|
||||
DNS</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="#tabs-automation" class="nav-link" data-bs-toggle="tab">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-2" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z" /><path d="M12 2v2" /><path d="M9 12v9" /><path d="M15 12v9" /><path d="M5 16l4 -2" /><path d="M15 14l4 2" /><path d="M9 18h6" /><path d="M10 8v.01" /><path d="M14 8v.01" /></svg>
|
||||
Automation</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active show" id="tabs-general">
|
||||
<h5 class="mt-3">General Settings</h5>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<!-- Registry Operator's Details -->
|
||||
<div class="mb-3">
|
||||
<label for="registryOperator" class="form-label">Registry Operator Name</label>
|
||||
<input type="text" class="form-control" id="registryOperator" placeholder="Enter registry operator's name">
|
||||
<div class="form-text">The official name of the organization operating the registry.</div>
|
||||
</div>
|
||||
|
||||
<!-- Contact Information -->
|
||||
<div class="mb-3">
|
||||
<label for="contactEmail" class="form-label">Contact Email</label>
|
||||
<input type="email" class="form-control" id="contactEmail" placeholder="Enter contact email">
|
||||
<div class="form-text">The email address for general inquiries to the registry.</div>
|
||||
</div>
|
||||
|
||||
<!-- Save Button -->
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<!-- Authentication Mechanisms -->
|
||||
<div class="mb-3">
|
||||
<label for="authenticationMechanism" class="form-label">Authentication Mechanism</label>
|
||||
<select class="form-select" id="authenticationMechanism">
|
||||
<option selected>Choose...</option>
|
||||
<option value="password">Password-based</option>
|
||||
<option value="2fa">Two-factor Authentication</option>
|
||||
<option value="certificate">Certificate-based</option>
|
||||
</select>
|
||||
<div class="form-text">Choose the primary method of authentication for accessing the registry system.</div>
|
||||
</div>
|
||||
|
||||
<!-- Registry Handle -->
|
||||
<div class="mb-3">
|
||||
<label for="registryHandle" class="form-label">Registry Handle</label>
|
||||
<input type="text" class="form-control" id="registryHandle" placeholder="Enter registry handle">
|
||||
<div class="form-text">A unique identifier for the registry which will be appended to each object handle.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="registryOperator" class="form-label">Registry Operator Name</label>
|
||||
<input type="text" class="form-control" id="registryOperator" placeholder="Enter registry operator's name">
|
||||
<div class="form-text">The official name of the organization operating the registry.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabs-tlds">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h5 class="mt-3">TLD Settings</h5>
|
||||
<a href="/tld/create" class="btn btn-secondary">Add New TLD</a>
|
||||
<div class="mb-3">
|
||||
<label for="contactEmail" class="form-label">Contact Email</label>
|
||||
<input type="email" class="form-control" id="contactEmail" placeholder="Enter contact email">
|
||||
<div class="form-text">The email address for general inquiries to the registry.</div>
|
||||
</div>
|
||||
{% if tlds %}
|
||||
{% for tld in tlds %}
|
||||
<div class="card card-md mb-3">
|
||||
<div class="card-body text-center">
|
||||
<div class="text-uppercase text-secondary font-weight-medium">Number of Domains: {{ tld.domain_count }}</div>
|
||||
<div class="display-5 fw-bold my-3">{{ tld.tld }}</div>
|
||||
<ul class="list-unstyled lh-lg">
|
||||
{% if tld.secure == 1 %}
|
||||
<li>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-1 text-success" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10" /></svg>
|
||||
Signed with DNSSEC
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-1 text-warning" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>
|
||||
Not signed with DNSSEC
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon me-1 text-info" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /><path d="M12 9h.01" /><path d="M11 12h1v4h1" /></svg>
|
||||
Supports Standard Latin Characters Only
|
||||
</li>
|
||||
</ul>
|
||||
<div class="text-center mt-4">
|
||||
<a href="/pricing/{{ tld.tld | slice(1) | lower }}" class="btn btn-outline-success">Update TLD Pricing</a>
|
||||
<a href="/reserved/{{ tld.tld | slice(1) | lower }}" class="btn btn-outline-info">Manage Reserved Names</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="tab-pane" id="tabs-dns">
|
||||
<h5 class="mt-3">DNS Settings</h5>
|
||||
<form>
|
||||
<!-- DNS Server Settings -->
|
||||
<div class="mb-3">
|
||||
<label for="primaryDns" class="form-label">Primary DNS Server</label>
|
||||
<input type="text" class="form-control" id="primaryDns" placeholder="Enter primary DNS server address">
|
||||
<div class="form-text">The address of the primary DNS server for the registry.</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="secondaryDns" class="form-label">Secondary DNS Server</label>
|
||||
<input type="text" class="form-control" id="secondaryDns" placeholder="Enter secondary DNS server address">
|
||||
<div class="form-text">The address of the secondary DNS server for redundancy.</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="soaEmail" class="form-label">SOA Email</label>
|
||||
<input type="email" class="form-control" id="soaEmail" placeholder="Enter email address for SOA record">
|
||||
<div class="form-text">The email address to be used in the SOA (Start of Authority) record for DNS zones.</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
</div>
|
||||
|
||||
<!-- Save Button -->
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabs-automation">
|
||||
<h4>Automation tab</h4>
|
||||
<div>Donec ac vitae diam amet vel leo egestas consequat rhoncus in luctus amet, facilisi sit mauris accumsan nibh habitant senectus</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="registryHandle" class="form-label">Registry Handle</label>
|
||||
<input type="text" class="form-control" id="registryHandle" placeholder="Enter registry handle">
|
||||
<div class="form-text">A unique identifier for the registry which will be appended to each object handle.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
|
||||
<title>{% block title %}{% endblock %} | Namingo</title>
|
||||
<!-- CSS files -->
|
||||
{% if route_is('domains') or route_is('contacts') or route_is('hosts') or route_is('epphistory') or route_is('registrars') or route_is('transactions') or route_is('overview') or route_is('reports') or route_is('transfers') or route_is('users') or route_is('support') or route_is('poll') or route_is('log') or route_is('invoices') %}
|
||||
{% if route_is('domains') or route_is('contacts') or route_is('hosts') or route_is('epphistory') or route_is('registrars') or route_is('transactions') or route_is('overview') or route_is('reports') or route_is('transfers') or route_is('users') or route_is('support') or route_is('poll') or route_is('log') or route_is('invoices') or route_is('registry/tlds') %}
|
||||
{% include 'partials/css-tables.twig' %}
|
||||
{% else %}
|
||||
{% include 'partials/css.twig' %}
|
||||
|
@ -189,7 +189,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li {{ is_current_url('epphistory') or is_current_url('poll') or is_current_url('log') or is_current_url('registry') or is_current_url('reports') ? 'class="nav-item dropdown active"' : 'class="nav-item dropdown"' }}>
|
||||
<li {{ is_current_url('epphistory') or is_current_url('poll') or is_current_url('log') or is_current_url('registry') or is_current_url('reports') or is_current_url('manageTlds') ? 'class="nav-item dropdown active"' : 'class="nav-item dropdown"' }}>
|
||||
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" data-bs-auto-close="outside" role="button" aria-expanded="false">
|
||||
<span class="nav-link-icon d-md-none d-lg-inline-block"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"></path> <path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"></path></svg>
|
||||
</span>
|
||||
|
@ -201,6 +201,9 @@
|
|||
<a class="dropdown-item" href="{{route('registry')}}">
|
||||
{{ __('Configuration') }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{{route('manageTlds')}}">
|
||||
{{ __('TLDs') }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{{route('reports')}}">
|
||||
{{ __('Reports') }}
|
||||
</a>
|
||||
|
@ -382,6 +385,8 @@
|
|||
{% include 'partials/js-log.twig' %}
|
||||
{% elseif route_is('invoices') %}
|
||||
{% include 'partials/js-invoices.twig' %}
|
||||
{% elseif route_is('registry/tlds') %}
|
||||
{% include 'partials/js-tlds.twig' %}
|
||||
{% else %}
|
||||
{% include 'partials/js.twig' %}
|
||||
{% endif %}
|
||||
|
|
90
cp/resources/views/partials/js-tlds.twig
Normal file
90
cp/resources/views/partials/js-tlds.twig
Normal file
|
@ -0,0 +1,90 @@
|
|||
<script src="/assets/js/tabulator.min.js" defer></script>
|
||||
<script src="/assets/js/tabler.min.js" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.6.0/jspdf.plugin.autotable.min.js"></script>
|
||||
<script>
|
||||
var table;
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
|
||||
function tldLinkFormatter(cell){
|
||||
var value = cell.getValue();
|
||||
return `<a href="/registry/tld/${cell.getRow().getData().tld}" style="font-weight:bold;">${value}</a>`;
|
||||
}
|
||||
|
||||
function secureFormatter(cell) {
|
||||
// Get the value of the 'secure' field
|
||||
var secure = cell.getValue();
|
||||
|
||||
// Return appropriate SVG icon and text based on the secure value
|
||||
return secure === 1 ?
|
||||
`<svg xmlns="http://www.w3.org/2000/svg" class="icon me-1 text-success" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10" /></svg> Signed` :
|
||||
`<svg xmlns="http://www.w3.org/2000/svg" class="icon me-1 text-warning" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg> Not signed`;
|
||||
}
|
||||
|
||||
function actionsFormatter(cell, formatterParams, onRendered) {
|
||||
return `
|
||||
<a class="btn btn-outline-yellow" href="/ticket/${cell.getRow().getData().tld}" title="Manage Settings"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16l-3 -2l-2 2l-2 -2l-2 2l-2 -2l-3 2" /><path d="M14 8h-2.5a1.5 1.5 0 0 0 0 3h1a1.5 1.5 0 0 1 0 3h-2.5m2 0v1.5m0 -9v1.5" /></svg> Settings</a> <a class="btn btn-outline-info" href="/ticket/${cell.getRow().getData().tld}" title="Manage Prices"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16l-3 -2l-2 2l-2 -2l-2 2l-2 -2l-3 2" /><path d="M14 8h-2.5a1.5 1.5 0 0 0 0 3h1a1.5 1.5 0 0 1 0 3h-2.5m2 0v1.5m0 -9v1.5" /></svg> Prices</a> <a class="btn btn-outline-teal" href="/ticket/${cell.getRow().getData().tld}" title="Manage Promotions"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1" /><path d="M9 12l2 2l4 -4" /></svg> Promotions</a> <a class="btn btn-outline-pink" href="/ticket/${cell.getRow().getData().tld}" title="Manage Premium Names"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M13.867 9.75c-.246 -.48 -.708 -.769 -1.2 -.75h-1.334c-.736 0 -1.333 .67 -1.333 1.5c0 .827 .597 1.499 1.333 1.499h1.334c.736 0 1.333 .671 1.333 1.5c0 .828 -.597 1.499 -1.333 1.499h-1.334c-.492 .019 -.954 -.27 -1.2 -.75" /><path d="M12 7v2" /><path d="M12 15v2" /></svg> Premium Names</a>
|
||||
`;
|
||||
}
|
||||
|
||||
table = new Tabulator("#tldTable", {
|
||||
ajaxURL:"/api/records/domain_tld", // Set the URL for your JSON data
|
||||
ajaxConfig:"GET",
|
||||
pagination:"local",
|
||||
paginationSize:10,
|
||||
ajaxResponse:function(url, params, response){
|
||||
return response.records;
|
||||
},
|
||||
layout:"fitDataFill",
|
||||
responsiveLayout: "collapse",
|
||||
responsiveLayoutCollapseStartOpen:false,
|
||||
resizableColumns:false,
|
||||
columns:[
|
||||
{formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0},
|
||||
{title:"TLD", field:"tld", width:350, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0},
|
||||
{title:"DNSSEC", field:"secure", width:250, headerSort:true, resizable:false, formatter: secureFormatter, responsive:0},
|
||||
{title: "Actions", formatter: actionsFormatter, headerSort: false, resizable:false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }},
|
||||
],
|
||||
placeholder:function(){
|
||||
return this.getHeaderFilters().length ? "No Matching Data" : "No Data"; //set placeholder based on if there are currently any header filters
|
||||
}
|
||||
});
|
||||
var searchInput = document.getElementById("search-input");
|
||||
searchInput.addEventListener("input", function () {
|
||||
var term = searchInput.value.toLowerCase();
|
||||
|
||||
if (term) { // Only apply the filter when there's a term to search for
|
||||
table.setFilter(function (data) {
|
||||
// Check if any of the fields contain the search term
|
||||
return (
|
||||
String(data.tld).toLowerCase().includes(term) ||
|
||||
String(data.secure).toLowerCase().includes(term)
|
||||
);
|
||||
});
|
||||
} else {
|
||||
table.clearFilter(); // Clear the filter when the search box is emptied
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function downloadCSV() {
|
||||
table.download("csv", "data.csv");
|
||||
}
|
||||
|
||||
function downloadJSON() {
|
||||
table.download("json", "data.json");
|
||||
}
|
||||
|
||||
function downloadXLSX() {
|
||||
table.download("xlsx", "data.xlsx", {sheetName:"My TLDs"});
|
||||
}
|
||||
|
||||
function downloadPDF() {
|
||||
table.download("pdf", "data.pdf", {
|
||||
orientation:"portrait",
|
||||
title:"My TLDs",
|
||||
jsPDF:{unit:"mm", format:"a4", orientation:"p"}
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -89,6 +89,10 @@ $app->group('', function ($route) {
|
|||
$route->get('/overview', FinancialsController::class .':overview')->setName('overview');
|
||||
|
||||
$route->get('/registry', SystemController::class .':registry')->setName('registry');
|
||||
$route->map(['GET', 'POST'], '/registry/tld/create', SystemController::class .':createTld')->setName('createTld');
|
||||
$route->map(['GET', 'POST'], '/registry/tld/{tld}', SystemController::class . ':viewTld')->setName('viewTld');
|
||||
$route->get('/registry/tlds', SystemController::class .':manageTlds')->setName('manageTlds');
|
||||
$route->map(['GET', 'POST'], '/registry/reserved', SystemController::class .':manageReserved')->setName('manageReserved');
|
||||
|
||||
$route->get('/support', SupportController::class .':view')->setName('ticketview');
|
||||
$route->map(['GET', 'POST'], '/support/new', SupportController::class .':newticket')->setName('newticket');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue