Skip to content

Commit

Permalink
独立配置文件,方便管理;
Browse files Browse the repository at this point in the history
  • Loading branch information
yb committed Mar 15, 2020
1 parent bb0ad5e commit fcfc80c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uptime-status",
"version": "1.2.0",
"version": "1.3.0",
"private": true,
"dependencies": {
"axios": "^0.19.2",
Expand Down
38 changes: 38 additions & 0 deletions public/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// 配置
window.Config = {

// 站点名
SiteName: 'Uptime Status',

// 站点链接
SiteUrl: '/',

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

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

// 日志天数
// 虽然免费版说仅保存60天日志,但测试好像API可以获取90天的
// 不过时间不要设置太长,容易卡,接口请求也容易失败
CountDays: 60,

// 导航栏菜单
Navi: [
{
text: 'Homepage',
url: 'https://status.org.cn/'
},
{
text: 'GitHub',
url: 'https://github.com/yb/uptime-status'
}
]
};
43 changes: 1 addition & 42 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Uptime Status</title>
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" type="image/x-icon" />
<script>

// 配置
window.Config = {

// 站点名
SiteName: 'Uptime Status',

// 站点链接
SiteUrl: '/',

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

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

// 日志天数
// 虽然免费版说仅保存60天日志,但测试好像API可以获取90天的
// 不过时间不要设置太长,容易卡,接口请求也容易失败
CountDays: 60,

// 导航栏菜单
Navi: [
{
text: 'Homepage',
url: 'https://status.org.cn/'
},
{
text: 'GitHub',
url: 'https://github.com/yb/uptime-status'
}
]
};

</script>
<script src="%PUBLIC_URL%/config.js"></script>
</head>
<body>
<div id="app"></div>
Expand Down

1 comment on commit fcfc80c

@vercel
Copy link

@vercel vercel bot commented on fcfc80c Mar 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.