Sha256: 901ed47f45aa1c8eebac14002c961cbdb94a632fba8054d051113f6730d184be

Contents?: true

Size: 483 Bytes

Versions: 11

Compression:

Stored size: 483 Bytes

Contents

import 'whatwg-fetch'

export default () => {
  fetch('https://k4cdqxp909c5.statuspage.io/api/v2/status.json')
  .then((response) => response.json())
  .then((payload) => {
  	var color;
  	switch (payload.status.indicator) {
  		case 'major':
  			color = 'red';
  		case 'critical':
  			color = 'red';
  		case 'minor':
  			color = 'yellow';
  		default:
  			color = 'green';
  	}
    $('.Nxd-api-status').text(payload.status.description).addClass(`Vlt-badge--` + color)
  })
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.15 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.14 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.13 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.12 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.11 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.10 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.9 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.8 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.7 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js
station-0.5.6 lib/nexmo_developer/app/webpacker/javascript/api_status/index.js