'
);
if (
i_value.impact === "none" &&
i_value.status === "investigating"
) {
i_value.components.forEach((component, index) => {
$(".components-affected-wrapper").append(
"
" + component.name + ""
);
});
}
$.each(
i_value.incident_updates,
function (iu_index, iu_value) {
if (iu_value.affected_components !== null) {
$.each(
iu_value.affected_components,
function (ac_index, ac_value) {
if (
ac_value.new_status != "operational" &&
!componentsArray.includes(ac_value.name)
) {
if (ac_value.new_status == "major_outage") {
affected_class = "red-dot-own";
} else if (
ac_value.new_status == "partial_outage" ||
ac_value.new_status == "degraded_performance"
) {
affected_class = "orange-dot-own";
} else if (
ac_value.new_status == "under_maintenance"
) {
affected_class = "yellow-dot-own";
} else {
affected_class = "green-dot-own";
}
comp_name = ac_value.name.substring(
ac_value.name.indexOf("-") + 1
);
$(".components-affected-wrapper").append(
'
' +
comp_name +
""
);
componentsArray.push(ac_value.name);
affected_component = ac_value.name;
foundIndex_sms =
e_services_with_group1a.indexOf(
affected_component
);
foundIndex_mms =
e_services_with_group1b.indexOf(
affected_component
);
foundIndex_voice =
e_services_with_group1c.indexOf(
affected_component
);
if (
foundIndex_sms != -1 &&
!componentsArray.includes("SMS")
) {
$(".components-affected-wrapper").append(
'
SMS'
);
componentsArray.push("SMS");
} else if (
foundIndex_mms != -1 &&
!componentsArray.includes("MMS")
) {
$(".components-affected-wrapper").append(
'
MMS'
);
componentsArray.push("MMS");
} else if (
foundIndex_voice != -1 &&
!componentsArray.includes("PSTN")
) {
$(".components-affected-wrapper").append(
'
PSTN'
);
componentsArray.push("PSTN");
}
}
}
);
}
}
);
}
});
}
);
}
setTimeout(function () {
$(".loader-wrapper").fadeOut();
}, 500);
$(".main-page").hide();
$("#above_footer").hide();
} else {
summaryData.scheduled_maintenances = $.grep(
summaryData.scheduled_maintenances,
function (sm_value, sm_index) {
if (sm_value.status == "in_progress") {
summaryData.incidents.push(sm_value);
return false;
}
return true;
}
);
// for incidents
$.each(summaryData.incidents, function (index, value) {
if (value.impact == "critical") {
incident_header_bg_class = "bg-red";
} else if (value.impact == "major" || value.impact == "minor") {
incident_header_bg_class = "bg-orange";
} else if (value.impact == "maintenance") {
incident_header_bg_class = "bg-blue";
} else {
incident_header_bg_class = "bg-green";
}
incidentHtml =
'
';
if (value.impact == "none" && value.status == "investigating") {
var message_body = get_incident_message(
value,
value.incident_updates[0].body
);
incidentHtml =
'
' +
'
' +
'
' +
message_body +
" " +
get_time_tz(value.updated_at, "PST") +
" PST
";
$("#green_alerted_container").append(incidentHtml);
} else if (value.impact == "critical") {
$("#red_incident_container").append(incidentHtml);
} else if (value.impact == "major") {
$("#major_incident_container").append(incidentHtml);
} else if (value.impact == "maintenance") {
$("#maintenance_incident").append(incidentHtml);
} else {
$("#orange_incident_container").append(incidentHtml);
}
$.each(value.incident_updates, function (iu_index, iu_value) {
var iu_status = iu_value.status.replace(/_/g, " ");
incidentUpdate =
'
\
\
' +
iu_status +
" \
- " +
iu_value.body +
' \
\
\
Posted: ' +
get_time_tz(iu_value.display_at, "PST") +
" PST \
\
";
$("#" + iu_value.incident_id).append(incidentUpdate);
});
if (
value.incident_updates[0] &&
value.incident_updates[0].affected_components
) {
$.each(
value.incident_updates[0].affected_components,
function (iuac_index, iuac_value) {
var affected_service = iuac_value.name.substring(
iuac_value.name.indexOf("-") + 1
);
incidentUpdate_ac =
'
' +
affected_service +
"
";
$("#services_" + value.id).append(incidentUpdate_ac);
}
);
}
});
var containers = [
"#major_incident_container",
"#red_incident_container",
"#orange_incident_container",
"#maintenance_incident",
"#green_alerted_container",
];
var children = $(containers.join(",")).map(function () {
return $(this).children().length;
});
var totalNumChildren = children.get().reduce(function (total, count) {
return total + count;
},0);
if (totalNumChildren === 0) {
$("#component_top_hr").hide();
} else {
$("#above_footer").hide();
}
//for components
$.each(
summaryData.components,
function (componentsIndex, componentsValue) {
if (
componentsValue.group == true ||
(componentsValue.group == false &&
componentsValue.group_id == null)
) {
if (componentsValue.status == "major_outage") {
dot_class = "red-dot-own";
} else if (
componentsValue.status == "partial_outage" ||
componentsValue.status == "degraded_performance"
) {
dot_class = "orange-dot-own";
} else if (componentsValue.status == "under_maintenance") {
dot_class = "blue-dot-own";
} else {
dot_class = "green-dot-own";
}
if (
componentsValue.name == external_services_group1 ||
componentsValue.name == external_services_group2
) {
componentHtml =
'
' +
componentsValue.name +
"
";
$("#external_components").append(componentHtml);
if (componentsValue.components) {
componentUl =
'
';
$("#external_components li:last-child").append(componentUl);
}
} else if(componentsValue.name == zipwhip_group1 || componentsValue.name == zipwhip_group2) {
componentHtml =
'
' +
componentsValue.name +
"
";
$("#zipwhip_components").append(componentHtml);
if (componentsValue.components) {
componentUl =
'
';
$("#zipwhip_components li:last-child").append(componentUl);
}
}
else {
componentHtml =
'
' +
componentsValue.name +
"
";
$("#twilio_components").append(componentHtml);
if (componentsValue.components) {
componentUl =
'
';
$("#twilio_components li:last-child").append(componentUl);
}
}
}
}
);
$.each(
summaryData.components,
function (componentsIndex, componentsValue) {
if (componentsValue.group == false) {
if (componentsValue.status == "operational") {
if (make_hollow_green_sms && componentsValue.name == "SMS") {
dot_class = "green-outline-dot-own";
} else if (
make_hollow_green_mms &&
componentsValue.name == "MMS"
) {
dot_class = "green-outline-dot-own";
} else if (
make_hollow_green_voice &&
componentsValue.name == "PSTN"
) {
dot_class = "green-outline-dot-own";
} else {
dot_class = "green-dot-own";
}
} else if (
componentsValue.status == "partial_outage" ||
componentsValue.status == "degraded_performance"
) {
dot_class = "orange-dot-own";
} else if (componentsValue.status == "under_maintenance") {
dot_class = "blue-dot-own";
} else {
dot_class = "red-dot-own";
}
componentHtml =
'
' +
componentsValue.name +
' ';
$("#" + componentsValue.group_id).append(componentHtml);
if (dot_class == "green-outline-dot-own") {
$("#" + componentsValue.id).append(
'

May be impacted by a connectivity issue'
);
}
}
}
);
$("ul.status-list").each(function () {
$(this).children("li:not(:first-child)").hide("slow");
if ($(this).children().length > 1) {
$(this).append(
'
Show more'
);
}
});
$(".show-more").on("click", function () {
if ($(this).text() == "Show more") {
$(this).parent().children().show("slow");
} else {
$(this).parent().children("li:not(:first-child)").hide("slow");
}
$(this).text() === "Show more"
? $(this).text("Show less")
: $(this).text("Show more");
});
// Add toggled sections for regional Programmable Voice & Elastic SIP Trunking
$("div.outer-box-heading:contains('PROGRAMMABLE VOICE'), div.outer-box-heading:contains('ELASTIC SIP TRUNKING')").prepend('
');
$("div.outer-box-heading:contains('PROGRAMMABLE VOICE'), div.outer-box-heading:contains('ELASTIC SIP TRUNKING')").next("ul.inner-box-dot-wrapper").toggle();
$("div.outer-box-heading:contains('PROGRAMMABLE VOICE'), div.outer-box-heading:contains('ELASTIC SIP TRUNKING')").click(function(e){
$(this).next("ul.inner-box-dot-wrapper").toggle();
if($(this).find("span.group-parent-indicator").hasClass("fa-plus-square-o")) {
$(this).find("span.group-parent-indicator").removeClass("fa-plus-square-o");
$(this).find("span.group-parent-indicator").addClass("fa-minus-square-o");
} else {
$(this).find("span.group-parent-indicator").addClass("fa-plus-square-o");
$(this).find("span.group-parent-indicator").removeClass("fa-minus-square-o");
}
})
// -------------
if (summaryData.scheduled_maintenances.length == 0) {
$("#scheduled_maintenances_div").append(
"
No scheduled maintenance at this time.
"
);
}
// for scheduled maintenances
$.each(
summaryData.scheduled_maintenances,
function (sm_index, sm_value) {
scheduled_count++;
var maintenance_start = get_time_tz(sm_value.scheduled_for, "PST");
var maintenance_end = get_time_tz(sm_value.scheduled_until, "PST");
incidentHtml =
'
\
\
' +
sm_value.name +
'
\
' +
maintenance_start +
" - " +
maintenance_end +
'
\
\
\
' +
sm_value.incident_updates[0].body +
'
\
\
MAINTENANCE PERIOD
\
\
\
\
- US Pacific: ' +
get_time_tz(sm_value.scheduled_for, "PST") +
" - " +
get_time_tz(sm_value.scheduled_until, "PST") +
"
\
- US Central: " +
get_time_tz(sm_value.scheduled_for, "CST") +
" - " +
get_time_tz(sm_value.scheduled_until, "CST") +
"
\
- US Eastern: " +
get_time_tz(sm_value.scheduled_for, "ET") +
" - " +
get_time_tz(sm_value.scheduled_until, "ET") +
"
\
- UTC: " +
get_time_tz(sm_value.scheduled_for, "UTC") +
" - " +
get_time_tz(sm_value.scheduled_until, "UTC") +
'
\
\
\
\
' +
get_time_tz(sm_value.incident_updates[0].display_at, "PST") +
" PST
\
\
\
\
";
$("#scheduled_maintenances_div").append(incidentHtml);
}
);
setTimeout(function () {
$(".loader-wrapper").fadeOut();
$("[data-js-hook=show-updates-dropdown]").addClass("btn btn-blue");
}, 500);
$(".page-footer").hide();
}
});
});
Subscribe to UpdatesSubscribe
Get email notifications whenever Twilio creates, updates or resolves an incident.
Get text message notifications whenever Twilio creates or resolves an incident.
Get webhook notifications whenever Twilio creates an incident, updates an incident, resolves an incident or changes a component status.