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

RaghavSh
Kilo Patron

I dont think you need to change anything in widget, the line you have highlighted is taking value from instance options :

find_real_file.png

 

to open instance options use ctrl+right-click on the widget


Raghav
MVP 2023

I added the options and tech and application still doesn't show up. Any other suggestions?

find_real_file.png

do you have an active outage related to CIs present in these tables, this is OOB code and should work.

The highlighted line in code should take all the classes as it is an IN operator.


Raghav
MVP 2023

Rocky5
Kilo Sage

Hello,

 

I am also looking for the same. Did you find solution for this one?

 

Thanks,

Rocky.