Giter Club home page Giter Club logo

ansible-ui's Introduction

Ansible UI

UI projects for Ansible.

Getting Started

  1. Prerequisites

    • Node 18.x (recommended)
    • NPM 8.x (recommended)

    Note: The project should with older versions of node and npm but may require regenerating the package-lock.json.

  2. Clone Repository

    git clone [email protected]:ansible/ansible-ui.git
  3. Install Package Dependencies

    npm ci

Environment Variables

Environment Variable Description
AWX_SERVER The AWX server (protocol://host:port).
AWX_USERNAME The AWX server username. (only used by Cypress)
AWX_PASSWORD The AWX server password. (only used by Cypress)
EDA_SERVER The EDA server (protocol://host:port).
EDA_USERNAME The EDA server username. (only used by Cypress)
EDA_PASSWORD The EDA server password. (only used by Cypress)
HUB_SERVER The HUB server (protocol://host:port).
HUB_USERNAME The HUB server username. (only used by Cypress)
HUB_PASSWORD The HUB server password. (only used by Cypress)
HUB_API_PREFIX The HUB server API prefix. (/api/automation-hub)
HUB_GALAXYKIT_COMMAND The galaxykit command. (galaxykit --ignore-certs)
export AWX_SERVER=https://localhost:8043
export AWX_USERNAME='my-user'
export AWX_PASSWORD='my-password'

export EDA_SERVER=http://localhost:8000
export EDA_USERNAME='my-user'
export EDA_PASSWORD='my-password'

export HUB_SERVER=http://localhost:5001
export HUB_USERNAME='my-user'
export HUB_PASSWORD='my-password'

Note: For Hub integration tests: Check that the Ansible binary was correctly installed under the Python directory. Add it to the PATH variable. This is needed for the galaxykit commands that create hub resources for tests.

NPM Scripts

NPM Script Description
npm run awx Run AWX on http://localhost:4101
npm run e2e:awx Run AWX E2E tests from Cypress UI
npm run e2e:run:awx Run AWX E2E tests from CLI
npm run component:awx Run AWX component tests from Cypress UI
npm run component:run:awx Run AWX component tests from CLI
npm run hub Run HUB on http://localhost:4102
npm run e2e:hub Run HUB E2E tests from Cypress UI
npm run e2e:run:hub Run HUB E2E tests from CLI
npm run component:hub Run HUB component tests from Cypress UI
npm run component:run:hub Run HUB component tests from CLI
npm run eda Run EDA on http://localhost:4103
npm run e2e:eda Run EDA E2E tests from Cypress UI
npm run e2e:run:eda Run EDA E2E tests from CLI
npm run component:eda Run EDA component tests from Cypress UI
npm run component:run:eda Run EDA component tests from CLI
npm run tsc Run Typescript compiler checks
npm run eslint Run eslint checks
npm run prettier Run prettier format checks
npm run prettier:fix Fix prettier format of files

Documentation

Code of Conduct

We ask all of our community members and contributors to adhere to the Ansible code of conduct. If you have questions or need assistance, please reach out to our community team at [email protected]

ansible-ui's People

Contributors

acruzgon avatar akus062381 avatar alexscorey avatar appuk avatar daphnemaeve avatar fullsushidev avatar github-actions[bot] avatar himdel avatar jamestalton avatar jerabekjiri avatar keithjgrant avatar kialam avatar kurokobo avatar lgalis avatar mabashian avatar marshmalien avatar matoval avatar milanpospisil avatar nixocio avatar prat98 avatar redornot avatar resolutecoder avatar rooftopcellist avatar shaiahwren avatar skochay330 avatar tiyiprh avatar tznamena avatar vidyanambiar avatar vishsanghishetty avatar zitanemeckova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-ui's Issues

User cannot add new automation server without being logged into one first

I discovered an edge case where if a user is logged out of an existing automation server and would like to add an additional one or delete an existing one, they need to be logged in first. This could cause an issue if said automation server is down (ec2 nightlys are reaped) and the user cannot log in, and therefore cannot add another server.

Idea - Add support to "folder" view on template/project/workflow

Hi team,

I open this issue as an idea to the new Ui.

It will be very beautifull if in next release we can have a possibility to group and/or subgroups object that have the same scope, like folder tree view.

I don't know if someone already think it and exclude it, but for large groups or team can be very, very usefull and for sure optimize the view.

A example can be thisa: https://material.angular.io/components/tree/overview

This is very easy with angular material, just have referance to parent folder.

Thanks

Make repo public

Please set the repo to public so it's visible to contributors outside of Ansible org. and our future work is visible to the outside as well.

[AWX] Rename Azure AD to Microsoft Entra ID

In 2023, Microsoft renamed Azure AD to Microsoft Entra ID.

Microsoft renamed Azure Active Directory (Azure AD) to Microsoft Entra ID to communicate the multicloud, multiplatform functionality of the products, alleviate confusion with Windows Server Active Directory, and unify the Microsoft Entra product family.
https://learn.microsoft.com/en-us/entra/fundamentals/new-name

The AWX's UI still uses Azure AD in some screens, so I think we should replace these text with Microsoft Entra ID or something like Microsoft Entra ID (formerly Azure AD).

Related to: ansible/awx#15022

Session timeout logic

Detect session timeout and redirect to login. Bonus points if logging back in returns to the original url if it's the same user

RBAC based on group membership returned by OIDC provider.

Hey!

I couldn't find any previous threads on this, sorry if this has been asked before.

When logging in with an OIDC provider, is it possible to give the user a role, let's say "Owner", based on group membership returned by the OIDC provider?

If this is not a current feature, is this something that's been considered adding?

Thanks in advance.

[QE] Filtering by multiple strings at a time

Right now, the EDA API only supports filtering by one string at a time. If a user tries to filter by multiple strings, the list simply displays the whole list, unfiltered.

When support for filtering by multiple strings at a time is added, we need to update our tests to reflect this.

EDA UI image no longer works in Openshift environments

Problem

EDA UI image no longer works in Openshift environments

Additional Info

This seems to be because this section of the Dockerfile that set file permissions has been removed:

Deploying EDA now fails on Openshift:

$ oc logs eda-demo-ui-5c8489b8b4-8njms
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: ERROR: /etc/nginx/templates exists, but /etc/nginx/conf.d is not writable
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/08/22 19:41:36 [warn] 1#1: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
2023/08/22 19:41:36 [emerg] 1#1: mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)
nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

New tech preview UI allow user who does not have project create permission to create new project

Bug Summary
I create normal user who does not the have permission to create projects, inventories etc. Then I switched to new tech preview UI. After that user get the ability to create projects, inventories etc on main dashboard.

"Old" UI:
image

New tech preview UI:
image

Steps to reproduce
Create normal user. Switch to new tech preview UI. Normal user can create project on the main dashboard.

Expected results
Normal user can not create new projects, inventories.

Actual results
Normal user can create project on the main dashboard eveh he does not have additional permission for project creation.

[EDA] eda-ui is deployment fail

I am building with eda-operator and eda-ui is giving me an error.
When I deployed it days ago, it was fine.

unknown eda_server variable

I've investigated and I'm getting an error starting at 2.4.455.

pod status

# kubectl get pod -n eda
NAME                                                      READY   STATUS             RESTARTS       AGE
eda-server-operator-controller-manager-858495bdbf-j2zzb   2/2     Running            12 (86m ago)   6d
eda-redis-8554b848f9-ltldp                                1/1     Running            0              17m
eda-postgres-13-0                                         1/1     Running            0              17m
eda-default-worker-758d5dd588-g4cv8                       1/1     Running            0              16m
eda-default-worker-758d5dd588-bcdj2                       1/1     Running            0              16m
eda-activation-worker-5748b7f98c-cr8pz                    1/1     Running            0              16m
eda-activation-worker-5748b7f98c-xjftr                    1/1     Running            0              16m
eda-activation-worker-5748b7f98c-lf294                    1/1     Running            0              16m
eda-activation-worker-5748b7f98c-tpsdt                    1/1     Running            0              16m
eda-activation-worker-5748b7f98c-k8wtt                    1/1     Running            0              16m
eda-scheduler-86b874d978-vhjbz                            1/1     Running            0              16m
eda-api-678bfcfdf7-sdgv6                                  2/2     Running            0              17m
eda-ui-5bc56f5d79-9ggqj                                   0/1     CrashLoopBackOff   8 (60s ago)    17m

Error Message

# kubectl logs eda-ui-5bc56f5d79-9ggqj -n eda
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/09/26 09:57:47 [emerg] 1#1: unknown "eda_server" variable
nginx: [emerg] unknown "eda_server" variable

reference information

  # image_web_version: 2.4.469 Error
  # image_web_version: 2.4.467 Error
  # image_web_version: 2.4.460 Error
  # image_web_version: 2.4.455 Error
  # image_web_version: 2.4.454 OK
  # image_web_version: 2.4.453 OK
  # image_web_version: 2.4.452 OK
  # image_web_version: 2.4.450 OK

Update URLs in links to docs

Some links to documentation in the help text point to an old version of the docs. They currently point to /ansible-tower/latest which routes to v3.6.x and should be updated to /ansible-controller/latest

Static files empty login dropdown

When serving the static files from ansible-ui/controller, the user gets an empty dropdown on the login page for automation server:

empty servers

[EDA] Wrong help text for Variables field for Rulebook Activations

In the current implementation, the help for Variables field for Rulebook Activations shows following text:

Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON. Refer to the documentation for example syntax.

In my understanding, this is wrong description for this field.

This is the fileld that defines variables for ansible-rulebook instead of ansible-playbook.
It's not equivalent to -e or --extra-vars command line parameter for ansible-playbook but contents of the file that passed via --vars for ansible-rulebook: https://ansible.readthedocs.io/projects/rulebook/en/stable/variables.html

This should be corrected.

image

Links should use <Link> instead of button onClick

Multiple links are using buttons with onClick handlers to invoke navigate() instead of rendering regular href's using <Link>

  • Links to documentation in tooltips
  • Nav menu items
  • Detail links in some lists
  • "create X" links in TablePage navbar and empty list page

WebPack - Make public path dynamic

https://stackoverflow.com/questions/39879680/example-of-setting-webpack-public-path-at-runtime

Make it so that the index.html can specify the public path

    <script type="application/javascript">
        window.resourceBasePath = '/path/to/scripts/on/server/';
    </script>

Then add in the code support that.

The nginx config could possible then use a substitution filter to update the public path when serving the index.html
https://nginx.org/en/docs/http/ngx_http_sub_module.html

This would allow the UI to be served from dynamic paths on a server.

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.