fusor / fusor-ember-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fuser-ember-cli

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.

Important Note

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

Development Workflow

  1. Ensure that your Foreman settings.yaml has login: false and require_ssl: false. Otherwise, API calls will not authenticate properly.
  2. Clone fusor to your local workstation.
  3. cd fusor-ember-cli
  4. In controllers/application.js, change deployAsPlugin from true to false. If false, it shows a menu bar for development which is not needed when running inside Foreman/Katello.
  5. Update your ember-cli-build.js to include these lines
  6. 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, run ember server --environment=mocks-enabled to use the mirage mocks.
  7. HAPPY HACKING!
  8. BEFORE running next step, in controllers/application.js, change deployAsPlugin back to true and remove the app.import() lines you added to the Brocfile.js in step 4
  9. Run bash script ./copy-fusor-ember-cli-to-ui-assets which copies files from fusor/fusor-ember-cli/dist to the fusor/ui repo
  10. Git commit code
  11. Send pull request. CAREFUL: Ensure that you're pull request does not include deployAsPlugin: false or the extra app.import() lines.

API MOCKS for RHEV and OpenStack

If you want to use use API mock responses for development only using ember-cli, please apply this commit.

Requirements for QE Automated Testing

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">

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone <repository-url> this repository
  • change into the new directory
  • npm install
  • bower install

Running / Development

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

  • ember test
  • ember test --server

Building

  • ember build (development)
  • ember build --environment production (production)

Deploying

Specify what it takes to deploy your app.

Further Reading / Useful Links

About


Languages

Language:JavaScript 81.5%Language:HTML 15.3%Language:CSS 3.2%Language:Shell 0.1%