Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show logs panel if task never running #1503

Merged
merged 6 commits into from Apr 28, 2017
Merged

Conversation

@PtrTeixeira
Copy link
Contributor

PtrTeixeira commented Apr 12, 2017

If a task is currently stopped and never reached the RUNNING state,
don't show the "Logs" section, or include a link to
"tail_of_finished_service.log".

PtrTeixeira added 2 commits Apr 11, 2017
If a task is currently stopped and never reached the RUNNING state,
don't show the "Logs" section, or include a link to
"tail_of_finished_service.log".
Instead of showing a red label with "Task lost" when a task failed to
start (eg, due to it attempting to accept an invalid offer), show a blue
(info) label with the label "Task aborted."

const labelText = (status, currentState, cleanupType) => {
if (status === TaskStatus.NEVER_RAN) {
return 'Task aborted';

This comment has been minimized.

Copy link
@ssalinas

ssalinas Apr 13, 2017

Member

👍 for this, I think this will make things a lot clearer for users

@ssalinas
Copy link
Member

ssalinas commented Apr 13, 2017

Good to go ahead and test in staging whenever you like @PtrTeixeira

PtrTeixeira added 2 commits Apr 14, 2017
If the directory is linked directory is empty - either there never was
anything there or whatever was there has now been cleaned up - don't
show a link to the latest log on the task detail page.
Was previously checking the `length` property to determine if a given
array had contents. This didn't work because in cases where the
directory had been cleaned up, the query to get that field would respond
with an error code, which resulted in `files` being `null` or
`undefined`, rather than the empty array.
@PtrTeixeira PtrTeixeira added the hs_qa label Apr 19, 2017
@ssalinas ssalinas modified the milestone: 0.15.0 Apr 19, 2017
PtrTeixeira added 2 commits Apr 19, 2017
In some cases the whole object can be null, not just a field of it. This
checks that the object is present before accessing its fields, which
should hopefully prevent more exceptions from being thrown due to state
oddities.
React requires that a component evaluate to either null, a dom element,
or a react component when it renders. The `TaskLatestLog` component was
rendering as `false`, rather than `null`, in cases when files were not
loaded - in particular, when following links directly into a directory
rather than the task page itself.
@ssalinas ssalinas merged commit 389be84 into master Apr 28, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ssalinas ssalinas deleted the dont-link-nonexistent-logs branch Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.