mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-13 08:07:00 +02:00
More reporting improvements
This commit is contained in:
parent
3d639c7268
commit
647a1ae659
3 changed files with 49 additions and 12 deletions
|
@ -425,18 +425,24 @@ function getRestoredNoReport($dbh, $registrar) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAgpExemptionRequests($dbh, $registrar) {
|
function getAgpExemptionRequests($dbh, $registrar) {
|
||||||
// Placeholder: Replace with actual query/logic
|
$stmt = $dbh->prepare("SELECT count(name) FROM domain WHERE clid = :registrarId AND (agp_request BETWEEN last_day(curdate() - interval 2 month) + interval 1 day AND last_day(curdate() - interval 1 month)) AND agp_status = 'requested'");
|
||||||
return 0;
|
$stmt->bindParam(':registrarId', $registrar['id'], PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAgpExemptionsGranted($dbh, $registrar) {
|
function getAgpExemptionsGranted($dbh, $registrar) {
|
||||||
// Placeholder: Replace with actual query/logic
|
$stmt = $dbh->prepare("SELECT count(name) FROM domain WHERE clid = :registrarId AND (agp_grant BETWEEN last_day(curdate() - interval 2 month) + interval 1 day AND last_day(curdate() - interval 1 month)) AND agp_status = 'granted'");
|
||||||
return 0;
|
$stmt->bindParam(':registrarId', $registrar['id'], PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAgpExemptedDomains($dbh, $registrar) {
|
function getAgpExemptedDomains($dbh, $registrar) {
|
||||||
// Placeholder: Replace with actual query/logic
|
$stmt = $dbh->prepare("SELECT count(name) FROM domain WHERE clid = :registrarId AND (agp_grant BETWEEN last_day(curdate() - interval 2 month) + interval 1 day AND last_day(curdate() - interval 1 month)) AND agp_exempted = 1");
|
||||||
return 0;
|
$stmt->bindParam(':registrarId', $registrar['id'], PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAttemptedAdds($dbh, $registrar) {
|
function getAttemptedAdds($dbh, $registrar) {
|
||||||
|
@ -532,18 +538,21 @@ function getRestoredNoReportAllRegistrars($dbh) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAgpExemptionRequestsAllRegistrars($dbh) {
|
function getAgpExemptionRequestsAllRegistrars($dbh) {
|
||||||
// Placeholder: Replace with actual query/logic
|
$stmt = $dbh->prepare("SELECT count(name) FROM domain WHERE (agp_request BETWEEN last_day(curdate() - interval 2 month) + interval 1 day AND last_day(curdate() - interval 1 month)) AND agp_status = 'requested'");
|
||||||
return 0;
|
$stmt->execute();
|
||||||
|
return $stmt->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAgpExemptionsGrantedAllRegistrars($dbh) {
|
function getAgpExemptionsGrantedAllRegistrars($dbh) {
|
||||||
// Placeholder: Replace with actual query/logic
|
$stmt = $dbh->prepare("SELECT count(name) FROM domain WHERE (agp_grant BETWEEN last_day(curdate() - interval 2 month) + interval 1 day AND last_day(curdate() - interval 1 month)) AND agp_status = 'granted'");
|
||||||
return 0;
|
$stmt->execute();
|
||||||
|
return $stmt->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAgpExemptedDomainsAllRegistrars($dbh) {
|
function getAgpExemptedDomainsAllRegistrars($dbh) {
|
||||||
// Placeholder: Replace with actual query/logic
|
$stmt = $dbh->prepare("SELECT count(name) FROM domain WHERE (agp_grant BETWEEN last_day(curdate() - interval 2 month) + interval 1 day AND last_day(curdate() - interval 1 month)) AND agp_exempted = 1");
|
||||||
return 0;
|
$stmt->execute();
|
||||||
|
return $stmt->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAttemptedAddsAllRegistrars($dbh) {
|
function getAttemptedAddsAllRegistrars($dbh) {
|
||||||
|
|
|
@ -281,6 +281,11 @@ CREATE TABLE IF NOT EXISTS `registry`.`domain` (
|
||||||
`renewPeriod` tinyint(3) unsigned default NULL,
|
`renewPeriod` tinyint(3) unsigned default NULL,
|
||||||
`transferPeriod` tinyint(3) unsigned default NULL,
|
`transferPeriod` tinyint(3) unsigned default NULL,
|
||||||
`renewedDate` datetime(3) default NULL,
|
`renewedDate` datetime(3) default NULL,
|
||||||
|
`agp_exempted` tinyint(1) DEFAULT 0,
|
||||||
|
`agp_request` datetime(3) default NULL,
|
||||||
|
`agp_grant` datetime(3) default NULL,
|
||||||
|
`agp_reason` text default NULL,
|
||||||
|
`agp_status` varchar(30) default NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `name` (`name`),
|
UNIQUE KEY `name` (`name`),
|
||||||
CONSTRAINT `domain_ibfk_1` FOREIGN KEY (`clid`) REFERENCES `registrar` (`id`) ON DELETE RESTRICT,
|
CONSTRAINT `domain_ibfk_1` FOREIGN KEY (`clid`) REFERENCES `registrar` (`id`) ON DELETE RESTRICT,
|
||||||
|
@ -658,6 +663,15 @@ INSERT INTO `registry`.`ticket_categories` (name, description) VALUES
|
||||||
('Registrar Application', 'Queries or issues related to new registrar applications or onboarding'),
|
('Registrar Application', 'Queries or issues related to new registrar applications or onboarding'),
|
||||||
('RDAP Updates', 'Issues or queries related to the Registration Data Access Protocol (RDAP) updates');
|
('RDAP Updates', 'Issues or queries related to the Registration Data Access Protocol (RDAP) updates');
|
||||||
|
|
||||||
|
INSERT INTO `registry`.`settings` (`name`, `value`) VALUES
|
||||||
|
('dns-tcp-queries-received', '0'),
|
||||||
|
('dns-tcp-queries-responded', '0'),
|
||||||
|
('dns-udp-queries-received', '0'),
|
||||||
|
('dns-udp-queries-responded', '0'),
|
||||||
|
('searchable-whois-queries', '0'),
|
||||||
|
('web-whois-queries', '0'),
|
||||||
|
('whois-43-queries', '0');
|
||||||
|
|
||||||
CREATE USER 'registry'@'localhost' IDENTIFIED BY 'EPPRegistry';
|
CREATE USER 'registry'@'localhost' IDENTIFIED BY 'EPPRegistry';
|
||||||
CREATE USER 'registry-select'@'localhost' IDENTIFIED BY 'EPPRegistrySELECT';
|
CREATE USER 'registry-select'@'localhost' IDENTIFIED BY 'EPPRegistrySELECT';
|
||||||
CREATE USER 'registry-update'@'localhost' IDENTIFIED BY 'EPPRegistryUPDATE';
|
CREATE USER 'registry-update'@'localhost' IDENTIFIED BY 'EPPRegistryUPDATE';
|
||||||
|
|
|
@ -280,6 +280,11 @@ CREATE TABLE registry.domain (
|
||||||
"renewperiod" smallint CHECK ("renewperiod" >= 0) default NULL,
|
"renewperiod" smallint CHECK ("renewperiod" >= 0) default NULL,
|
||||||
"transferperiod" smallint CHECK ("transferperiod" >= 0) default NULL,
|
"transferperiod" smallint CHECK ("transferperiod" >= 0) default NULL,
|
||||||
"reneweddate" timestamp(3) without time zone default NULL,
|
"reneweddate" timestamp(3) without time zone default NULL,
|
||||||
|
"agp_exempted" BOOLEAN DEFAULT FALSE,
|
||||||
|
"agp_request" TIMESTAMP(3) DEFAULT NULL,
|
||||||
|
"agp_grant" TIMESTAMP(3) DEFAULT NULL,
|
||||||
|
"agp_reason" TEXT DEFAULT NULL,
|
||||||
|
"agp_status" VARCHAR(30) DEFAULT NULL,
|
||||||
primary key ("id"),
|
primary key ("id"),
|
||||||
unique ("name")
|
unique ("name")
|
||||||
);
|
);
|
||||||
|
@ -638,6 +643,15 @@ INSERT INTO registry.ticket_categories (name, description) VALUES
|
||||||
('Registrar Application', 'Queries or issues related to new registrar applications or onboarding'),
|
('Registrar Application', 'Queries or issues related to new registrar applications or onboarding'),
|
||||||
('RDAP Updates', 'Issues or queries related to the Registration Data Access Protocol (RDAP) updates');
|
('RDAP Updates', 'Issues or queries related to the Registration Data Access Protocol (RDAP) updates');
|
||||||
|
|
||||||
|
INSERT INTO registry.settings (name, value) VALUES
|
||||||
|
('dns-tcp-queries-received', '0'),
|
||||||
|
('dns-tcp-queries-responded', '0'),
|
||||||
|
('dns-udp-queries-received', '0'),
|
||||||
|
('dns-udp-queries-responded', '0'),
|
||||||
|
('searchable-whois-queries', '0'),
|
||||||
|
('web-whois-queries', '0'),
|
||||||
|
('whois-43-queries', '0');
|
||||||
|
|
||||||
ALTER TABLE registry.domain_price ADD FOREIGN KEY ("tldid") REFERENCES registry.domain_tld ("id");
|
ALTER TABLE registry.domain_price ADD FOREIGN KEY ("tldid") REFERENCES registry.domain_tld ("id");
|
||||||
ALTER TABLE registry.domain_restore_price ADD FOREIGN KEY ("tldid") REFERENCES registry.domain_tld ("id");
|
ALTER TABLE registry.domain_restore_price ADD FOREIGN KEY ("tldid") REFERENCES registry.domain_tld ("id");
|
||||||
ALTER TABLE registry.registrar_whitelist ADD FOREIGN KEY ("registrar_id") REFERENCES registry.registrar ("id");
|
ALTER TABLE registry.registrar_whitelist ADD FOREIGN KEY ("registrar_id") REFERENCES registry.registrar ("id");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue