proxes 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +0 -0
  3. data/.gitignore +0 -0
  4. data/.pryrc +0 -0
  5. data/.rspec +0 -0
  6. data/.rubocop.yml +0 -0
  7. data/.ruby-version +0 -0
  8. data/.travis.yml +0 -0
  9. data/Gemfile +0 -0
  10. data/Gemfile.ci +0 -0
  11. data/Gemfile.dev +0 -0
  12. data/LICENSE.txt +0 -0
  13. data/README.md +0 -0
  14. data/Rakefile +0 -0
  15. data/Vagrantfile +4 -0
  16. data/bin/proxes-install +0 -0
  17. data/config.ru +0 -0
  18. data/config/logger.yml +0 -0
  19. data/gulpfile.js +0 -0
  20. data/lib/proxes.rb +0 -0
  21. data/lib/proxes/container.rb +0 -0
  22. data/lib/proxes/{app.rb → controllers/app.rb} +38 -16
  23. data/lib/proxes/controllers/application.rb +5 -2
  24. data/lib/proxes/controllers/audit_logs.rb +0 -0
  25. data/lib/proxes/controllers/component.rb +1 -0
  26. data/lib/proxes/controllers/permissions.rb +0 -0
  27. data/lib/proxes/controllers/roles.rb +0 -0
  28. data/lib/proxes/controllers/users.rb +0 -0
  29. data/lib/proxes/db.rb +0 -2
  30. data/lib/proxes/forwarder.rb +0 -0
  31. data/lib/proxes/helpers/authentication.rb +0 -0
  32. data/lib/proxes/helpers/component.rb +3 -1
  33. data/lib/proxes/helpers/indices.rb +0 -0
  34. data/lib/proxes/helpers/pundit.rb +0 -0
  35. data/lib/proxes/helpers/views.rb +0 -0
  36. data/lib/proxes/helpers/wisper.rb +0 -0
  37. data/lib/proxes/listener.rb +0 -0
  38. data/lib/proxes/loggers/elasticsearch.rb +0 -0
  39. data/lib/proxes/models/audit_log.rb +0 -0
  40. data/lib/proxes/models/base.rb +0 -0
  41. data/lib/proxes/models/identity.rb +0 -0
  42. data/lib/proxes/models/permission.rb +0 -0
  43. data/lib/proxes/models/role.rb +0 -0
  44. data/lib/proxes/models/user.rb +0 -0
  45. data/lib/proxes/omniauth.rb +1 -1
  46. data/lib/proxes/policies/application_policy.rb +0 -0
  47. data/lib/proxes/policies/audit_log_policy.rb +0 -0
  48. data/lib/proxes/policies/identity_policy.rb +0 -0
  49. data/lib/proxes/policies/permission_policy.rb +0 -0
  50. data/lib/proxes/policies/request/cat_policy.rb +0 -0
  51. data/lib/proxes/policies/request/root_policy.rb +0 -0
  52. data/lib/proxes/policies/request/search_policy.rb +0 -1
  53. data/lib/proxes/policies/request/snapshot_policy.rb +0 -0
  54. data/lib/proxes/policies/request/stats_policy.rb +0 -0
  55. data/lib/proxes/policies/request_policy.rb +0 -0
  56. data/lib/proxes/policies/role_policy.rb +0 -0
  57. data/lib/proxes/policies/token_policy.rb +0 -0
  58. data/lib/proxes/policies/user_policy.rb +0 -0
  59. data/lib/proxes/proxes.rb +3 -6
  60. data/lib/proxes/rake_tasks.rb +20 -9
  61. data/lib/proxes/request.rb +17 -9
  62. data/lib/proxes/request/cat.rb +0 -0
  63. data/lib/proxes/request/root.rb +0 -0
  64. data/lib/proxes/request/search.rb +1 -0
  65. data/lib/proxes/request/snapshot.rb +0 -0
  66. data/lib/proxes/request/stats.rb +0 -0
  67. data/lib/proxes/security.rb +0 -0
  68. data/lib/proxes/seed.rb +0 -0
  69. data/lib/proxes/services/logger.rb +0 -0
  70. data/lib/proxes/version.rb +1 -1
  71. data/migrate/20170207_base_tables.rb +0 -0
  72. data/migrate/20170208_audit_log.rb +0 -0
  73. data/migrate/20170416_audit_log_details.rb +0 -0
  74. data/migrate/20170416_user_specific_permissions.rb +0 -0
  75. data/package.json +0 -0
  76. data/proxes.gemspec +0 -0
  77. data/public/browserconfig.xml +9 -0
  78. data/public/images/apple-icon.png +0 -0
  79. data/public/images/favicon-16x16.png +0 -0
  80. data/public/images/favicon-32x32.png +0 -0
  81. data/public/images/launcher-icon-1x.png +0 -0
  82. data/public/images/launcher-icon-2x.png +0 -0
  83. data/public/images/launcher-icon-4x.png +0 -0
  84. data/public/images/mstile-150x150.png +0 -0
  85. data/public/images/safari-pinned-tab.svg +43 -0
  86. data/public/js/bundle.js +0 -0
  87. data/public/manifest.json +25 -0
  88. data/src/scripts/app.js +0 -0
  89. data/views/404.haml +0 -0
  90. data/views/audit_logs/index.haml +0 -0
  91. data/views/error.haml +0 -0
  92. data/views/getting_started.haml +0 -0
  93. data/views/identity/login.haml +1 -1
  94. data/views/identity/register.haml +0 -0
  95. data/views/index.haml +0 -0
  96. data/views/layout.haml +6 -1
  97. data/views/partials/delete_form.haml +0 -0
  98. data/views/partials/form_control.haml +0 -0
  99. data/views/partials/navbar.haml +1 -1
  100. data/views/partials/notifications.haml +0 -0
  101. data/views/partials/pager.haml +0 -0
  102. data/views/partials/sidebar.haml +2 -2
  103. data/views/permissions/display.haml +0 -0
  104. data/views/permissions/edit.haml +0 -0
  105. data/views/permissions/form.haml +0 -0
  106. data/views/permissions/index.haml +0 -0
  107. data/views/permissions/new.haml +0 -0
  108. data/views/roles/display.haml +0 -0
  109. data/views/roles/edit.haml +0 -0
  110. data/views/roles/form.haml +0 -0
  111. data/views/roles/index.haml +0 -0
  112. data/views/roles/new.haml +0 -0
  113. data/views/users/display.haml +0 -0
  114. data/views/users/edit.haml +0 -0
  115. data/views/users/identity.haml +0 -0
  116. data/views/users/index.haml +0 -0
  117. data/views/users/new.haml +0 -0
  118. data/views/users/profile.haml +0 -0
  119. data/views/users/user.haml +0 -0
  120. metadata +14 -5
  121. data/lib/proxes/controllers/auth_identity.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7409fa9ea1b118954e8b3b1d8edc19b4ca1b8c5
