4857 Commits

Author SHA1 Message Date
Matthew Jones
d685815478
Merge pull request #1607 from AlanCoding/tower_verify_field
Sync tower verify_ssl parameter with tower-cli
2018-03-26 12:12:45 -07:00
Matthew Jones
71d2a4b4cf
Merge pull request #1610 from AlanCoding/group_related
Include related Jobs in group deletion protection
2018-03-26 12:09:45 -07:00
AlanCoding
9db0fdfc0b
sync tower verify_ssl parameter with tower-cli
Add new input for the tower type credential
elsewhere, tests are being added for verify_ssl in modules
tower-cli also updating to use the original tower.py var
2018-03-26 13:42:52 -04:00
Chris Meyers
09babbe862
Merge pull request #1677 from chrismeyersfsu/fix-traceback_msg
call celery method with celery context
2018-03-26 13:03:32 -04:00
Alan Rominger
e38955e1fa
Merge pull request #1670 from AlanCoding/no_credential
Inventory source can_change - remove credential check
2018-03-26 12:06:57 -04:00
chris meyers
1503e0505e call celery method with celery context
* Tracebacks are more informative this way.
2018-03-26 12:02:42 -04:00
Alan Rominger
4c2cff7a63
Merge pull request #1666 from AlanCoding/fix_workflow_vars_again
Ignore workflow survey passwords when not applicable
2018-03-26 11:17:32 -04:00
Matthew Jones
bddb288ac1
Merge pull request #1352 from ansible/network_ui_3_3
Graphical UI for Network Inventory
2018-03-26 08:11:21 -07:00
AlanCoding
894eeee979
inventory source can_change rm credential check 2018-03-26 09:45:45 -04:00
Matthew Jones
f5252d9147
Merge pull request #1624 from theblazehen/devel
Add Rocket.Chat notification type
2018-03-26 06:41:48 -07:00
Jeandre Le Roux
c25d8a5d34 Fix rocket.chat notification test flake8
Signed-off-by: Jeandre Le Roux <theblazehen@theblazehen.com>
2018-03-26 15:13:33 +02:00
HNKNTA
7ddbc49568 Fixed parentless function
Signed-off-by: HNKNTA <hnknta@gmail.com>
2018-03-25 18:33:46 +03:00
Ben Thomasson
96b3ebd31e
Moves network_ui_test to an external repo 2018-03-23 17:00:27 -04:00
Ben Thomasson
0e32644a27
Check for missing environ in request 2018-03-23 17:00:27 -04:00
Ben Thomasson
766bee3753
Refactors network_ui_test out of network_ui
* Separates test messages from application messages
* Removes test runner and groups, processes, and streams from network_ui
* Adds network_ui_test
* Fixes routing for network_ui_test
* Removes coverage_report tool from network_ui
* Fixes network_ui_test test workflow
* Sets width and height of the page during tests
2018-03-23 17:00:25 -04:00
Ben Thomasson
48d801271c
Imports prototype from ansible-network-ui
The ansible-network-ui prototype project builds a standalone Network UI
outside of Tower as its own Django application. The original prototype
code is located here:
https://github.com/benthomasson/ansible-network-ui.

The prototype provides a virtual canvas that supports placing
networking devices onto 2D plane and connecting those devices together
with connections called links.  The point where the link connects
to the network device is called an interface.  The devices, interfaces,
and links may all have their respective names.  This models physical
networking devices is a simple fashion.

The prototype implements a pannable and zoomable 2D canvas in using SVG
elements and AngularJS directives.   This is done by adding event
listeners for mouse and keyboard events to an SVG element that fills the
entire browser window.

Mouse and keyboard events are handled in a processing pipeline where
the processing units are implemented as finite state machines that
provide deterministic behavior to the UI.

