Commit Graph

47 Commits

Author SHA1 Message Date
manchandavishal cc41dedbc5 Address RemovedInDjango40Warning
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093

Change-Id: I66118c1af551e69a2deabf87b37efa574233e93b
2022-04-29 16:44:48 +05:30
Kent Wu 40a07a0e00 Avoid using deprecated opt in Web-UI
Use new opt instead of deprecated opt to avoid KeyError.

Change-Id: I9bff33eac9c756afb571f81824a8a3242477f321
Closes-Bug: #1777705
2018-06-19 16:10:24 -06:00
Jakub Jursa 357117beff Added engine_name parameter to action creation.
With implementation of new engines (nova, rsync, ...) a regression was
introduced - user is no longer able to create working action for nova instance
backup because config generated by freezer-scheduler passed to freezer-agent
doesn't contain 'engine_name' thus falling back to default value 'tar'
even when 'mode' is set to 'nova'. This patch adds possibility to specify
'engine_name' in web UI which is then passed to freezer-scheduler job cfg.

Change-Id: Ifc4ed728db369da54fecef3c2ecf4dfcbfe4fefb
2018-05-22 10:45:19 +02:00
Akihiro Motoki 6bf20357fe Django 2.0 support
Replace django.core.urlresolves with django.urls

(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

Note that this commit does not add py35dj20 like other horizon plugins
because there is no actual python unit tests in freezer-web-ui.

Older Django unit tests were dropped from tox.ini
as horizon dropped Django <=1.10 support in Rocky.

Change-Id: I38f3f05655324f2a5f38c6e8c6ab53ebaa42d4c8
2018-05-14 02:34:28 +09:00
yapeng d6ae33196b Replace patterns syntax by url
The old syntax using patterns is deprecated in Django 1.8, and is
removed in Django 1.10. The current version Django<1.11, this
patch fix the syntax.

Change-Id: I26564c97538c23378c0494739257b31dd8796f5a
Closes-Bug: #1709742
2017-08-10 03:03:19 +00:00
zhangdebo af953deb65 Fix a bug when restore a nova instance from UI.
First I backup a nova instance successfully, then I want to
restore it, I have created an action and a job, but the job
runned failed, I found an error in log of freezer agent:
"The parameter --nova-restore-network is required"

In the web form, the name of input field for network is called
"nova_network_id", but in the freezer project, it's called
"nova_restore_network".

Change-Id: Ia2aba0090ac04c5d444fcab675d9cd3357db01cd
Closes-Bug: #1686653
2017-04-27 02:41:34 -07:00
Jenkins 83aaebf879 Merge "Place the error message to correct position" 2017-03-08 14:22:22 +00:00
Jenkins d718cbdc7d Merge "Optimize the checks of instance id for create action" 2017-03-08 14:22:16 +00:00
Jenkins 5d3c08d5f1 Merge "Remove the redundant codes" 2017-03-08 14:22:05 +00:00
qiaomin f702a606ca Place the error message to correct position
Modify the error message 'You must define nova network id to restore'
to be around the 'Nova Network ID' field.

Change-Id: Ic732a33c2fd754afa6d1d796b8d9e6f1e382c135
Closes-Bug: #1663888
2017-02-11 22:40:54 +08:00
qiaomin 031917bbcb Optimize the checks of instance id for create action
Make the checks of "Nova Instance ID" and 'Cinder Volume ID'
more correct for create action.

Change-Id: I051cca74d629febb01203c1eb4f2d35f091a7b8d
Closes-Bug: #1663887
2017-02-11 22:29:52 +08:00
Jenkins 40f832375f Merge "Optimize the checks of container for create action" 2017-02-11 12:48:07 +00:00
qiaomin 71f9e3a650 Modify "Restore From Date" field to datetime format
Modify the "Restore From Date" filed in "Create Action" form
to datetime format. This makes the user life easier.

Change-Id: I602a8640098be2ffb592c613b734dceda5b1eaeb
2017-02-08 12:24:39 +08:00
qiaomin f7165967b5 Remove the redundant codes
DeleteInstance action inherits from tables.DeleteAction,
the tables.DeleteAction has already define some attributes.
So this patch remove the repeated attributes.

Change-Id: I7cab3cf609b75e483d5507af113501aa957436c5
2017-02-07 22:54:52 +08:00
qiaomin 39a9a2e6db Optimize the checks of container for create action
Make the checks of container more correct for create action.

Change-Id: If1bdb46e2c76db69ff5301fa5439c8ae4f87bca5
Closes-Bug: #1662190
2017-02-07 21:49:28 +08:00
Jenkins fc2cb12b53 Merge "Use 'trimmed' for blocktrans in html page" 2017-02-02 16:17:23 +00:00
Jenkins 6fd461f03c Merge "Add the missing name in confirm delete modal" 2017-02-02 15:39:23 +00:00
Jenkins 70f46a62ef Merge "Remove the redundant "required=True"" 2017-02-02 15:20:48 +00:00
Jenkins 5fb80daf35 Merge "Restore nova from UI" 2017-02-02 15:11:53 +00:00
qiaomin ac7908c15e Remove the redundant "required=True"
The django form field default is "required=True", so this patch
remove the redundant "required=True" in the form.

Change-Id: Id2342cea882134099a43f2149e7b56168a015afe
2017-01-26 23:15:30 +08:00
qiaomin 7fb16fa84a Use 'trimmed' for blocktrans in html page
Add trimmed option to blocktrans, 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.

Change-Id: I9a5c3e958260a94d8a44dc3946e25a690f00f30e
Closes-Bug: #1659559
2017-01-26 22:27:07 +08:00
qiaomin 6de8df0b9f Add the missing name in confirm delete modal
Change-Id: Idcf6ae03c96712a3204c606f659543e5738008a3
Closes-Bug: #1658557
2017-01-23 23:13:09 +08:00
qiaomin 4c7386db8b Optimize create backup action
Remove the redundant 'Source File/Directory' item,
adn set 'Container name or path' non required item
when the 'mode' is 'cinder' or 'nova'.

Closes-Bug: #1657457

Change-Id: Idab804f391e3534ad2369ec1ab6c065feab2e7da
2017-01-18 13:41:14 +00:00
Gleb Stepanov f25a7c8d8f Restore nova from UI
Add an ability to restore nova instances from horizon
web UI.

Change-Id: I3ea0a52383bf6b05f88e6e959a774f6f573cd44b
2016-12-22 14:49:57 +00:00
Jenkins a31ac2de01 Merge "Remove logging import unused" 2016-12-07 17:46:27 +00:00
Gleb Stepanov fbd1d3e404 Fix label text
Change-Id: I8141a74c2619523e345914cce0b733a8d35afd29
2016-12-02 18:11:56 +02:00
Cao Xuan Hoang 42eb07b3f4 Remove logging import unused
This patch removes logging import unused in disaster_recovery

Change-Id: I453254206e4c91f005018cad9eff512a85a40df0
2016-11-15 16:29:24 +07:00
Ryan Peters ddc6321e6d Adds help text and fixes dropdown displays
Adds help text for users creating a Restore Action item.
Also fixes the fields that get displayed when selecting options
in the Action, Mode, and Storage dropdowns.

Change-Id: Ia5fcfa0a3afb8d75c9beb497204ef9b4934a723f
2016-08-11 09:51:41 -05:00
Jenkins 4c8cdb2d37 Merge "Actions for a job no longer shows irrelevant actions for specific cases" 2016-03-29 10:22:38 +00:00
Jenkins 9cf484a0d8 Merge "UX improvements" 2016-03-25 12:57:21 +00:00
Memo Garcia a1541e6a59 UX improvements
Fix calendar to better display in small windows
Bump the number of results for listing items
Quick workaround to successfully listing items after being created

Closes bug: 1556939
Change-Id: Ibaf0a999a729197900b18c1f22fd819f5e11e797
2016-03-25 12:05:25 +00:00
Jenkins d49e655ffe Merge "Fix misleading labeling for filters" 2016-03-24 14:55:02 +00:00
Jenkins 61b5dee2ad Merge "Improve success messages when it takes time to display the action" 2016-03-10 14:35:08 +00:00
Jin Nan Zhang 9cc4126d52 Fixed importError urlresolvers
ImportError: No module named urlresolvers in horizon.utils.
Fixed this importError use django.core.urlresolvers.

Change-Id: Ia2591675e3ac75b1cf608e7c18ad0c749d530289
Closes-Bug: #1549077
2016-03-01 14:02:05 -05:00
Memo García 40df86f710 Improve success messages when it takes time to display the action
Closes bug: 287309
Change-Id: Ie86d5e214eeb2ea3041c3b89e52f1394bebe14dc
2016-03-01 11:15:51 +00:00
Memo García 7dbb52e2b3 Actions for a job no longer shows irrelevant actions for specific cases
Resolves bug: 1546195
Change-Id: I6234a1d7bdbd2c5366fcf95290c60500b0625d1c
2016-02-16 16:43:05 +00:00
Memo García 37f3b7caef Fix misleading labeling for filters
Resolved bug: 1544083

Change-Id: I0b2383159b1616d80a5d7641618a65a73dc73654
2016-02-10 14:43:14 +00:00
Jenkins d67f5bc931 Merge "Simplify snapshot configuration for actions" 2016-01-18 19:04:52 +00:00
Memo García e8756ee635 Simplify snapshot configuration for actions
Resolves bug: 1533707

Change-Id: I4ebc710ebba8a392acc226cc18dcfbd323d08afd
2016-01-14 14:48:09 +00:00
Memo García db813a823e Send max retries, interval and mandatory fields
max retries, max retries interval and mandatory values are not present in
the dictionary that the api gets, this commit fix that by updating the
dictionary with those values

Resolves bug: 1533637

Change-Id: I3be163db0da7e3e84881bb6c3ab378cb1687037c
2016-01-13 12:04:25 +00:00
Memo García 9bd1e8089d Add visual clues for mandatory fields in actions
Add * to mandatory fields, usually django forms handle this
but, in freezer-web-ui the rules for mandatory fields varies for
each mode and action, so the implementation has to be manually

Implements: blueprint mandatory-clues

Change-Id: Ied5de01ca19a459a92084e925d8afc396e77aa95
2016-01-07 14:07:23 +00:00
memo b48b27fb8c Remove empty tabs in freezer dashboard
remove empty tab for job edition
remove possibility to add job without interval if start and end date
are provided
show a message when a job is started/stoped

Resolves bug: 1523497

Change-Id: Iff39fc9e813969672eecd48d9084fd100bcf611c
2015-12-08 13:58:08 +00:00
Memo García f6d896edbf Improved error messages in action ui
Change-Id: I902c7b49697c0fdee9cad38800eee975eab54498
2015-11-28 18:31:32 +00:00
Memo García 2cc46f5886 Improved cinder and nova backups ui
Simplified ui for linux snapshots

Change-Id: I18c6350a217327c6fe924373ab104441cf82dc0c
2015-11-28 12:49:34 +00:00
memo 1435d33732 General dashboard enhancements
rename _50_freezer.py to _50_freezer.py.example
updated readme to point to freezer launchpad
improved readability for actions and jobs in the ui

Change-Id: Ib07719e5f91443ea6716f940b6b125b872505088
2015-11-26 15:03:01 +00:00
memo 3cce1e3d3b Bug fix while editing actions with missing keys
If a key is not present in the database, the panel failed to open the modal
windows for edition, this fix that by using the dict.get()

Change-Id: Ic5f5e216828f10d41f288408fc5109dc004c6ab9
2015-11-18 14:43:22 +00:00
memo b08558eba4 Improved horizon dashboard for freezer
action, job, session, backup, clients are now objects in api.py
shield decorator to avoid having boilerplate code in views
move from freezer_ui to disaster_recovery url
improved actions edition in a job
javascript lint
added clients panel
added actions panel
improved restore functionality from the dashboard

Change-Id: I23aed516bcde3a40b24144b05f858d1e3a49a796
2015-11-12 16:21:27 +00:00