mno-enterprise-core 2.0.9 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/mno_enterprise/application_controller.rb +10 -20
  3. data/app/models/mno_enterprise/base_resource.rb +1 -2
  4. data/app/models/mno_enterprise/impac/dashboard.rb +24 -22
  5. data/app/models/mno_enterprise/impac/kpi.rb +1 -1
  6. data/app/models/mno_enterprise/impac/widget.rb +1 -1
  7. data/app/models/mno_enterprise/user.rb +2 -1
  8. data/config/initializers/audit_log.rb +2 -0
  9. data/config/initializers/config.rb +3 -0
  10. data/config/locales/models/app/en.yml +25 -0
  11. data/config/locales/models/app/id.yml +25 -0
  12. data/config/locales/models/app/zh.yml +25 -0
  13. data/config/locales/models/app_instance/en.yml +24 -0
  14. data/config/locales/models/app_instance/id.yml +24 -0
  15. data/config/locales/models/app_instance/zh.yml +24 -0
  16. data/config/locales/models/credit_card/en.yml +23 -0
  17. data/config/locales/models/credit_card/id.yml +23 -0
  18. data/config/locales/models/credit_card/zh.yml +23 -0
  19. data/config/locales/models/deletion_request/en.yml +9 -0
  20. data/config/locales/models/deletion_request/id.yml +9 -0
  21. data/config/locales/models/deletion_request/zh.yml +9 -0
  22. data/config/locales/models/impac/dashboard/en.yml +13 -0
  23. data/config/locales/models/impac/dashboard/id.yml +13 -0
  24. data/config/locales/models/impac/dashboard/zh.yml +13 -0
  25. data/config/locales/models/impac/widget/en.yml +13 -0
  26. data/config/locales/models/impac/widget/id.yml +13 -0
  27. data/config/locales/models/impac/widget/zh.yml +13 -0
  28. data/config/locales/models/invoice/en.yml +9 -0
  29. data/config/locales/models/invoice/id.yml +9 -0
  30. data/config/locales/models/invoice/zh.yml +9 -0
  31. data/config/locales/models/org_invite/en.yml +9 -0
  32. data/config/locales/models/org_invite/id.yml +9 -0
  33. data/config/locales/models/org_invite/zh.yml +9 -0
  34. data/config/locales/models/org_team/en.yml +9 -0
  35. data/config/locales/models/org_team/id.yml +9 -0
  36. data/config/locales/models/org_team/zh.yml +9 -0
  37. data/config/locales/models/organization/en.yml +24 -0
  38. data/config/locales/models/organization/id.yml +24 -0
  39. data/config/locales/models/organization/zh.yml +24 -0
  40. data/config/locales/models/user/en.yml +45 -0
  41. data/config/locales/models/user/id.yml +45 -0
  42. data/config/locales/models/user/zh.yml +44 -0
  43. data/config/locales/templates/components/en.yml +21 -0
  44. data/config/locales/templates/components/id.yml +21 -0
  45. data/config/locales/templates/components/zh.yml +21 -0
  46. data/config/locales/templates/dashboard/en.yml +60 -0
  47. data/config/locales/templates/dashboard/id.yml +50 -0
  48. data/config/locales/templates/dashboard/marketplace/en.yml +16 -0
  49. data/config/locales/templates/dashboard/marketplace/id.yml +14 -0
  50. data/config/locales/templates/dashboard/marketplace/zh.yml +14 -0
  51. data/config/locales/templates/dashboard/organization/en.yml +107 -0
  52. data/config/locales/templates/dashboard/organization/id.yml +103 -0
  53. data/config/locales/templates/dashboard/organization/zh.yml +103 -0
  54. data/config/locales/templates/dashboard/teams/en.yml +48 -0
  55. data/config/locales/templates/dashboard/teams/id.yml +43 -0
  56. data/config/locales/templates/dashboard/teams/zh.yml +43 -0
  57. data/config/locales/templates/dashboard/zh.yml +54 -0
  58. data/config/locales/templates/impac/en.yml +24 -0
  59. data/config/locales/templates/impac/id.yml +24 -0
  60. data/config/locales/templates/impac/modals/en.yml +31 -0
  61. data/config/locales/templates/impac/modals/id.yml +29 -0
  62. data/config/locales/templates/impac/modals/zh.yml +28 -0
  63. data/config/locales/templates/impac/widgets/common/en.yml +9 -0
  64. data/config/locales/templates/impac/widgets/common/id.yml +9 -0
  65. data/config/locales/templates/impac/widgets/common/zh.yml +9 -0
  66. data/config/locales/templates/impac/widgets/en.yml +66 -0
  67. data/config/locales/templates/impac/widgets/id.yml +58 -0
  68. data/config/locales/templates/impac/widgets/settings/en.yml +23 -0
  69. data/config/locales/templates/impac/widgets/settings/id.yml +19 -0
  70. data/config/locales/templates/impac/widgets/settings/zh.yml +19 -0
  71. data/config/locales/templates/impac/widgets/zh.yml +58 -0
  72. data/config/locales/templates/impac/zh.yml +24 -0
  73. data/config/locales/templates/modals/en.yml +9 -0
  74. data/config/locales/templates/modals/id.yml +9 -0
  75. data/config/locales/templates/modals/zh.yml +9 -0
  76. data/config/locales/views/auth/confirmations/en.yml +17 -0
  77. data/config/locales/views/auth/confirmations/id.yml +17 -0
  78. data/config/locales/views/auth/confirmations/zh.yml +17 -0
  79. data/config/locales/views/auth/passwords/en.yml +10 -0
  80. data/config/locales/views/auth/passwords/id.yml +10 -0
  81. data/config/locales/views/auth/passwords/zh.yml +10 -0
  82. data/config/locales/views/auth/registrations/en.yml +9 -0
  83. data/config/locales/views/auth/registrations/id.yml +9 -0
  84. data/config/locales/views/auth/registrations/zh.yml +8 -0
  85. data/config/locales/views/auth/sessions/en.yml +7 -0
  86. data/config/locales/views/auth/sessions/id.yml +7 -0
  87. data/config/locales/views/auth/sessions/zh.yml +7 -0
  88. data/config/locales/views/auth/shared/en.yml +12 -0
  89. data/config/locales/views/auth/shared/id.yml +11 -0
  90. data/config/locales/views/auth/shared/zh.yml +11 -0
  91. data/config/locales/views/auth/unlocks/en.yml +7 -0
  92. data/config/locales/views/auth/unlocks/id.yml +7 -0
  93. data/config/locales/views/auth/unlocks/zh.yml +7 -0
  94. data/config/locales/views/pages/en.yml +19 -0
  95. data/config/locales/views/pages/id.yml +18 -0
  96. data/config/locales/views/pages/zh.yml +18 -0
  97. data/config/locales/views/provision/en.yml +12 -0
  98. data/config/locales/views/provision/id.yml +11 -0
  99. data/config/locales/views/provision/zh.yml +11 -0
  100. data/config/locales/views/webhook/o_auth/en.yml +6 -0
  101. data/config/locales/views/webhook/o_auth/id.yml +6 -0
  102. data/config/locales/views/webhook/o_auth/providers/en.yml +15 -0
  103. data/config/locales/views/webhook/o_auth/providers/id.yml +15 -0
  104. data/config/locales/views/webhook/o_auth/providers/zh.yml +15 -0
  105. data/config/locales/views/webhook/o_auth/zh.yml +6 -0
  106. data/lib/devise/models/remote_authenticatable.rb +1 -1
  107. data/lib/devise_extension.rb +6 -2
  108. data/lib/generators/mno_enterprise/dummy/dummy_generator.rb +7 -0
  109. data/lib/generators/mno_enterprise/dummy/templates/rails/routes.rb +0 -6
  110. data/lib/generators/mno_enterprise/install/install_generator.rb +79 -33
  111. data/lib/generators/mno_enterprise/install/templates/Procfile +1 -1
  112. data/lib/generators/mno_enterprise/install/templates/Procfile.dev +2 -0
  113. data/lib/generators/mno_enterprise/install/templates/config/application.yml +11 -0
  114. data/lib/generators/mno_enterprise/install/templates/config/initializers/mno_enterprise.rb +18 -15
  115. data/lib/generators/mno_enterprise/install/templates/config/settings.yml +7 -0
  116. data/lib/generators/mno_enterprise/install/templates/config/settings/development.yml +6 -0
  117. data/lib/generators/mno_enterprise/install/templates/config/settings/production.yml +6 -0
  118. data/lib/generators/mno_enterprise/install/templates/config/settings/test.yml +6 -0
  119. data/lib/generators/mno_enterprise/install/templates/config/settings/uat.yml +6 -0
  120. data/lib/generators/mno_enterprise/install/templates/stylesheets/{main.less_erb → main.less} +16 -3
  121. data/lib/generators/mno_enterprise/templates/scripts/puma.rb +3 -3
  122. data/lib/her_extension/model/relation.rb +0 -13
  123. data/lib/mno_enterprise/concerns/controllers/auth/confirmations_controller.rb +24 -19
  124. data/lib/mno_enterprise/concerns/controllers/i18n.rb +16 -0
  125. data/lib/mno_enterprise/concerns/models/app_instance.rb +0 -4
  126. data/lib/mno_enterprise/concerns/models/organization.rb +1 -1
  127. data/lib/mno_enterprise/core.rb +20 -7
  128. data/lib/mno_enterprise/engine.rb +19 -0
  129. data/lib/mno_enterprise/testing_support/common_rake.rb +1 -1
  130. data/lib/mno_enterprise/testing_support/factories/impac/kpis.rb +1 -0
  131. data/lib/mno_enterprise/testing_support/factories/org_invite.rb +1 -5
  132. data/lib/mno_enterprise/testing_support/mno_enterprise_api_test_helper.rb +1 -2
  133. data/lib/mno_enterprise/testing_support/shared_contexts/rake_task.rb +21 -0
  134. data/lib/mno_enterprise/version.rb +1 -1
  135. data/lib/tasks/mno_enterprise_tasks.rake +3 -5
  136. data/spec/controllers/mno_enterprise/i18n_spec.rb +42 -0
  137. data/spec/lib/her_extension/model/relation_spec.rb +0 -71
  138. data/spec/lib/mno_enterprise/core_engine_spec.rb +16 -0
  139. data/spec/mno_enterprise_spec.rb +2 -2
  140. data/spec/models/mno_enterprise/base_resource_spec.rb +0 -22
  141. metadata +152 -18
  142. data/lib/her_extension/middleware/mnoe_raise_error.rb +0 -21
  143. data/lib/her_extension/model/associations/belongs_to_association.rb +0 -25
  144. data/spec/controllers/mno_enterprise/application_controller_spec.rb +0 -15
