This repo is the development environment to create FusorUi which a rails engine that is added to Foreman.
FusorUi is essentially the output from this repo which is an ember-cli project that contains assets such as javascript, stylesheets, images, and fonts.
The fuser-ember-cli/dist directory is the .gitignore so you wont find it in this repository.
The fuser-ember-cli/dist distory is generated automatically by ember-cli when you run ember server
or ember build
locally inside the this directory.
Purely static files (those that are not part of the build) should be checked
in under ../ui/public/fusor_ui
. They will be served in both the dev and iso
environments at:
${HOSTNAME}/fusor_ui/
i.e.
https://sat61fusor.example.com/fusor_ui/files/QCI_Requirements.txt
- Ensure that your Foreman settings.yaml has
login: false
andrequire_ssl: false
. Otherwise, API calls will not authenticate properly. - Clone fusor to your local workstation.
cd fusor-ember-cli
- In controllers/application.js, change
deployAsPlugin
fromtrue
tofalse
. Iffalse
, it shows a menu bar for development which is not needed when running inside Foreman/Katello. - Update your ember-cli-build.js to include these lines
- Run
ember server --proxy http://sat61dev.example.com/
or whatever URL of your Foreman/Katello instance. This tells the ember server to proxy API calls to Foreman/Katello.
Alternatively, runember server --environment=mocks-enabled
to use the mirage mocks. - HAPPY HACKING!
- BEFORE running next step, in controllers/application.js, change
deployAsPlugin
back totrue
and remove the app.import() lines you added to the Brocfile.js in step 4 - Run bash script
./copy-fusor-ember-cli-to-ui-assets
which copies files fromfusor/fusor-ember-cli/dist
to thefusor/ui
repo - Git commit code
- Send pull request. CAREFUL: Ensure that you're pull request does not include
deployAsPlugin: false
or the extra app.import() lines.
If you want to use use API mock responses for development only using ember-cli, please apply this commit.
Quality Engineering (QE) requires that a unique data attribute called data-qci
is assigned to each tag for automated testing. Developers should manually add data-qci
or alternatively, the {{text-f}} component helper will automatically add data-qci
if a local variable called cssId
is passed. For example:
{{text-f label="Name" value=value cssId='any-unique-name'}}
This autmatically generates the following.
<input type="text" id="any-unique-name" data-qci="any-unique-name">
You will need the following things properly installed on your computer.
git clone <repository-url>
this repository- change into the new directory
npm install
bower install
ember server --proxy http://foreman.url
- Visit your app at http://localhost:4200.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
ember build
(development)ember build --environment production
(production)
Specify what it takes to deploy your app.