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
Avoid colour indications on outdated channels #95
Avoid colour indications on outdated channels #95
Conversation
This removes the colour indicator from `Last updated` labels. For outdated channels this label is now always grey.
@@ -169,12 +169,15 @@ init() | |||
var m = moment.unix(update_times[channel]['update_time']); | |||
jobset['update_time_relative'] = m.fromNow() | |||
jobset['update_time_local'] = m.format() | |||
if (m > moment().subtract(3, 'days')) { | |||
// do not use color indications on outdated channels | |||
if (jobset['current']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this condition implements the change.
|
||
if (record['job_history'][record['job_history'].length - 1] == 0) { | ||
row.getElementsByClassName("status")[0].innerHTML += '<span class="label label-important">Build problem</span>'; | ||
status.innerHTML += '<span class="label label-important">Build problem</span>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are just mechanical changes to usage of variables instead of quariing the DOM for the same element multiple times.
- lines are now shorter
- quering the dom is relatively expesive operation so this is just a sort of micro optimization.
I hope the naming makes sense but please review it. In the end I'm not a native speaker and don't want to confuse others by my poor naming choices.
ping @grahamc this is ready for merge. Feel free to close PR if you no longer want to see this change. |
/cc @garbas who is re-working the homepage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late review. @turboMaCk thank you!
This removes the colour indicator from
Last updated
labels.For outdated channels this label is now always grey.
cc @grahamc This is the change we've talked about in DMs on Twitter few days ago.