diff --git a/rhodecode/apps/file_store/backends/local_store.py b/rhodecode/apps/file_store/backends/local_store.py --- a/rhodecode/apps/file_store/backends/local_store.py +++ b/rhodecode/apps/file_store/backends/local_store.py @@ -255,7 +255,7 @@ class LocalFileStorage(object): return filename, metadata - def get_metadata(self, filename): + def get_metadata(self, filename, ignore_missing=False): """ Reads JSON stored metadata for a file @@ -264,6 +264,7 @@ class LocalFileStorage(object): """ filename = self.store_path(filename) filename_meta = filename + '.meta' - + if ignore_missing and not os.path.isfile(filename_meta): + return {} with open(filename_meta, "rb") as source_meta: return json.loads(source_meta.read()) diff --git a/rhodecode/public/js/rhodecode/routes.js b/rhodecode/public/js/rhodecode/routes.js --- a/rhodecode/public/js/rhodecode/routes.js +++ b/rhodecode/public/js/rhodecode/routes.js @@ -12,6 +12,12 @@ ******************************************************************************/ function registerRCRoutes() { // routes registration + pyroutes.register('admin_artifacts', '/_admin/artifacts', []); + pyroutes.register('admin_artifacts_data', '/_admin/artifacts-data', []); + pyroutes.register('admin_artifacts_delete', '/_admin/artifacts/%(uid)s/delete', ['uid']); + pyroutes.register('admin_artifacts_show_all', '/_admin/artifacts', []); + pyroutes.register('admin_artifacts_show_info', '/_admin/artifacts/%(uid)s', ['uid']); + pyroutes.register('admin_artifacts_update', '/_admin/artifacts/%(uid)s/update', ['uid']); pyroutes.register('admin_audit_log_entry', '/_admin/audit_logs/%(audit_log_id)s', ['audit_log_id']); pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); pyroutes.register('admin_defaults_repositories', '/_admin/defaults/repositories', []); diff --git a/rhodecode/templates/base/base.mako b/rhodecode/templates/base/base.mako --- a/rhodecode/templates/base/base.mako +++ b/rhodecode/templates/base/base.mako @@ -115,6 +115,7 @@
  • ${_('Repository groups')}
  • ${_('Users')}
  • ${_('User groups')}
  • +
  • ${_('Artifacts')}
  • ${_('Permissions')}
  • ${_('Authentication')}
  • ${_('Integrations')}
  • diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -416,6 +416,12 @@ +<%def name="repo_artifact_admin_name(file_uid, artifact_display_name)"> + + ${(artifact_display_name or '_EMPTY_NAME_')} + + + <%def name="repo_artifact_uid(repo_name, file_uid)"> ${h.shorter(file_uid, size=24, prefix=True)} @@ -443,6 +449,7 @@ % endif + <%def name="markup_form(form_id, form_text='', help_text=None)">