@hrs2019 if you want purely CSS based approach you can try the following, where colorPalette map is used to assign Green or Red Color based on Connected or Disconnected
<format type="color" field="CLevel">
<colorPalette type="map">{"Disconnected":#DC4E41,"Connected":#53A051}</colorPalette>
</format>
and Glow animation is always shades of Grey (static).
@-webkit-keyframes glowing {
0% {opacity: 0.5; -webkit-box-shadow: 0 0 3px #F7F8FA;}
50% {opacity: 0.7; -webkit-box-shadow: 0 0 40px #E1E6EB;}
100% {opacity: 1; -webkit-box-shadow: 0 0 3px #F7F8FA;}
}
If you want both rendering and glow to be as per CLevel field value, you will have to use Simple XML JS Extension to apply appropriate classes to each cell and have glowing CSS override according to the class. You can refer to Splunk Dashboard Examples app or several answers on Splunk Answers Table Cell rendering to see how you can access Table Cell value in JS and assign Class as per the table cell. For example: https://answers.splunk.com/answers/637615/why-is-the-table-cell-highlighting-not-reading-the.html
Following is the complete Simple XML Code:
<dashboard script="panel_tooltip.js" theme="dark">
<label>Table with Flashing Buttons</label>
<row>
<panel depends="$alwaysHideCSSOverride$">
<html>
<style>
#tableWithGlowingButtons table td:nth-child(3) {
border-radius: 10px;
border: none;
cursor: pointer;
display: inline-block;
font-family: Arial;
font-size: 12px;
margin: 5px;
padding: 5px 10px;
text-align: center;
text-decoration: none;
-webkit-animation: glowing 1500ms infinite;
}
@-webkit-keyframes glowing {
0% {opacity: 0.5; -webkit-box-shadow: 0 0 3px #F7F8FA;}
50% {opacity: 0.7; -webkit-box-shadow: 0 0 40px #E1E6EB;}
100% {opacity: 1; -webkit-box-shadow: 0 0 3px #F7F8FA;}
}
</style>
</html>
</panel>
<panel>
<title>Status</title>
<table id="tableWithGlowingButtons">
<search>
<query>| makeresults
| eval ApName="CCP,SSD,FF,DDD,RT","Area CP Name"="test"
| makemv ApName delim=","
| mvexpand ApName
| eval CLevel=if(like(ApName,"%CCP%"), "Connected", "Disconnected")
| table ApName "Area CP Name" CLevel</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
<format type="color" field="CLevel">
<colorPalette type="map">{"Disconnected":#DC4E41,"Connected":#53A051}</colorPalette>
</format>
</table>
</panel>
</row>
</dashboard>
... View more