4
- data.tar.gz: 6b2a541c7296b4f01897426fc564d8be355e6b14
3
+ metadata.gz: 57bea97e3c3af963903653b899ce921259e44471
4
+ data.tar.gz: 249a32f7f58fc65f43657175f23fadeaa35c8d6a
5
5
  SHA512:
6
- metadata.gz: 9ad3f9a49be714b6f4cf93574b8ad824d6516990bb670e0e3971b225157d8ab55a6ce46ada46e2f090966961111274275198d770921e83edb2f5338715542257
7
- data.tar.gz: 3edd89d337056d9873cc77254c70150791b8c549d445b3f88671c0e9801f0a6e19a75cfe7ceea17cf541daa20e789420a6ca4450ba175bd4145408c8c5ba63af
6
+ metadata.gz: 41c950eaa6b324461b8b610f42e330bd901903941c57154173986a626bfa155729640380f851a7dd7ff284bd3fe425c5ce54eeeafa1d7b7e13db21c2401e207e
7
+ data.tar.gz: 820cc09e3bd06a4fd477f3a4829fd632cd56109cd55c07efc8842c83e8e4a91c2c3812fb6465ef6d58f359bc980980b3c0ba1bf044e0358d179cfaf151228ffc
File without changes
data/.gitignore CHANGED
File without changes
data/.pryrc CHANGED
File without changes
data/.rspec CHANGED
File without changes
File without changes
File without changes
File without changes
data/Gemfile CHANGED
File without changes
data/Gemfile.ci CHANGED
File without changes
File without changes
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
@@ -44,3 +44,7 @@ Vagrant.configure(2) do |config|
44
44
  # npm install --no-bin-links
45
45
  SHELL
46
46
  end
47
+
48
+ # create user proxes with password 'somethingrandom';
49
+ # create database proxes;
50
+ # grant all privileges on database proxes to proxes;
File without changes
data/config.ru CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,19 +3,43 @@
3
3
  require 'proxes/controllers/application'
4
4
 
5
5
  module ProxES
6
- # Manage your Elasticsearch cluster, user and user sessions
7
6
  class App < Application
7
+ # Home Page
8
8
  get '/' do
9
9
  authenticate!
10
- haml :index, locals: { title: 'Dashboard' }
10
+ redirect '/_proxes/dashboards/offline' if cluster_health.nil?
11
+ redirect "/_proxes/dashboards/#{cluster_health['status']}"
11
12
  end
12
13
 
13
- ['/unauthenticated', '/_proxes/unauthenticated'].each do |path|
14
- get path do
15
- redirect '/auth/identity'
16
- end
14
+ # OmniAuth Identity Stuff
15
+ # Log in Page
16
+ get '/_proxes/auth/identity' do
17
+ haml :'identity/login', locals: { title: 'Log In' }
18
+ end
19
+
20
+ # Successful Login
21
+ post '/auth/identity/callback' do
22
+ user = User.find(email: env['omniauth.auth']['info']['email'])
23
+ self.current_user = user
24
+ log_action(:identity_login, user: user)
25
+ flash[:success] = 'Logged In'
26
+ redirect '/_proxes'
17
27
  end
18
28
 
29
+ # Failed Login
30
+ post '/_proxes/auth/identity/callback' do
31
+ broadcast(:identity_failed_login)
32
+ flash[:warning] = 'Invalid credentials. Please try again.'
33
+ redirect '/_proxes/auth/identity'
34
+ end
35
+
36
+ # Register Page
37
+ get '/_proxes/auth/identity/register' do
38
+ identity = Identity.new
39
+ haml :'identity/register', locals: { title: 'Register', identity: identity }
40
+ end
41
+
42
+ # Register Action
19
43
  post '/auth/identity/new' do
20
44
  identity = Identity.new(params['identity'])
21
45
  if identity.valid? && identity.save
@@ -24,27 +48,25 @@ module ProxES
24
48
 
25
49
  log_action(:identity_register, user: user)
26
50
  flash[:info] = 'Successfully Registered. Please log in'
27
- redirect '/auth/identity'
51
+ redirect '/_proxes/auth/identity'
28
52
  else
29
53
  flash.now[:warning] = 'Could not complete the registration. Please try again.'
30
54
  haml :'identity/register', locals: { identity: identity }
31
55
  end
32
56
  end
33
57
 
34
- post '/auth/identity/callback' do
35
- user = User.find(email: env['omniauth.auth']['info']['email'])
36
- self.current_user = user
37
- log_action(:identity_login, user: user)
38
- flash[:success] = 'Logged In'
39
- redirect '/_proxes'
40
- end
41
-
42
- delete '/auth/identity' do
58
+ # Logout Action
59
+ delete '/_proxes/auth/identity' do
43
60
  log_action(:identity_logout)
44
61
  logout
45
62
  flash[:info] = 'Logged Out'
46
63
 
47
64
  redirect '/_proxes'
48
65
  end
66
+
67
+ # Unauthenticated
68
+ get '/_proxes/unauthenticated' do
69
+ redirect '/_proxes/auth/identity'
70
+ end
49
71
  end
50
72
  end
@@ -15,6 +15,8 @@ require 'elasticsearch'
15
15
  module ProxES
16
16
  class Application < Sinatra::Base
17
17
  set :root, ::File.expand_path(::File.dirname(__FILE__) + '/../../../')
18
+ set :view_location, nil
19
+ set :model_class, nil
18
20
  # The order here is important, since Wisper has a deprecated method respond_with method
19
21
  helpers Wisper::Publisher, Helpers::Wisper
20
22
  helpers Helpers::Pundit, Helpers::Views, Helpers::Authentication
@@ -59,15 +61,16 @@ module ProxES
59
61
 
60
62
  error Helpers::NotAuthenticated do
61
63
  flash[:warning] = 'Please log in first.'
62
- redirect '/auth/identity'
64
+ redirect '/_proxes/auth/identity'
63
65
  end
64
66
 
65
67
  error ::Pundit::NotAuthorizedError do
66
68
  flash[:warning] = 'Please log in first.'
67
- redirect '/auth/identity'
69
+ redirect '/_proxes/auth/identity'
68
70
  end
69
71
 
70
72
  before(/.*/) do
73
+ ::ProxES::Services::Logger.instance.debug "Running with #{self.class}"
71
74
  if request.url =~ /.json/
72
75
  request.accept.unshift('application/json')
73
76
  request.path_info = request.path_info.gsub(/.json/, '')
File without changes
@@ -6,6 +6,7 @@ require 'proxes/helpers/component'
6
6
  module ProxES
7
7
  class Component < Application
8
8
  helpers Helpers::Component
9
+
9
10
  set base_path: nil
10
11
  set dehumanized: nil
11
12
  set view_location: nil
File without changes
File without changes
File without changes
@@ -13,6 +13,4 @@ DB.extension(:pagination)
13
13
 
14
14
  Sequel::Model.plugin :auto_validations
15
15
  Sequel::Model.plugin :update_or_create
16
- # Sequel::Model.plugin :prepared_statements
17
- # Sequel::Model.plugin :prepared_statements_associations
18
16
  Sequel::Model.plugin :timestamps, update_on_create: true
File without changes
File without changes
@@ -40,7 +40,9 @@ module ProxES
40
40
  end
41
41
 
42
42
  def view_location
43
- settings.view_location || underscore(pluralize(demodulize(settings.model_class)))
43
+ return settings.view_location if settings.view_location
44
+ return underscore(pluralize(demodulize(settings.model_class))) if settings.model_class
45
+ underscore(demodulize(self.class))
44
46
  end
45
47
  end
46
48
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  require 'omniauth'
2
2
  require 'omniauth-identity'
3
3
  require 'proxes/models/identity'
4
- require 'proxes/controllers/auth_identity'
4
+ require 'proxes/controllers/app'
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -8,7 +8,6 @@ module ProxES
8
8
  patterns = Permission.for_user(user, 'INDEX').map do |permission|
9
9
  permission.pattern.gsub(/\{user.(.*)\}/) { |_match| user.send(Regexp.last_match[1].to_sym) }
10
10
  end
11
- p scope.index
12
11
  filter scope.index, patterns
13
12
  end
14
13
  end
File without changes
File without changes
File without changes
File without changes
@@ -7,14 +7,11 @@ module ProxES
7
7
  end
8
8
 
9
9
  def self.route_mappings
10
- require 'proxes/app'
11
- require 'proxes/controllers/users'
12
- require 'proxes/controllers/roles'
13
- require 'proxes/controllers/permissions'
14
- require 'proxes/controllers/audit_logs'
15
-
10
+ controllers = File.expand_path('../controllers', __FILE__)
11
+ Dir.glob("#{controllers}/*.rb").each { |f| require f }
16
12
  {
17
13
  '/' => ::ProxES::App,
14
+ '/dashboards' => ::ProxES::Dashboards,
18
15
  '/users' => ::ProxES::Users,
19
16
  '/roles' => ::ProxES::Roles,
20
17
  '/permissions' => ::ProxES::Permissions,
@@ -155,6 +155,9 @@ module ProxES
155
155
 
156
156
  desc 'Prepare ProxES migrations'
157
157
  task :prep do
158
+ puts 'Prepare the ProxES folders'
159
+ Dir.mkdir 'pids' unless File.exist?('pids')
160
+
158
161
  puts 'Preparing the ProxES migrations folder'
159
162
  Dir.mkdir 'migrations' unless File.exist?('migrations')
160
163
  ::ProxES::Container.migrations.each do |path|
@@ -174,27 +177,35 @@ module ProxES
174
177
 
175
178
  desc 'Check if the migration is current'
176
179
  task :check do
177
- Sequel.extension :migration
178
- Sequel::Migrator.check_current(DB, folder)
180
+ require 'sequel'
181
+ puts 'Running ProxES Migrations check'
182
+ ::Sequel.extension :migration
183
+ ::Sequel::Migrator.check_current(::DB, folder)
179
184
  end
180
185
 
181
186
  desc 'Migrate ProxES database to latest version'
182
187
  task :up do
183
- Sequel.extension :migration
184
- Sequel::Migrator.apply(DB, folder)
188
+ require 'sequel'
189
+ puts 'Running ProxES Migrations up'
190
+ ::Sequel.extension :migration
191
+ ::Sequel::Migrator.apply(::DB, folder)
185
192
  end
186
193
 
187
194
  desc 'Roll back the ProxES database'
188
195
  task :down do
189
- Sequel.extension :migration
190
- Sequel::Migrator.apply(DB, folder, 0)
196
+ require 'sequel'
197
+ puts 'Running ProxES Migrations down'
198
+ ::Sequel.extension :migration
199
+ ::Sequel::Migrator.apply(::DB, folder, 0)
191
200
  end
192
201
 
193
202
  desc 'Reset the ProxES database'
194
203
  task :bounce do
195
- Sequel.extension :migration
196
- Sequel::Migrator.apply(DB, folder, 0)
197
- Sequel::Migrator.apply(DB, folder)
204
+ require 'sequel'
205
+ puts 'Running ProxES Migrations bounce'
206
+ ::Sequel.extension :migration
207
+ ::Sequel::Migrator.apply(::DB, folder, 0)
208
+ ::Sequel::Migrator.apply(::DB, folder)
198
209
  end
199
210
  end
200
211
  end
@@ -4,22 +4,29 @@ require 'rack'
4
4
 
5
5
  module ProxES
6
6
  class Request < Rack::Request
7
+ ID_ENDPOINTS = %w[_create _explain _mlt _percolate _source _termvector _update]
8
+
7
9
  def self.from_env(env)
8
- request = Rack::Request.new(env)
9
- splits = request.path.split('/')
10
- endpoint = if splits[1] && splits[1][0] == '_'
11
- splits[1][1..-1].titlecase
12
- else
13
- splits.count > 0 ? splits[-1][1..-1].titlecase : 'Root'
14
- end
10
+ endpoint = path_endpoint(env['REQUEST_PATH'])
11
+ return new(env) if endpoint.nil?
12
+ endpoint_class = endpoint[1..-1]
15
13
  begin
16
- require 'proxes/request/' + endpoint.downcase
17
- Request.const_get(endpoint).new(env)
14
+ require 'proxes/request/' + endpoint_class.downcase
15
+ Request.const_get(endpoint_class.titlecase).new(env)
18
16
  rescue LoadError
19
17
  new(env)
20
18
  end
21
19
  end
22
20
 
21
+ def self.path_endpoint(path)
22
+ return '_root' if ['', nil, '/'].include? path
23
+ path_parts = path[1..-1].split('/')
24
+ return path_parts[-1] if ID_ENDPOINTS.include? path_parts[-1]
25
+ return path_parts[-2] if path_parts[-1] == 'count' && path_parts[-2] == '_percolate'
26
+ return path_parts[-2] if path_parts[-1] == 'scroll' && path_parts[-2] == '_search'
27
+ path_parts.find { |part| part[0] == '_' }
28
+ end
29
+
23
30
  def initialize(env)
24
31
  super
25
32
  parse
@@ -29,6 +36,7 @@ module ProxES
29
36
  path_parts[0]
30
37
  end
31
38
 
39
+
32
40
  def parse
33
41
  path_parts
34
42
  end
File without changes
File without changes
@@ -20,6 +20,7 @@ module ProxES
20
20
  end
21
21
 
22
22
  def parse
23
+ p path_parts
23
24
  @index ||= check_part(path_parts[0])
24
25
  @type ||= check_part(path_parts[1])
25
26
  @id ||= check_part(path_parts[2])
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ProxES
4
- VERSION = '0.5.2'.freeze
4
+ VERSION = '0.6.0'.freeze
5
5
  end
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/_proxes/images/mstile-150x150.png"/>
6
+ <TileColor>#da532c</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="192.000000pt" height="192.000000pt" viewBox="0 0 192.000000 192.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.11, written by Peter Selinger 2001-2013
9
+ </metadata>
10
+ <g transform="translate(0.000000,192.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M812 1896 c-3 -6 -7 -46 -7 -88 -1 -43 -4 -80 -8 -84 -3 -4 -26 -9
13
+ -49 -11 -97 -11 -247 -74 -343 -146 -324 -242 -395 -717 -159 -1050 19 -26 34
14
+ -49 34 -52 0 -2 -27 -32 -60 -65 -33 -33 -60 -63 -60 -67 0 -12 121 -119 175
15
+ -154 116 -76 273 -139 380 -153 61 -8 251 -9 285 -1 14 3 42 8 62 10 95 13
16
+ 280 99 381 178 182 142 294 322 346 554 31 136 27 266 -13 449 -9 41 -59 159
17
+ -94 219 -83 144 -209 268 -355 349 -71 40 -206 91 -263 101 -130 21 -242 26
18
+ -252 11z m240 -135 c151 -34 301 -120 411 -236 83 -87 184 -269 201 -360 3
19
+ -16 9 -55 15 -85 11 -64 7 -213 -7 -285 -61 -297 -283 -537 -577 -624 -86 -25
20
+ -122 -30 -216 -31 -188 -3 -347 48 -507 163 l-43 31 300 300 299 301 0 135 c0
21
+ 74 1 265 1 423 l1 289 38 -5 c20 -3 58 -11 84 -16z m-248 -256 l1 -88 -50 -14
22
+ c-295 -82 -433 -407 -285 -670 l30 -52 -60 -61 c-32 -33 -63 -60 -67 -60 -25
23
+ 1 -97 139 -124 236 -40 146 -19 336 52 463 91 163 220 265 404 319 99 30 99
24
+ 30 99 -73z m1 -361 c1 -76 -3 -147 -8 -158 -5 -10 -53 -63 -108 -117 l-99 -99
25
+ -15 24 c-70 106 -51 283 42 386 45 50 153 115 178 107 6 -2 10 -59 10 -143z"/>
26
+ <path d="M990 1600 l0 -30 168 0 167 0 -45 30 c-44 29 -48 30 -167 30 l-123 0
27
+ 0 -30z"/>
28
+ <path d="M990 1417 l0 -32 250 0 c138 0 250 3 250 6 0 4 -9 17 -19 31 l-20 25
29
+ -230 1 -231 1 0 -32z"/>
30
+ <path d="M994 1261 c-2 -2 -4 -16 -4 -31 l0 -27 299 0 300 0 -13 31 -12 31
31
+ -283 0 c-155 0 -284 -2 -287 -4z"/>
32
+ <path d="M994 1081 c-2 -2 -4 -17 -4 -33 l0 -28 315 0 315 0 0 30 c0 24 -4 30
33
+ -22 31 -116 3 -601 3 -604 0z"/>
34
+ <path d="M959 870 l-32 -30 39 -1 c132 -2 646 -1 649 2 1 2 5 15 7 29 l3 25
35
+ -317 3 -318 2 -31 -30z"/>
36
+ <path d="M777 690 c-15 -15 -27 -29 -27 -31 0 -2 183 -4 407 -4 l407 0 12 31
37
+ 13 31 -393 0 -393 0 -26 -27z"/>
38
+ <path d="M600 510 c-17 -14 -30 -28 -30 -32 0 -3 196 -6 436 -6 l437 0 23 24
39
+ c13 12 24 27 24 31 0 4 -194 8 -430 8 l-431 0 -29 -25z"/>
40
+ <path d="M430 341 c0 -5 16 -18 36 -30 34 -20 47 -21 402 -21 l367 0 45 30 45
41
+ 30 -447 0 c-260 0 -448 -4 -448 -9z"/>
42
+ </g>
43
+ </svg>
File without changes
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "ProxES",
3
+ "name": "ProxES",
4
+ "icons": [
5
+ {
6
+ "src": "_proxes/images/launcher-icon-1x.png",
7
+ "type": "image/png",
8
+ "sizes": "48x48"
9
+ },
10
+ {
11
+ "src": "_proxes/images/launcher-icon-2x.png",
12
+ "type": "image/png",
13
+ "sizes": "96x96"
14
+ },
15
+ {
16
+ "src": "_proxes/images/launcher-icon-4x.png",
17
+ "type": "image/png",
18
+ "sizes": "192x192"
19
+ }
20
+ ],
21
+ "start_url": "_proxes/auth/identity",
22
+ "theme_color": "#ffffff",
23
+ "background_color": "#ffffff",
24
+ "display": "standalone"
25
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -15,5 +15,5 @@
15
15
  %button.btn.btn-primary{ type: 'submit' } Log In
16
16
  .pull-right
17
17
  No account yet?
18
- %a.btn.btn-default{ href: '/auth/identity/register' } Register
18
+ %a.btn.btn-default{ href: '/_proxes/auth/identity/register' } Register
19
19
  .col-sm-3
File without changes
File without changes
@@ -4,7 +4,12 @@
4
4
  %meta{ charset: 'utf-8' }
5
5
  %meta{ 'http-equiv' => 'X-UA-Compatible', 'content' => 'IE=edge,chrome=1' }
6
6
  %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
7
- %link{ rel: 'apple-touch-icon', sizes: '76x76', href: '/assets/img/apple-icon.png' }
7
+ %meta{ name: 'theme-color', content: '#ffffff' }
8
+ %link{ rel: 'manifest', href: '/_proxes/manifest.json' }
9
+ %link{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/_proxes/images/favicon-32x32.png' }
10
+ %link{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/_proxes/images/favicon-16x16.png' }
11
+ %link{ rel: 'apple-touch-icon', sizes: '76x76', href: '/_proxes/images/apple-icon.png' }
12
+ %link{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#5bbad5' }
8
13
 
9
14
  %title
10
15
  ProxES
File without changes
File without changes
@@ -19,7 +19,7 @@
19
19
  - else
20
20
  %ul.nav.navbar-top-links.navbar-right
21
21
  %li
22
- %a.btn.btn-link{ href: '/auth/identity' }
22
+ %a.btn.btn-link{ href: '/_proxes/auth/identity' }
23
23
  Log In
24
24
  .navbar-default.sidebar{ role: 'navigation' }
25
25
  = haml :'partials/sidebar'
File without changes
File without changes
@@ -12,11 +12,11 @@
12
12
  = item[:text]
13
13
  - else
14
14
  %li.active
15
- %a{ href: '/auth/identity' }
15
+ %a{ href: '/_proxes/auth/identity' }
16
16
  %i.fa.fa-user.fa-fw
17
17
  Log In
18
18
  %li
19
- %a{ href: '/auth/identity/register' }
19
+ %a{ href: '/_proxes/auth/identity/register' }
20
20
  %i.fa.fa-pencil-square-o.fa-fw
21
21
  Register
22
22
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurgens du Toit
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-24 00:00:00.000000000 Z
11
+ date: 2017-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -389,11 +389,10 @@ files:
389
389
  - config/logger.yml
390
390
  - gulpfile.js
391
391
  - lib/proxes.rb
392
- - lib/proxes/app.rb
393
392
  - lib/proxes/container.rb
393
+ - lib/proxes/controllers/app.rb
394
394
  - lib/proxes/controllers/application.rb
395
395
  - lib/proxes/controllers/audit_logs.rb
396
- - lib/proxes/controllers/auth_identity.rb
397
396
  - lib/proxes/controllers/component.rb
398
397
  - lib/proxes/controllers/permissions.rb
399
398
  - lib/proxes/controllers/roles.rb
@@ -446,7 +445,17 @@ files:
446
445
  - migrate/20170416_user_specific_permissions.rb
447
446
  - package.json
448
447
  - proxes.gemspec
448
+ - public/browserconfig.xml
449
+ - public/images/apple-icon.png
450
+ - public/images/favicon-16x16.png
451
+ - public/images/favicon-32x32.png
452
+ - public/images/launcher-icon-1x.png
453
+ - public/images/launcher-icon-2x.png
454
+ - public/images/launcher-icon-4x.png
455
+ - public/images/mstile-150x150.png
456
+ - public/images/safari-pinned-tab.svg
449
457
  - public/js/bundle.js
458
+ - public/manifest.json
450
459
  - src/scripts/app.js
451
460
  - views/404.haml
452
461
  - views/audit_logs/index.haml
@@ -499,7 +508,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
499
508
  version: '0'
500
509
  requirements: []
501
510
  rubyforge_project:
502
- rubygems_version: 2.6.8
511
+ rubygems_version: 2.6.11
503
512
  signing_key:
504
513
  specification_version: 4
505
514
  summary: Rack wrapper around Elasticsearch to provide security and management features
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'proxes/controllers/application'
4
-
5
- module ProxES
6
- class AuthIdentity < Application
7
- get '/auth/identity' do
8
- haml :'identity/login', locals: { title: 'Log In' }
9
- end
10
-
11
- # Failed Login
12
- post '/_proxes/auth/identity/callback' do
13
- broadcast(:identity_failed_login)
14
- flash[:warning] = 'Invalid credentials. Please try again.'
15
- redirect '/auth/identity'
16
- end
17
-
18
- get '/auth/identity/register' do
19
- identity = Identity.new
20
- haml :'identity/register', locals: { title: 'Register', identity: identity }
21
- end
22
- end
23
- end