1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00
awx/awx/ui
2018-10-24 14:29:46 -04:00
..
build remove the network UI 2018-07-30 11:03:53 -04:00
client Restore Date Picker field in Scheduler template. 2018-10-24 14:29:46 -04:00
grunt-tasks
po Update translations 2018-08-17 13:56:34 -04:00
test Merge branch 'devel' into workflow-visualizer-search 2018-10-19 10:26:12 -04:00
utils updated automated ui get license script to only look for nondev deps 2018-08-28 15:49:06 -04:00
__init__.py
.eslintignore
.eslintrc.js don't prefer destructuring for arrays within es-lint 2018-04-25 21:12:13 -04:00
.jshintrc
.npmrc
apps.py
conf.py Merge branch 'release_3.2.4' into release_3.3.0 2018-04-26 11:10:28 -04:00
context_processors.py
fields.py
Gruntfile.js
models.py
package-lock.json replace phantomjs with headless chrome 2018-10-05 13:40:06 -04:00
package.json replace phantomjs with headless chrome 2018-10-05 13:40:06 -04:00
README.md update development documentation 2018-10-10 09:23:47 -04:00
urls.py
views.py Merge branch 'release_3.2.4' into release_3.3.0 2018-04-26 11:10:28 -04:00

AWX UI

Requirements

  • node.js 8.x LTS
  • npm 5.x LTS
  • bzip2, gcc-c++, git, make

Development

The API development server will need to be running. See CONTRIBUTING.md.

# Build ui for the devel environment - reachable at https://localhost:8043
make ui-devel

# Alternatively, start the ui development server. While running, the ui will be reachable
# at https://localhost:3000 and updated automatically when code changes.
make ui-docker

# When using docker machine, use this command to start the ui development server instead.
DOCKER_MACHINE_NAME=default make ui-docker-machine

Development with an external server

If you normally run awx on an external host/server (in this example, awx.local), you'll need to reconfigure the webpack proxy slightly for make ui-docker to work:

/awx/settings/development.py
+
+CSRF_TRUSTED_ORIGINS = ['awx.local:8043']

awx/ui/build/webpack.watch.js
-        host: '127.0.0.1',
+        host: '0.0.0.0',
+        disableHostCheck: true,

/awx/ui/package.json
@@ -7,7 +7,7 @@
   "config": {
     ...
+    "django_host": "awx.local"
   },

Testing

# run linters
make jshint

# run unit tests
make ui-test-ci

# run e2e tests - see awx/ui/test/e2e for more information
npm --prefix awx/ui run e2e

Adding dependencies

# add a development or build dependency
npm install --prefix awx/ui --save-dev dev-package@1.2.3

# add a production dependency
npm install --prefix awx/ui --save prod-package@1.23

# add the updated package.json and lock files to scm
git add awx/ui/package.json awx/ui/package-lock.json

Building for Production

# built files are placed in awx/ui/static
make ui-release