The finite state machines are built in a visual way that makes
the states and transitions clearly evident.  The visual tool for
building FSM is located here:
https://github.com/benthomasson/fsm-designer-svg.   This tool
is a fork of this project where the canvas is the same.  The elements
on the page are FSM states and the directional connections are called
transitions.   The bootstrapping of the FSM designer tool and
network-ui happen in parallel.  It was useful to try experiemental
code in FSM designer and then import it into network-ui.

The FSM designer tool provides a YAML description of the design
which can be used to generate skeleton code and check the implementation
against the design for discrepancies.

Events supported:

* Mouse click
* Mouse scroll-wheel
* Keyboard events
* Touch events

Interactions supported:

* Pan canvas by clicking-and-dragging on the background
* Zooming canvas by scrolling mousewheel
* Adding devices and links by using hotkeys
* Selecting devices, interaces, and links by clicking on their icon
* Editing labels on devices, interfaces, and links by double-clicking on
  their icon
* Moving devices around the canvas by clicking-and-dragging on their
  icon

Device types supported:

* router
* switch
* host
* racks

The database schema for the prototype is also developed with a visual
tool that makes the relationships in the snowflake schema for the models
quickly evident.  This tool makes it very easy to build queries across
multiple tables using Django's query builder.

See: https://github.com/benthomasson/db-designer-svg

The client and the server communicate asynchronously over a websocket.
This allows the UI to be very responsive to user interaction since
the full request/response cycle is not needed for every user
interaction.

The server provides persistence of the UI state in the database
using event handlers for events generated in the UI.  The UI
processes mouse and keyboard events, updates the UI, and
generates new types of events that are then sent to the server
to be persisted in the database.

UI elements are tracked by unique ids generated on the client
when an element is first created.  This allows the elements to
be correctly tracked before they are stored in the database.

The history of the UI is stored in the TopologyHistory model
which is useful for tracking which client made which change
and is useful for implementing undo/redo.

Each message is given a unique id per client and has
a known message type.  Message types are pre-populated
in the MessageType model using a database migration.

A History message containing all the change messages for a topology is
sent when the websocket is connected.  This allows for undo/redo work
across sessions.

This prototype provides a server-side test runner for driving
tests in the user interface.  Events are emitted on the server
to drive the UI.  Test code coverage is measured using the
istanbul library which produces instrumented client code.
Code coverage for the server is is measured by the coverage library.

The test code coverage for the Python code is 100%.
2018-03-23 17:00:14 -04:00
AlanCoding
7ea9575e78
ignore workflow survey passwords when not applicable 2018-03-23 13:01:45 -04:00
Ryan Petrello
07680dd7c0
Merge pull request #1652 from ryanpetrello/fix-500
send job notification templates _after_ all events have been processed
2018-03-23 10:51:06 -04:00
Jeandre Le Roux
0525df595e Add unit test for rocket.chat notifications
Signed-off-by: Jeandre Le Roux <theblazehen@theblazehen.com>
2018-03-22 16:11:03 +02:00
Ryan Petrello
f59f47435b send job notification templates _after_ all events have been processed
see: https://github.com/ansible/awx/issues/500
2018-03-22 09:30:41 -04:00
Chris Meyers
ddf000e8e7
Merge pull request #1643 from chrismeyersfsu/fix-tower_special_group
do not allow tower group delete or name change
2018-03-22 08:06:03 -04:00
chris meyers
305ef6fa7e do not allow tower group delete or name change
* DO allow policy changes and other attribute changes
2018-03-22 08:05:06 -04:00
Chris Meyers
3446134501
Merge pull request #1646 from chrismeyersfsu/fix-kombu_unicode
use non-unicode queue names
2018-03-21 21:59:05 -04:00
chris meyers
e0803b9f08 use non-unicode queue names
* Use unicode InstanceGroup and queue names up until the point we
actually create the queue
* kombu add_consumers returns a dict with a value that contians the
passed in queue name. Trouble is, the returned dict value is a string
and not a unicode string and this results in an error.
2018-03-21 16:50:07 -04:00
Chris Meyers
724812e87c
Merge pull request #1637 from chrismeyersfsu/fix-instance_removed_from_group
handle instance group names unicode
2018-03-21 15:47:00 -04:00
chris meyers
91bfed3d50 handle instance group names unicode 2018-03-21 13:41:48 -04:00
AlanCoding
4f1f578fde
make user_capabilities False for read tokens 2018-03-21 13:14:14 -04:00
Ryan Petrello
1a542c5e06
Merge pull request #1620 from ryanpetrello/dynamic-autoscale
dynamically set worker autoscale max_concurrency based on system memory
2018-03-21 11:52:16 -04:00
Ryan Petrello
6a96e6a268 dynamically set worker autoscale max_concurrency based on system memory 2018-03-21 11:10:48 -04:00
AlanCoding
001fa634aa
include related Jobs in group del protection 2018-03-21 08:05:16 -04:00
Jeandre Le Roux
fd12c44ada Add Rocket.Chat notification type
Summary: Add Rocket.Chat notification type
Issue type: Feature Pull Request
Component: Notifications

Signed-off-by: Jeandre Le Roux <theblazehen@theblazehen.com>
2018-03-21 10:02:50 +02:00
Chris Vick
fca1e7028f
Added a space before closing quote to fix spelling
Without the space before the lines closing quote, 'or' and 'other' get concatenated to 'orother' in the tooltip
2018-03-20 19:36:37 -07:00
Wayne Witzel III
f4e57e2906
Merge pull request #1608 from wwitzel3/devel
System Setting for Orgainization User/Team permissions.
2018-03-20 17:17:49 -04:00
Alan Rominger
8056ac5393
Delay import of freeze to make tests run (#1617)
* Delay import of freeze to make tests run

* fix flake8 error
2018-03-20 11:58:11 -04:00
Wayne Witzel III
d7f26f417d Reword help text for manage org auth 2018-03-20 07:31:08 -04:00
Alan Rominger
30fb4076df
Merge pull request #1569 from AlanCoding/relaunch_survey
Allow normal users to relaunch jobs with survey answers
2018-03-20 07:14:09 -04:00
Matthew Jones
c0661722b6
Merge pull request #1523 from paihu/slack-color-notification
support slack color notification #1490
2018-03-19 18:05:28 -07:00
Wayne Witzel III
d5564e8d81 Fix user capabilities when MANAGE_ORGANIZATION_AUTH is disabled 2018-03-19 15:16:54 -04:00
Wayne Witzel III
a9da494904 switch to single toggle and change name 2018-03-19 14:45:52 -04:00
Wayne Witzel III
771108e298 Protect team assignment for the roles access point 2018-03-19 12:10:13 -04:00
Wayne Witzel III
33ac8a9668 System wide toggle for org admin user/team abilities 2018-03-19 11:24:36 -04:00
Bill Nottingham
6fc4274c68 Just set ANSIBLE_SSH_CONTROL_PATH_DIR, and don't worry about the socket file name.
Ansible itself (since 2.3) has code to have a shorter hashed control path socket name.
2018-03-16 16:56:45 -04:00
AlanCoding
bbbb7def0a
fix bug with non-event model 2018-03-16 14:27:36 -04:00
AlanCoding
66108164b9
remove unnecessary mock 2018-03-16 10:55:48 -04:00
AlanCoding
69eccd3130
move ACTIVE_STATES to constants 2018-03-16 10:31:41 -04:00
AlanCoding
7881c921ac
block deletion of resources w unprocessed events 2018-03-16 10:14:28 -04:00
Wayne Witzel III
6231742f71 Move RelatedJob mixin to Project 2018-03-16 09:42:32 -04:00
Wayne Witzel III
c628e9de0a Filter active jobs by WFT/JT 2018-03-16 09:32:42 -04:00
Wayne Witzel III
c54d9a9445 Fix query using self -> self.project and fix imports 2018-03-16 09:24:46 -04:00
Wayne Witzel III
f594f62dfc Project needs to expose all of its ProjectUpdate jobs in an active state 2018-03-16 09:12:20 -04:00