Skip to content

Filter for pipeline history view#2391

Merged
zabil merged 19 commits intogocd:masterfrom
Mdevlin4:dev/madevl/labelfilter
Sep 6, 2016
Merged

Filter for pipeline history view#2391
zabil merged 19 commits intogocd:masterfrom
Mdevlin4:dev/madevl/labelfilter

Conversation

@Mdevlin4
Copy link
Contributor

@Mdevlin4 Mdevlin4 commented Jul 5, 2016

Added an input box to the pipeline history view to filter pipelines by their label, comment, build cause, or revision.

@Mdevlin4 Mdevlin4 changed the title Dev/madevl/labelfilter Filter for pipeline history view Jul 6, 2016
@zabil zabil self-assigned this Jul 7, 2016
@zabil
Copy link
Contributor

zabil commented Jul 7, 2016

@Mdevlin4 thanks for putting this together!

To make the search box look and behave like how it is on the dashboard page we think it should look like this

By default
screen shot 2016-07-07 at 6 02 43 pm

With a filter (notice the x button to cancel)

screen shot 2016-07-07 at 6 02 43 pm withfilter

Tell us if you need help in getting it look like that.

Mdevlin4 added 2 commits July 7, 2016 11:42
Removed search buttons and changed the filter to apply when the user types into the input box
…/madevl/labelfilter

# Conflicts:
#	server/webapp/WEB-INF/rails.new/app/assets/javascripts/pipeline_history_search.js
#	server/webapp/WEB-INF/rails.new/app/assets/stylesheets/css/pipeline-history.scss
#	server/webapp/WEB-INF/vm/pipeline/pipeline_history.vm
@Mdevlin4
Copy link
Contributor Author

Mdevlin4 commented Jul 7, 2016

Thanks for the feedback! I made those changes to make it look and function more like the search box on the dashboard page.

Here is the default look:
image

And the 'x' button to remove the filter:
image

Thanks again for the suggestions!

PipelinePauseInfo pauseInfo = pipelinePauseService.pipelinePauseInfo(pipelineName);
boolean hasBuildCauseInBuffer = pipelineScheduleQueue.hasBuildCause(CaseInsensitiveString.str(pipelineConfig.name()));
PipelineInstanceModels pipelineHistory = pipelineHistoryService.load(pipelineName, pagination, username, true);
PipelineInstanceModels pipelineHistory = (labelFilter == null || labelFilter.trim().isEmpty()) ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, missed this earlier.
We have a utility method https://github.com/gocd/gocd/blob/master/base/src/com/thoughtworks/go/util/StringUtil.java#L161 for checking blank strings can you use that here?

@Mdevlin4
Copy link
Contributor Author

Thanks for the tip about the utility methods, I switched it to use the StringUtil class for the blank string check.

@zabil zabil added this to the Release 16.8 milestone Jul 14, 2016
@zabil zabil modified the milestones: Release 16.9, Release 16.8 Aug 11, 2016
@zabil zabil modified the milestones: Release 16.10, Release 16.9 Aug 31, 2016
@zabil zabil merged commit cc69476 into gocd:master Sep 6, 2016
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.

2 participants