@@ -0,0 +1,12 @@
1
+ en:
2
+ mno_enterprise:
3
+ provision:
4
+ provision_apps:
5
+ title: Your order is being prepared
6
+ preparing: Preparing Order
7
+
8
+ select_organization:
9
+ title: Choose an organization
10
+ explanation: You belong to multiple organizations
11
+ select: Please select the organization you are making this new order for
12
+ submit: Go
@@ -0,0 +1,11 @@
1
+ id:
2
+ mno_enterprise:
3
+ provision:
4
+ provision_apps:
5
+ title: "Pesanan Anda sedang dipersiapkan"
6
+ preparing: "Mempersiapkan Pesanan"
7
+ select_organization:
8
+ title: "Pilih organisasi"
9
+ explanation: "Anda termasuk anggota di banyak organisasi"
10
+ select: "Pilih organisasi yang menjadi tujuan Anda melakukan pemesanan baru ini"
11
+ submit: "Lanjutkan"
@@ -0,0 +1,11 @@
1
+ zh:
2
+ mno_enterprise:
3
+ provision:
4
+ provision_apps:
5
+ title: "您的订单正在处理中"
6
+ preparing: 正在处理订单
7
+ select_organization:
8
+ title: "选择一个公司"
9
+ explanation: "您属于多个公司"
10
+ select: "请选择建立此新订单的公司"
11
+ submit: "开始"
@@ -0,0 +1,6 @@
1
+ en:
2
+ mno_enterprise:
3
+ webhook:
4
+ o_auth:
5
+ authorize:
6
+ you_are_redirected: You are about to be connected via our integration partner
@@ -0,0 +1,6 @@
1
+ id:
2
+ mno_enterprise:
3
+ webhook:
4
+ o_auth:
5
+ authorize:
6
+ you_are_redirected: Anda sedang disambungkan melalui patner kami
@@ -0,0 +1,15 @@
1
+ en:
2
+ mno_enterprise:
3
+ webhook:
4
+ o_auth:
5
+ providers:
6
+ myob:
7
+ which_version_used: Which version of MYOB do you use?
8
+ my_version_is: "My version of MYOB is:"
9
+ connect: Connect
10
+
11
+ xero:
12
+ how_do_you_want_to_connect: How do you want us to connect your Xero account?
13
+ which_extra_modules: Do you want to connect any of the following extra modules?
14
+ which_country_for_the_account: What is the country associated with your Xero account?
15
+ connect: Connect
@@ -0,0 +1,15 @@
1
+ id:
2
+ mno_enterprise:
3
+ webhook:
4
+ o_auth:
5
+ providers:
6
+ myob:
7
+ which_version_used: Versi MYOB mana yang anda gunakan?
8
+ my_version_is: "Versi MYOB saya adalah:"
9
+ connect: Sambungkan
10
+
11
+ xero:
12
+ how_do_you_want_to_connect: How do you want us to connect your Xero account?
13
+ which_extra_modules: Do you want to connect any of the following extra modules?
14
+ which_country_for_the_account: What is the country associated with your Xero account?
15
+ connect: Connect
@@ -0,0 +1,15 @@
1
+ zh:
2
+ mno_enterprise:
3
+ webhook:
4
+ o_auth:
5
+ providers:
6
+ myob:
7
+ which_version_used: 你用哪个MYOB的版本?
8
+ my_version_is: "我的MYOB的版本是:"
9
+ connect: 连接
10
+
11
+ xero:
12
+ how_do_you_want_to_connect: How do you want us to connect your Xero account?
13
+ which_extra_modules: Do you want to connect any of the following extra modules?
14
+ which_country_for_the_account: What is the country associated with your Xero account?
15
+ connect: Connect
@@ -0,0 +1,6 @@
1
+ zh:
2
+ mno_enterprise:
3
+ webhook:
4
+ o_auth:
5
+ authorize:
6
+ you_are_redirected: 您即将通过我们的集成合作伙伴连接
@@ -30,7 +30,7 @@ module Devise
30
30
  def serialize_from_session(key,salt)
31
31
  record = Rails.cache.fetch(['user', key], expires_in: 1.minutes) do
32
32
  to_adapter.get(key)
33
- end.tap {|r| r && r.clear_association_cache}
33
+ end.tap(&:clear_association_cache)
34
34
  record if record && record.authenticatable_salt == salt
35
35
  end
36
36
 
@@ -27,6 +27,10 @@ end
27
27
  # modules
28
28
  Devise.add_module :password_expirable, controller: :password_expirable, model: 'devise/models/password_expirable', route: :password_expired
29
29
 
30
- ActiveSupport.on_load(:action_controller) do
31
- include DeviseExtension::Controllers::Helpers
30
+ module DeviseExtension
31
+ class Engine < ::Rails::Engine
32
+ ActiveSupport.on_load(:action_controller) do
33
+ include DeviseExtension::Controllers::Helpers
34
+ end
35
+ end
32
36
  end
@@ -46,6 +46,13 @@ module MnoEnterprise
46
46
  template "rails/test-env.rb", "#{dummy_path}/config/environments/test.rb", force: true
47
47
  end
48
48
 
49
+ # Overwrite mnoe less file required by asset pipeline
50
+ def test_dummy_frontend
51
+ if defined?(MnoEnterprise::Frontend)
52
+ create_file("#{dummy_path}/app/assets/stylesheets/main.less", force: true)
53
+ end
54
+ end
55
+
49
56
  def test_dummy_clean
