##// END OF EJS Templates
artifacts: added admin panel to manage all artifacts in an instance.
milka -
r4661:df96df1f default
parent child Browse files
Show More
@@ -255,7 +255,7 b' class LocalFileStorage(object):'
255 255
256 256 return filename, metadata
257 257
258 def get_metadata(self, filename):
258 def get_metadata(self, filename, ignore_missing=False):
259 259 """
260 260 Reads JSON stored metadata for a file
261 261
@@ -264,6 +264,7 b' class LocalFileStorage(object):'
264 264 """
265 265 filename = self.store_path(filename)
266 266 filename_meta = filename + '.meta'
267
267 if ignore_missing and not os.path.isfile(filename_meta):
268 return {}
268 269 with open(filename_meta, "rb") as source_meta:
269 270 return json.loads(source_meta.read())
@@ -12,6 +12,12 b''
12 12 ******************************************************************************/
13 13 function registerRCRoutes() {
14 14 // routes registration
15 pyroutes.register('admin_artifacts', '/_admin/artifacts', []);
16 pyroutes.register('admin_artifacts_data', '/_admin/artifacts-data', []);
17 pyroutes.register('admin_artifacts_delete', '/_admin/artifacts/%(uid)s/delete', ['uid']);
18 pyroutes.register('admin_artifacts_show_all', '/_admin/artifacts', []);
19 pyroutes.register('admin_artifacts_show_info', '/_admin/artifacts/%(uid)s', ['uid']);
20 pyroutes.register('admin_artifacts_update', '/_admin/artifacts/%(uid)s/update', ['uid']);
15 21 pyroutes.register('admin_audit_log_entry', '/_admin/audit_logs/%(audit_log_id)s', ['audit_log_id']);
16 22 pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []);
17 23 pyroutes.register('admin_defaults_repositories', '/_admin/defaults/repositories', []);
@@ -115,6 +115,7 b''
115 115 <li class="${h.is_active('repository_groups', active)}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
116 116 <li class="${h.is_active('users', active)}"><a href="${h.route_path('users')}">${_('Users')}</a></li>
117 117 <li class="${h.is_active('user_groups', active)}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
118 <li class="${h.is_active('artifacts', active)}"><a href="${h.route_path('admin_artifacts')}">${_('Artifacts')}</a></li>
118 119 <li class="${h.is_active('permissions', active)}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li>
119 120 <li class="${h.is_active('authentication', active)}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
120 121 <li class="${h.is_active('integrations', active)}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
@@ -416,6 +416,12 b''
416 416 </a>
417 417 </%def>
418 418
419 <%def name="repo_artifact_admin_name(file_uid, artifact_display_name)">
420 <a href="${h.route_path('admin_artifacts_show_info', uid=file_uid)}">
421 ${(artifact_display_name or '_EMPTY_NAME_')}
422 </a>
423 </%def>
424
419 425 <%def name="repo_artifact_uid(repo_name, file_uid)">
420 426 <code>${h.shorter(file_uid, size=24, prefix=True)}</code>
421 427 </%def>
@@ -443,6 +449,7 b''
443 449 % endif
444 450 </%def>
445 451
452
446 453 <%def name="markup_form(form_id, form_text='', help_text=None)">
447 454
448 455 <div class="markup-form">
General Comments 0
You need to be logged in to leave comments. Login now