# Dynamic color changing text box based on Pipeline Build Status

**URL:** <https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443>\
**Category:** Kibana\
**Created:** [November 5, 2020, 5:41pm UTC](https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443 "2020-11-05T17:41:01Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [November 18, 2020, 1:56pm UTC](https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443/22 "2020-11-18T13:56:33Z")

</div>

How many results would there be for 10 days for each environment? For example use DEV. How many results would be in the last 10 days that would need to be displayed?

I am thinking just a saved search table but it depends on how many results.

---

<div class="post-metadata">

**Author:** ![preeti1211](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@preeti1211](https://discuss.elastic.co/u/preeti1211)\
**Post date:** [November 18, 2020, 2:56pm UTC](https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443/23 "2020-11-18T14:56:29Z")

</div>

```auto
That count will vary.

Can you do it for last 10 builds for each environment.
Last 10 builds for each environment with the cell color to be green and red depending on the status of a build, something like in a heatmap.

I have prepared one scripted field "result_integer" for converting result/status into an integer value depending on which we can change the cell color.
Below is the code for scripted field
<
if (!doc['result.keyword'].empty) { 
    return doc['result.keyword'].value == "succeeded" ? 1 : 0;    
}   
return null; 
>

```

---

<div class="post-metadata">

**Author:** ![preeti1211](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@preeti1211](https://discuss.elastic.co/u/preeti1211)\
**Post date:** [November 22, 2020, 12:20pm UTC](https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443/24 "2020-11-22T12:20:20Z")

</div>

We have changed the approach, now we are fetching last 10 build data and preparing different heatmaps for each environment.  
That way, we achieved our usecase in a different manner.

Thanks  
Preeti

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 20, 2020, 12:20pm UTC](https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443/25 "2020-12-20T12:20:24Z")

</div>

Closed on December 20, 2020, 12:20pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

[Previous page](https://discuss.elastic.co/t/dynamic-color-changing-text-box-based-on-pipeline-build-status/254443.md?page=1)
