зеркало из https://github.com/mozilla/treeherder.git
Bug 1060322 - Move hardcoded Bugzilla & slave health URLs to thUrl
This commit is contained in:
Родитель
7fed6e575e
Коммит
9a2497df86
|
@ -202,7 +202,7 @@
|
|||
<tr>
|
||||
<th class="small">Machine name</th>
|
||||
<td class="small">
|
||||
<a target="_blank" href="https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name={{ job.machine_name }}">{{ job.machine_name }}</a>
|
||||
<a target="_blank" href="{{ getSlaveHealthUrl(job.machine_name) }}">{{ job.machine_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-repeat="(label, value) in visibleFields"><th>{{label}}</th><td>{{ value }}</td></tr>
|
||||
|
|
|
@ -21,6 +21,12 @@ treeherder.factory('thUrl', [
|
|||
},
|
||||
getLogViewerUrl: function(job_id) {
|
||||
return "logviewer.html#?job_id=" + job_id + "&repo=" + $rootScope.repoName;
|
||||
},
|
||||
getBugUrl: function(bug_id) {
|
||||
return "https://bugzilla.mozilla.org/show_bug.cgi?id=" + bug_id;
|
||||
},
|
||||
getSlaveHealthUrl: function(machine_name) {
|
||||
return "https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name=" + machine_name;
|
||||
}
|
||||
};
|
||||
return thUrl;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<span class="btn-group pinboard-related-bugs-btn">
|
||||
<a class="btn btn-xs related-bugs-link"
|
||||
title="{{::bug.summary}}"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id={{::bug.id}}"
|
||||
href="{{:: getBugUrl(bug.id) }}"
|
||||
target="_blank"
|
||||
><em>{{::bug.id}}</em></a>
|
||||
<span class="btn btn-ltgray btn-xs pinned-job-close-btn"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<span class="btn-group pinboard-related-bugs-btn">
|
||||
<a class="btn btn-xs annotations-bug related-bugs-link"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id={{::bug.bug_id}}"
|
||||
href="{{:: getBugUrl(bug.bug_id) }}"
|
||||
target="_blank"
|
||||
title="View bug {{::bug.bug_id}}"
|
||||
><em>{{::bug.bug_id}}</em></a>
|
||||
|
|
|
@ -436,5 +436,9 @@ treeherder.controller('PluginCtrl', [
|
|||
|
||||
// expose the tab service properties on the scope
|
||||
$scope.tabService = thTabs;
|
||||
|
||||
//fetch URLs
|
||||
$scope.getBugUrl = thUrl.getBugUrl;
|
||||
$scope.getSlaveHealthUrl = thUrl.getSlaveHealthUrl;
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
title="add to list of bugs to associate with all pinned jobs">
|
||||
<i class="glyphicon glyphicon-pushpin"></i>
|
||||
</a>
|
||||
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{::bug.id}}"
|
||||
<a href="{{:: getBugUrl(bug.id) }}"
|
||||
target="_blank">{{::bug.id}}
|
||||
<span ng-bind-html="bug.summary | escapeHTML | highlightCommonTerms:suggestion.search"
|
||||
title="{{::bug.summary}}">{{::bug.summary}}
|
||||
|
@ -40,14 +40,14 @@
|
|||
<i class="glyphicon glyphicon-pushpin"></i>
|
||||
</a>
|
||||
<a ng-if="bug.resolution === ''"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id={{::bug.id}}"
|
||||
href="{{:: getBugUrl(bug.id) }}"
|
||||
target="_blank">{{::bug.id}}
|
||||
<span ng-bind-html="bug.summary | escapeHTML | highlightCommonTerms:suggestion.search"
|
||||
title="{{::bug.summary}}">{{::bug.summary}}
|
||||
</span>
|
||||
</a>
|
||||
<a ng-if="bug.resolution !== ''"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id={{::bug.id}}"
|
||||
href="{{:: getBugUrl(bug.id) }}"
|
||||
target="_blank"
|
||||
class="deleted">{{::bug.id}}
|
||||
<span ng-bind-html="bug.summary | escapeHTML | highlightCommonTerms:suggestion.search"
|
||||
|
|
|
@ -116,9 +116,8 @@
|
|||
class="list-unstyled content-spacer">
|
||||
<li ng-if="classifications.length > 0">
|
||||
<span th-failure-classification failure-id="classifications[0].failure_classification_id"></span>
|
||||
|
||||
<a target="_blank" ng-repeat="bug in bugs"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id={{bug.bug_id}}"
|
||||
href="{{ getBugUrl(bug.bug_id) }}"
|
||||
title="View bug {{bug.bug_id}}"><em> {{bug.bug_id}}</em></a>
|
||||
</li>
|
||||
<li ng-if="classifications[0].note.length > 0"><em>{{classifications[0].note}}</em></li>
|
||||
|
@ -169,7 +168,7 @@
|
|||
<span ng-switch on="job.machine_name">
|
||||
<span ng-switch-when='unknown'>{{job.machine_name}}</span>
|
||||
<a title="Open buildbot slave health report" target="_blank"
|
||||
href="https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name={{job.machine_name}}"
|
||||
href="{{ getSlaveHealthUrl(job.machine_name) }}"
|
||||
ng-switch-default>
|
||||
{{job.machine_name}}
|
||||
</a>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<tr>
|
||||
<th>Machine name</th>
|
||||
<td>
|
||||
<a target="_blank" href="https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name={{ similar_job_selected.machine_name }}">
|
||||
<a target="_blank" href="{{ getSlaveHealthUrl(similar_job_selected.machine_name) }}">
|
||||
{{ similar_job_selected.machine_name }}
|
||||
</a>
|
||||
</td>
|
||||
|
|
Загрузка…
Ссылка в новой задаче