Show More
@@ -485,7 +485,7 b' class TestAdminSystemInfo(object):' | |||||
485 | update_data = { |
|
485 | update_data = { | |
486 | 'versions': [ |
|
486 | 'versions': [ | |
487 | { |
|
487 | { | |
488 |
'version': '100. |
|
488 | 'version': '100.0.0', | |
489 | 'general': 'The latest version we are ever going to ship' |
|
489 | 'general': 'The latest version we are ever going to ship' | |
490 | }, |
|
490 | }, | |
491 | { |
|
491 | { | |
@@ -502,15 +502,15 b' class TestAdminSystemInfo(object):' | |||||
502 | update_data = { |
|
502 | update_data = { | |
503 | 'versions': [ |
|
503 | 'versions': [ | |
504 | { |
|
504 | { | |
505 |
'version': ' |
|
505 | 'version': '4.0.0', | |
506 | 'general': 'The first version we ever shipped' |
|
506 | 'general': 'The first version we ever shipped' | |
507 | } |
|
507 | } | |
508 | ] |
|
508 | ] | |
509 | } |
|
509 | } | |
|
510 | text = f"Your current version, {rhodecode.__version__}, is up-to-date as it is equal to or newer than the latest available version, 4.0.0." | |||
510 | with mock.patch(UPDATE_DATA_QUALNAME, return_value=update_data): |
|
511 | with mock.patch(UPDATE_DATA_QUALNAME, return_value=update_data): | |
511 | response = self.app.get(route_path('admin_settings_system_update')) |
|
512 | response = self.app.get(route_path('admin_settings_system_update')) | |
512 | response.mustcontain( |
|
513 | response.mustcontain(text) | |
513 | 'This instance is already running the <b>latest</b> stable version') |
|
|||
514 |
|
514 | |||
515 | def test_system_update_bad_response(self, autologin_user): |
|
515 | def test_system_update_bad_response(self, autologin_user): | |
516 | with mock.patch(UPDATE_DATA_QUALNAME, side_effect=ValueError('foo')): |
|
516 | with mock.patch(UPDATE_DATA_QUALNAME, side_effect=ValueError('foo')): |
@@ -84,6 +84,6 b'' | |||||
84 | <script> |
|
84 | <script> | |
85 | $('#check_for_update').click(function(e){ |
|
85 | $('#check_for_update').click(function(e){ | |
86 | $('#update_notice').show(); |
|
86 | $('#update_notice').show(); | |
87 | $('#update_notice').load("${h.route_path('admin_settings_system_update')}"); |
|
87 | $('#update_notice').load("${h.route_path('admin_settings_system_update', _query={'ver': request.GET.get('ver')})}"); | |
88 | }) |
|
88 | }) | |
89 | </script> |
|
89 | </script> |
@@ -1,25 +1,30 b'' | |||||
1 | ## upgrade block rendered afte on-click check |
|
1 | ## upgrade block rendered afte on-click check | |
2 |
|
2 | |||
3 | <div class="alert ${'alert-warning' if c.should_upgrade else 'alert-success'}"> |
|
3 | <div class="alert ${'alert-warning' if c.should_upgrade else 'alert-success'}"> | |
4 | <p> |
|
4 | ||
5 | %if c.should_upgrade: |
|
5 | %if c.should_upgrade: | |
6 |
A <b>new version</b> is available |
|
6 | <span style="font-size: 130%">A <b>new version</b> is available !</span> | |
|
7 | <br/> | |||
|
8 | <br/> | |||
|
9 | ||||
7 |
|
|
10 | %if c.latest_data.get('title'): | |
8 |
<b>${h.literal(c.latest_data['title'])} |
|
11 | RhodeCode <b>${c.latest_ver}</b> - ${h.literal(c.latest_data['title'])} | |
9 |
|
|
12 | %else: | |
10 | <b>${c.latest_ver}</b> |
|
13 | RhodeCode <b>${c.latest_ver}</b> | |
11 | %endif |
|
14 | %endif | |
12 | %else: |
|
15 | %else: | |
13 | This instance is already running the <b>latest</b> stable version ${c.latest_ver}. |
|
16 | Your current version, ${c.cur_ver}, is up-to-date as it is equal to or newer than the latest available version, ${c.latest_ver}. | |
14 | %endif |
|
17 | %endif | |
15 | </p> |
|
18 | ||
16 |
|
|
19 | ||
17 | % if c.should_upgrade and c.important_notices: |
|
20 | % if c.should_upgrade and c.important_notices: | |
18 | <div>Important notes for this release:</div> |
|
21 | <br/> | |
19 | <ul> |
|
22 | <br/> | |
|
23 | <div>Summary:</div> | |||
|
24 | <br/> | |||
20 | % for notice in c.important_notices: |
|
25 | % for notice in c.important_notices: | |
21 |
|
|
26 | - ${notice}<br/> | |
22 | % endfor |
|
27 | % endfor | |
23 | </ul> |
|
|||
24 | % endif |
|
28 | % endif | |
|
29 | ||||
25 | </div> |
|
30 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now