##// END OF EJS Templates
feat(system-info): update report and made a ver option be passed via GET param to test check for update logic
super-admin -
r5432:81f383de default
parent child Browse files
Show More
@@ -165,16 +165,20 b' class AdminSystemInfoSettingsView(BaseAp'
165 (_('Storage location'), val('storage')['path'], state('storage')),
165 (_('Storage location'), val('storage')['path'], state('storage')),
166 (_('Storage info'), val('storage')['text'], state('storage')),
166 (_('Storage info'), val('storage')['text'], state('storage')),
167 (_('Storage inodes'), val('storage_inodes')['text'], state('storage_inodes')),
167 (_('Storage inodes'), val('storage_inodes')['text'], state('storage_inodes')),
168 ('', '', ''), # spacer
168
169
169 (_('Gist storage location'), val('storage_gist')['path'], state('storage_gist')),
170 (_('Gist storage location'), val('storage_gist')['path'], state('storage_gist')),
170 (_('Gist storage info'), val('storage_gist')['text'], state('storage_gist')),
171 (_('Gist storage info'), val('storage_gist')['text'], state('storage_gist')),
172 ('', '', ''), # spacer
171
173
172 (_('Archive cache storage type'), val('storage_archive')['type'], state('storage_archive')),
174 (_('Archive cache storage type'), val('storage_archive')['type'], state('storage_archive')),
173 (_('Archive cache storage location'), val('storage_archive')['path'], state('storage_archive')),
175 (_('Archive cache storage location'), val('storage_archive')['path'], state('storage_archive')),
174 (_('Archive cache info'), val('storage_archive')['text'], state('storage_archive')),
176 (_('Archive cache info'), val('storage_archive')['text'], state('storage_archive')),
177 ('', '', ''), # spacer
175
178
176 (_('Temp storage location'), val('storage_temp')['path'], state('storage_temp')),
179 (_('Temp storage location'), val('storage_temp')['path'], state('storage_temp')),
177 (_('Temp storage info'), val('storage_temp')['text'], state('storage_temp')),
180 (_('Temp storage info'), val('storage_temp')['text'], state('storage_temp')),
181 ('', '', ''), # spacer
178
182
179 (_('Search info'), val('search')['text'], state('search')),
183 (_('Search info'), val('search')['text'], state('search')),
180 (_('Search location'), val('search')['location'], state('search')),
184 (_('Search location'), val('search')['location'], state('search')),
@@ -210,7 +214,8 b' class AdminSystemInfoSettingsView(BaseAp'
210 update_url = UpdateModel().get_update_url()
214 update_url = UpdateModel().get_update_url()
211
215
212 def _err(s):
216 def _err(s):
213 return '<div style="color:#ff8888; padding:4px 0px">{}</div>'.format(s)
217 return f'<div style="color:#ff8888; padding:4px 0px">{s}</div>'
218
214 try:
219 try:
215 data = UpdateModel().get_update_data(update_url)
220 data = UpdateModel().get_update_data(update_url)
216 except urllib.error.URLError as e:
221 except urllib.error.URLError as e:
@@ -226,12 +231,12 b' class AdminSystemInfoSettingsView(BaseAp'
226
231
227 c.update_url = update_url
232 c.update_url = update_url
228 c.latest_data = latest
233 c.latest_data = latest
229 c.latest_ver = latest['version']
234 c.latest_ver = (latest['version'] or '').strip()
230 c.cur_ver = rhodecode.__version__
235 c.cur_ver = self.request.GET.get('ver') or rhodecode.__version__
231 c.should_upgrade = False
236 c.should_upgrade = False
232
237
233 is_oudated = UpdateModel().is_outdated(c.cur_ver, c.latest_ver)
238 is_outdated = UpdateModel().is_outdated(c.cur_ver, c.latest_ver)
234 if is_oudated:
239 if is_outdated:
235 c.should_upgrade = True
240 c.should_upgrade = True
236 c.important_notices = latest['general']
241 c.important_notices = latest['general']
237 UpdateModel().store_version(latest['version'])
242 UpdateModel().store_version(latest['version'])
General Comments 0
You need to be logged in to leave comments. Login now