Difference between revisions of "Widget:ServerStatus"

From DDO Compendium
m (trying to figure out what's wrong with the SS widget)
m (update link for loading circle)
 
(7 intermediate revisions by the same user not shown)
Line 39: Line 39:
         <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 44: Line 45:
<hr>
<hr>
<script type="text/javascript">
<script type="text/javascript">
     $('.loading').html('<img src="https://ddocompendium.com/images/b/b8/Loading_Circle.gif" />');
     $('.loading').html('<img src="https://ddo-compendium-files.s3.amazonaws.com/b/b8/Loading_Circle.gif" />');
     $.getJSON( "https://ddocrafting.info/discord/", function ( status ) {
     $.getJSON( "https://3ei7kn7eti.execute-api.us-east-2.amazonaws.com", function ( status ) {
         if (status.argonnessen == 1) {
         if (status.argonnessen == 1) {
             $("#argo-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />');
         } else {
         } else {
             $("#argo-status").empty().html('<img src="https://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#argo-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.cannith == 1) {
         if (status.cannith == 1) {
             $("#cannith-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#cannith-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />');
         } else {
         } else {
             $("#cannith-status").empty().html('<img src="https://ddocompendium.com/images/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.khyber == 1) {
         if (status.khyber == 1) {
             $("#khyber-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#khyber-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.ghallanda == 1) {
         if (status.ghallanda == 1) {
             $("#ghallanda-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#ghallanda-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.orien == 1) {
         if (status.orien == 1) {
             $("#orien-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#orien-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.sarlona == 1) {
         if (status.sarlona == 1) {
             $("#sarlona-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#sarlona-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.thelanis == 1) {
         if (status.thelanis == 1) {
             $("#thelanis-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#thelanis-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.wayfinder == 1) {
         if (status.wayfinder == 1) {
             $("#wayfinder-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/5/5f/Red_X.png" />');
             $("#wayfinder-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
        }
        if (status.hardcore== 1) {
            $("#hardcore-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/9/93/Green_Check.png" />');
        } else {
            $("#hardcore-status").empty().html('<img src="https://ddo-compendium-files.s3.amazonaws.com/5/5f/Red_X.png" />');
         }
         }
         if (status.lamannia == 1) {
         if (status.lamannia == 1) {
             $("#lam-status").empty().html('<img src="https://ddocompendium.com/images/9/93/Green_Check.png" />');
             $("#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://ddocompendium.com/images/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>

Latest revision as of 04:11, 27 February 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}}