Closed
Bug 1168453
Opened 10 years ago
Closed 10 years ago
Switch Perfherder project dropdowns to default to mozilla-inbound
Categories
(Tree Management :: Perfherder, defect, P3)
Tree Management
Perfherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jfrench, Assigned: tushar1995)
References
()
Details
(Keywords: ateam-summer-of-contribution)
User Story
Thank you for helping out with Treeherder! You can find us on IRC at irc://irc.mozilla.org/treeherder Here's some links to help get you started. Project page: https://wiki.mozilla.org/Auto-tools/Projects/Treeherder https://wiki.mozilla.org/Auto-tools/Projects/Perfherder Interacting with us, repo locations and links to set up a development version of the software: https://wiki.mozilla.org/Auto-tools/Projects/Treeherder#Contributing https://wiki.mozilla.org/Auto-tools/Projects/Treeherder#Source_and_Docs A-Team general reference, coding style guides: https://ateam-bootcamp.readthedocs.org
Since Treeherder defaults to mozilla-inbound, it might also make sense for:
o Perfherder > Graphs > Add test data > Project (dropdown)
o Perfherder > Compare > Project (dropdown)
..to default to mozilla-inbound also.
Currently they default to mozilla-central.
| Assignee | ||
Comment 2•10 years ago
|
||
I'd like to give this bug a shot!
| Reporter | ||
Comment 3•10 years ago
|
||
Done, thanks Tushar! Feel free to find us in channel if needed.
Assignee: nobody → tushar1995
Status: NEW → ASSIGNED
User Story: (updated)
| Reporter | ||
Comment 4•10 years ago
|
||
@theterabyte, I believe the lines which present the dropdowns are:
Perfherder > Graphs > Add test data > Project (dropdown)
https://github.com/mozilla/treeherder/blob/master/ui/partials/perf/testdatachooser.html#L7
Perfherder > Compare > Project (dropdowns)
https://github.com/mozilla/treeherder/blob/master/ui/partials/perf/comparechooserctrl.html#L8 (and L22)
And I think there are some articles on ng-options and its use on Angulars' own documentation https://docs.angularjs.org/api/ng/directive/ngOptions or via a yahoo/google search for "angular ng-options" and/or how to manipulate and present a default value.
| Reporter | ||
Comment 5•10 years ago
|
||
| Assignee | ||
Comment 6•10 years ago
|
||
I've managed to set the default to 'mozilla-inbound' however, in order to achieve this I had to change the JS code (a SO thread suggested ng-init but the AngularJS documentation warned against that). Should I submit a PR? Or would someone be able to point me in a direction that doesn't involve tweaking the JS code? (I only changed one line in two separate JS files so I don't think it has affected any functionality.)
Comment 7•10 years ago
|
||
(In reply to Tushar Bhargava [: theterabyte] from comment #6)
> I've managed to set the default to 'mozilla-inbound' however, in order to
> achieve this I had to change the JS code (a SO thread suggested ng-init but
> the AngularJS documentation warned against that). Should I submit a PR? Or
> would someone be able to point me in a direction that doesn't involve
> tweaking the JS code? (I only changed one line in two separate JS files so I
> don't think it has affected any functionality.)
Hmm, maybe we should do it in JS code then? Sometimes I am wrong about these things. :) Could you post your PR, and also a reference to stackoverflow and the angular docs? I'll probably be in a better position to give you advice with all of that in front of me.
| Assignee | ||
Comment 8•10 years ago
|
||
The PR: https://github.com/mozilla/treeherder/pull/623
SO: http://stackoverflow.com/questions/18194255/how-to-have-a-default-option-in-select-box-angular-js
AngularJS documentation (warning against use of ng-init and recommending controllers for default value setting): https://docs.angularjs.org/api/ng/directive/ngInit
Comment 9•10 years ago
|
||
(In reply to Tushar Bhargava [: theterabyte] from comment #8)
> The PR: https://github.com/mozilla/treeherder/pull/623
>
> SO:
> http://stackoverflow.com/questions/18194255/how-to-have-a-default-option-in-
> select-box-angular-js
>
> AngularJS documentation (warning against use of ng-init and recommending
> controllers for default value setting):
> https://docs.angularjs.org/api/ng/directive/ngInit
Ok cool, yes, it sounds like js is the way to go, however I think the implementation should be a little different. See the PR for comments. In the future, could you request review or feedback when you post a PR (asking for feedback or f? is good if you're just doing a proof of concept)? That way it will show up in my review queue so I won't miss it.
| Reporter | ||
Comment 10•10 years ago
|
||
I noticed related behavior in general, with our current Compare on production. If you are on a Compare result with a non-default repo (eg. b2g-inbound), and hit 'back' in the browser you end up back on mozilla-central with no revisions in the fields. ie. an empty default Compare page.
I'm not sure what the desired UX is, either preserving the revisions, the repo selections, or both.
Perhaps outside the scope of this bug, but let me know if you'd like me to enter it separately.
Comment 11•10 years ago
|
||
(In reply to Jonathan French (:jfrench) from comment #10)
> I noticed related behavior in general, with our current Compare on
> production. If you are on a Compare result with a non-default repo (eg.
> b2g-inbound), and hit 'back' in the browser you end up back on
> mozilla-central with no revisions in the fields. ie. an empty default
> Compare page.
>
> I'm not sure what the desired UX is, either preserving the revisions, the
> repo selections, or both.
>
> Perhaps outside the scope of this bug, but let me know if you'd like me to
> enter it separately.
Yes, it would be preferable if we preserved the form state when using the back button. Out of scope here though. Please file a new bug. :)
Comment 12•10 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/414e9dfe207933eeb320d559745df02931c136be
Bug 1168453 - Switch default branches for perfherder
* Graphs: Defaults to m-i
* Compare: Defaults to m-i for base, try for new
Comment 13•10 years ago
|
||
Fixed things up on github and pushed:
https://github.com/mozilla/treeherder/commit/414e9dfe207933eeb320d559745df02931c136be
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•