mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 17:16:59 +02:00
Preparation for registrar update
This commit is contained in:
parent
8a9de54510
commit
83f8e41709
9 changed files with 597 additions and 34 deletions
|
@ -9,10 +9,10 @@ use Psr\Container\ContainerInterface;
|
||||||
|
|
||||||
class UsersController extends Controller
|
class UsersController extends Controller
|
||||||
{
|
{
|
||||||
public function view(Request $request, Response $response)
|
public function listUsers(Request $request, Response $response)
|
||||||
{
|
{
|
||||||
$userModel = new User($this->container->get('db'));
|
$userModel = new User($this->container->get('db'));
|
||||||
$users = $userModel->getAllUsers();
|
$users = $userModel->getAllUsers();
|
||||||
return view($response,'admin/users/index.twig', compact('users'));
|
return view($response,'admin/users/listUsers.twig', compact('users'));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,22 +27,31 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">{{ host.name }} <span class="status status-green">{{ hostStatus.status }}</span>{% if hostLinked is not null %} <span class="status status-info">linked</span>{% endif %}</h3>
|
<h3 class="card-title">{{ host.name }} <span class="status status-green">{{ hostStatus.status }}</span>{% if hostLinked is not null %} <span class="status status-info">linked</span>{% endif %}</h3>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="datagrid">
|
<div class="datagrid">
|
||||||
<div class="datagrid-item">
|
<div class="datagrid-item">
|
||||||
<div class="datagrid-title">IPv4</div>
|
<div class="datagrid-title">IPv4</div>
|
||||||
<div class="datagrid-content">{% for ipv4 in hostIPv4 %}
|
<div class="datagrid-content">
|
||||||
{{ ipv4.addr }}{% if not loop.last %}, {% endif %}
|
{% if hostIPv4 is empty %}
|
||||||
{% endfor %}
|
N/A
|
||||||
|
{% else %}
|
||||||
|
{% for ipv4 in hostIPv4 %}
|
||||||
|
{{ ipv4.addr }}{% if not loop.last %}, {% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="datagrid-item">
|
<div class="datagrid-item">
|
||||||
<div class="datagrid-title">IPv6</div>
|
<div class="datagrid-title">IPv6</div>
|
||||||
<div class="datagrid-content">{% for ipv6 in hostIPv6 %}
|
<div class="datagrid-content">
|
||||||
{{ ipv6.addr }}{% if not loop.last %}, {% endif %}
|
{% if hostIPv6 is empty %}
|
||||||
{% endfor %}
|
N/A
|
||||||
|
{% else %}
|
||||||
|
{% for ipv6 in hostIPv6 %}
|
||||||
|
{{ ipv6.addr }}{% if not loop.last %}, {% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="datagrid-item">
|
<div class="datagrid-item">
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
<div class="page-body">
|
<div class="page-body">
|
||||||
<div class="container-xl">
|
<div class="container-xl">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
{% include 'partials/flash.twig' %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body border-bottom py-3">
|
<div class="card-body border-bottom py-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
562
cp/resources/views/admin/registrars/updateRegistrar.twig
Normal file
562
cp/resources/views/admin/registrars/updateRegistrar.twig
Normal file
|
@ -0,0 +1,562 @@
|
||||||
|
{% extends "layouts/app.twig" %}
|
||||||
|
|
||||||
|
{% block title %}{{ __('Update Registrar') }} {{ registrar.name }}{% 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">
|
||||||
|
{{ __('Update Registrar') }} {{ registrar.name }}
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Page body -->
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="col-12">
|
||||||
|
{% include 'partials/flash.twig' %}
|
||||||
|
<form action="/registrar/update" method="post" autocomplete="off"><input type="hidden" name="reg_clid" value="{{ registrar.clid }}">
|
||||||
|
{{ csrf.field | raw }}
|
||||||
|
<!-- Registrar Details Card -->
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Registrar Details</h5>
|
||||||
|
<div class="row">
|
||||||
|
<!-- First Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="name" class="form-label required">Name</label>
|
||||||
|
<input type="text" class="form-control" id="name" name="name" required value="{{ registrar.name }}">
|
||||||
|
<small class="text-muted">The official name of the registrar.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ianaId" class="form-label">IANA ID</label>
|
||||||
|
<input type="number" class="form-control" id="ianaId" name="ianaId" value="{{ registrar.iana_id }}">
|
||||||
|
<small class="text-muted">Unique identifier assigned by IANA.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="email" class="form-label required">Email</label>
|
||||||
|
<input type="email" class="form-control" id="email" name="email" required autocapitalize="none" value="{{ registrar.email }}">
|
||||||
|
<small class="text-muted">Primary contact email of the registrar.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="url" class="form-label required">URL</label>
|
||||||
|
<input type="url" class="form-control" id="url" name="url" required autocapitalize="none" value="{{ registrar.url }}">
|
||||||
|
<small class="text-muted">Registrar's official website URL.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Second Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="whoisServer" class="form-label required">WHOIS Server</label>
|
||||||
|
<input type="text" class="form-control" id="whoisServer" name="whoisServer" required autocapitalize="none" value="{{ registrar.whois_server }}">
|
||||||
|
<small class="text-muted">Address of the registrar's WHOIS server.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="rdapServer" class="form-label required">RDAP Server</label>
|
||||||
|
<input type="text" class="form-control" id="rdapServer" name="rdapServer" required autocapitalize="none" value="{{ registrar.rdap_server }}">
|
||||||
|
<small class="text-muted">Address of the registrar's RDAP server.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseEmail" class="form-label required">Abuse Email</label>
|
||||||
|
<input type="email" class="form-control" id="abuseEmail" name="abuseEmail" required autocapitalize="none" value="{{ registrar.abuse_email }}">
|
||||||
|
<small class="text-muted">Email address for reporting abuse.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abusePhone" class="form-label required">Abuse Phone</label>
|
||||||
|
<input type="tel" class="form-control" id="abusePhone" name="abusePhone" required value="{{ registrar.abuse_phone }}">
|
||||||
|
<small class="text-muted">Phone number for reporting abuse.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Financial Information Card -->
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Financial Information</h5>
|
||||||
|
<div class="row">
|
||||||
|
<!-- First Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="accountBalance" class="form-label">Account Balance</label>
|
||||||
|
<div class="form-control-plaintext">{{ registrar.accountBalance }}</div>
|
||||||
|
<small class="text-muted">Current balance in the registrar's account.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="creditLimit" class="form-label required">Credit Limit</label>
|
||||||
|
<input type="number" step="0.01" class="form-control" id="creditLimit" name="creditLimit" required value="{{ registrar.creditLimit }}">
|
||||||
|
<small class="text-muted">Maximum credit limit for the registrar.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Second Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="creditThreshold" class="form-label required">Credit Threshold</label>
|
||||||
|
<input type="number" step="0.01" class="form-control" id="creditThreshold" name="creditThreshold" required value="{{ registrar.creditThreshold }}">
|
||||||
|
<small class="text-muted">Credit threshold triggering alerts or actions.</small>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="thresholdType" class="form-label">Threshold Type</label>
|
||||||
|
<div class="form-control-plaintext">{{ registrar.thresholdType|slice(0, 1)|upper ~ registrar.thresholdType|slice(1) }}</div>
|
||||||
|
<small class="text-muted">Type of threshold: fixed value or percentage.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Registrar Contacts Section with Tabs -->
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Registrar Contacts</h5>
|
||||||
|
<ul class="nav nav-tabs nav-fill" id="contactTabs" role="tablist">
|
||||||
|
<!-- Tab Headers -->
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link active" id="owner-tab" data-bs-toggle="tab" data-bs-target="#owner" type="button" role="tab" aria-controls="owner" aria-selected="true">Owner</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="billing-tab" data-bs-toggle="tab" data-bs-target="#billing" type="button" role="tab" aria-controls="billing" aria-selected="false">Billing</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="abuse-tab" data-bs-toggle="tab" data-bs-target="#abuse" type="button" role="tab" aria-controls="abuse" aria-selected="false">Abuse</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content" id="contactTabsContent">
|
||||||
|
<!-- Owner Tab -->
|
||||||
|
<div class="tab-pane fade show active" id="owner" role="tabpanel" aria-labelledby="owner-tab">
|
||||||
|
<div class="mt-3">
|
||||||
|
<div class="form-check mb-3">
|
||||||
|
<input class="form-check-input" type="checkbox" value="" id="copyOwnerData">
|
||||||
|
<label class="form-check-label" for="copyOwnerData">
|
||||||
|
<strong>Copy data to other contacts</strong>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
{% for contact in contacts %}
|
||||||
|
{% if contact.type == 'owner' %}
|
||||||
|
<!-- First Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerFirstName" class="form-label required">First Name</label>
|
||||||
|
<input type="text" class="form-control" id="ownerFirstName" name="owner[first_name]" value="{{ contact.first_name }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerLastName" class="form-label required">Last Name</label>
|
||||||
|
<input type="text" class="form-control" id="ownerLastName" name="owner[last_name]" value="{{ contact.last_name }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerOrg" class="form-label">Organization</label>
|
||||||
|
<input type="text" class="form-control" id="ownerOrg" name="owner[org]" value="{{ contact.org }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerStreet1" class="form-label">Street Address</label>
|
||||||
|
<input type="text" class="form-control" id="ownerStreet1" name="owner[street1]" value="{{ contact.street1 }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerCity" class="form-label required">City</label>
|
||||||
|
<input type="text" class="form-control" id="ownerCity" name="owner[city]" value="{{ contact.city }}" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Second Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerSp" class="form-label">State/Province</label>
|
||||||
|
<input type="text" class="form-control" id="ownerSp" name="owner[sp]" value="{{ contact.sp }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerPc" class="form-label">Postal Code</label>
|
||||||
|
<input type="text" class="form-control" id="ownerPc" name="owner[pc]" value="{{ contact.pc }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerCc" class="form-label required">Country</label>
|
||||||
|
<select class="form-select" id="ownerCc" name="owner[cc]" required="required">
|
||||||
|
{% for country in countries %}
|
||||||
|
<option value="{{ country.alpha2 }}" {% if country.alpha2|lower == contact.cc %}selected{% endif %}>{{ country.name }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerVoice" class="form-label">Phone</label>
|
||||||
|
<input type="tel" class="form-control" id="ownerVoice" name="owner[voice]" value="{{ contact.voice }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="ownerEmail" class="form-label required">Email</label>
|
||||||
|
<input type="email" class="form-control" id="ownerEmail" name="owner[email]" required autocapitalize="none" value="{{ contact.email }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Billing Tab -->
|
||||||
|
<div class="tab-pane fade" id="billing" role="tabpanel" aria-labelledby="billing-tab">
|
||||||
|
<div class="mt-3">
|
||||||
|
<div class="row">
|
||||||
|
{% for contact in contacts %}
|
||||||
|
{% if contact.type == 'billing' %}
|
||||||
|
<!-- First Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingFirstName" class="form-label required">First Name</label>
|
||||||
|
<input type="text" class="form-control" id="billingFirstName" name="billing[first_name]" value="{{ contact.first_name }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingLastName" class="form-label required">Last Name</label>
|
||||||
|
<input type="text" class="form-control" id="billingLastName" name="billing[last_name]" value="{{ contact.last_name }}"required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingOrg" class="form-label">Organization</label>
|
||||||
|
<input type="text" class="form-control" id="billingOrg" name="billing[org]" value="{{ contact.org }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingStreet1" class="form-label">Street Address</label>
|
||||||
|
<input type="text" class="form-control" id="billingStreet1" name="billing[street1]" value="{{ contact.street1 }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingCity" class="form-label required">City</label>
|
||||||
|
<input type="text" class="form-control" id="billingCity" name="billing[city]" value="{{ contact.city }}" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Second Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingSp" class="form-label">State/Province</label>
|
||||||
|
<input type="text" class="form-control" id="billingSp" name="billing[sp]" value="{{ contact.sp }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingPc" class="form-label">Postal Code</label>
|
||||||
|
<input type="text" class="form-control" id="billingPc" name="billing[pc]" value="{{ contact.pc }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingCc" class="form-label required">Country</label>
|
||||||
|
<select class="form-select" id="billingCc" name="billing[cc]" required="required">
|
||||||
|
{% for country in countries %}
|
||||||
|
<option value="{{ country.alpha2 }}" {% if country.alpha2|lower == contact.cc %}selected{% endif %}>{{ country.name }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingVoice" class="form-label">Phone</label>
|
||||||
|
<input type="tel" class="form-control" id="billingVoice" name="billing[voice]" value="{{ contact.voice }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="billingEmail" class="form-label required">Email</label>
|
||||||
|
<input type="email" class="form-control" id="billingEmail" name="billing[email]" required autocapitalize="none" value="{{ contact.email }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Abuse Tab -->
|
||||||
|
<div class="tab-pane fade" id="abuse" role="tabpanel" aria-labelledby="abuse-tab">
|
||||||
|
<div class="mt-3">
|
||||||
|
<div class="row">
|
||||||
|
{% for contact in contacts %}
|
||||||
|
{% if contact.type == 'abuse' %}
|
||||||
|
<!-- First Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseFirstName" class="form-label required">First Name</label>
|
||||||
|
<input type="text" class="form-control" id="abuseFirstName" name="abuse[first_name]" value="{{ contact.first_name }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseLastName" class="form-label required">Last Name</label>
|
||||||
|
<input type="text" class="form-control" id="abuseLastName" name="abuse[last_name]" value="{{ contact.last_name }}" required>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseOrg" class="form-label">Organization</label>
|
||||||
|
<input type="text" class="form-control" id="abuseOrg" name="abuse[org]" value="{{ contact.org }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseStreet1" class="form-label">Street Address</label>
|
||||||
|
<input type="text" class="form-control" id="abuseStreet1" name="abuse[street1]" value="{{ contact.street1 }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseCity" class="form-label required">City</label>
|
||||||
|
<input type="text" class="form-control" id="abuseCity" name="abuse[city]" required value="{{ contact.city }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Second Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseSp" class="form-label">State/Province</label>
|
||||||
|
<input type="text" class="form-control" id="abuseSp" name="abuse[sp]" value="{{ contact.sp }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abusePc" class="form-label">Postal Code</label>
|
||||||
|
<input type="text" class="form-control" id="abusePc" name="abuse[pc]" value="{{ contact.pc }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseCc" class="form-label required">Country</label>
|
||||||
|
<select class="form-select" id="abuseCc" name="abuse[cc]" required="required">
|
||||||
|
{% for country in countries %}
|
||||||
|
<option value="{{ country.alpha2 }}" {% if country.alpha2|lower == contact.cc %}selected{% endif %}>{{ country.name }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseVoice" class="form-label">Phone</label>
|
||||||
|
<input type="tel" class="form-control" id="abuseVoice" name="abuse[voice]" value="{{ contact.voice }}">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="abuseEmail" class="form-label required">Email</label>
|
||||||
|
<input type="email" class="form-control" id="abuseEmail" name="abuse[email]" required autocapitalize="none" value="{{ contact.email }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<!-- IP Whitelisting Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="card h-100">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">IP Whitelisting</h5>
|
||||||
|
<p class="card-text">
|
||||||
|
Whitelist IP addresses for secure access. Up to 5 IP addresses (IPv4 or IPv6) can be added.
|
||||||
|
</p>
|
||||||
|
<div id="ipWhitelistForm">
|
||||||
|
<div id="ipAddressFields">
|
||||||
|
{% for ip in whitelist %}
|
||||||
|
<div class="mb-3 d-flex align-items-center">
|
||||||
|
<input type="text" class="form-control" name="ipAddress[]" value="{{ ip.addr }}" autocapitalize="none">
|
||||||
|
<button type="button" class="btn btn-danger ms-2 remove-ip">-</button>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if whitelist|length < 5 %}
|
||||||
|
<div class="mb-3 d-flex align-items-center">
|
||||||
|
<input type="text" class="form-control" name="ipAddress[]" autocapitalize="none">
|
||||||
|
<button type="button" class="btn btn-primary ms-2 add-ip">+</button>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Registrar User Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="card h-100">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Registrar User</h5>
|
||||||
|
<p class="card-text">
|
||||||
|
For an existing registrar user, you can view the current EPP username (also known as CLID) and panel access email. Additionally, you have the option to reset the passwords for EPP and panel access as needed.
|
||||||
|
</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col required">Username/CLID</th>
|
||||||
|
<th scope="col">Login Email</th>
|
||||||
|
<th scope="col">Panel Password <span class="text-red">*</span></th>
|
||||||
|
<th scope="col">EPP Password <span class="text-red">*</span></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ registrar.clid }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ user.email ? user.email : 'N/A' }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="password" class="form-control form-control-sm" name="panelPassword" autocomplete="off" disabled>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="password" class="form-control form-control-sm" name="eppPassword" autocomplete="off" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- OTE Section -->
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Operational Test and Evaluation (OTE)</h5>
|
||||||
|
<p class="card-text">
|
||||||
|
Operational Test and Evaluation (OTE) assesses the functionality of EPP commands in a simulated environment, ensuring effective communication between the registrar's system and the registry. Below are key EPP commands and their test statuses:
|
||||||
|
</p>
|
||||||
|
<div class="row">
|
||||||
|
<!-- First Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
contact:create
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
domain:check
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
domain:info
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
domain:renew
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
domain:transfer
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Second Column -->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
host:create
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
host:info
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
contact:update
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
domain:delete
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
|
poll:request
|
||||||
|
<span class="badge bg-orange text-orange-fg">Pending</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="submit" class="btn btn-primary">Update Registrar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</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>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const ipForm = document.getElementById('ipWhitelistForm');
|
||||||
|
const maxFields = 5;
|
||||||
|
|
||||||
|
ipForm.addEventListener('click', function(e) {
|
||||||
|
const target = e.target;
|
||||||
|
|
||||||
|
// Handle Add IP Button Click
|
||||||
|
if (target.classList.contains('add-ip')) {
|
||||||
|
const totalFields = ipForm.querySelectorAll('input[name="ipAddress[]"]').length;
|
||||||
|
if (totalFields < maxFields) {
|
||||||
|
const newField = document.createElement('div');
|
||||||
|
newField.className = 'mb-3 d-flex align-items-center';
|
||||||
|
newField.innerHTML = `
|
||||||
|
<input type="text" class="form-control" name="ipAddress[]" autocapitalize="none">
|
||||||
|
<button type="button" class="btn btn-danger ms-2 remove-ip">-</button>
|
||||||
|
`;
|
||||||
|
ipForm.querySelector('#ipAddressFields').appendChild(newField);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle Remove IP Button Click
|
||||||
|
if (target.classList.contains('remove-ip')) {
|
||||||
|
target.parentElement.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disable the add button if maxFields is reached
|
||||||
|
const totalFields = ipForm.querySelectorAll('input[name="ipAddress[]"]').length;
|
||||||
|
const addButton = ipForm.querySelector('.add-ip');
|
||||||
|
if (addButton) {
|
||||||
|
addButton.disabled = totalFields >= maxFields;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const copyCheckbox = document.getElementById('copyOwnerData');
|
||||||
|
|
||||||
|
// Function to copy data to another tab
|
||||||
|
function copyDataToTab(tabId) {
|
||||||
|
const ownerInputs = document.querySelectorAll('#owner input:not([type="checkbox"]), #owner select');
|
||||||
|
const targetFields = document.querySelectorAll(`${tabId} input:not([type='checkbox']), ${tabId} select`);
|
||||||
|
|
||||||
|
ownerInputs.forEach((input, index) => {
|
||||||
|
if (targetFields[index] && input.tagName === targetFields[index].tagName) {
|
||||||
|
targetFields[index].value = input.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
copyCheckbox.addEventListener('change', function() {
|
||||||
|
if (this.checked) {
|
||||||
|
copyDataToTab('#billing');
|
||||||
|
copyDataToTab('#abuse');
|
||||||
|
} else {
|
||||||
|
// Clear fields when unchecked, if desired
|
||||||
|
['#billing', '#abuse'].forEach(tabId => {
|
||||||
|
const fields = document.querySelectorAll(`${tabId} input:not([type='checkbox']), ${tabId} select`);
|
||||||
|
fields.forEach(field => {
|
||||||
|
field.value = '';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "layouts/app.twig" %}
|
{% extends "layouts/app.twig" %}
|
||||||
|
|
||||||
{% block title %}{{ __('Users') }}{% endblock %}
|
{% block title %}{{ __('List Users') }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="page-wrapper">
|
<div class="page-wrapper">
|
|
@ -144,7 +144,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li {{ is_current_url('registrars') or is_current_url('users') or is_current_url('registrarcreate') or 'registrar' in currentUri ? 'class="nav-item dropdown active"' : 'class="nav-item dropdown"' }}>
|
<li {{ is_current_url('registrars') or is_current_url('listUsers') or is_current_url('registrarcreate') or 'registrar' in currentUri ? '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">
|
<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="M12 13a3 3 0 1 0 0 -6a3 3 0 0 0 0 6z"></path><path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"></path><path d="M6 20.05v-.05a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v.05"></path></svg>
|
<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="M12 13a3 3 0 1 0 0 -6a3 3 0 0 0 0 6z"></path><path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"></path><path d="M6 20.05v-.05a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v.05"></path></svg>
|
||||||
</span>
|
</span>
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
{{ __('Announcements') }}
|
{{ __('Announcements') }}
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="{{route('users')}}">
|
<a class="dropdown-item" href="{{route('listUsers')}}">
|
||||||
{{ __('List Users') }}
|
{{ __('List Users') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.6.0/jspdf.plugin.autotable.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.6.0/jspdf.plugin.autotable.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var table;
|
var table;
|
||||||
document.querySelector("#registrarTable").addEventListener('click', function(e) {
|
|
||||||
if (e.target.matches('.update-btn')) {
|
|
||||||
let id = e.target.getAttribute('data-id');
|
|
||||||
updateRecord(id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
function registrarLinkFormatter(cell){
|
function registrarLinkFormatter(cell){
|
||||||
var value = cell.getValue();
|
var value = cell.getValue();
|
||||||
|
@ -20,7 +13,7 @@
|
||||||
|
|
||||||
function actionsFormatter(cell, formatterParams, onRendered) {
|
function actionsFormatter(cell, formatterParams, onRendered) {
|
||||||
return `
|
return `
|
||||||
<button class="btn btn-outline-primary btn-icon update-btn" data-id="${cell.getRow().getData().id}"><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="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"></path><path d="M16 5l3 3"></path></svg></button>
|
<a class="btn btn-outline-primary btn-icon update-btn" href="/registrar/update/${cell.getRow().getData().clid}"><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="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"></path><path d="M16 5l3 3"></path></svg></a>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,10 +68,6 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateRecord(id) {
|
|
||||||
console.log("Updating record with ID: " + id);
|
|
||||||
}
|
|
||||||
|
|
||||||
function downloadCSV() {
|
function downloadCSV() {
|
||||||
table.download("csv", "data.csv");
|
table.download("csv", "data.csv");
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
function roleLabelFormatter(cell) {
|
function roleLabelFormatter(cell) {
|
||||||
var value = cell.getValue();
|
var value = cell.getValue();
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
return '<span class="badge bg-purple text-purple-fg">Administrator</span>'; // Bootstrap label for Administrator
|
return '<span class="badge bg-purple-lt">Administrator</span>';
|
||||||
} else if (value === 4) {
|
} else if (value === 4) {
|
||||||
return '<span class="badge bg-indigo text-indigo-fg">Registrar</span>'; // Bootstrap label for Registrar
|
return '<span class="badge bg-indigo-lt">Registrar</span>';
|
||||||
}
|
}
|
||||||
return value; // If the value is neither 0 nor 4, return it as is
|
return value; // If the value is neither 0 nor 4, return it as is
|
||||||
}
|
}
|
||||||
|
@ -33,21 +33,21 @@
|
||||||
function verifiedFormatter(cell) {
|
function verifiedFormatter(cell) {
|
||||||
var value = cell.getValue();
|
var value = cell.getValue();
|
||||||
if (value === false) {
|
if (value === false) {
|
||||||
return '<span class="badge bg-orange text-orange-fg">Pending</span>'; // Badge for Pending
|
return '<span class="badge bg-orange-lt">Pending</span>';
|
||||||
} else if (value === true) {
|
} else if (value === true) {
|
||||||
return '<span class="badge bg-green text-green-fg">OK</span>'; // Green badge for OK
|
return '<span class="badge bg-green-lt">ok</span>';
|
||||||
} else {
|
} else {
|
||||||
return '<span class="badge bg-dark text-dark-fg">?</span>';
|
return '<span class="badge bg-dark-lt">?</span>';
|
||||||
}
|
}
|
||||||
return value; // Display the actual value for any other case
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function statusBadgeFormatter(cell) {
|
function statusBadgeFormatter(cell) {
|
||||||
var value = cell.getValue();
|
var value = cell.getValue();
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
return '<span class="badge bg-green text-green-fg">OK</span>'; // Green badge for OK
|
return '<span class="badge bg-green-lt">ok</span>';
|
||||||
} else {
|
} else {
|
||||||
return '<span class="badge bg-red text-red-fg">Trouble</span>'; // Red badge for Trouble
|
return '<span class="badge bg-red-lt">Trouble</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,10 @@ $app->group('', function ($route) {
|
||||||
$route->get('/registrars', RegistrarsController::class .':view')->setName('registrars');
|
$route->get('/registrars', RegistrarsController::class .':view')->setName('registrars');
|
||||||
$route->map(['GET', 'POST'], '/registrar/create', RegistrarsController::class . ':create')->setName('registrarcreate');
|
$route->map(['GET', 'POST'], '/registrar/create', RegistrarsController::class . ':create')->setName('registrarcreate');
|
||||||
$route->get('/registrar/view/{registrar}', RegistrarsController::class . ':viewRegistrar')->setName('viewRegistrar');
|
$route->get('/registrar/view/{registrar}', RegistrarsController::class . ':viewRegistrar')->setName('viewRegistrar');
|
||||||
|
$route->get('/registrar/update/{registrar}', RegistrarsController::class . ':updateRegistrar')->setName('updateRegistrar');
|
||||||
|
$route->post('/registrar/update', RegistrarsController::class . ':updateRegistrarProcess')->setName('updateRegistrarProcess');
|
||||||
|
|
||||||
$route->get('/users', UsersController::class .':view')->setName('users');
|
$route->get('/users', UsersController::class .':listUsers')->setName('listUsers');
|
||||||
|
|
||||||
$route->get('/epphistory', LogsController::class .':view')->setName('epphistory');
|
$route->get('/epphistory', LogsController::class .':view')->setName('epphistory');
|
||||||
$route->get('/poll', LogsController::class .':poll')->setName('poll');
|
$route->get('/poll', LogsController::class .':poll')->setName('poll');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue