mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
TEMP
This commit is contained in:
parent
14675f5bb7
commit
ab6f59c09e
8 changed files with 48 additions and 2 deletions
11
app/controllers/registrant/whois_controller.rb
Normal file
11
app/controllers/registrant/whois_controller.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class Registrant::WhoisController < RegistrantController
|
||||
def index
|
||||
authorize! :view, Registrant::Whois
|
||||
if params[:domain_name].present?
|
||||
whois_url = "#{ENV['restful_whois_url']}/v1/#{params[:domain_name]}"
|
||||
binding.pry
|
||||
page = Nokogiri::HTML(open(whois_url))
|
||||
@results = 'ee'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -13,6 +13,7 @@ class Ability
|
|||
when 'ApiUser'
|
||||
epp
|
||||
registrar
|
||||
registrant # refactor
|
||||
end
|
||||
|
||||
can :show, :dashboard
|
||||
|
@ -63,6 +64,10 @@ class Ability
|
|||
can :manage, :deposit
|
||||
end
|
||||
|
||||
def registrant
|
||||
can :manage, Registrant::Whois
|
||||
end
|
||||
|
||||
def user
|
||||
can :show, :dashboard
|
||||
end
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
- active_class = %w(registrant/domains registrant/check registrant/renew registrant/tranfer registrant/keyrelays).include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:domains), registrant_domains_path
|
||||
|
||||
- active_class = %w(registrant/whois).include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:whois), registrant_whois_path
|
||||
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
- if user_signed_in?
|
||||
%li= link_to t(:log_out, user: current_user), '/registrant/logout'
|
||||
|
|
21
app/views/registrant/whois/index.haml
Normal file
21
app/views/registrant/whois/index.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
= render 'shared/title', name: t(:whois)
|
||||
|
||||
- if ENV['restful_whois_url'].blank?
|
||||
%p
|
||||
Registrant configuration issue: missing restful_whois_url
|
||||
- else
|
||||
.row
|
||||
.col-md-12{style: 'margin-bottom: -15px;'}
|
||||
= form_tag registrant_whois_path, class: 'form-horizontal', method: :get do
|
||||
.col-md-11
|
||||
.form-group
|
||||
= text_field_tag :domain_name, params[:domain_name], class: 'form-control', placeholder: t(:domain_name), autocomplete: 'off', autofocus: true
|
||||
.col-md-1.text-right.text-center-xs
|
||||
.form-group
|
||||
%button.btn.btn-default
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%hr
|
||||
- if @results
|
||||
= @results
|
|
@ -35,6 +35,9 @@ key_path: '/home/registry/registry/shared/ca/private/webclient.key.pem'
|
|||
epp_hostname: 'registry.gitlab.eu'
|
||||
repp_url: 'https://repp.gitlab.eu/repp/v1/'
|
||||
|
||||
# Registrant server configuration
|
||||
restful_whois_url: 'https://restful-whois.example.com'
|
||||
|
||||
# SMTP configuration (for Admin/EPP/Registrar/Registrant servers)
|
||||
smtp_address: 'server-hostname'
|
||||
smtp_port: '25' # 587, 465
|
||||
|
|
|
@ -766,3 +766,4 @@ en:
|
|||
contact_email_update_subject: 'Teie domeenide kontakt epostiaadress on muutunud / Contact e-mail addresses of your domains have changed'
|
||||
object_status_prohibits_operation: 'Object status prohibits operation'
|
||||
domain_registrant_update_subject: "Kinnitustaotlus domeeni %{name} registreerija vahetuseks / Application for approval for registrant chache of %{name}"
|
||||
whois: WHOIS
|
||||
|
|
|
@ -191,7 +191,7 @@ common: &default_settings
|
|||
development:
|
||||
<<: *default_settings
|
||||
# Turn on communication to New Relic service in development mode
|
||||
monitor_mode: true
|
||||
monitor_mode: false
|
||||
app_name: Registry (Development)
|
||||
|
||||
# Rails Only - when running in Developer Mode, the New Relic Agent will
|
||||
|
@ -199,7 +199,7 @@ development:
|
|||
# executed since starting the mongrel.
|
||||
# NOTE: There is substantial overhead when running in developer mode.
|
||||
# Do not use for production or load testing.
|
||||
developer_mode: true
|
||||
developer_mode: false
|
||||
|
||||
test:
|
||||
<<: *default_settings
|
||||
|
|
|
@ -126,6 +126,8 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :whois
|
||||
|
||||
# resources :contacts do
|
||||
# member do
|
||||
# get 'delete'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue