Coder Social home page Coder Social logo

unnecessary-username / tower-analytics-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhatinsights/tower-analytics-frontend

0.0 0.0 0.0 18.73 MB

Automation Analytics provides data analytics for Ansible Tower that provides visualization and insight into how automation is used in your organization.

Home Page: https://console.redhat.com/ansible/automation-analytics

License: Apache License 2.0

Shell 1.64% JavaScript 59.64% TypeScript 38.46% Makefile 0.08% HTML 0.04% SCSS 0.14%

tower-analytics-frontend's Introduction

Build Status

Automation Analytics Front End

Automation Analytics provides data analytics for Ansible Tower that provides visualization and insight into how automation is used in your organization.

Build Automation Analytics Front End

Developing locally

  1. npm ci - install dependencies from the lockfile
  2. get the backend running: automation analytics backend
  3. npm start - starts standalone: webpack serves the files alongside with insights, rbac and keycloak.
  4. Go to http://localhost:1337/beta/ansible/automation-analytics and use the admin/admin credentials to login.

When you have M1 Mac:

VERSION=16.1.1
git clone [email protected]:keycloak/keycloak-containers.git
cd keycloak-containers/server
git checkout $VERSION
docker build -t "jboss/keycloak:MAGIC" .
  • run keycloak locally
docker run -p 4001:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_VENDOR=h2 -v `pwd`/node_modules/@redhat-cloud-services/frontend-components-config-utilities/standalone/services/default/keycloak/realm_export.json:/tmp/realm_export.json jboss/keycloak:MAGIC -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/tmp/realm_export.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
  • in node_modules/@redhat-cloud-services/frontend-components-config-utilities/standalone/services/rbac.js change redis:5.0.4 to redis:latest
  • in node_modules/@redhat-cloud-services/frontend-components-config-utilities/standalone/services/default/chrome.js change whole args for keycloak to node (must be a container that will build and run without errors and not consume port 4001)
  • npm run start
  • Go to http://localhost:1337/beta/ansible/automation-analytics and use the admin/admin credentials to login.

Note that after running npm install or npm ci changes in node_modules will be lost. You can use this script to do it

sed -i.bak -e 's/redis:5.0.4/redis:latest/' node_modules/@redhat-cloud-services/frontend-components-config-utilities/standalone/services/rbac.js
sed -i.bak -e '/-p.*keycloakPort.*8080/d' -e '/"-[eD]/d' -e '/-v /d' -e 's/jboss\/keycloak/node/' node_modules/@redhat-cloud-services/frontend-components-config-utilities/standalone/services/default/chrome.js

Developing against a deployed backend

  1. npm ci - install dependencies from the lockfile
  2. npm start --env=stage - starts local frontend while proxying all the request to the stage environment.
  3. Follow the link the proxy outputs to the terminal - this is different from env to env. You need valid credentials for the environment you are running against to be able to log in

WIP: Developing against a backend on the ephemeral (ephemeral is not supporting it yet)

  1. npm ci - install dependencies from the lockfile
  2. npm start --env=eph --eph_id=YOUR_EPH_ID - starts local frontend while proxying all the request to the eph environment.
  3. Follow the link the proxy outputs to the terminal - this is different from env to env. You need valid credentials for the environment you are running against to be able to log in

Testing

  • npm run lint - runs eslint
  • npm run test - runs jest
  • npm run test:watch - runs jest in watch mode
  • npm run verify - will run linters and tests

Deploying

  • The Platform team is using Travis to deploy the application
    • The Platform team will help you set up the Travis instance if this is the route you are wanting to take

How it works

  • any push to the devel branch will deploy to stage, stage/beta, prod/beta
  • any push to the prod-stable branch will deploy to prod
  • If a PR is accepted and merged, devel will be rebuilt and will deploy to stage, stage/beta, prod/beta

tower-analytics-frontend's People

Contributors

brumik avatar kialam avatar skochay330 avatar zitanemeckova avatar h-kataria avatar benthomasson avatar fullsushidev avatar knightsean00 avatar daphnemaeve avatar jctanner avatar jlmitch5 avatar jeanetteobr avatar ryelo avatar dmzoneill avatar dependabot[bot] avatar hyperkid123 avatar karelhala avatar iphands avatar jameswnl avatar jharting avatar allenbw avatar wenottingham avatar ehelms avatar kruai avatar appuk avatar alexscorey avatar chambridge avatar masbahnana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.