Created
September 28, 2017 10:06
-
-
Save wazery/331e930658166f28e10045c813c8799a to your computer and use it in GitHub Desktop.
task1_steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Task 1 | |
The first thing every Rails developer tries when working on this task; is to find the `app/views` | |
directory, but the ManageIQ team decided to split out the code base into smaller gems and components. | |
They created a new gem (Rails Engine) called 'manageiq-ui-classic', in which it contains everything related to the UI. | |
If you open the `Gemfile`, you will find [line #172](https://github.com/ManageIQ/manageiq/blob/master/Gemfile#L172) : | |
```ruby | |
manageiq_plugin "manageiq-ui-classic" | |
``` | |
The `mangeiq_plugin` is defined in [line #14](https://github.com/ManageIQ/manageiq/blob/master/Gemfile#L14), in which | |
it adds the gems from the ManageIQ organization's GitHub account, when called. | |
So let's get into the steps of finishing this task. | |
## Steps: | |
1. Check the code of `manageiq_ui_classic` gem, and now you can find the views under `app/views` | |
2. Open the view `app/views/catalog/_st_form.html.haml` | |
3. In [line #11](https://github.com/wazery/manageiq-ui-classic/blob/master/app/views/catalog/_st_form.html.haml#L11), you can find the constant that has the values (**CATALOG_ITEM_TYPES**) | |
4. That constant is defined in the main Rails app, so you can modify it there, and make sure to restart the server cause it will result in a runtime error | |
5. Modify the file `app/models/service_template.rb`, [line #25](https://github.com/ManageIQ/manageiq/blob/cd3db79c3d8944ed0d531de8522c75e58ec5b156/app/models/service_template.rb#L25) and add the OEM to the hash | |
6. Restart the server by running the rake task `rake evm:restart` | |
Thats it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment