diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-12-04 16:21:02 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-12-04 16:21:02 +0100 |
commit | 05c13248f6a0d30c03998fbe14fbfacfd5a9b2a5 (patch) | |
tree | 8b2a4eb1be2816a8a21ea6b65a4964b9ce70bfa5 | |
parent | f511c30917184713be95fe84737e80a4f8f89d20 (diff) |
Remove translate function.
Change-Id: I50f0395afb7bf4152ae07fbd9ea25beed5890814
-rw-r--r-- | app/dashboard/templates/boots-job-kernel-defconfig.html | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/app/dashboard/templates/boots-job-kernel-defconfig.html b/app/dashboard/templates/boots-job-kernel-defconfig.html index 5441709..417e646 100644 --- a/app/dashboard/templates/boots-job-kernel-defconfig.html +++ b/app/dashboard/templates/boots-job-kernel-defconfig.html @@ -36,54 +36,5 @@ {%- endblock %} {%- block scripts %} {{ super() }} -<script type="text/javascript"> -function translateCommitURL(commitURL, commitId) { - 'use strict'; - - var uriParser, - hostName, - knownGit, - baseURL = '', - urlPath, - newCommitURL = '', - translateRule, - lenTranslate, - i, - urlTranslation = {{ url_translation|tojson|safe }}; - - if (commitURL !== null && commitId !== null) { - uriParser = new URI(commitURL); - hostName = uriParser.hostname(); - urlPath = uriParser.path(); - - if (urlTranslation.hasOwnProperty(hostName)) { - knownGit = urlTranslation[hostName]; - translateRule = knownGit[3]; - lenTranslate = translateRule.length; - - for (i = 0; i < lenTranslate; i++) { - urlPath = urlPath.replace( - translateRule[i][0], translateRule[i][1]); - } - - baseURL = new URI({ - protocol: knownGit[0], - hostname: hostName, - path: knownGit[1].replace('%s', urlPath) - }); - - newCommitURL = new URI({ - protocol: knownGit[0], - hostname: hostName, - path: knownGit[2].replace('%s', urlPath) + commitId - }); - - baseURL = baseURL.href(); - newCommitURL = newCommitURL.href(); - } - } - return [baseURL, newCommitURL]; -} -</script> <script type="text/javascript" src="/static/js/linaro-boots-job-kernel-defconfig-0.0.4.js"></script> {%- endblock %} |