50
57
  inside dummy_path do
51
58
  remove_file ".gitignore"
@@ -1,8 +1,2 @@
1
1
  Rails.application.routes.draw do
2
-
3
- # MnoEnterprise Engine
4
- mount MnoEnterprise::Engine => "/mnoe", as: :mno_enterprise
5
-
6
- # Root to login page
7
- root to: redirect('/mnoe/auth/users/sign_in')
8
2
  end
@@ -7,27 +7,29 @@ module MnoEnterprise
7
7
  desc "Description:\n Install Maestrano Enterprise Engine in your application\n\n"
8
8
 
9
9
  class_option :skip_rspec, type: :boolean, default: false, desc: 'Skip rspec-rails installation'
10
- class_option :skip_sprite, type: :boolean, default: false, desc: 'Skip sprite-factory installation'
11
- class_option :skip_factory_girl, type: :boolean, default: false, desc: 'Skip sprite-factory installation'
12
-
13
-
10
+ class_option :skip_factory_girl, type: :boolean, default: false, desc: 'Skip factory_girl installation'
11
+ class_option :skip_frontend, type: :boolean, default: false, desc: 'Skip frontend installation'
12
+ class_option :skip_admin, type: :boolean, default: false, desc: 'Skip admin installation'
14
13
 
15
14
  def copy_initializer
16
15
  template "Procfile"
16
+ template "Procfile.dev"
17
17
  template "config/initializers/mno_enterprise.rb"
18
18
  template "config/mno_enterprise_styleguide.yml"
19
- end
20
19
 
21
- def setup_assets
22
- if defined?(MnoEnterprise::Frontend) || Rails.env.test?
23
- # JavaScript
24
- copy_file "javascripts/mno_enterprise_extensions.js", "app/assets/javascripts/mno_enterprise_extensions.js"
20
+ # Settings
21
+ template "config/settings.yml", "config/settings.yml"
22
+ create_file "config/settings.local.yml"
23
+ directory "config/settings", "config/settings"
25
24
 
25
+ template "config/application.yml", "config/application.yml"
26
+ template "config/application.yml", "config/application.sample.yml"
27
+ end
26
28
 
29
+ def setup_assets
30
+ if defined?(MnoEnterprise::Frontend)
27
31
  # Stylesheets
28
- copy_file "stylesheets/main.less_erb", "app/assets/stylesheets/main.less.erb"
29
- copy_file "stylesheets/theme.less_erb", "app/assets/stylesheets/theme.less.erb"
30
- copy_file "stylesheets/variables.less", "app/assets/stylesheets/variables.less"
32
+ copy_file "stylesheets/main.less", "app/assets/stylesheets/main.less", skip: true
31
33
 
32
34
  # Require main stylesheet file
33
35
  inject_into_file 'app/assets/stylesheets/application.css', before: " */" do
@@ -39,6 +41,52 @@ module MnoEnterprise
39
41
  end
40
42
  end
41
43
 
44
+ def setup_less_development_paths
45
+ if defined?(MnoEnterprise::Frontend) || Rails.env.test?
46
+ application(nil, env: "development") do
47
+ "# Reload frontend stylesheets on changes\n config.less.paths << \"\#{Rails.root}/frontend/src/app/stylesheets\"\n"
48
+ end
49
+ end
50
+ end
51
+
52
+ def update_gitignore
53
+ create_file '.gitignore' unless File.exists? '.gitignore'
54
+
55
+ append_to_file '.gitignore' do
56
+ "\n" +
57
+ "# Ignore application configuration\n" +
58
+ "config/application.yml\n" +
59
+ "config/application-*.yml\n" +
60
+ "config/settings.local.yml\n" +
61
+ "config/settings/*.local.yml\n" +
62
+ "config/environments/*.local.yml\n" +
63
+ "\n" +
64
+ "# Bower and Node packages\n" +
65
+ "bower_components\n" +
66
+ "node_modules\n"
67
+ end
68
+ end
69
+
70
+ def setup_frontend
71
+ unless options[:skip_frontend]
72
+ say("\n")
73
+ @install_frontend = ask_with_default("Would you like to install Maestrano Enterprise Angular (frontend)?")
74
+ if @install_frontend
75
+ rake "mnoe:frontend:install"
76
+ end
77
+ end
78
+ end
79
+
80
+ def setup_admin
81
+ unless options[:skip_admin]
82
+ say("\n")
83
+ @install_admin = ask_with_default("Would you like to install Maestrano Enterprise Admin Dashboard (frontend)?")
84
+ if @install_admin
85
+ rake "mnoe:admin:install"
86
+ end
87
+ end
88
+ end
89
+
42
90
  # Inject engine routes
