mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 17:55:55 +02:00
added profile pghero
This commit is contained in:
parent
97c7e13cfc
commit
7e188a3d36
5 changed files with 108 additions and 13 deletions
4
Gemfile
4
Gemfile
|
@ -98,3 +98,7 @@ group :test do
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'aws-sdk-sesv2', '~> 1.19'
|
gem 'aws-sdk-sesv2', '~> 1.19'
|
||||||
|
|
||||||
|
# profiles
|
||||||
|
gem 'pghero'
|
||||||
|
gem 'pg_query', '>= 0.9.0'
|
||||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -233,6 +233,8 @@ GEM
|
||||||
thor (>= 0.14.0, < 2)
|
thor (>= 0.14.0, < 2)
|
||||||
globalid (0.5.2)
|
globalid (0.5.2)
|
||||||
activesupport (>= 5.0)
|
activesupport (>= 5.0)
|
||||||
|
google-protobuf (3.19.1)
|
||||||
|
google-protobuf (3.19.1-x86_64-linux)
|
||||||
gyoku (1.3.1)
|
gyoku (1.3.1)
|
||||||
builder (>= 2.1.2)
|
builder (>= 2.1.2)
|
||||||
haml (5.2.2)
|
haml (5.2.2)
|
||||||
|
@ -338,6 +340,10 @@ GEM
|
||||||
request_store (~> 1.1)
|
request_store (~> 1.1)
|
||||||
pdfkit (0.8.5)
|
pdfkit (0.8.5)
|
||||||
pg (1.2.3)
|
pg (1.2.3)
|
||||||
|
pg_query (2.1.2)
|
||||||
|
google-protobuf (>= 3.17.1)
|
||||||
|
pghero (2.8.1)
|
||||||
|
activerecord (>= 5)
|
||||||
pry (0.14.1)
|
pry (0.14.1)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
|
@ -555,6 +561,8 @@ DEPENDENCIES
|
||||||
paper_trail (~> 12.1)
|
paper_trail (~> 12.1)
|
||||||
pdfkit
|
pdfkit
|
||||||
pg (= 1.2.3)
|
pg (= 1.2.3)
|
||||||
|
pg_query (>= 0.9.0)
|
||||||
|
pghero
|
||||||
pry (= 0.14.1)
|
pry (= 0.14.1)
|
||||||
puma
|
puma
|
||||||
que
|
que
|
||||||
|
@ -579,4 +587,4 @@ DEPENDENCIES
|
||||||
wkhtmltopdf-binary (~> 0.12.5.1)
|
wkhtmltopdf-binary (~> 0.12.5.1)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.27
|
2.2.31
|
||||||
|
|
|
@ -5,6 +5,12 @@ Rails.application.routes.draw do
|
||||||
get 'practice/index'
|
get 'practice/index'
|
||||||
get 'practice/contact'
|
get 'practice/contact'
|
||||||
# https://github.com/internetee/epp_proxy#translation-of-epp-calls
|
# https://github.com/internetee/epp_proxy#translation-of-epp-calls
|
||||||
|
#
|
||||||
|
# profiles
|
||||||
|
if Rails.env.development? || Rails.env.staging?
|
||||||
|
mount PgHero::Engine, at: "pghero"
|
||||||
|
end
|
||||||
|
|
||||||
namespace :epp do
|
namespace :epp do
|
||||||
constraints(EppConstraint.new(:session)) do
|
constraints(EppConstraint.new(:session)) do
|
||||||
get 'session/hello', to: 'sessions#hello', as: 'hello'
|
get 'session/hello', to: 'sessions#hello', as: 'hello'
|
||||||
|
|
15
db/migrate/20211124071418_create_pghero_query_stats.rb
Normal file
15
db/migrate/20211124071418_create_pghero_query_stats.rb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
class CreatePgheroQueryStats < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
create_table :pghero_query_stats do |t|
|
||||||
|
t.text :database
|
||||||
|
t.text :user
|
||||||
|
t.text :query
|
||||||
|
t.integer :query_hash, limit: 8
|
||||||
|
t.float :total_time
|
||||||
|
t.integer :calls, limit: 8
|
||||||
|
t.timestamp :captured_at
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index :pghero_query_stats, [:database, :captured_at]
|
||||||
|
end
|
||||||
|
end
|
|
@ -71,7 +71,8 @@ COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
|
||||||
|
|
||||||
CREATE TYPE public.validation_type AS ENUM (
|
CREATE TYPE public.validation_type AS ENUM (
|
||||||
'email_validation',
|
'email_validation',
|
||||||
'manual_force_delete'
|
'manual_force_delete',
|
||||||
|
'nameserver_validation'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -2260,6 +2261,41 @@ CREATE SEQUENCE public.payment_orders_id_seq
|
||||||
ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id;
|
ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: pghero_query_stats; Type: TABLE; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE public.pghero_query_stats (
|
||||||
|
id bigint NOT NULL,
|
||||||
|
database text,
|
||||||
|
"user" text,
|
||||||
|
query text,
|
||||||
|
query_hash bigint,
|
||||||
|
total_time double precision,
|
||||||
|
calls bigint,
|
||||||
|
captured_at timestamp without time zone
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: pghero_query_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE SEQUENCE public.pghero_query_stats_id_seq
|
||||||
|
START WITH 1
|
||||||
|
INCREMENT BY 1
|
||||||
|
NO MINVALUE
|
||||||
|
NO MAXVALUE
|
||||||
|
CACHE 1;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: pghero_query_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER SEQUENCE public.pghero_query_stats_id_seq OWNED BY public.pghero_query_stats.id;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: prices; Type: TABLE; Schema: public; Owner: -
|
-- Name: prices; Type: TABLE; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -2619,8 +2655,7 @@ CREATE TABLE public.validation_events (
|
||||||
validation_eventable_type character varying,
|
validation_eventable_type character varying,
|
||||||
validation_eventable_id bigint,
|
validation_eventable_id bigint,
|
||||||
created_at timestamp(6) without time zone NOT NULL,
|
created_at timestamp(6) without time zone NOT NULL,
|
||||||
updated_at timestamp(6) without time zone NOT NULL,
|
updated_at timestamp(6) without time zone NOT NULL
|
||||||
event_type public.validation_type
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -3162,6 +3197,13 @@ ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('publi
|
||||||
ALTER TABLE ONLY public.payment_orders ALTER COLUMN id SET DEFAULT nextval('public.payment_orders_id_seq'::regclass);
|
ALTER TABLE ONLY public.payment_orders ALTER COLUMN id SET DEFAULT nextval('public.payment_orders_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: pghero_query_stats id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY public.pghero_query_stats ALTER COLUMN id SET DEFAULT nextval('public.pghero_query_stats_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: prices id; Type: DEFAULT; Schema: public; Owner: -
|
-- Name: prices id; Type: DEFAULT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -3685,6 +3727,14 @@ ALTER TABLE ONLY public.payment_orders
|
||||||
ADD CONSTRAINT payment_orders_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT payment_orders_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: pghero_query_stats pghero_query_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY public.pghero_query_stats
|
||||||
|
ADD CONSTRAINT pghero_query_stats_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: prices prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
-- Name: prices prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -4049,6 +4099,13 @@ CREATE INDEX index_domain_transfers_on_domain_id ON public.domain_transfers USIN
|
||||||
CREATE INDEX index_domains_on_delete_date ON public.domains USING btree (delete_date);
|
CREATE INDEX index_domains_on_delete_date ON public.domains USING btree (delete_date);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_domains_on_json_statuses_history; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_domains_on_json_statuses_history ON public.domains USING gin (json_statuses_history);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_domains_on_name; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_domains_on_name; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -4441,6 +4498,13 @@ CREATE INDEX index_notifications_on_registrar_id ON public.notifications USING b
|
||||||
CREATE INDEX index_payment_orders_on_invoice_id ON public.payment_orders USING btree (invoice_id);
|
CREATE INDEX index_payment_orders_on_invoice_id ON public.payment_orders USING btree (invoice_id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_pghero_query_stats_on_database_and_captured_at; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_pghero_query_stats_on_database_and_captured_at ON public.pghero_query_stats USING btree (database, captured_at);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -4490,13 +4554,6 @@ CREATE INDEX index_users_on_identity_code ON public.users USING btree (identity_
|
||||||
CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_id);
|
CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_id);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: index_validation_events_on_event_type; Type: INDEX; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE INDEX index_validation_events_on_event_type ON public.validation_events USING btree (event_type);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_validation_events_on_validation_eventable; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_validation_events_on_validation_eventable; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -5232,7 +5289,12 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20210215101019'),
|
('20210215101019'),
|
||||||
('20210616112332'),
|
('20210616112332'),
|
||||||
('20210629074044'),
|
('20210629074044'),
|
||||||
('20210628090353'),
|
|
||||||
('20210708131814'),
|
('20210708131814'),
|
||||||
('20210729131100'),
|
('20210729131100'),
|
||||||
('20210729134625');
|
('20210729134625'),
|
||||||
|
('20211028122103'),
|
||||||
|
('20211028125245'),
|
||||||
|
('20211029082225'),
|
||||||
|
('20211124071418');
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue