Commit Graph

58 Commits

Author SHA1 Message Date
Akihiro Motoki 5c61331ff2 Django 4.2: Adjust instance detail template
The template for the instance detail overview uses Django template
filters to define a default value for metadata with an empty value.
This usage looks magic and does not work with Django 4.2.
It looks like this is an undocumented/unspecified behavior.
This commit changes it to use {% if %} template syntax instead of
depending on the unspcified behavior.

Closes-Bug: #2040129
Change-Id: Ida5b2a721f2657347c174e386d2e023dffd64b1b
2023-10-23 15:36:49 +09:00
Ivan Kolodyazhny d403b31d70 Show all os-extended-server-attributes
Patch I0cfe9090e8263f983fa5f42f42616a26407be47a adds hypervisor hostname
to the instance details view. This patch adds the rest of instance
attributes allowed by 'os_compute_api:os-extended-server-attributes'
policy.

Change-Id: Id39ee14e3054422a96248f8cdd0a5bf07c27f2fc
Closes-Bug: #1874273
2020-09-24 18:48:15 +09:00
manchandavishal 99b89a430e Add Project ID information in detail page
This patch add 'Project ID' information in instances,Subnet,
Volumes and Volumes Snapshots detail pages.

Change-Id: I48da491d5283ab607d298b454d32a349e97be0d1
Closes-Bug: #1815029
2019-02-15 05:37:28 +00:00
pengyuesheng 3d899d9078 the name needs to be word wrap
if the name is too long,
it will affect the display.

Change-Id: Ib1e35d32b0b3f82a0f949d94a2f4c8bcfd4eff41
Closes-Bug: #1801862
2019-01-07 14:29:44 +08:00
Zuul 2eea0f15b3 Merge "Instances column is shortened so it fits properly" 2018-12-26 19:09:26 +00:00
manchandavishal d6217b3e63 Instances column is shortened so it fits properly
The 'Time since created' column name has been shortened to 'Age'
in project instances and admin instances meaning it fits properly
in table header cell and doesn't cause table header height to
increase.

Closes-Bug: #1614287

Change-Id: I94fc9eb260050e187445abd8236ac414b885b467
Co-Authored-By: Sam Wright <swright.wellington@gmail.com>
2018-12-18 10:01:56 +00:00
Zuul 318e1f3cd5 Merge "Instance: show network info even if name is empty" 2018-12-14 19:13:34 +00:00
Akihiro Motoki 65f14e5d79 Instance: show network info even if name is empty
Previously, when a network name is an empty string,
network information of server interfaces will be empty,
so we cannot distinguish server interfaces.

Also network name in the instance detail page is capitalized
but there is no need to capitalize it and such information like
network name should be displayed as-is. This is not directly
related to the bug fixed by this commit, but it is simple enough
and related to network name, so I believe it is okay.

Change-Id: I2f2ad9b6bf50a2b53e79e4929d877111f875bd5b
Closes-Bug: #1805812
2018-12-14 17:51:52 +00:00
Akihiro Motoki fe6e395a62 Show ports without IP in instance table and detail
Previously instance ports without IP address were not shown
because api.neutron.servers_update_addresses() ignored ports
without IP address.

This commit changes servers_update_addresses() to include
a special symbol (None) representing "No IP address"
in "addresses" attribute in "server" object.

"(No IP address)" will be shown for ports without IP addresses now.

Closes-Bug: #1804016
Change-Id: I46699731ab515667b8cdf97ef68bdb8cbfe0b563
2018-11-29 23:34:23 +09:00
andrewbogott 1f13da0e47 Server overview: display hypervisor name if available
Previously this had a check for is_superuser.  That's sort of
right since the default nova-api policy doesn't return the hypervisor
if you don't have the admin priv.

But, since there is a modifiable policy enforced by the api,
let's just let that decide.  If nova-api returns the hypervisor,
presumably it has decided that we're allowed to see it, so let's
see it!

Change-Id: I0cfe9090e8263f983fa5f42f42616a26407be47a
2018-11-01 14:54:14 -05:00
Akihiro Motoki b017879500 Django2: Use new custom template loader interface
The new template loader interface is described here:
https://docs.djangoproject.com/en/2.0/ref/templates/api/#loader-methods

The old interface was deprecated in Django 1.9, and the old interface
load_template_sources() was removed in Django 2.0.
https://docs.djangoproject.com/en/2.0/releases/1.9/#template-loader-apis-have-changed

According to the UT result, force_escape in _detail_overview.html
looks unnecessary. If force_escape is used, the returned string will
be double-escaped and it is not what we expect.

blueprint django2-support
Change-Id: I8a5a79cb61a6ebd25453bde3e0ec64f5b5f50e1b
2018-03-03 07:22:35 +09:00
Akihiro Motoki 84216cb0f5 Always display server description
The description field is only shown when the description of
a corresponding server has non-empty string. It is better to
display "description" field regardless of its value.

"description" field is supported since Mitaka release, so
this commit always shows 'description' field rather than
showing the field conditionally.

Change-Id: I2064c6e8a625d4362ce00218528a09ef734087fc
Closes-Bug: #1737558
2017-12-12 01:39:48 +09:00
liyingjun 2161b91264 [Micro version] Support description for instance
In Nova Compute API microversion 2.19, you can specify a “description”
attribute when creating, rebuilding, or updating a server instance. This
description can be retrieved by getting server details, or list details
for servers, this patch adds support for this attribute for instance in
horizon.

Change-Id: Ic9217234021d236aee8295915f1a9c3c544396b0
Implement-blueprint: support-description-for-instance
2017-10-26 22:36:00 +08:00
Akihiro Motoki ed4c4b3442 I18n cleanup on recent merged changes
* (admin/instances/tables.py)
  _(" ") is confusing to translators. We already use an empty string ""
  in the project instance table, so there is no need to use a string
  only with a space.
* (project/instances/templates/instances/_detail_overview.html)
  "Locked" in the instance detail template means an attribute name.
  The word "locked" is potentially used in various contexts:
  passive voice, adjective or some name like attribute name.
  We can clarify the meaning of the string by using gettext context.
* (Angular workflow/launch-instance/keypair/create-keypair.html)
  <label> with "translate" attribute leads to an extracted string
  with HTML tagws. It can be avoided by using <translate> tag.
  The fix is same as what were fixed in commit fcd30d95e8.

Change-Id: Ib30306d82e45d81188393d4965493abac93699e3
2017-06-20 10:11:59 +00:00
Ying Zuo ddfa667d02 Add instance locked status on instances table
Added a column to show the locked status on project/admin instances table.

There will be a locked or unlocked icon with help tooltip if nova 2.9 or
above is used. See openstack_dashboard/api/microversions.py

Added the locked field on project/admin instance details panel.

Change-Id: If31ae281d2782c71cd6112f3bd6228647a6130e4
Closes-bug: #1593903
2017-06-14 20:00:56 -07:00
Jenkins 3a8e7b67c6 Merge "Delete instance,volume,etc confirmation is missing name or ID" 2017-04-25 17:20:16 +00:00
wei.ying fa3528933c Delete instance,volume,etc confirmation is missing name or ID
If click the name link and go into the details page for the instance, volume, etc.
And attempt to delete. It will pop up a message, but omit the name/id.
Need to add the property of 'data-display' in detail page.

Change-Id: I9c1966dc7942a27903237e2786edbcd2fbd936ea
Closes-Bug: #1680329
2017-04-07 22:58:50 +00:00
Ying Zuo a35cf2da28 Only show image name as a link when the image exists
Updated the nova api to return None when the image name
is not available, for example, when it's deleted.

Added a check for the image name before showing it as
a link.

Change-Id: I342b23dfd8352182f50c41054d2dbb3eae854839
Closes-bug:1668783
2017-03-28 15:42:07 -07:00
Ying Zuo a21b51e34a Fix alignment issues for nav-tabs and ul on details panels
Added space between the nav-tabs and tab content on details panels.

Removed the bullet points in front of instance IP addresses
and security groups.

Change-Id: I426e73eca0ef8ac57434631da75cb602674be893
Closes-bug: #1625310
2017-01-18 11:40:14 -08:00
Akihiro Motoki 926a4513ea Use 'trimmed' for blocktrans with multi-line contents
blocktrans trimmed option removes newlines from contents of blocktrans
and replaces any whitespace at the beginning and end of a line into
a single space. This makes translator life easier.
More detail is described in the bug report.

Closes-Bug: #1583757
Depends-On: I534895be0d5f4bf0429b1511ee5421991386c873
Change-Id: Idb451b7688fd5533a8315399de13bac8b8078a67
2016-05-19 20:00:40 +00:00
Rob Cresswell f2b2289b4a Drop Django 1.7 support
Django 1.7 support ends in December 2015
(https://www.djangoproject.com/download/#supported-versions), so it
will not be supported by Mitaka release.

This patch removes many of the deprecation warnings:-

`RedirectView.permanent` change:
https://docs.djangoproject.com/en/1.8/ref/class-based-views/base/

`url` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.5 notes for the url and ssi template tag change

`django.forms.utils` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.9 notes

`firstof` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.8 notes for cycle and firstof template tags

Change-Id: If546c087e73d189daa92e5bd63f0533fcf19089f
Partially-Implements: blueprint drop-dj17
2015-11-16 11:55:38 +00:00
Rob Cresswell 7a58d15aec Navigation + cleanup for details pages
Adds a common detail page and a breadcrumb templatetag. The breadcrumb
templatetag defaults to displaying the panel name and the existing page
title, which is usually name_or_id. The templatetag can also access the
context, and accepts a "custom_breadcrumb", for complex nested pages or
customised layouts.

This type of navigation is also useful for small devices (mobile/
tablet), providing logical direction that isn't dependant on the
sidebar being displayed.

Currently implemented in Images, Volumes (simple breadcrumb), Ports and
Subnets (more complex nesting).

This approach has been chosen as manipulation of the URLs was seen as
undesirable, making request.path too unreliable. Furthermore, the
templatetag seperation means this could easily be used in other views.

NOTE: The network details page itself will be updated following the
resolution of https://bugs.launchpad.net/horizon/+bug/1416838

Change-Id: I7443b2ffa61560e5d1fd4d6d91b11201f1db6fac
Partial-Bug: 1413823
2015-11-09 07:01:04 +00:00
Rob Cresswell 2281c3a4a7 Show Image ID on Instance Overview
Instances can be filtered by Image ID, but that ID isn't displayed.
This patch shows the Image ID, and also makes the Flavour name more
explicit.

Change-Id: I38c59fb0a387f8f05d42b0a0107d0102a4ddc480
Partial-Bug: 1366320
2015-10-14 14:36:50 +01:00
Masco Kaliyamoorthy 2d8a4c6bc7 corrected the wrong url in admin instance detail
In admin instance detail page, the url for attached volume
pointing to volume detail in project panel.

This behavior is wrong, it should be link to admin panel only.

This patch corrected the url to point to the admin panel volume detail.

Change-Id: I76419f1236304211602fa98f3885d8a2a05b6468
Closes-Bug: #1470821
2015-07-02 17:31:40 +05:30
Masco Kaliyamoorthy 863f7fcd06 corrected the wrong url in admin instance detail
In admin instance detail page, the image url pointing to image detail page in project panel.

This behavior is wrong, it should be link to admin panel only.

This patch corrected the url to point to the admin panel image detail page.

Change-Id: I4ec2687cc208e61b2be00dc86e42f95fa8a1a363
Closes-Bug: #1463312
2015-06-09 14:38:18 +05:30
jing.liuqing 5ae1f3c44f Hidden HOST in instance overview page for normal user
If the logined user is normal user, the instance overview page
will always show "HOST: -". There is no need show them for normal
users, it may cause some safety problem.

Closes-Bug: 1417849
Change-Id: Ib51bb05822fe910e97f73af56a8d6856764f7653
2015-06-03 07:05:31 +00:00
Alex Chan cf152365cd Instance overview renders erroneous markup
Under Instance Detail | Overview | Meta | Key Name an unclosed </em>
is rendered for an instance launched without an associated key pair.
This seems to be reproducible using Django 1.6.1 in local devstack.
The issue seems to be that Django's implementation of the add filter
has an issue concatenating a string and a function to localize text.
Since that fails and returns an empty string which subsequently is
added to the closing </em> tag, the closing tag is the only thing
that is displayed.

This fix saves the localized value to a variable which is then used
in the add filter.

Closes-Bug: #1423797
Change-Id: I4452ca4a902bbaf19ae5b2bd9bcbe2900069ac3b
2015-03-13 17:58:47 +00:00
Masco Kaliyamoorthy fb3709dc40 added flavor id in instance detail page
in instance table, we can filter out the
instances by using the flavor id.

but there is no way to get the flavor id
in horizon for non admin users.

so adding the flavor id in instance detail
and popover flavor detail table.

Change-Id: I4995d9181a47bb7e15ce8b2c7b4252e389d91c71
Closes-Bug: #1415825
2015-01-29 16:20:44 +05:30
Jenkins bb5e8b4335 Merge "Change uptime to time since created" 2015-01-21 19:56:24 +00:00
SudheerKall 42def722f8 Change uptime to time since created
Change the label name to time since created to suite requirement

Closes-Bug: 1308189

Change-Id: I872f046ceaf2305b2bf9a42ea7fd07ea46e91a87
2015-01-21 15:03:13 +05:30
Jenkins f4674f3a02 Merge "Unify the syntax used for the {% ... %} delimter in Jinja2 templates" 2015-01-19 23:43:33 +00:00
Christian Berendt 31f7f50ff1 Unify the syntax used for the {% ... %} delimter in Jinja2 templates
According to the Jinja2 documentation the preferred usage for
the syntax of the {% ... %} delimter is {% ... %}. This patch
changes all occurcens of {%... and ...%} to {% ... %}.

Change-Id: I49243a16b71237bea47bc29f11508e16e77e3621
2015-01-19 20:58:15 +01:00
Christian Berendt ad64a212ba Unify the syntax used for the {{ ... }} delimter in Jinja2 templates
According to the Jinja2 documentation the preferred usage for
the syntax of the {{ ... }} delimter is {{ ... }}. This patch
changes all occurcens of {{... and ...}} to {{ ... }}.

Change-Id: I755475d1476cbfeac190217fa67dc2640917762c
2015-01-19 09:42:24 +00:00
Aaron Sahlin 4395851050 Fixed display issues on Details Page caused by bootstrap 3 update
Per UX suggestion applied Bootstrap 'dl-horizontal' styling plus
added css to left justify the labels on the details page.  Also
addeds col-sm-12 div inside all row divs in detail views, to achieve
proper bootstrap grid usage.

Closes-bug: #1349602
Change-Id: I337150c7a8c90cc838fac8cb89a552a0566789e3
2015-01-05 20:34:44 +00:00
Jenkins a015e29295 Merge "Show up to 1 decimal place for instance detail RAM" 2014-12-08 17:33:58 +00:00
David Lyle 794ba46d56 Standardizing translation of "-"
There are several places where "-" or '-' are not translated strings.
There are others where they are. This should be consistent. I can see
value in being able to translate "-" to another character.

Closes-Bug: #1398892
Change-Id: Icfcd20fb597122d8efa30debf9f6e7273f036419
2014-12-03 10:09:17 -07:00
David Lyle 4de3530af2 Adding Host Server to instance detail page
The Host Server is potentially available in the instance detail
data. Now displaying that information. This is useful data for
diagnosing issues.

Implements blueprint: instance-details-add-host-server

Change-Id: If397a6ca6f0fdf0edad12e1948ebaf4041e072d1
2014-12-02 14:49:00 -07:00
Sam Betts 12f57f65a8 Show up to 1 decimal place for instance detail RAM
The current instance details page rounds the amount of RAM to the
nearest integer, which at GB and TB levels does not provide enough
fidelity to be useful, this patch allows the page to display up to one
decimal place if it is required, by changing the filter applied in the
template from mbformat to mb_float_format.

Change-Id: Ida97e83285b64ac6b08260f78f31c69dc37009b0
Closes-Bug: 1384446
2014-11-27 10:41:53 +00:00
Jenkins ec012c6943 Merge "Gracefully handle failures to retrieve a flavor" 2014-11-26 11:57:00 +00:00
Julie Pichon b50413ca0a Gracefully handle failures to retrieve a flavor
In some cases, a flavor in use can become unaccessible, for instance
after deleting a flavor with access restrictions.

 * On the Instance details page, make the try/except blocks for API
   calls more fine-grained. Some specific failures shouldn't cause the
   whole page to fail to load (and e.g. prevent Console access).

 * Fix the Resize Instance form to display even if information about
   the current flavor cannot be retrieved.

 * Gracefully handle failures to retrieve flavor information on AJAX
   calls for row update, so that the row doesn't disappear from the
   table.

Change-Id: I011b6e01eca3e04e5ef2528732b9bde3782b4eba
Closes-Bug: #1366166
2014-11-21 11:34:12 +00:00
Kahou Lei 520c29cdf0 place the word "Info" with "Information"
Update necessary html files.
Test it on GUI and unit tests passed

Change-Id: Ic1d66a68c9de45c52884109e360917c1eefbfac8
Closes-Bug: 1394315
2014-11-21 00:12:48 +00:00
Doug Fish 055f737a9b Make status in instance details screen translatable
Use the same set of translations we have for status in the
instances table to make the status in the instance details
screen translatable.

Change-Id: I2430b9211e9f1aa2d067c74e577ba5905b261402
Closes-Bug: #1383916
2014-10-21 16:59:24 -05:00
Jenkins 66eb7b427f Merge "Remove string concatenation related to volume attachment" 2014-10-20 14:12:06 +00:00
Akihiro Motoki 1eb0a6a711 Remove string concatenation related to volume attachment
Translatable string "on" is a part of string concatenation
and it makes difficult to translate it properly.

Change-Id: Ib2bf65791899a3c69087749d3a5fcf5061568b5d
Closes-Bug: #1382874
2014-10-20 05:36:12 +09:00
Sayali Lunkad 057bfd86b7 Removes term inconsistency in the dashboard
Makes some text edits in order to bring consistency in the terms mentioned.

Closes-bug: #1272141

Change-Id: Ie1c959df7f7074c38fb1e464715194f93b2dc112
2014-10-17 15:27:31 +05:30
Thomas Goirand 149f842017 template to rely on the the "id" attribute
The exception fixed is the following:
NoReverseMatch: Reverse for 'detail' with arguments '('',)' and keyword
arguments '{}' not found. 1 pattern(s) tried:
[u'project/volumes/(?P<volume_id>[^/]+)/$']

The test data doesn't include a volumeId attribute to volumes but they
contain an id attribute.

Here I modify the template to rely on the the "id" attribute but maybe
real data has a volumeId attribute and it's the test data in
openstack_dashboard/test/test_data/nova_data.py that needs to be
modified instead.

Change-Id: Ia561c2db1c59e51fb669e1ad6636d9b3bc9f7676
2014-08-05 14:59:53 +08: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
Cindy Lu d4b7e5be82 Fix Instance Image Name cell value
It shows up differently in Project vs Admin table for instance with no image.
Project table shows '-'
Admin table shows '(not found)'
=> Now both tables show '-' as it is consistent with other tables

Also, in the Instance detail page, Image Name shows as a hyperlinked "(not found)"
=> Now the detail page shows a plain text 'None'

Change-Id: Ie865017d4fdd6c5d6e028d9e3bf94dd67c21daca
Closes-Bug: #1277240
2014-05-30 12:33:34 -07:00
Akihiro Motoki 2139fe9433 Fix wrong links to volume detail
instance detail page and stack mapping has wrong links
to volume details (They point to volume snapshot by mistake)

Change-Id: I2c067941034d6a75f5d99fc663fe07515705afe7
Closes-Bug: #1296356
2014-03-24 03:56:29 +09:00
Zhenguo Niu 3d25f1d595 Move volume snapshots table to volumes panel
Now that instance snapshots are just images, the images & snapshots
page only has images and volume snapshots. This is an odd combination.
I think we should now move volume snapshots to the volumes panel,
since a volume snapshot is tied to a volume.

Closes-Bug: #1190843
Change-Id: I3e12cec8b859a30db9f131e9889a92277e064086
2014-02-18 10:24:18 +08:00