diff --git a/public/config.js b/public/config.js index 36ee5f6..1db1014 100644 --- a/public/config.js +++ b/public/config.js @@ -2,12 +2,12 @@ window.Config = { // 显示标题 - SiteName: '云生站点监测', + SiteName: '浅语站点监测', // UptimeRobot Api Keys // 支持 Monitor-Specific 和 Read-Only ApiKeys: [ - 'ur1078385-b9802a0868414b8a975d5038', + 'ur2265723-f304ae7cfe64b92fbd6147f8', ], // 日志天数 @@ -22,15 +22,23 @@ window.Config = { Navi: [ { text: '主页', - url: 'https://tjys.tk' + url: 'https://uv.wiki' }, { text: '博客', - url: 'https://blog.qikaile.tk' + url: 'https://rainss.cn' }, { - text: 'GitHub', - url: 'https://github.com/qikaile/uptime-status' + text: '工具', + url: 'https://tool.rainss.cn' + }, + { + text: '监控', + url: 'https://dash.rains.autos' + }, + { + text: 'Github', + url: 'https://github.com/rainerosion' }, ], }; diff --git a/src/app.scss b/src/app.scss index 4c5db12..fd074ba 100644 --- a/src/app.scss +++ b/src/app.scss @@ -34,7 +34,7 @@ a { padding: 30px 0 60px 0; color: white; width: 101%; - height: 400px; + height: 295px; padding-right: 1%; .container { @@ -105,7 +105,7 @@ a { max-width: 980px; margin: 0 auto; padding: 0 20px; - margin-top: 200px; + margin-top: 95px; position: relative; } @@ -372,7 +372,7 @@ a { /* 小于 512px 时 */ @media (max-width: 512px) { #header { - height: 340px; + height: 235px; .logo { font-size: 18px; @@ -384,7 +384,7 @@ a { } .status-top { - margin-top: 160px; + margin-top: 55px; } .status-tip { @@ -412,7 +412,7 @@ a { /* 小于 370px 时 */ @media (max-width: 370px) { #header { - height: 300px; + height: 195px; .logo { font-size: 16px; @@ -420,7 +420,7 @@ a { } .status-top { - margin-top: 90px; + margin-top: 35px; text-align: center; } diff --git a/src/common/uptimerobot.js b/src/common/uptimerobot.js index 65f52da..7658790 100644 --- a/src/common/uptimerobot.js +++ b/src/common/uptimerobot.js @@ -11,12 +11,10 @@ export async function GetMonitors(apikey, days) { for (let d = 0; d < days; d++) { dates.push(today.subtract(d, 'day')); } - const ranges = dates.map((date) => `${date.unix()}_${date.add(1, 'day').unix()}`); const start = dates[dates.length - 1].unix(); const end = dates[0].add(1, 'day').unix(); ranges.push(`${start}_${end}`); - const postdata = { api_key: apikey, format: 'json', @@ -24,7 +22,7 @@ export async function GetMonitors(apikey, days) { log_types: '1-2', logs_start_date: start, logs_end_date: end, - custom_uptime_ranges: ranges.join('-'), + custom_uptime_ranges: ranges.reverse().join('-'), }; const response = await axios.post('https://uptimestatus.qikaile.tk/v2/getMonitors', postdata, { @@ -42,10 +40,10 @@ export async function GetMonitors(apikey, days) { return response.data.monitors.map((monitor) => { const ranges = monitor.custom_uptime_ranges.split('-'); - const average = formatNumber(ranges.pop()); + const average = formatNumber(ranges.shift()); const daily = []; const map = []; - dates.forEach((date, index) => { + dates.reverse().forEach((date, index) => { map[date.format('YYYYMMDD')] = index; daily[index] = { date: date, diff --git a/src/components/app.js b/src/components/app.js index 3615290..b47d6fa 100644 --- a/src/components/app.js +++ b/src/components/app.js @@ -24,7 +24,7 @@ function App() {
> diff --git a/src/components/uptimerobot.js b/src/components/uptimerobot.js index db00b87..a0a52ec 100644 --- a/src/components/uptimerobot.js +++ b/src/components/uptimerobot.js @@ -29,6 +29,7 @@ function UptimeRobot({ apikey }) {