43
91
  def notify_about_routes
44
92
  if (routes_file = destination_path.join('config', 'routes.rb')).file? && (routes_file.read !~ %r{mount\ MnoEnterprise::Engine})
@@ -47,31 +95,20 @@ module MnoEnterprise
47
95
  # If you would like to change where this engine is mounted, simply change the :at option to something different
48
96
  #
49
97
  # We ask that you don't use the :as option here, as Mnoe relies on it being the default of "mno_enterprise"
50
- mount MnoEnterprise::Engine, at: '/mnoe', as: :mno_enterprise
98
+ scope '(:locale)' do
99
+ mount MnoEnterprise::Engine, at: '/mnoe', as: :mno_enterprise
100
+ end
51
101
 
102
+ root to: redirect(MnoEnterprise.router.dashboard_path)
52
103
  }
53
104
  inject_into_file routes_file, mount, after: "Rails.application.routes.draw do\n"
54
105
  end
55
106
 
56
107
  unless options[:quiet]
57
- say " "
108
+ say "\n"
58
109
  say "We added the following line to your application's config/routes.rb file:"
59
- say " "
60
110
  say " mount MnoEnterprise::Engine, at: '/mnoe'"
61
- end
62
- end
63
-
64
- def install_sprite_generator
65
- if (defined?(MnoEnterprise::Frontend) || Rails.env.test?) && !options[:skip_sprite]
66
- say("\n")
67
- @install_sprite = ask_with_default('Would you like to install sprite-factory?')
68
- if @install_sprite
69
- gem_group :development do
70
- gem "chunky_png"
71
- gem "sprite-factory"
72
- end
73
- template "tasks/sprites.rake", "lib/tasks/sprites.rake"
74
- end
111
+ say " root to: redirect(MnoEnterprise.router.dashboard_path)"
75
112
  end
76
113
  end
77
114
 
@@ -106,12 +143,21 @@ module MnoEnterprise
106
143
  say_status("==> Maestrano Enterprise has been installed ==", nil)
107
144
  say("- You can generate deployment configs by running: 'rails g mno_enterprise:puma_stack'")
108
145
  say("- You can start the server with: 'foreman start'")
109
- if @install_sprite =~ /y/i
146
+
147
+ if @install_frontend
110
148
  say("\n\n")
111
- say("==> Sprite Factory has been installed")
112
- say("- Drop your icons in vendor/sprites/icons then run: 'rake assets:resprite'")
113
- say("- Add more icons folders to vendor/sprites then modify lib/tasks/sprites.rake")
149
+ say_status("==> Maestrano Enterprise Angular has been installed", nil)
150
+ say("- You can quickly customize the platform style in frontend/src/app/stylesheets")
151
+ say("- You can customize the whole frontend by overriding mno-enterprise-angular in frontend/src/")
152
+ say("- You can run 'rake mnoe:frontend:dist' to rebuild the frontend after changing frontend/src")
114
153
  end
154
+
155
+ if @install_admin
156
+ say("\n\n")
157
+ say_status("==> Maestrano Enterprise Admin Dashboard has been installed", nil)
158
+ say("- You can access the platform with an admin user (admin_role = 'admin')")
159
+ end
160
+
115
161
  say("\n\n")
116
162
  end
117
163
  end
@@ -1 +1 @@
1
- web: bundle exec rails s -p 7000
1
+ web: bundle exec puma -p 7000
@@ -0,0 +1,2 @@
1
+ web: bundle exec puma -p 7000
2
+ gulp: gulp serve --gulpfile ./tmp/build/frontend/gulpfile.js --cwd ./tmp/build/frontend/
@@ -0,0 +1,11 @@
1
+ # Add configuration values here, as shown below.
2
+
3
+ # Tenant Credentials
4
+ tenant_id: my_tenant_id
5
+ tenant_key: my_tenant_access_key
6
+
7
+ # Emailing platform - Mandrill (default mandrill)
8
+ # mandrill_key: changeme
9
+
10
+ # Rails secret key
11
+ SECRET_KEY_BASE: <%= SecureRandom.hex(64) %>
@@ -1,5 +1,3 @@
1
- # require 'mno-enterprise'
2
-
3
1
  MnoEnterprise.configure do |config|
