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

 1 $(function () {
 2     Highcharts.setOptions({
 3         global : {
 4             useUTC : false
 5         }
 6     });
 7     // Create the chart
 8     $('#container').highcharts('StockChart', {
 9         chart : {
10             events : {
11                 load : function () {
12                     // set up the updating of the chart each second
13                     var series = this.series[0];
14                     setInterval(function () {
15                         var x = (new Date()).getTime(), // current time
16                             y = Math.round(Math.random() * 100);
17                         series.addPoint([x, y], true, true);
18                     }, 1000);
19                 }
20             }
21         },
22         rangeSelector: {
23             buttons: [{
24                 count: 1,
25                 type: 'minute',
26                 text: '1M'
27             }, {
28                 count: 5,
29                 type: 'minute',
30                 text: '5M'
31             }, {
32                 type: 'all',
33                 text: 'All'
34             }],
35             inputEnabled: false,
36             selected: 0
37         },
38         title : {
39             text : 'Live random data'
40         },
41         exporting: {
42             enabled: false
43         },
44         series : [{
45             name : 'Random data',
46             data : (function () {
47                 // generate an array of random data
48                 var data = [], time = (new Date()).getTime(), i;
49                 for (i = -999; i <= 0; i += 1) {
50                     data.push([
51                         time + i * 1000,
52                         Math.round(Math.random() * 100)
53                     ]);
54                 }
55                 return data;
56             }())
57         }]
58     });
59 });
View Code

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

posted @ 2017-07-03 16:56  李永三  阅读(271)  评论(0编辑  收藏  举报