Difference between revisions of "Widget:ServerStatus"
From DDO Compendium
MNDeveloper (talk | contribs) |
|||
(21 intermediate revisions by 2 users not shown) | |||
Line 29: | Line 29: | ||
</style> | </style> | ||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | ||
<div class=" | <div class="text-center"> | ||
<div class="row ss-widget-text-center"> | <div class="row ss-widget-text-center"> | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Argonnessen<br><span id="argo-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Argonnessen<br><span id="argo-status" class="loading"></span></div> | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Cannith<br><span id="cannith-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Cannith<br><span id="cannith-status" class="loading"></span></div> | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Cormyr<br><span id="cormyr-status" class="loading"></span></div> | |||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Khyber<br><span id="khyber-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Khyber<br><span id="khyber-status" class="loading"></span></div> | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Ghallanda<br><span id="ghallanda-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Ghallanda<br><span id="ghallanda-status" class="loading"></span></div> | ||
Line 42: | Line 40: | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Thelanis<br><span id="thelanis-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Thelanis<br><span id="thelanis-status" class="loading"></span></div> | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Wayfinder<br><span id="wayfinder-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Wayfinder<br><span id="wayfinder-status" class="loading"></span></div> | ||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Hardcore<br><span id="hardcore-status" class="loading"></span></div> | |||
<div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Lamannia<br><span id="lam-status" class="loading"></span></div> | <div class="col-lg-1 col-md-2 col-sm-3 col-xs-4">Lamannia<br><span id="lam-status" class="loading"></span></div> | ||
</div> | </div> | ||
Line 47: | Line 46: | ||
<hr> | <hr> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$('.loading').html('<img src="https:// | $('.loading').html('<img src="https://ddo-compendium-files.s3.amazonaws.com/b/b8/Loading_Circle.gif" />'); | ||
$.getJSON( "https:// | $.getJSON( "https://3ei7kn7eti.execute-api.us-east-2.amazonaws.com", function ( status ) { | ||
if (status.argonnessen) { | if (status.argonnessen == 1) { | ||
$("#argo-status").empty().html('<img src="https:// | $("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | |||
$("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | |||
} | |||
if (status.cannith == 1) { | |||
$("#cannith-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | |||
} else { | |||
$("#cannith-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | |||
} | |||
if (status.cormyr == 1) { | |||
$("#cormyr-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | |||
} else { | } else { | ||
$("# | $("#cormyr-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.khyber == 1) { | ||
$("# | $("#khyber-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#khyber-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.ghallanda == 1) { | ||
$("# | $("#ghallanda-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#ghallanda-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.orien == 1) { | ||
$("# | $("#orien-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#orien-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.sarlona == 1) { | ||
$("# | $("#sarlona-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#sarlona-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.thelanis == 1) { | ||
$("# | $("#thelanis-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#thelanis-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.wayfinder == 1) { | ||
$("# | $("#wayfinder-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#wayfinder-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status. | if (status.hardcore== 1) { | ||
$("# | $("#hardcore-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("# | $("#hardcore-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
if (status.lamannia) { | if (status.lamannia == 1) { | ||
$("#lam-status").empty().html('<img src="https:// | $("#lam-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />'); | ||
} else { | } else { | ||
$("#lam-status").empty().html('<img src="https:// | $("#lam-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />'); | ||
} | } | ||
}); | }).fail(function() { | ||
$("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#cannith-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#cormyr-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#khyber-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#ghallanda-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#orien-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#sarlona-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#thelanis-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#wayfinder-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#hardcore-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
$("#lam-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/f/fd/RedExclamation.png" />'); | |||
}); | |||
</script> | </script> | ||
</includeonly> | </includeonly> |
Latest revision as of 00:06, 23 October 2024
About[edit]
This widget will display the server statuses for Dungeons and Dragons Online.
How to Use[edit]
Add the following code snippet on a page you wish to use it on. The endpoint that this widget uses is rate limited, so please use it sparingly.
{{#widget:ServerStatus}}