Difference between revisions of "Widget:ServerStatus"

From DDO Compendium
(Undo revision 228999 by MNDeveloper (talk))
Tags: Undo Reverted
(Added Cormyr)
Tag: Manual revert
Line 30: Line 30:
<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="text-center">
<div class="text-center">
<span id="statusresult"></span>
     <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 48: Line 48:
     $('.loading').html('<img src="https://ddo-compendium-files.s3.amazonaws.com/b/b8/Loading_Circle.gif" />');
     $('.loading').html('<img src="https://ddo-compendium-files.s3.amazonaws.com/b/b8/Loading_Circle.gif" />');
     $.getJSON( "https://3ei7kn7eti.execute-api.us-east-2.amazonaws.com", function ( status ) {
     $.getJSON( "https://3ei7kn7eti.execute-api.us-east-2.amazonaws.com", function ( status ) {
$("#argo-status").empty().html(status);
        if (status.message) {
              $("#statusresult").empty().html('<img alt="GreyQuestion.png" src="https://ddo-compendium-files.s3.amazonaws.com/4/42/GreyQuestion.png" decoding="async" width="16" height="16" data-file-width="16" data-file-height="16">');
      } else {
         if (status.argonnessen == 1) {
         if (status.argonnessen == 1) {
             $("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />');
             $("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />');
Line 61: Line 57:
         } else {
         } else {
             $("#cannith-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
             $("#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 {
            $("#cormyr-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.khyber == 1) {
         if (status.khyber == 1) {
Line 101: Line 102:
         } else {
         } else {
             $("#lam-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
             $("#lam-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
        }
         }
         }
     });
     });
</script>
</script>
</includeonly>
</includeonly>

Revision as of 23:52, 22 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}}