mno-enterprise 3.1.4 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +293 -113
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a76a9fadf68efdbeb9c468da460896200e5b0acb
|
4
|
+
data.tar.gz: c04a6a7193b25262f072be83c18ff13e26773581
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 845f7e3c5ec67837e9a5e5d9bda16b722617c3ba89d82cf3c6bdc1f6dbcb8406a95c19e345e81e09c82ccde35759c9403ab3a30f3787492042e8ed9dbb1213d7
|
7
|
+
data.tar.gz: 3f87243eb41add2d9cd6252804988d3da9fb995226abda38866ccef9c5e6d0a0264f781f9a7aef3ccf133cbb69064eac426807aa73a8a91c005fbae6c04c5ccd
|
data/README.md
CHANGED
@@ -17,17 +17,24 @@ The goal of this engine is to provide a base that you can easily extend with cus
|
|
17
17
|
- - -
|
18
18
|
|
19
19
|
1. [Install](#install)
|
20
|
-
2. [
|
21
|
-
3. [
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
2. [Upgrade](#upgrade)
|
21
|
+
3. [Configuration](#configuration)
|
22
|
+
1. [Emailing Platform](#emailing-platform)
|
23
|
+
2. [Intercom](#intercom)
|
24
|
+
3. [Active Job Backend](#active-job-backend)
|
25
|
+
4. [Building the Frontend](#building-the-frontend)
|
26
|
+
5. [Modifying the style - Theme Previewer](#modifying-the-style---theme-previewer)
|
27
|
+
6. [Extending the Frontend](#extending-the-frontend)
|
28
|
+
1. [Adding a custom font](#adding-a-custom-font)
|
29
|
+
2. [Adding a favicon](#adding-favicon)
|
30
|
+
7. [Replacing the Frontend](#replacing-the-frontend)
|
31
|
+
8. [Extending the Backend](#extending-the-backend)
|
32
|
+
1. [Overriding Models and Controllers with the Decorator Pattern](#overriding-models-and-controllers-with-the-decorator-pattern)
|
33
|
+
2. [Generating a database extension](#generating-a-database-extension)
|
34
|
+
9. [Deploying](#deploying)
|
27
35
|
1. [Deploy a Puma stack on EC2 via Webistrano/Capistrano](#deploy-a-puma-stack-on-ec2-via-webistranocapistrano)
|
28
36
|
2. [Sample nginx config for I18n](#sample-nginx-config-for-i18n)
|
29
37
|
3. [Health Checks](#health-checks)
|
30
|
-
9. [Migrating from v2 to v3](#migrating-from-v2-to-v3)
|
31
38
|
10. [Contributing](#contributing)
|
32
39
|
|
33
40
|
- - -
|
@@ -68,22 +75,29 @@ The install script will perform three things:
|
|
68
75
|
- Create a /frontend directory in your application for all frontend customisations/overrides
|
69
76
|
|
70
77
|
**Manual Node setup (optional):**
|
71
|
-
Building the frontend requires you to have nodejs and
|
78
|
+
Building the frontend requires you to have nodejs and yarn installed. While the rake task will attempt to install these dependencies, you may want to install these manually prior to running the install task.
|
79
|
+
See the [nodejs](https://nodejs.org/en/) and [yarn](https://yarnpkg.com/en/docs/install) websites for instructions on how install them on your machine.
|
72
80
|
|
73
81
|
Once node is installed, you can run the following commands to ensure that all dependencies are installed:
|
74
82
|
```bash
|
75
83
|
bin/rake mnoe:frontend:install_dependencies
|
76
84
|
```
|
77
85
|
|
86
|
+
## Upgrade
|
87
|
+
|
88
|
+
We follow [Semantic Versioning](https://semver.org/) so upgrading to a compatible version should be straightforward.
|
89
|
+
|
90
|
+
For major upgrade between versions see [UPGRADING](UPGRADING.md).
|
91
|
+
|
78
92
|
## Configuration
|
79
93
|
|
80
94
|
### Emailing platform
|
81
95
|
|
82
|
-
Maestrano Enterprise
|
96
|
+
Maestrano Enterprise supports either [Mandrill](https://www.mandrill.com/) or [SparkPost](https://www.sparkpost.com/) as well as regular SMTP.
|
83
97
|
|
84
|
-
You can use either provider as long as your account has the [required templates](https://maestrano.atlassian.net/wiki/display/
|
98
|
+
You can use either provider as long as your account has the [required templates](https://maestrano.atlassian.net/wiki/display/DEV/Emailing).
|
85
99
|
|
86
|
-
If you want to copy the default templates to your own account you can use the tools in `tools/emails
|
100
|
+
If you want to copy the default templates to your own account you can use the tools in `tools/emails`.
|
87
101
|
|
88
102
|
#### Mandrill
|
89
103
|
|
@@ -116,24 +130,22 @@ end
|
|
116
130
|
```
|
117
131
|
|
118
132
|
#### SMTP
|
119
|
-
|
120
|
-
|
121
|
-
Typically for security reasons, system environment variables 'SMTP_USERNAME' and 'SMTP_PASSWORD' should be used to set the SMTP credentials.
|
133
|
+
|
134
|
+
It's also possible to use a regular SMTP server. In this case, Maestrano Enterprise will use the templates bundled within the gem, see the next section to customise them.
|
122
135
|
|
123
136
|
```ruby
|
124
137
|
# Gemfile
|
125
138
|
gem 'premailer-rails'
|
126
139
|
|
127
|
-
# config/
|
140
|
+
# config/application.rb
|
128
141
|
Rails.application.configure do
|
129
|
-
|
130
|
-
config.action_mailer.default_url_options = { :host => host_domain, :port => port_number }
|
131
|
-
config.action_mailer.asset_host = your_apps_root_url
|
142
|
+
# Email configuration
|
132
143
|
config.action_mailer.delivery_method = :smtp
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
144
|
+
|
145
|
+
config.action_mailer.smtp_settings = {
|
146
|
+
address: ENV['SMTP_HOST'],
|
147
|
+
port: ENV['SMTP_PORT'],
|
148
|
+
domain: ENV['SMTP_DOMAIN'],
|
137
149
|
user_name: ENV['SMTP_USERNAME'],
|
138
150
|
password: ENV['SMTP_PASSWORD'],
|
139
151
|
authentication: 'plain',
|
@@ -141,6 +153,13 @@ Rails.application.configure do
|
|
141
153
|
}
|
142
154
|
end
|
143
155
|
|
156
|
+
# config/environments/<production|uat>.rb
|
157
|
+
Rails.application.configure do
|
158
|
+
config.action_mailer.raise_delivery_errors = false
|
159
|
+
config.action_mailer.default_url_options = { host: host_domain, port: port_number }
|
160
|
+
config.action_mailer.asset_host = your_apps_root_url
|
161
|
+
end
|
162
|
+
|
144
163
|
# config/initializers/mno_enterprise.rb
|
145
164
|
MnoEnterprise.configure do |config|
|
146
165
|
config.mail_adapter = :smtp
|
@@ -150,22 +169,202 @@ end
|
|
150
169
|
Rails.application.config.assets.precompile += %w( mno_enterprise/mail.css )
|
151
170
|
```
|
152
171
|
|
172
|
+
|
173
|
+
In this example, the SMTP server settings are passed via environment variables. See sample configurations below.
|
174
|
+
|
175
|
+
**Gmail**
|
176
|
+
|
177
|
+
If you don't have access to a SMTP server, a personal Gmail account can be used as an alternative.
|
178
|
+
The Gmail account should be set to allow "less secure apps".
|
179
|
+
|
180
|
+
```ruby
|
181
|
+
# config/application.yml
|
182
|
+
SMTP_HOST: smtp.gmail.com
|
183
|
+
SMTP_PORT: 587
|
184
|
+
SMTP_DOMAIN: gmail.com
|
185
|
+
SMTP_USERNAME: user@gmail.com
|
186
|
+
SMTP_PASSWORD: password
|
187
|
+
```
|
188
|
+
|
189
|
+
**Mailgun**
|
190
|
+
|
191
|
+
[Mailgun](https://www.mailgun.com/sending-email) provides an SMTP mode and allow you to manage multiple domain within the same account.
|
192
|
+
|
193
|
+
```ruby
|
194
|
+
# config/application.yml
|
195
|
+
SMTP_HOST: smtp.mailgun.org
|
196
|
+
SMTP_PORT: 587
|
197
|
+
SMTP_DOMAIN: mg.acme-enterprise-mnoe-uat.maestrano.io
|
198
|
+
SMTP_USERNAME:
|
199
|
+
SMTP_PASSWORD:
|
200
|
+
```
|
201
|
+
|
153
202
|
##### Customization of mail templates
|
154
|
-
- You can override the default mail templates by adding template files (
|
155
|
-
- Logo can also be
|
156
|
-
- Write your own stylesheet by adding mail.css file to the stylesheets directory (
|
203
|
+
- You can override the default mail templates by adding template files (`template-name.html.erb`, `template-name.text.erb`) to the mail view directory (`/app/views/system_notifications`).
|
204
|
+
- Logo can also be overridden by adding your own logo image (`main-logo.png`) to the image assets directory (`/app/assets/images/mno_enterprise`).
|
205
|
+
- Write your own stylesheet by adding a `mail.css` file to the stylesheets directory (`/app/assets/stylesheets/mno_enterprise`). The css rules you write will be applied to all the mail templates including the default ones.
|
206
|
+
|
207
|
+
### Intercom
|
208
|
+
|
209
|
+
Intercom is already integrated in mno-enterprise, you just need to enable it!
|
210
|
+
|
211
|
+
Add the gem to your `Gemfile`
|
212
|
+
|
213
|
+
```ruby
|
214
|
+
gem 'intercom', '~> 3.5.4'
|
215
|
+
```
|
216
|
+
|
217
|
+
Expose the following environments variables (via `application.yml` or your preferred method)
|
218
|
+
|
219
|
+
```
|
220
|
+
INTERCOM_APP_ID
|
221
|
+
INTERCOM_TOKEN
|
222
|
+
```
|
223
|
+
|
224
|
+
If you want to enable secure mode (recommended), expose `INTERCOM_API_SECRET`.
|
225
|
+
|
226
|
+
If you built your app with an older version of mno-enterprise, double-check that `config/initializer/mno-enteprise.rb` contains the following lines:
|
227
|
+
|
228
|
+
```ruby
|
229
|
+
# Intercom
|
230
|
+
config.intercom_app_id = ENV['INTERCOM_APP_ID']
|
231
|
+
config.intercom_api_secret = ENV['INTERCOM_API_SECRET']
|
232
|
+
config.intercom_token = ENV['INTERCOM_TOKEN']
|
233
|
+
```
|
234
|
+
|
235
|
+
#### (Deprecated) Using API Keys
|
236
|
+
|
237
|
+
Expose the following environments variables (via `application.yml` or your preferred method)
|
238
|
+
|
239
|
+
```
|
240
|
+
INTERCOM_APP_ID
|
241
|
+
INTERCOM_API_KEY
|
242
|
+
INTERCOM_API_SECRET
|
243
|
+
```
|
244
|
+
|
245
|
+
If you built your app with an older version of mno-enterprise, double-check that `config/initializer/mno-enteprise.rb` contains the following lines:
|
246
|
+
|
247
|
+
```ruby
|
248
|
+
# Intercom
|
249
|
+
config.intercom_app_id = ENV['INTERCOM_APP_ID']
|
250
|
+
config.intercom_api_secret = ENV['INTERCOM_API_SECRET']
|
251
|
+
config.intercom_api_key = ENV['INTERCOM_API_KEY']
|
252
|
+
```
|
253
|
+
|
254
|
+
### Active Job Backend
|
255
|
+
|
256
|
+
Maestrano Enterprise uses Active Job to process background jobs such as logging event or emails.
|
257
|
+
|
258
|
+
By default if no adapter is set, the jobs are immediately executed.
|
259
|
+
|
260
|
+
To see an up-to-date list of all queueing backend supported by Active Job see the documentation for [Active Job](http://edgeguides.rubyonrails.org/active_job_basics.html#backends)
|
261
|
+
|
262
|
+
#### Sucker Punch
|
263
|
+
|
264
|
+
This is the easiest as it runs within the application process, so you don't have to maintain a separate process to run background jobs.
|
265
|
+
|
266
|
+
Add this line to your application's `Gemfile`:
|
267
|
+
|
268
|
+
```ruby
|
269
|
+
gem 'sucker_punch', '~> 2.0'
|
270
|
+
```
|
271
|
+
|
272
|
+
To enable backward compatibility with ActiveJob 4.2, create the following initializer:
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
# config/initializers/sucker_punch.rb
|
276
|
+
|
277
|
+
require 'sucker_punch/async_syntax'
|
278
|
+
```
|
279
|
+
|
280
|
+
Then in `config/application.rb`:
|
281
|
+
|
282
|
+
```ruby
|
283
|
+
# Use Sucker Punch for ActiveJob
|
284
|
+
config.active_job.queue_adapter = :sucker_punch
|
285
|
+
```
|
286
|
+
|
287
|
+
#### Sidekiq
|
288
|
+
|
289
|
+
This is more involved as you need to manage a separate process (the sidekiq worker) and add Redis to your stack.
|
290
|
+
|
291
|
+
Here's a quick start guide, see https://github.com/mperham/sidekiq/wiki/Active-Job for more details.
|
292
|
+
|
293
|
+
|
294
|
+
Add this line to your application's `Gemfile`:
|
295
|
+
|
296
|
+
```ruby
|
297
|
+
gem 'sidekiq'
|
298
|
+
```
|
299
|
+
|
300
|
+
Create a `config/sidekiq.yml`:
|
301
|
+
|
302
|
+
```yaml
|
303
|
+
---
|
304
|
+
:queues:
|
305
|
+
- default
|
306
|
+
- mailers
|
307
|
+
```
|
308
|
+
|
309
|
+
In `config/application.rb`:
|
310
|
+
|
311
|
+
```ruby
|
312
|
+
# Use Sidekiq for ActiveJob
|
313
|
+
config.active_job.queue_adapter = :sidekiq
|
314
|
+
```
|
315
|
+
|
316
|
+
Run the worker process, if you use a `Procfile` you can add the following line to it:
|
317
|
+
|
318
|
+
```
|
319
|
+
worker: bundle exec sidekiq
|
320
|
+
```
|
321
|
+
|
322
|
+
To enable the web interface only for admin, add to your `Gemfile`:
|
323
|
+
|
324
|
+
```ruby
|
325
|
+
gem 'sinatra', '~> 1.4.7', require: false
|
326
|
+
```
|
327
|
+
|
328
|
+
and to `config/routes.rb`:
|
329
|
+
|
330
|
+
```ruby
|
331
|
+
Rails.application.routes.draw do
|
332
|
+
...
|
333
|
+
|
334
|
+
#================================================
|
335
|
+
# Sidekiq admin interface
|
336
|
+
#================================================
|
337
|
+
require 'sidekiq/web'
|
338
|
+
authenticate :user, -> (u) { u.admin_role == 'admin' } do
|
339
|
+
mount Sidekiq::Web, at: '/sidekiq'
|
340
|
+
end
|
341
|
+
|
342
|
+
...
|
343
|
+
end
|
344
|
+
```
|
345
|
+
|
157
346
|
|
158
347
|
## Building the frontend
|
159
348
|
The Maestrano Enterprise frontend is a Single Page Application (SPA) that is separate from the Rails project. The source code for this frontend can be found on the [mno-enterprise-angular Github repository](https://github.com/maestrano/mno-enterprise-angular)
|
160
349
|
|
161
350
|
Build the frontend by running the following command:
|
162
351
|
```bash
|
163
|
-
|
352
|
+
bin/rake mnoe:frontend:build
|
164
353
|
```
|
165
354
|
This will create a "dashboard" directory under the /public folder with the compiled frontend.
|
166
355
|
|
167
356
|
Building the frontend is only required if you modify the CSS and/or JavaScripts files under /frontend.
|
168
357
|
|
358
|
+
### Upgrading the frontend
|
359
|
+
|
360
|
+
To upgrade the frontend version, edit the `package.json` file if needed, then run:
|
361
|
+
|
362
|
+
```
|
363
|
+
bin/rake mnoe:frontend:update
|
364
|
+
```
|
365
|
+
|
366
|
+
This will upgrade the frontend version, respecting the constraint in `package.json`, and rebuild it.
|
367
|
+
|
169
368
|
## Modifying the style - Theme Previewer
|
170
369
|
The Maestrano Enterprise Express frontend is bundled with a Theme Previewer allowing you to easily modify and save the style of an Express instance without reloading the page.
|
171
370
|
|
@@ -186,12 +385,14 @@ This action will save the current style in /frontend/src/app/stylesheets/theme-p
|
|
186
385
|
|
187
386
|
## Extending the Frontend
|
188
387
|
You can easily override or extend the Frontend by adding files to the /frontend directory. All files in this directory will be taken into account during the frontend build and will override the base files of the mno-enterprise-angular project.
|
388
|
+
You can also override the login page background adding an image and gif loaders, which is managed by rails, including the files into the path ../app/assets/images/mno_enterprise. You can generate really cool gifs for this task in pages like http://loading.io/ .
|
389
|
+
|
189
390
|
|
190
391
|
Files in this folder MUST follow the [mno-enterprise-angular](https://github.com/maestrano/mno-enterprise-angular) directory structure. For example, you can override the application layout by creating /frontend/src/app/views/layout.html in your project - it will override the original src/app/views/layout.yml file of the mno-enterprise-angular project.
|
191
392
|
|
192
393
|
You can also add new files to this directory such as adding new views. This allows you to easily extend the current frontend to suit your needs.
|
193
394
|
|
194
|
-
While extending the frontend, you can run this command to start the frontend using gulp serve and automatically override the original files with the ones in the frontend folder:
|
395
|
+
While extending the frontend, you can run this command to start the frontend using gulp serve and automatically override the original files with the ones in the frontend folder(be aware it does not take into account images or folders):
|
195
396
|
```bash
|
196
397
|
foreman start -f Procfile.dev
|
197
398
|
```
|
@@ -206,7 +407,7 @@ Simply copy the font files under the directory `/frontend/src/fonts/` of your ho
|
|
206
407
|
|
207
408
|
An example of a project using a custom font can be seen on the [mno-enterprise-demo](https://github.com/maestrano/mno-enterprise-demo) project.
|
208
409
|
|
209
|
-
NB: Your host project may have been generated or created before the implementation of this feature, in this case make sure the
|
410
|
+
NB: Your host project may have been generated or created before the implementation of this feature, in this case make sure the file `/app/assets/stylesheets/main.less` contains:
|
210
411
|
```less
|
211
412
|
// Import custom fonts
|
212
413
|
//--------------------------------------------
|
@@ -224,12 +425,72 @@ In some cases you may decide that the current [mno-enterprise-angular](https://g
|
|
224
425
|
|
225
426
|
In this case we recommend cloning or copying the [mno-enterprise-angular](https://github.com/maestrano/mno-enterprise-angular) repository in a new repository so as to keep the directory structure and build (Gulp) process. From there you can completely change the frontend appearance to fit your needs.
|
226
427
|
|
227
|
-
Once done you can replace the frontend source by specifying your frontend github repository in the /
|
428
|
+
Once done you can replace the frontend source by specifying your frontend github repository in the /package.json file. You can then build it by running the usual:
|
228
429
|
```bash
|
229
|
-
|
430
|
+
bin/rake mnoe:frontend:build
|
431
|
+
```
|
432
|
+
|
433
|
+
## Extending the Backend
|
434
|
+
|
435
|
+
### Overriding Models and Controllers with the Decorator Pattern
|
436
|
+
|
437
|
+
`mno-enteprise` follows the decorator pattern recommended in the [Engine Rails guide](http://guides.rubyonrails.org/engines.html#improving-engine-functionality)
|
438
|
+
|
439
|
+
#### Using `ActiveSupport::Concern`
|
440
|
+
|
441
|
+
Most of `mno-enteprise` classes use `ActiveSupport::Concern` making it really easy to extend them.
|
442
|
+
|
443
|
+
For example look at the following `MnoEnterprise::Organization` class:
|
444
|
+
|
445
|
+
```ruby
|
446
|
+
module MnoEnterprise
|
447
|
+
class Organization < BaseResource
|
448
|
+
include MnoEnterprise::Concerns::Models::Organization
|
449
|
+
end
|
450
|
+
end
|
230
451
|
```
|
231
452
|
|
232
|
-
|
453
|
+
Let's say we want to add an extra method, a scope and not allow removal of users:
|
454
|
+
|
455
|
+
```ruby
|
456
|
+
# foobar-enterprise/app/models/mno_enterprise/organization.rb
|
457
|
+
module MnoEnterprise
|
458
|
+
class Organization < BaseResource
|
459
|
+
include MnoEnterprise::Concerns::Models::Organization
|
460
|
+
|
461
|
+
scope :big, -> { where('size.gt': 10) }
|
462
|
+
|
463
|
+
def monkey_patched?
|
464
|
+
true
|
465
|
+
end
|
466
|
+
|
467
|
+
# PATCH: do nothing
|
468
|
+
def remove_user(user)
|
469
|
+
end
|
470
|
+
end
|
471
|
+
end
|
472
|
+
```
|
473
|
+
|
474
|
+
|
475
|
+
#### Using `Class#class_eval`
|
476
|
+
|
477
|
+
Sometime the class you want to extend does not use a Concern. In this case, you can use `Class#class_eval`.
|
478
|
+
|
479
|
+
For example, to override the `after_sign_in_path`:
|
480
|
+
|
481
|
+
```ruby
|
482
|
+
# foobar-enterprise/app/decorators/controllers/mno_enterprise/application_controller_decorator.rb
|
483
|
+
MnoEnterprise::ApplicationController.class_eval do
|
484
|
+
# Patch: return to custom url
|
485
|
+
def after_sign_in_path_for(resource)
|
486
|
+
"my_custom_url"
|
487
|
+
end
|
488
|
+
end
|
489
|
+
```
|
490
|
+
|
491
|
+
All decorators matching the glob `Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb")` are automatically loaded.
|
492
|
+
|
493
|
+
### Generating a database extension
|
233
494
|
|
234
495
|
If you want to add fields to existing models, you can create a database extension for it.
|
235
496
|
|
@@ -323,87 +584,6 @@ HealthCheck.setup do |config|
|
|
323
584
|
end
|
324
585
|
```
|
325
586
|
|
326
|
-
|
327
|
-
## Migrating from v2 to v3
|
328
|
-
|
329
|
-
### a) Upgrade the gem
|
330
|
-
First switch to a new branch such as v2-to-v3.
|
331
|
-
```bash
|
332
|
-
git co -b v2-to-v3
|
333
|
-
```
|
334
|
-
|
335
|
-
Open your Gemfile and ensure that your project points to the v3.0-dev branch of Maestrano Enterprise. You gemfile should look like this:
|
336
|
-
```ruby
|
337
|
-
gem 'mno-enterprise', git: 'https://some-token:x-oauth-basic@github.com/alachaum/mno-enterprise.git', branch: 'v3.0-dev'
|
338
|
-
```
|
339
|
-
|
340
|
-
Then update the gem by running
|
341
|
-
```bash
|
342
|
-
bundle update mno-enterprise
|
343
|
-
```
|
344
|
-
|
345
|
-
Ensure you've got node installed on your system. Some googling will surely provide you with the steps required to install Node on your machine.
|
346
|
-
|
347
|
-
Rerun the Maestrano Enterprise task in your project. This task will download and compile the enterprise angular frontend.
|
348
|
-
```bash
|
349
|
-
bundle exec rake mno_enterprise:install
|
350
|
-
```
|
351
|
-
|
352
|
-
After running this task a new "/frontend" directory will have appeared in the root of your project. This folder will contain any customization you want to make the frontend. It should already contain a few LESS files with a default theme.
|
353
|
-
|
354
|
-
### b) Reapply your style
|
355
|
-
|
356
|
-
The way styling and frontend customisations are handled by the platform has changed. Everything is now located under the "/frontend" directory.
|
357
|
-
|
358
|
-
In order to migrate your style, follow these instructions:
|
359
|
-
|
360
|
-
- Copy the content of your /app/assets/stylesheets/theme.less.erb into /frontend/src/app/stylesheets/theme.less. Replace any ERB variable by the actual LESS value
|
361
|
-
- Delete /app/assets/stylesheets/theme.less.erb
|
362
|
-
- Copy the content of your /app/assets/stylesheets/variables.less into /frontend/src/app/stylesheets/variables.less.
|
363
|
-
- Delete /app/assets/stylesheets/variables.less
|
364
|
-
- Create the file: /app/assets/stylesheets/main.less and copy the following content to it:
|
365
|
-
```less
|
366
|
-
/*-----------------------------------------------------------------------*/
|
367
|
-
/* Import Core LESS Framework */
|
368
|
-
/*-----------------------------------------------------------------------*/
|
369
|
-
// Import Core LESS Framework
|
370
|
-
@import "mno_enterprise/main";
|
371
|
-
|
372
|
-
/*-----------------------------------------------------------------------*/
|
373
|
-
/* Customization */
|
374
|
-
/*-----------------------------------------------------------------------*/
|
375
|
-
|
376
|
-
// Import theme colors
|
377
|
-
//--------------------------------------------
|
378
|
-
@import "../../../frontend/src/app/stylesheets/theme";
|
379
|
-
|
380
|
-
// Import custom variables
|
381
|
-
//--------------------------------------------
|
382
|
-
@import "../../../frontend/src/app/stylesheets/variables";
|
383
|
-
|
384
|
-
// Import theme published by Theme Previewer
|
385
|
-
//--------------------------------------------
|
386
|
-
// @import "../../../frontend/src/app/stylesheets/theme-previewer-published.less";
|
387
|
-
|
388
|
-
// Import any custom less file below
|
389
|
-
//--------------------------------------------
|
390
|
-
// @import 'homepage'
|
391
|
-
```
|
392
|
-
- Copy any CSS customization you have made in main.less.erb to main.less
|
393
|
-
- Rebuild the frontend with your style
|
394
|
-
```bash
|
395
|
-
rake mnoe:frontend:dist
|
396
|
-
```
|
397
|
-
- Copy your logo in /app/assets/images/mno_enterprise/main-logo.png to /public/dashboard/images/main-logo.png
|
398
|
-
|
399
|
-
Launch your application, your style should now be reapplied.
|
400
|
-
|
401
|
-
### c) Caveat: Impac! endpoint
|
402
|
-
|
403
|
-
The v3 is currently being finalised. There are some minor configuration options that still need to be implemented such as the "impact endpoint urls".
|
404
|
-
|
405
|
-
If deploying to UAT, the Impac! URLs need to be manually replaced. Search the "/public" directory for "http://localhost:4000" and replace by "https://api-impac-uat.maestrano.io". Save the files and deploy.
|
406
|
-
|
407
587
|
## Contributing
|
408
588
|
|
409
589
|
# Contributing to MnoEnterprise
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mno-enterprise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud Lachaume
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mno-enterprise-core
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 3.
|
20
|
+
version: 3.2.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 3.
|
27
|
+
version: 3.2.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: mno-enterprise-api
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 3.
|
34
|
+
version: 3.2.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 3.
|
41
|
+
version: 3.2.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: mno-enterprise-frontend
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 3.
|
48
|
+
version: 3.2.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - '='
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 3.
|
55
|
+
version: 3.2.0
|
56
56
|
description: Maestrano Enterprise is your application marketplace, out of the box.
|
57
57
|
email:
|
58
58
|
- developers@maestrano.com
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
86
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.
|
87
|
+
rubygems_version: 2.6.8
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: Maestrano Enterprise
|