mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
added current env style
This commit is contained in:
parent
5ddb7ff268
commit
0444b75fee
6 changed files with 23 additions and 10 deletions
|
@ -123,7 +123,12 @@ For Apache, registry admin goes to port 443 in production, /etc/apache2/sites-en
|
||||||
SSLCipherSuite RC4-SHA:HIGH:!ADH
|
SSLCipherSuite RC4-SHA:HIGH:!ADH
|
||||||
|
|
||||||
<Directory /app/registry/registry/current/public>
|
<Directory /app/registry/registry/current/public>
|
||||||
Require all granted
|
# comment out if Apache 2.4 or newer
|
||||||
|
Allow from all
|
||||||
|
|
||||||
|
# uncomment if Apache 2.4 or newer
|
||||||
|
# Require all granted
|
||||||
|
|
||||||
Options -MultiViews
|
Options -MultiViews
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
BIN
app/assets/images/alpha.png
Normal file
BIN
app/assets/images/alpha.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
BIN
app/assets/images/development.png
Normal file
BIN
app/assets/images/development.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
app/assets/images/staging.png
Normal file
BIN
app/assets/images/staging.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -1,2 +1,16 @@
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
def current_env
|
||||||
|
if request.host == 'registry.gitlab.eu'
|
||||||
|
:alpha
|
||||||
|
elsif request.host == 'testepp.internet.ee'
|
||||||
|
:staging
|
||||||
|
elsif Rails.env.development?
|
||||||
|
:development
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def env_style
|
||||||
|
return '' if current_env.nil?
|
||||||
|
"background-image: url(#{image_path(current_env.to_s + '.png')});"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||||
%link{href: "../../favicon.ico", rel: "icon"}/
|
%link{href: "../../favicon.ico", rel: "icon"}/
|
||||||
%title Eesti Interneti SA
|
%title Eesti Interneti SA
|
||||||
%body
|
%body{:style => env_style}
|
||||||
/ Static navbar
|
/ Static navbar
|
||||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||||
.container
|
.container
|
||||||
|
@ -22,15 +22,9 @@
|
||||||
%span.icon-bar
|
%span.icon-bar
|
||||||
= link_to root_path, class: 'navbar-brand' do
|
= link_to root_path, class: 'navbar-brand' do
|
||||||
= APP_CONFIG['app_name']
|
= APP_CONFIG['app_name']
|
||||||
- if request.host == 'registry.gitlab.eu'
|
- if current_env.present?
|
||||||
.text-center
|
.text-center
|
||||||
%small{style: 'color: #0074B3;'} GITLAB STAGING
|
%small{style: 'color: #0074B3;'}= current_env
|
||||||
- elsif Rails.env.development?
|
|
||||||
.text-center
|
|
||||||
%small{style: 'color: #D10000;'}= Rails.env.upcase
|
|
||||||
- elsif Rails.env.staging?
|
|
||||||
.text-center
|
|
||||||
%small{style: 'color: #0074B3;'}= Rails.env.upcase
|
|
||||||
|
|
||||||
.navbar-collapse.collapse
|
.navbar-collapse.collapse
|
||||||
%ul.nav.navbar-nav
|
%ul.nav.navbar-nav
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue