Commit Graph

49 Commits

Author SHA1 Message Date
Akihiro Motoki eac3e7032a Drop Heat related code from horizon
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.

blueprint heat-dashboard-split-out

Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
2017-12-05 07:38:55 +00:00
Zuul 14cf54696d Merge "Properly sort Heat stacks on Created field" 2017-10-24 15:37:47 +00:00
Akihiro Motoki af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
Pavlo Shchelokovskyy bfd66305ce Properly sort Heat stacks on Created field
replace the 'timesince_or_never' filter with 'timesince_sorted' one as the
creation_time attribute of a Heat stack can not actually be None.
Also add a 'timesince' data-type to this field.

Change-Id: I9727254b4c255331562083f957133ed6e3cd7e90
Closes-Bug: #1713748
2017-08-29 15:08:34 +00:00
yaraat 08fd18c03b Add exceptions for action
In ResumeStack.action use try/except for action resume, delete, suspend

Closes-Bug: #1535571

Change-Id: I5f1ed830e16ca60cd11c78dcaaef3596b338b4ce
2017-08-14 13:41:32 +03:00
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
Revon Mathews 4458f5aaec Fixes inconsistency in Stacks filter label
Fixed inconsisteny in filter label to include '=' after the text
as seen in all the other cases.

Change-Id: I2c0905dbfef96a062028f5e0200c9e2c6100c9c8
Closes-Bug: #1648565
2016-12-08 12:08:37 -06:00
Eddie Ramirez 69e18fc42c Server-side filtering Orchestration
Included patch 12 changes
Implements blueprint: server-side-filtering
Co-authored-by: Revon Mathews <revon.mathews@intel.com>
Change-Id: I22c5c736f756b1f5640d2fc4d284ac45deaefc19
2016-10-17 15:50:17 +00:00
David Lyle af627907d5 Updating heat policy file
The heat policy is out of date. This patch updates the policy file
to match heat master.

There have been several modifications to the heat policy rules
checked in the heat views. The previously used policies were a
mix of fantasy, out-dated policy rules and just error. After
instrumenting the heat code to verify policy usage, the new
rule checks align with heat master policy use.

Change-Id: I17eb7d2945924167f3a62440b7e12b9b313d0f5d
2016-06-14 11:01:45 -06:00
Tatiana Ovchinnikova 914a07a51f Refactor Orchectration Stacks menu
Move some Orchestration Stacks table actions to table actions menu.

Change-Id: I38f0b4f2e961b0e3f40bb44efad16d5eb64762b2
Closes-Bug: #1570532
2016-05-13 17:10:02 +03:00
Timur Sufiev 658f502b5d In Stack Details do not display as links events leading to nowhere
Events that correspond to stack operations have the same physical id
as the stack has itself (and the same name), so the link which is
meant to point to some resource description, points to nowhere for
them. Better not render such links at all.

Change-Id: I2cff8efacbc00bed2989e5d4afee0690e712ad66
Closes-Bug: #1480997
2015-10-17 10:39:23 +00:00
Cindy Lu 49fad8b093 Heat Stacks Details: Events table doesn't show up
It shows a loading sign.
There is an AttributeError because event_list does not return
with any 'resource_type' to map. Since it doesn't make any sense,
removed the resource_to_url link, and also add a check in the method.

Change-Id: Ic94cffaa2450bbee3f9c9dabcaffb03a6cdc3b46
Closes-Bug: #1493216
2015-10-02 09:58:05 -07:00
Cindy Lu f430ea0189 Add icons for Heat Stacks BatchActions
Preview, Check, Suspend, and Resume actions are missing icons.

Change-Id: Ide04d2f3707b81a5d09480a80214a8626a66f93f
Closes-Bug: #1500962
2015-09-29 16:43:33 +00:00
Tatiana Ovchinnikova cab3912b69 Add "Preview Stack" action to Stacks table
This patch set adds "Preview Stack" button to Stacks table
to provide user with a possibility to preview stack without
creating it, as it is already implemented in CLI.

Partially implements blueprint: heat-ui-improvement

Change-Id: Idf92deb57f8213a403f102db467828087d91e79a
2015-03-13 15:35:47 +03:00
Wu Wenxiang 4bbc6d2e26 Make the values of Stack Resource status be translatable
Add STATUS_DISPLAY_CHOICES in files:
openstack_dashboard/dashboards/project/stacks/tables.py

Change-Id: Ifd702cb929f9016db639346b1586da5319b9f59e
Partial-Bug: #1418027
2015-02-23 15:56:41 +08:00
Tatiana Ovchinnikova 6934660945 Stack resources table improvement
In spite of the fact that status of stack resource is "Create complete",
the row color remains yellow instead of grey. This patch set keeps the
column for detailed states and adds a new hidden column for correct
states displaying.

Closes-Bug: #1385244

Change-Id: I2a9e5a6f456378dcd1f96d96f69fdba1527e4f25
2015-02-10 10:19:40 +00:00
Jenkins 6a1e50853c Merge "made stack status value is translatable" 2015-02-09 16:36:27 +00:00
Masco Kaliyamoorthy 60ad5d1ebd made stack status value is translatable
in stack table the stack status column value
is not translatable. in this patch added
a display choice for status with translatable
option.

Partially implements blueprint: heat-ui-improvement

Change-Id: I72af0b8c7386efa3dacd7c4eb035d73ba25c2bc1
2015-02-09 11:38:54 +05:30
Jenkins ccce0c2edb Merge "added filter for stacks table" 2015-02-05 17:58:15 +00:00
Jenkins 9d32c18ac8 Merge "Move to hacking 0.10" 2015-02-05 15:31:19 +00:00
lin-hua-cheng 0cde6aa055 Move to hacking 0.10
Release notes:
http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0

Per the release notes, H307, H803 and H904 has been removed.

Fix code issues with H238 and W292.

Change-Id: I747ebb64db5825bc70f1ae19c1c1f5ca2089c06d
2015-02-04 20:27:07 -08:00
Wu Wenxiang 116133df1e Remove unused import urlencode
Remove unused import urlencode in file:
openstack_dashboard/dashboards/project/stacks/tables.py

Change-Id: I2eb3a4230ad5c3f6d4d54fad566280ac8bd52f24
2015-02-04 21:53:05 +08:00
Masco Kaliyamoorthy 10efaaf539 added filter for stacks table
client side filter is missing for
stack table.

this patch adding the filter for
stack table.

Change-Id: Iff87e45b65a2b5159a761cd4f7211b602080e2b1
Closes-Bug: #1417399
2015-02-03 12:09:25 +05:30
Tatiana Ovchinnikova 07692894d9 Heat stack status column improvement
Status column on stack table is using 'status' instead of 'stack_status'
to keep Horizon from listing all of the various Heat states and from
incorrect displaying progress meters for several of them. However
'stack_status' is more detailed and more useful for user. This patch set
adds 'stack_status' column for detailed status and keeps 'status' column
hidden for correct displaying.

Partially implements blueprint: heat-ui-improvement

Change-Id: Iacf5e9819aaedc508aa19bb2442030c0572e8c1a
2015-01-30 10:32:16 +03:00
Tatiana Ovchinnikova b2c07ad64e Add "Suspend" and "Resume" actions to Stacks table
This patch set adds "Suspend Stack" and "Resume Stack" buttons
to Stacks table to provide user with a possibility to suspend
and resume stack, like it is already implemented in CLI.

Partially implements blueprint: heat-ui-improvement

Change-Id: I6ea8cb7f342fdd8fcfd124012aefc66d9d898410
2015-01-23 17:29:56 +03:00
Tatiana Ovchinnikova a57e913e6c Add "Check Stack" action to Stacks table
This patch set adds "Check Stack" button to Stacks table
to provide user with a possibility to check stack, like it is
already implemented in CLI.

Partially implements blueprint: heat-ui-improvement

Change-Id: I0a2c6f62844a4120081e74689c4ca8d8cf35251d
2015-01-22 07:12:21 +03:00
Andrew Lazarev 51024cc13b Fixed row deletion for deleted stack
Now heat returns stack with "stack_status == 'DELETE_COMPLETE'"
for deleted stack. Added corresponding check to ajax handler.

HTTPNotFound is not used anymore and deprecated. Removed except
block for it.

Added raise to generic "except Exception" block to prevent
internal errors inside horizon.

Change-Id: Ia9cfd975790872918ba25c347319003ddc3468fa
Closes-Bug: #1367758
2014-12-08 16:51:29 +00:00
Akihiro Motoki 2a9349bd67 Fix E128 errors in openstack_dashboard/dashboards/project/
E128 continuation line under-indented for visual indent

Partial-Bug: #1375929
Change-Id: I6bc8db7dab6fc2c3aad7fa54b6e07643b595f230
2014-10-16 16:53:52 +09:00
Doug Fish 41d16ce4ca Fix concatenation in more misc actions
Remove concatenation and pluralization issues from Evacuate
Host, Sell Puppies (renamed from Delete Puppies.  I cannot
condone the deleting of virtual puppies.), Delete Continer,
Delete Object, Delete Stack

Change-Id: Ia6eb39cb2d736345afbdb3bfce8cb61bb2586871
partial-bug: 1307476
2014-09-25 14:01:51 -05:00
Cindy Lu 296520051c Delete Stacks button doesn't work
Clicking on causes a frozen grey overlay.
It should have the class 'btn-danger' and remove the 'ajax-modal' class.

Change-Id: I892f7cc550cb1c332fa37fd08022b4d252918619
Closes-Bug: #1350112
2014-08-04 14:24:29 -07:00
Jiri Tomasek 92146772b6 Update Twitter Bootstrap to version 3
Updated to bootstrap 3.2.0
back to v3.1.1
fix base-line-height variable
Revamped grid system
Replaced help-inline with help-block
Change .control-group to .form-group
Add column widths to horizontal form labels and .controls, remove .controls class
Datepicker form fix
Add btn-default to btn elements with no other color
Topbar switcher fix
Rename button sizes
Replace alert-error with alert-danger
Removed alert-block
Alerts fixing
Updated LinkAction and Action table actions to define icon, replaced btn-default icon with glyphicon
Replaced icons with glyphicons, removed btn-icon styling from horizon.scss
change Button Icons text in customizing docs
Fixed table header
Fix page_header h2 margin
Nav accordion fix
Tables fix
Modal fixes
added form-control class to input and selects
Forms fixes
Workflow modal fix
Fix quota bar
updated customizing docs
removed unused styling from horizon.scss
make datepicker form inline
fix table filter styling
added btn-danger to terminate instances button
fixed loading spinner
form fields and validations
Created bootstrap_form_field filter and template to render bootstrap forms properly
Style up the datepicker
Fixed failing test cases

Implements: blueprint bootstrap-update

Change-Id: Ic826849be1af7fc6bf06f97dd7a60fc54b862148
2014-07-28 16:13:21 +02:00
Julie Pichon de4466d88b Fix multiple Cross-Site Scripting (XSS) vulnerabilities.
* Ensure user emails are properly escaped

User emails in the Users and Groups panel are being passed through the
urlize filter to transform them into clickable links. However, urlize
expects input to be already escaped and safe. We should make sure to
escape the strings first as email addresses are not validated and can
contain any type of string.

Closes-Bug: #1320235

 * Ensure network names are properly escaped in the Launch Instance menu

Closes-Bug: #1322197

 * Escape the URLs generated for the Horizon tables

When generating the Horizon tables, there was an assumption that only
the anchor text needed to be escaped. However some URLs are generated
based on user-provided data and should be escaped as well.

 * Use 'reverse' to generate the Resource URLs in the stacks tables

Closes-Bug: #1308727

Change-Id: Ic8a92e69f66c2d265a802f350e30f091181aa42e
2014-07-08 13:45:48 +01:00
He Yongli e790ac070e Remove extraneous vim configuration comments
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4

at the top of source code files, except for files in
openstack/common.

Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
2014-05-06 15:30:10 +08:00
Jordan OMara c9befb3327 Add pagination to stack list
Implements: blueprint heat-stack-list-paging
Change-Id: I87ebd7feaeddcfe7fe76c92b075c53de7016846b
2014-04-04 10:05:12 -04:00
Jenkins f4282f73ec Merge "Adding policy checks for heat" 2014-03-31 20:32:45 +00:00
Julie Pichon ff7049432b Handle "null" time values for Stacks
The timesince filter expects a date or datetime object, and would fail
when receiving an empty string. Create a new filter that returns the
string value "Never" under these circumstances.

Change-Id: I73f4dbb608fc143c3ac60d753e9e222762579e51
Closes-Bug: #1286959
2014-03-26 12:00:53 +00:00
Jordan OMara e6ea72b0b0 Fixing heat stack status column
Status column on stack table was using stack_status instead of status
Status is a little more vague, but keeps Horizon from having to know
about all of the various Heat statuses (it was incorrectly displaying
progress meters for several of them before this fix)

Updated topology view with the same fix.

Implements: blueprint heat-fix-status-column
Change-Id: I3ad24d837dd5e9046aa8a91cce33b954b7a8e5d9
2014-03-05 14:12:29 -05:00
Jordan OMara 015aff2630 Heat Stack update view/form
2 Part view for updating Heat Templates. The first page allows you to
select a new template for your stack. The second allows you to set new
template parameters for your stack. Like the launch stack workflow, this
is not a horizon workflow, but two separate forms.

Implements: blueprint heat-stack-update

Change-Id: I2854e9e4bb578be5187ef962808b93f11ac6b1f1
2014-03-04 12:06:31 -05:00
Lin Hua Cheng 610e1b0631 Adding policy checks for heat
Change-Id: Ia454eefbaaf0c6262bfcc2890dead4d074555404
Implements: blueprint heat-rbac
2014-02-15 20:00:10 -08:00
Leandro I. Costantino a541f954a4 Remove delete action and bar when stack is DELETE_COMPLETE.
Heat is returning stack in DELETE_COMPLETE status. Beside that
the table don't consider DELETE_COMPLETE status so the animation is
always visible after deletion.

As a side effect, the checkbox and delete (row action) button are enabled.

This patch will remove the animation on DELETE_COMPLETE state and
disable 'Delete' button and checkbox so it cannot be delete again
by Table Delete action.

Change-Id: Id9c8d34c99a4079d2afa7438353490bfaf91072b
Closes-Bug: #1243087
2014-02-08 11:28:48 -05:00
Radomir Dopieralski 028332da4a Remove #noqa from most common imports and add them to import_exceptions
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.

I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.

I also removed a few unused imports that were revealed in the process.

Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
2014-01-07 12:26:35 +01:00
Akihiro MOTOKI 0ef5c4701f Allow translators to control word order of BatchAction message
Currently BatchAction message is generated by concatenating
'action' and 'data_type'. In most cases 'action' is a verb
and 'data_type' is an object. However in some action such as
TerminateInstance 'action' is a combination of verb and
object (e.g., "Scheduled termination of").  It is hard that
translators find translated strings which covers both cases.

This commit allows classes inheriting BatchAction to specify
a full action name containing '%(data_type)s' substitution
in action_present/ action_past so that translators can
control the order of phrases completely.

* _conjugate() in actions.py is renamed to _get_action_name()
  because this method no longer always conjugate words.
* Changes action_past strings which are not a form of verb + obj
  to strings with "%(data_type)s"

Closes-Bug: #1253678
Change-Id: I3cf1dc74e22745eb3a9bd2edc3ec68ed389495b5
2013-12-10 23:00:10 +09:00
lawrancejing d33f294ba9 Remove unused LOG
In some files, we import logging and define
LOG, but we never used it later, so i remove
those unused LOG and make horizon code clean.

Fixed: bug #1231761

Change-Id: I1ebf0098c647e7522f5f1a93cfece7a52bdc05c1
2013-09-28 23:57:13 -07:00
Jenkins 7a8e313ea8 Merge "Rename heat logical_resource_id to resource_name" 2013-08-28 04:46:02 +00:00
Steve Baker c208701f58 Rename heat logical_resource_id to resource_name
This attribute has been renamed in the heat API.

Fixes bug: 1216903

Change-Id: Ia29c0d1a7af8988cf69094bdfbdd7f439078dc7e
2013-08-27 14:13:56 +12:00
Tatiana Mazur b4fc9b4bc9 Small "H302 check" cleanup
This patch set removes some commented out stuff that
has been unintentially left in "H302 check" patch set.
It also replaces a couple more method imports with
module imports.

Fixes bug 1215892

Change-Id: I35fd880154a4ea6d6d8d3b3615103c271aa4a005
2013-08-23 18:07:08 +04:00
Tatiana Mazur 953d1b9793 Enable H302 check
This patch replaces some method imports with module imports and
makes H302 test enabled.

Fixes bug 1188531

Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
2013-08-22 17:39:09 +04:00
Tatiana Mazur 720194f00a Fix stack status displaying
Add status choices for stacks table.
"Update" status displays correctly now: white field
instead of yellow field and progress bar.

Fixes bug 1207214

Change-Id: I36ca9a41d12a08392e021dcd4ec68642aa07ab12
2013-08-09 12:28:05 +04:00
Steve Baker 1f71152b4b Implementation of a Heat stacks UI.
This change implements a UI to launch, manage and delete Heat stacks.

The launch screens are implemented with a set of chained forms where
the second form is dynamically built from the template in the first step.

A significant portion of this change was derived from
the work Dan Radez <dradez@redhat.com> did on thermal:
https://github.com/steveb/heat-horizon

UX flow revisions and basic test cases by Gabriel Hurley.

Implements blueprint: heat-ui

Change-Id: I294e93bed6da9dd3553e8b4a6a1c09b7c165a555
2013-07-03 03:48:31 -07:00