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

Add history trend items (fixes #362) #394

Merged
merged 11 commits into from
Jun 19, 2017
Merged

Conversation

ehborisov
Copy link
Contributor

@ehborisov ehborisov commented Jun 9, 2017

//: # (
. Thank you so much for sending us a pull request!
.
. Make sure you have a clear name for your pull request.
. The name should start with a capital letter and no dot is required in the end of the sentence.
. To link the request with isses use the following notation: (fixes #123, fixes #321)
.
. An example of good pull request names:
. - Add Russian translation (fixes #123)
. - Add an ability to disable default plugins
. - Support emoji in test descriptions
)

  • Sign Allure CLA
  • Provide additional data for history trend
  • Add links to graph
  • Provide unit tests

Copy link
Member

@baev baev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general

.filter(ExecutorInfo.class::isInstance)
.map(ExecutorInfo.class::cast)
.collect(Collectors.toList());
return executors.isEmpty() ? null : Collections.max(executors,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use sort together with findFirst instead and return Optional. Then use getExecutor().ifPresent(item::setExecutorInfo)

@baev
Copy link
Member

baev commented Jun 9, 2017

Also I would like to see some unit tests for that plugin

@baev baev changed the title [WIP] add history trend items (fixes #362) [WIP] Add history trend items (fixes #362) Jun 14, 2017
@baev
Copy link
Member

baev commented Jun 15, 2017

@sseliverstov this one is up to you

@baev baev force-pushed the 362-show-build-ids-on-trends branch from efcc86b to 0159344 Compare June 16, 2017 13:50
@sseliverstov sseliverstov changed the title [WIP] Add history trend items (fixes #362) Add history trend items (fixes #362) Jun 18, 2017
return this.options.items.map((item, i) => ({
...item,
id: item.buildOrder ? `build_${item.buildOrder}` : `item_${i}`,
name: item.buildOrder ? `#${item.buildOrder}` : `${this.options.items.length - i}(?)`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this (?) at the end mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If buildOrder is absent (for example in pervious format of historical data) we show index and mark it as (?)

id: item.buildOrder ? `build_${item.buildOrder}` : `item_${i}`,
name: item.buildOrder ? `#${item.buildOrder}` : `${this.options.items.length - i}(?)`,
total: item.statistic.total,
statistic: omit(item.statistic, 'total')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of omit you can do a native thing

const {total, ...statistic} = item.statistic;

@@ -31,50 +39,100 @@ class TrendChartView extends BaseChartView {
}

doShow(data) {
data = data.reverse();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.reverse() mutates original data. Would be safer to make a copy first

data = data.slice().reverse();

@baev baev merged commit 7606cb3 into master Jun 19, 2017
@baev baev deleted the 362-show-build-ids-on-trends branch June 19, 2017 13:42
@baev baev removed the review label Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support tab separated attachments
4 participants