Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API endpoint for GetMonitors function in uptimerobot.js #61

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions public/config.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
window.Config = {

// 显示标题
SiteName: 'Public Status',
SiteName: 'Public Status Page',

// UptimeRobot Api Keys
// 支持 Monitor-Specific 和 Read-Only
ApiKeys: [
'm784488775-dd1ad84b209c05f8e185c33e',
'm784490063-7b5da437e7f1e0d67613714d',
'm784497419-de55aa09902ccb3ab22d548a',
'm784496436-71a4bf7b1e3bdf7756be131b',
'ur2787651-ae61d0cfa1442cdabd672217'
],

// 日志天数
CountDays: 90,
CountDays: 60,

// 是否显示检测站点的链接
ShowLink: true,
ShowLink: false,

// 导航栏菜单
Navi: [
{
text: 'Homepage',
url: 'https://status.org.cn/'
url: '/'
},
{
text: 'GitHub',
url: 'https://github.com/yb/uptime-status'
url: 'https://github.com/lovebai/uptime-status'
},
{
text: 'Blog',
url: 'https://abo.xyz/'
url: 'https://obai.cc/'
},
],
};
2 changes: 1 addition & 1 deletion src/common/uptimerobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function GetMonitors(apikey, days) {
custom_uptime_ranges: ranges.join('-'),
};

const response = await axios.post('https://cors.status.org.cn/uptimerobot/v2/getMonitors', postdata, { timeout: 10000 });
const response = await axios.post('https://api.uptimerobot.com/v2/getMonitors', postdata, { timeout: 10000 });
if (response.data.stat !== 'ok') throw response.data.error;
return response.data.monitors.map((monitor) => {

Expand Down
2 changes: 1 addition & 1 deletion src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function App() {
</div>
<div id='footer'>
<p>基于 <Link to='https://uptimerobot.com/' text='UptimeRobot' /> 接口制作,检测频率 5 分钟</p>
<p>&copy; 2020 <Link to='https://status.org.cn/' text='STATUS.ORG.CN' />, Version {Package.version}</p>
<p>&copy; 2020 <Link to='https://STATUS.BDUCDS.COM/' text='STATUS.BDUCDS.COM' />, Version {Package.version}</p>
</div>
</div>
</>
Expand Down