4
2
  #===============================================
5
3
  # General Configuration
@@ -18,10 +16,10 @@ MnoEnterprise.configure do |config|
18
16
  # Maestrano Enterprise Tenant Authentication
19
17
  #===============================================
20
18
  # Configure your tenant ID
21
- config.tenant_id = "my_tenant_id"
19
+ config.tenant_id = ENV['tenant_id']
22
20
 
23
21
  # Configure your tenant Key
24
- config.tenant_key = "my_tenant_access_key"
22
+ config.tenant_key = ENV['tenant_key']
25
23
 
26
24
  #===============================================
27
25
  # Emailing
@@ -40,6 +38,9 @@ MnoEnterprise.configure do |config|
40
38
  #===============================================
41
39
  # External Routes
42
40
  #===============================================
41
+ # Dashboard path
42
+ # config.router.dashboard_path = '/dashboard/'
43
+
43
44
  # URL of the Terms and Conditions page.
44
45
  # Used on Devise Registration pages
45
46
  # config.router.terms_url = 'http://mywebsite.com/terms'
@@ -52,7 +53,12 @@ MnoEnterprise.configure do |config|
52
53
  #===============================================
53
54
  # Angular CSRF protection - Only needed if the AngularJS App
54
55
  # is not served through Rails asset pipeline
55
- # config.include_angular_csrf = false
56
+ config.include_angular_csrf = true
57
+
58
+ # I18n - Controls:
59
+ # - Routing in development
60
+ # - Filter and locale management in controllers
61
+ config.i18n_enabled = true
56
62
 
57
63
  #===============================================
58
64
  # Third Party Plugins
@@ -66,19 +72,16 @@ MnoEnterprise.configure do |config|
66
72
  # ==> Maestrano Enterprise API Configuration
67
73
  # Configure the API host
68
74
  # config.mno_api_host = "https://api-enterprise.maestrano.com"
75
+ config.mno_api_host = "#{Settings.mno.protocol}://#{Settings.mno.host}"
69
76
 
70
- # Configure the API root path
71
- # config.mno_api_root_path = "/v1"
72
-
73
- #===============================================
74
- # Impac! Reporting Configuration
75
- #===============================================
76
- # ==> Impac! API Configuration
77
- # Configure the API host
78
- # config.impac_api_host = "https://api-impac-uat.maestrano.io"
77
+ # Configure private API host if defined
78
+ if Settings.mno.private_protocol && Settings.mno.private_host
79
+ config.mno_api_private_host = "#{Settings.mno.private_protocol}://#{Settings.mno.private_host}"
80
+ end
79
81
 
80
82
  # Configure the API root path
81
- # config.impac_api_root_path = "/api"
83
+ # config.mno_api_root_path = "/v1"
84
+ config.mno_api_root_path = Settings.mno.paths.root
82
85
 
83
86
  #===============================================
84
87
  # Marketplace Listing
@@ -0,0 +1,7 @@
1
+ impac:
2
+ paths:
3
+ mnohub_api: /mnoe/jpi/v1
4
+ mno:
5
+ paths:
6
+ root: /api/mnoe/v1
7
+ frontend_host:
@@ -0,0 +1,6 @@
1
+ impac:
2
+ protocol: http
3
+ host: localhost:4000
4
+ mno:
5
+ protocol: http
6
+ host: localhost:3000
@@ -0,0 +1,6 @@
1
+ impac:
2
+ protocol: https
3
+ host: api-impac.maestrano.com
4
+ mno:
5
+ protocol: https
6
+ host: maestrano.com
@@ -0,0 +1,6 @@
1
+ impac:
2
+ protocol: http
3
+ host: localhost:4000
4
+ mno:
5
+ protocol: https
6
+ host: api-enterprise.maestrano.com
@@ -0,0 +1,6 @@
1
+ impac:
2
+ protocol: https
3
+ host: api-impac-uat.maestrano.io
4
+ mno:
5
+ protocol: https
6
+ host: uat.maestrano.io