Browse Source

(*)资源更新

master
peng.peng 1 year ago
parent
commit
39282f3eb9
  1. 30
      api/app/lib/controllers/homepage/index.js
  2. 1
      api/app/lib/index.js
  3. 0
      web/client/assets/images/homePage/bigscreen/headertitlebg.png
  4. BIN
      web/client/assets/images/homePage/bigscreen/分组 13 copy(1).png
  5. BIN
      web/client/assets/images/homePage/bigscreen/分组 13 copy(2).png
  6. BIN
      web/client/assets/images/homePage/bigscreen/分组 13 copy.png
  7. 2
      web/client/src/sections/homePage/components/public/table-card.js

30
api/app/lib/controllers/homepage/index.js

@ -156,8 +156,36 @@ function getClusterInfo(opts) {
}
}
function getRestfulInfo(opts) {
return async function (ctx, next) {
const models = ctx.fs.dc.models;
try {
let todayTotal = await models.RestfulApiRecord.Count({
where: {
visitTime: { [Op.between]: [moment().startOf('day'), moment().endOf('day')] }
}
})
let total = await models.RestfulApiRecord.Count({
where: {
id: { [$.gt]: 0 }
}
})
ctx.status = 200;
ctx.body = { total, todayTotal };
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = { message: '查询后端同步数据库数据量总量和top5' }
}
}
}
module.exports = {
getNodeResources,
getDataTotalTop5,
getClusterInfo
getClusterInfo,
getRestfulInfo
}

1
api/app/lib/index.js

@ -94,7 +94,6 @@ module.exports.models = function (dc) {
StandardDoc.hasMany(BusinessRule, { foreignKey: 'ruleBasis', targetKey: 'id' });
DbStatistics.belongsTo(DataSource, { foreignKey: 'sourceId', targetKey: 'id' });
DataSource.hasMany(DbStatistics, { foreignKey: 'sourceId', sourceKey: 'id' });
RestfulApiRecord.belongsTo(RestfulApi, { foreignKey: 'restServiceId', targetKey: 'id' });
};

0
web/client/assets/images/homePage/bigscreen/header-title-bg.png → web/client/assets/images/homePage/bigscreen/headertitlebg.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
web/client/assets/images/homePage/bigscreen/分组 13 copy(1).png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

BIN
web/client/assets/images/homePage/bigscreen/分组 13 copy(2).png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

BIN
web/client/assets/images/homePage/bigscreen/分组 13 copy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

2
web/client/src/sections/homePage/components/public/table-card.js

@ -7,7 +7,7 @@ class Box extends React.Component {
const { title, height = '100%', children, bodyPaddingTop = 1, titlePaddingTop, margin, overflow } = this.props
const headerbg = {
background: 'url(/assets/images/homepage/bigscreen/header-title-bg.png) no-repeat',
background: 'url(/assets/images/homepage/bigscreen/headertitlebg.png) no-repeat',
backgroundSize: '100% 100%',
}

Loading…
Cancel
Save