diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/helpers.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/helpers.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js b/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js deleted file mode 100644 index 479b9b18299..00000000000 --- a/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js +++ /dev/null @@ -1,33 +0,0 @@ -import Handlebars from 'hbsfy/runtime'; - -Handlebars.registerHelper('profileUrl', function (key) { - return baseUrl + '/profiles/show?key=' + encodeURIComponent(key); -}); - -Handlebars.registerHelper('exporterUrl', function (profile, exporterKey) { - var url = baseUrl + '/api/qualityprofiles/export'; - url += '?language=' + encodeURIComponent(profile.language); - url += '&name=' + encodeURIComponent(profile.name); - if (exporterKey != null) { - url += '&exporterKey=' + encodeURIComponent(exporterKey); - } - return url; -}); - -Handlebars.registerHelper('severityChangelog', function (severity) { - var label = '<i class="icon-severity-' + severity.toLowerCase() + '"></i> ' + window.t('severity', severity), - message = window.tp('quality_profiles.severity_set_to_x', label); - return new Handlebars.SafeString(message); -}); - -Handlebars.registerHelper('parameterChangelog', function (value, parameter) { - if (parameter) { - return new Handlebars.SafeString( - window.tp('quality_profiles.parameter_set_to_x', value, parameter) - ); - } else { - return new Handlebars.SafeString( - window.tp('quality_profiles.changelog.parameter_reset_to_default_value_x', parameter) - ); - } -}); |