Name
sn_sow_itsm_common.SOWIncidentLandingPageTier2UtilitySNC
Description
No description available
Script
var SOWIncidentLandingPageTier2UtilitySNC = Class.create();
SOWIncidentLandingPageTier2UtilitySNC.prototype = {
initialize: function() {
this.CHART_COLORS = {
"incident": {
"state": {
'1': 'moderate',
'2': 'info',
'3': 'warning',
'6': 'positive',
'7': 'high',
'8': 'low'
}
},
"problem": {
"state": {
'101': 'info',
'102': 'info',
'106': 'positive',
'104': 'info',
'103': 'info'
}
},
"change_request": {
"state": {
'0': 'info',
'-1': 'info',
'-2': 'info',
'-3': 'info',
'-4': 'info',
'-5': 'info'
}
},
"task": {
"sys_class_name": {
'change_task': 'teal',
'incident_task': 'purple',
'problem_task': 'high',
'sc_task': 'green-yellow',
'incident': 'blue',
'problem': 'critical',
'change_request': 'info'
}
}
};
},
_getSLATimeLeftLabelValueForIncidentEvamCard: function(targetType, timeLeftDisplayValue, hasBreached, slaTimeLeftLabelValue) {
if (targetType == "resolution")
slaTimeLeftLabelValue["label"] = hasBreached == true ? gs.getMessage('Resolution SLA') : gs.getMessage('Resolve in');
else if (targetType == "response")
slaTimeLeftLabelValue["label"] = hasBreached == true ? gs.getMessage('Response SLA') : gs.getMessage('Respond in');
else
slaTimeLeftLabelValue["label"] = hasBreached == true ? gs.getMessage('SLA') : gs.getMessage('SLA time left');
slaTimeLeftLabelValue["value"] = hasBreached == true ? gs.getMessage('Breached') : timeLeftDisplayValue;
return slaTimeLeftLabelValue;
},
getSLATimeLeftLabelValueForEvamCard: function(table, targetType, timeLeftDisplayValue, hasBreached) {
var slaTimeLeftLabelValue = {
"label": "",
"value": ""
};
return this._getSLATimeLeftLabelValueForIncidentEvamCard(targetType, timeLeftDisplayValue, hasBreached, slaTimeLeftLabelValue);
},
type: 'SOWIncidentLandingPageTier2UtilitySNC'
};
Sys ID
3c10671153a30110ebccddeeff7b1241