treehouses / cli

cli 🦄 for raspberry pi images of type treehouses
https://www.npmjs.com/package/@treehouses/cli
GNU Affero General Public License v3.0
44 stars 20 forks source link

treehouses feedback breaks when ifconfig.io down #402

Closed dogi closed 5 years ago

dogi commented 5 years ago
peacebuilderR (<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->

<head>

<meta http-equiv="refresh" content="0">

<title>ifconfig.io | 521: Web server is down</title>

<meta charset="UTF-8" />

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />

<meta name="robots" content="noindex, nofollow" />

<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />

<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->

<style type="text/css">body{margin:0;padding:0}</style>

</head>

<body>

<div id="cf-wrapper">

<div id="cf-error-details" class="cf-error-details-wrapper">
<div class="cf-wrapper cf-error-overview">
<h1>

<span class="cf-error-type">Error</span>
<span class="cf-error-code">521</span>
<small class="heading-ray-id">Ray ID: 50a32f5ace3abd0d • 2019-08-22 07:38:03 UTC</small>
</h1>
<h2 class="cf-subheadline">Web server is down</h2>
</div><!-- /.error-overview -->

<div class="cf-section cf-highlight cf-status-display">
<div class="cf-wrapper">
<div class="cf-columns cols-3">

<div id="cf-browser-status" class="cf-column cf-status-item cf-browser-status ">
<div class="cf-icon-error-container">
<i class="cf-icon cf-icon-browser"></i>
<i class="cf-icon-status cf-icon-ok"></i>
</div>
<span class="cf-status-desc">You</span>
<h3 class="cf-status-name">Browser</h3>
<span class="cf-status-label">Working</span>
</div>

<div id="cf-cloudflare-status" class="cf-column cf-status-item cf-cloudflare-status ">
<div class="cf-icon-error-container">
<i class="cf-icon cf-icon-cloud"></i>
<i class="cf-icon-status cf-icon-ok"></i>
</div>
<span class="cf-status-desc">Philadelphia</span>
<h3 class="cf-status-name">Cloudflare</h3>
<span class="cf-status-label">Working</span>
</div>

<div id="cf-host-status" class="cf-column cf-status-item cf-host-status cf-error-source">
<div class="cf-icon-error-container">
<i class="cf-icon cf-icon-server"></i>
<i class="cf-icon-status cf-icon-error"></i>
</div>
<span class="cf-status-desc">ifconfig.io</span>
<h3 class="cf-status-name">Host</h3>
<span class="cf-status-label">Error</span>
</div>

            </div>

        </div>
    </div><!-- /.status-display -->

    <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
            <div class="cf-column">
                <h2>What happened?</h2>
                <p>The web server is not returning a connection. As a result, the web page is not displaying.</p>
            </div>

            <div class="cf-column">
                <h2>What can I do?</h2>
                      <h5>If you are a visitor of this website:</h5>
  <p>Please try again in a few minutes.</p>

  <h5>If you are the owner of this website:</h5>
  <p><span>Contact your hosting provider letting them know your web server is not responding.</span> <a href="https://support.cloudflare.com/hc/en-us/articles/200171916-Error-521">Additional troubleshooting information</a>.</p>
            </div>
        </div>

    </div><!-- /.section -->

    <div class="cf-error-footer cf-wrapper">
<p>
<span class="cf-footer-item">Cloudflare Ray ID: <strong>50a32f5ace3abd0d</strong></span>
<span class="cf-footer-separator">•</span>
<span class="cf-footer-item"><span>Your IP</span>: 204.9.220.36</span>
<span class="cf-footer-separator">•</span>
<span class="cf-footer-item"><span>Performance & security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>

</p>
</div><!-- /.error-footer -->

</div><!-- /#cf-error-details -->
</div><!-- /#cf-wrapper -->
</body>
</html>) | port: 22300 | network: default | rpi: RPI3B+ | cli: 1.5.16 | img: release-64 | 2019-08-22 07:38:03 UTC
dogi commented 5 years ago

maybe we should check if the output is an ipv4 or ipv6, and if not write a tinier message ...

dogi commented 5 years ago

https://github.com/treehouses/cli/blob/master/modules/feedback.sh#L14-L16