We pass runningJobsCount to repos-list-tabs component, which essentially
is a binding and a binding will call the property that we're passing,
which in turn will fetch running and queued jobs. In order to avoid
this, I added guards in computed properties.
The `activate` hook is not always called when the route is used,
specifically it will not be called when the model changes, but the
change happened within the same route (for example when switching from
/travis-ci/travis-web to /travis-ci/travis-core). `beforeModel` is
guaranteed to be called every time the model is changed, both when the
route is entered for the first time and on any subsequent calls.
Note: There is a [known issue](https://github.com/mixonic/ember-cli-deprecation-workflow/issues/30) with a deprecation warning coming from
...wait for it... ember-cli-deprecation-workflow.
Otherwise, this simply bumps the necessary dependencies (suggested by
the new generators) and makes the project conform to the minimal changes
in import syntax.
An [issue](https://github.com/travis-ci/travis-ci/issues/5181) was reported in
which the repository sidebar links were not functioning properly. I've
tracked it down to the fact that a click handler was registered and
automatically performing a redirect to the repo route.
This breaks CMD+Click behavior (as the click handler was still
called and navigating when the user did not expect it, as well as
navigated to a link that the user did not intend to visit.
This commit simply removes that click handler. I checked the previous
coffee version of the file to gain more context on why it was initially
added, but unfortunately, it was simply added when the original
component was created, so I'm not sure what its use was.
When a user restarts a job, we should not try fetching the log again. In
order to do this I added a guard in job-log component, which checks if
attributes changed in didReceiveAttrs callback. If the old job value is
the same as the new value, we don't need to do anything.
The use of `resource` within the router is deprecated as of 2.0.0.
See notice [here](https://github.com/emberjs/ember.js/pull/11517).
This uses ember-watson to do the manual conversion, with small
aesthetic tweaks.
Sample of using the `time` element instead of `abbr` for displaying timestamps.
The `time` element can also represent durations. So the sample used here is suboptimal. Rather than the duration time lising the `lastBuildStartedAt` time in the `datetime` attribute, it ought to be a [valid `duration` value](https://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-duration-string). However, I didn't see any existing helpers for formatting according to a machine-readable duration value.
The previous initializer API was deprecated in Ember 2.1 (See
http://emberjs.com/deprecations/v2.x/), so this updates the initializer
signatures to accomodate that change.
Also, remove the registered deprecation from the workflow.
When a job is not started, we will show a message that the log can't be
shown. If a pusher message with a state change comes after the first log
pusher message, travis-web-log will error out, because in such a
situation a DOM element wouldn't be available. To make it always work,
this commit changes the behaviour to just hide #log element with CSS
instead of using {{#if}}.