Closed Bug 1053762 Opened 7 years ago Closed 6 years ago

Job details: A machine name of 'unknown' shouldn't link to slave_health

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: koddsson, Mentored)

References

()

Details

(Whiteboard: [good first bug])

Attachments

(1 file)

For pending and running jobs, the machine name (as shown in the job details panel, after clicking the job) is listed as "unknown" (this will likely change in bug 1052501, but this bug will no doubt remain).

This results in:
            <label>Machine name:</label>
            <a class="ng-binding" title="Open Buildbot Slave Health Report" target="_blank" href="https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name=unknown">
                unknown
            </a>

We should just not add the link to slave health if the machine name isn't known.

The same applies to the link on the similar jobs tab,

https://github.com/mozilla/treeherder-ui/blob/6906fdb96b450f912a579e24f3c0f42fcd4df354/webapp/app/index.html#L202
https://github.com/mozilla/treeherder-ui/blob/ffa754dfda3189bc9079fb5b83a45e0438591b70/webapp/app/plugins/pluginpanel.html#L144
https://github.com/mozilla/treeherder-ui/blob/e0dea2ba78de785ff1ea6ee9d418f5da168618de/webapp/app/plugins/similar_jobs/main.html#L33

We should also probably abstract out the hardcoded URLs into a central config:
https://github.com/mozilla/treeherder-ui/search?q=secure.pub.build.mozilla.org
Mentor: mdoglio
Summary: A machine name of 'unknown' shouldn't link to slave_health → Job details: A machine name of 'unknown' shouldn't link to slave_health
This is mentored and shows up in bugsahoy, so adding the suitable whiteboard value.
Whiteboard: [good first bug]
Kristján has opened a PR for this:
https://github.com/mozilla/treeherder-ui/pull/239
Assignee: nobody → koddsson
Status: NEW → ASSIGNED
Attached file treeherder-ui-PR#239
Adding Kristján's PR as a text attachment also, and flagging William or Mauro for review, whoever gets to it first :)
Attachment #8510828 - Flags: review?(wlachance)
Attachment #8510828 - Flags: review?(mdoglio)
Commit pushed to master at https://github.com/mozilla/treeherder-ui

https://github.com/mozilla/treeherder-ui/commit/692ff05aaaa4c20c5fa6acb69b3fa32fa1abbe84
[Fix bug 1053762] Ng-switch on machine name.

Produces a <p/> element with machine name if machine name is unknown but
a normal link if the machine name is anything else.

Fixes bug 1053762.
Comment on attachment 8510828 [details] [review]
treeherder-ui-PR#239

This looked good except for a minor indentation issue which I fixed before pushing.
Attachment #8510828 - Flags: review?(wlachance)
Attachment #8510828 - Flags: review?(mdoglio)
Attachment #8510828 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/1bd5f3f0dd888fca6b403f39f79de34ac9b9eab4
[Fix bug 1053762] Ng-switch on machine name.

Produces a <p/> element with machine name if machine name is unknown but
a normal link if the machine name is anything else.

Fixes bug 1053762.
You need to log in before you can comment on or make changes to this bug.