change fyipe to oneuptime and fyipe.come to oneuptime.com for _test

This commit is contained in:
deityhub 2021-11-22 14:30:08 +01:00
parent c0dba21127
commit 8d4cd95b06
4 changed files with 48 additions and 40 deletions

View File

@ -9,7 +9,7 @@ const options = {
// constructor
const tracker = new fyipe.ErrorTracker(
'https://staging.fyipe.com/api',
'https://staging.oneuptime.com/api',
'605bad70ae110c0013e14005',
'cb4b107a-7f28-464d-9fda-32715fa4cd68',
options // Optional Field
@ -31,7 +31,7 @@ tracker.setTags([
]); // an array of tags
// capturing error exception authomatically
NonExistingMethodCall(); // this is authomatically captured and sent to your fyipe dashboard
NonExistingMethodCall(); // this is authomatically captured and sent to your oneuptime dashboard
// capturing error exception manually
try {

View File

@ -4,7 +4,7 @@ const Logger = fyipe.Logger;
// constructor
const logger = new Logger(
'https://staging.fyipe.com/api',
'https://staging.oneuptime.com/api',
'6053aae39b79460013b35102',
'4904db2d-968c-4656-b6c0-aac450c97ee2'
);

View File

@ -8,7 +8,7 @@ const axios = require('axios');
// set up performance tracker configuration
const options = {
apiUrl: 'https://staging.fyipe.com/api',
apiUrl: 'https://staging.oneuptime.com/api',
appId: '609975b682d0790014cba640',
appKey: '9a715493-f7d5-4b50-a229-7ae79a5d2336',
app, // express app instance (optional field)

View File

@ -1,8 +1,8 @@
<div class='bubble-box'>
<div id="fyipe-status-bubble"></div>
<div id='fyipe-bubble-text'></div>
</div>
<style>
<div class="bubble-box">
<div id="oneuptime-status-bubble"></div>
<div id="oneuptime-bubble-text"></div>
</div>
<style>
.all {
width: 20px;
height: 20px;
@ -16,7 +16,7 @@
border-radius: 50%;
margin-right: 5px;
background-color: rgba(250, 109, 70);
},
}
.none {
width: 20px;
height: 20px;
@ -37,40 +37,48 @@
padding-top: 4px;
}
.bubble-box {
display:flex;
display: flex;
flex-direction: row;
}
</style>
<script language="javascript" type="text/javascript">
function initializeBubble() {
var placeholderDiv = document.getElementById("fyipe-status-bubble");
var placeholderTitleDiv = document.getElementById("fyipe-bubble-text");
var bubble = 'all';
var statusMessage = '';
var url = 'https://staging.fyipe.com/api/statusPage/statusBubble?statusPageId=5ffa98e25f166c0014d9c045&statusBubbleId=04013896-dcbe-40bd-8f1d-f4825badd782';
fetch(url,{
method: 'GET',
headers: {
'Access-Control-Allow-Origin': '*',
Accept: 'application/json',
'Content-Type': 'application/json;charset=UTF-8',
}})
.then(response => response.json())
}
</style>
<script language="javascript" type="text/javascript">
function initializeBubble() {
var placeholderDiv = document.getElementById('oneuptime-status-bubble');
var placeholderTitleDiv = document.getElementById(
'oneuptime-bubble-text'
);
var bubble = 'all';
var statusMessage = '';
var url =
'https://staging.oneuptime.com/api/statusPage/statusBubble?statusPageId=5ffa98e25f166c0014d9c045&statusBubbleId=04013896-dcbe-40bd-8f1d-f4825badd782';
fetch(url, {
method: 'GET',
headers: {
'Access-Control-Allow-Origin': '*',
Accept: 'application/json',
'Content-Type': 'application/json;charset=UTF-8',
},
})
.then(response => response.json())
.then(json => {
bubble = json && json.bubble ? json.bubble : null;
statusMessage = json && json.statusMessage ? json.statusMessage : null;
statusMessage =
json && json.statusMessage ? json.statusMessage : null;
if (bubble === 'all') {
placeholderDiv.className = 'all';
} else if (bubble === 'some') {
placeholderDiv.className = 'some';
} else if (bubble === 'none') {
placeholderDiv.className = 'none';
} else if (bubble === 'some-degraded') {
placeholderDiv.className = 'degraded';
}
placeholderTitleDiv.className = 'text';
placeholderTitleDiv.innerHTML = statusMessage;
} else if (bubble === 'some') {
placeholderDiv.className = 'some';
} else if (bubble === 'none') {
placeholderDiv.className = 'none';
} else if (bubble === 'some-degraded') {
placeholderDiv.className = 'degraded';
}
placeholderTitleDiv.className = 'text';
placeholderTitleDiv.innerHTML = statusMessage;
})
.catch(err => console.error(err));
};window.onload = function (){initializeBubble()};
</script>
}
window.onload = function() {
initializeBubble();
};
</script>