Closed Bug 1142579 Opened 10 years ago Closed 5 years ago

Don't try to show multiple log viewer icons for a job

Categories

(Tree Management :: Treeherder: Frontend, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: sabina.barbhuiya)

References

Details

(Keywords: outreachy)

Attachments

(1 file, 1 obsolete file)

A job can have multiple log URLs associated with it. Now it makes sense to display a "view raw log" icon for each, however the log viewer doesn't use the log URL and instead uses the text_log_summary artefact. The tl;dr is that the log viewer block here: https://github.com/mozilla/treeherder-ui/blob/79fb7a67901ba262ab9c12dd02e1b4dbccced89d/webapp/app/plugins/pluginpanel.html#L18 ...should not be in a |job_log_url in job_log_urls| and instead see if we have a 'text_log_summary' artefact. Along similar lines, the logic here is also flawed: https://github.com/mozilla/treeherder-ui/blob/b9a4d69dc529e119600e559827a9c90533c67ce0/webapp/app/js/controllers/jobs.js#L131 Notably: > data.artifacts.forEach(function(artifact) { > if (artifact.name === "text_log_summary") { > window.open(thUrl.getLogViewerUrl(artifact.id)); > } > }); Whilst that looks great in principal - "artifact.id" is really "job_id" and it's going to be the same for each artefact - so getLogViewerUrl() is going to open multiple duplicate tabs, when it should just open one.
See Also: → 1113264
Component: Treeherder → Treeherder: Frontend
Keywords: outreachy
Flags: needinfo?(sclements)
Flags: needinfo?(cdawson)

Hi, I am an outreachy applicant, I would like to work on this task.

Hi Albiona, I think this one has already been claimed. Sabina were you wanting this bug assigned to you?

Flags: needinfo?(sclements)
Flags: needinfo?(sabina.barbhuiya)
Flags: needinfo?(cdawson)

Yes :)

Flags: needinfo?(sabina.barbhuiya)
Assignee: nobody → sabina.barbhuiya
Status: NEW → ASSIGNED

Please see the "see also" and "duplicate" bug 1113264 for more info on this.

Just saw the duplicate bug with your comments in it. Very useful!

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Attachment #9099694 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: