SP Current Status Widget; How to display other services besides business services

Brandon estep1
Tera Contributor

The Current status widget only displays Business Services. We would like if we have a technical or application service with outage that they display too. I looked at the server script below but not sure how to change it to show all the services. Any help would be much appreciated. I think the line in yellow I need to change but what class do I use to get business / application/ tech services. 

 

// populate the 'data' object
// e.g., data.table = $sp.getValue('table');
var outage = new GlideRecord("cmdb_ci_outage");
outage.addQuery("cmdb_ci.sys_class_name", "IN", options.sys_class_list || "cmdb_ci_service");
outage.addQuery("begin", "<=", gs.nowNoTZ());
outage.addQuery("end", ">=", gs.nowNoTZ()).addOrCondition("end", "=", "NULL");
data.service = (input && input.service) || $sp.getParameter("service");
if (!GlideStringUtil.nil(data.service)) {
  outage.addQuery("cmdb_ci", data.service);
var serviceGR = new GlideRecord("cmdb_ci_service");
if (serviceGR.get(data.service))
data.serviceDisplay = serviceGR.getDisplayValue();
}
outage.query();
data.outages = [];
data.outageIDs = "";
while (outage.next()) {
var out = {};
out.typeDisplay = outage.type.getDisplayValue();
out.type = outage.getValue("type");
out.details = outage.getValue("details");
out.ci = outage.cmdb_ci.getDisplayValue();
out.serviceID = outage.getValue("cmdb_ci");
out.begin = outage.begin.getDisplayValue();
data.outages.push(out);
data.outageIDs += "," + outage.getUniqueValue();
}
5 REPLIES 5

Try changing the below line of code:

outage.addQuery("cmdb_ci.sys_class_nameIN" +options.sys_class_list +",cmdb_ci_service");


Raghav
MVP 2023