day23 CMDB 深入讲解

时间:2023-03-09 18:53:08
day23 CMDB 深入讲解

课前准备:

https://www.getpostman.com/postman

内容:

1. cmdb资产自动更新
2. api安全认证
3. restfulAPI
4. 自定义用户认证

课堂笔记:

前端展示:
MadKing-master
安装rest_framework:
pip3 install -i http://pypi.douban.com/simple/ djangorestframework --trusted-host pypi.douban.com
官方网站:http://www.django-rest-framework.org/

http://127.0.0.1:9000/login/

使用率通过在线平台展示

在线平台展示工具:
http://echarts.baidu.com/
https://www.hcharts.cn/

副文本
http://kindeditor.net/demo.php

动态图:
https://code.hcharts.cn/highstock/hhhhvm

 $(function () {
Highcharts.setOptions({
global : {
useUTC : false
}
});
// Create the chart
$('#container').highcharts('StockChart', {
chart : {
events : {
load : function () {
// set up the updating of the chart each second
var series = this.series[];
setInterval(function () {
var x = (new Date()).getTime(), // current time
y = Math.round(Math.random() * );
series.addPoint([x, y], true, true);
}, );
}
}
},
rangeSelector: {
buttons: [{
count: ,
type: 'minute',
text: '1M'
}, {
count: ,
type: 'minute',
text: '5M'
}, {
type: 'all',
text: 'All'
}],
inputEnabled: false,
selected:
},
title : {
text : 'Live random data'
},
exporting: {
enabled: false
},
series : [{
name : 'Random data',
data : (function () {
// generate an array of random data
var data = [], time = (new Date()).getTime(), i;
for (i = -; i <= ; i += ) {
data.push([
time + i * ,
Math.round(Math.random() * )
]);
}
return data;
}())
}]
});
});

echarts展示:
http://echarts.baidu.com/demo.html#scatter-map-brush