Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/components/menu.vue
#	src/router/index.js
#	src/views/FRUInfo.vue
hongxuepeng 5 rokov pred
rodič
commit
5ea47bd1a9

+ 119 - 119
src/components/menu.vue

@@ -1,137 +1,137 @@
 <template>
-    <div class="menu-contente">
-        <Menu mode="horizontal" active-name="总览">
+  <div class="menu-contente">
+   <Menu  mode="horizontal" active-name="总览">
 
-            <template v-for='(item, index) in menuList'>
-                <template v-if='!!!item.children'>
-                    <MenuItem :name="item.name" :to='item.link'>
-                        {{item.name}}
-                    </MenuItem>
+          <template v-for='(item, index) in menuList'>
+            <template v-if='!!!item.children'>
+              <MenuItem :name="item.name" :to='item.link'>
+                {{item.name}}
+              </MenuItem>
+            </template>
+            <template v-else>
+               <Submenu :name="item.name">
+                <template slot="title">
+                    {{item.name}}
                 </template>
-                <template v-else>
-                    <Submenu :name="item.name">
-                        <template slot="title">
-                            {{item.name}}
-                        </template>
-                        <template v-for='i in item.children'>
-                            <MenuItem :to='i.link' :name="i.name + index">{{i.name}}</MenuItem>
-                        </template>
-                    </Submenu>
+                <template v-for='i in item.children'>
+                  <MenuItem :to='i.link'  :name="i.name">{{i.name}}</MenuItem>
                 </template>
+              </Submenu>
             </template>
+          </template>
 
 
         </Menu>
-    </div>
+  </div>
 </template>
 
 <script>
-    export default {
-        name: 'allmenu',
-        data() {
-            return {
-                theme: '',
-                menuList: [
-                    {
-                        name: "总览",
-                        link: 'dashbord',
-                        isDisabel: false
-                    },
-                    {
-                        name: "风扇控制",
-                        link: 'fan',
-                        isDisabel: false
-                    },
-                    {
-                        name: "FRU信息",
-                        link: 'fru_info',
-                        isDisabel: false
-                    },
-                    {
-                        name: "健康",
-                        link: 'index/',
-                        isDisabel: false,
-                        children: [
-                            {name: "传感器读值", isDisabel: false},
-                            {name: "事件日志", isDisabel: false},
-                            {name: "系统日志", isDisabel: false},
-                            {name: "BSOD屏幕", isDisabel: false},
-                        ]
-                    },
-                    {
-                        name: "配置",
-                        link: 'index/',
-                        isDisabel: false,
-                        children: [
-                            {name: "Active Directory", link: '/index/active_directory', isDisabel: false},
-                            {name: "DNS", link: '/index/dns', isDisabel: false},
-                            {name: "事件日志", link: '/index/event_log', isDisabel: false},
-                            {name: "Images重定向", link: 'index/', isDisabel: false},
-                            {name: "LDAP/E-Directory", link: 'index/', isDisabel: false},
-                            {name: "证书", link: 'index/', isDisabel: false},
-                            {name: "鼠标的模式", link: 'index/', isDisabel: false},
-                            {name: "NCSI", link: 'index/', isDisabel: false},
-                            {name: "网络", link: 'index/', isDisabel: false},
-                            {name: "网络绑定", link: 'index/', isDisabel: false},
-                            {name: "网络连接", link: 'index/', isDisabel: false},
-                            {name: "NTP", link: 'index/', isDisabel: false},
-                            {name: "PAM 指令", link: 'index/', isDisabel: false},
-                            {name: "PEF", link: 'index/', isDisabel: false},
-                            {name: "RADIUS", link: 'index/', isDisabel: false},
-                            {name: "远程会话", link: 'index/', isDisabel: false},
-                            {name: "服务", link: 'index/', isDisabel: false},
-                            {name: "SMTP", link: 'index/', isDisabel: false},
-                            {name: "SSL", link: 'index/', isDisabel: false},
-                            {name: "系统日志", link: 'index/', isDisabel: false},
-                            {name: "系统防火墙", link: 'index/', isDisabel: false},
-                            {name: "用户", link: 'index/', isDisabel: false},
-                            {name: "虚拟媒体", link: 'index/', isDisabel: false},
-                        ]
-                    },
-                    {
-                        name: "运动控制",
-                        isDisabel: false,
-                        link: 'index/',
-                        children: [
-                            {name: "终端重定向", link: 'index/', isDisabel: false},
-                            {name: "电源控制", link: 'index/', isDisabel: false},
+export default {
+  name: 'allmenu',
+  data(){
+    return {
+      theme:'',
+        menuList:[
+          {
+            name:"总览",
+            link:'dashbord',
+            isDisabel: false
+          },
+          {
+            name:"风扇控制",
+            link:'fan',
+            isDisabel: false
+          },
+          {
+            name:"FRU信息",
+            link:'fru_info',
+            isDisabel: false
+          },
+          {
+            name:"健康",
+            link:'index/',
+            isDisabel: false,
+            children:[
+              {name:"传感器读值", isDisabel: false},
+              {name:"事件日志", isDisabel: false},
+              {name:"系统日志", isDisabel: false},
+              {name:"BSOD屏幕", isDisabel: false},
+            ]
+          },
+           {
+            name:"配置",
+            link:'index/',
+            isDisabel: false,
+            children:[
+              {name:"Active Directory", link:'index/', isDisabel: false},
+              {name:"DNS", link:'index/', isDisabel: false},
+              {name:"事件日志", link:'index/', isDisabel: false},
+              {name:"Images重定向", link:'index/', isDisabel: false},
+              {name:"LDAP/E-Directory", link:'index/', isDisabel: false},
+              {name:"证书", link:'index/', isDisabel: false},
+              {name:"鼠标的模式", link:'index/', isDisabel: false},
+              {name:"NCSI", link:'index/', isDisabel: false},
+              {name:"网络", link:'index/', isDisabel: false},
+              {name:"网络绑定", link:'index/', isDisabel: false},
+              {name:"网络连接", link:'index/', isDisabel: false},
+              {name:"NTP", link:'index/', isDisabel: false},
+              {name:"PAM 指令", link:'index/', isDisabel: false},
+              {name:"PEF", link:'index/', isDisabel: false},
+              {name:"RADIUS", link:'index/', isDisabel: false},
+              {name:"远程会话", link:'index/', isDisabel: false},
+              {name:"服务", link:'index/', isDisabel: false},
+              {name:"SMTP", link:'index/', isDisabel: false},
+              {name:"SSL", link:'index/', isDisabel: false},
+              {name:"系统日志", link:'index/', isDisabel: false},
+              {name:"系统防火墙", link:'index/', isDisabel: false},
+              {name:"用户", link:'index/', isDisabel: false},
+              {name:"虚拟媒体", link:'index/', isDisabel: false},
+            ]
+          },
+          {
+            name:"运动控制",
+            isDisabel: false,
+            link:'index/',
+            children:[
+              {name:"终端重定向", link:'index/', isDisabel: false},
+              {name:"电源控制", link:'index/', isDisabel: false},
 
-                        ]
-                    },
-                    {
-                        name: "自动视频录制",
-                        isDisabel: false,
-                        link: 'index/',
-                        children: [
-                            {name: "触发配置", link: 'index/', isDisabel: false},
-                            {name: "视频录制", link: 'index/', isDisabel: false},
+            ]
+          },
+          {
+            name:"自动视频录制",
+            isDisabel: false,
+            link:'index/',
+            children:[
+              {name:"触发配置", link:'index/', isDisabel: false},
+              {name:"视频录制", link:'index/', isDisabel: false},
 
-                        ]
-                    },
-                    {
-                        name: "维护",
-                        isDisabel: false,
-                        link: 'index/',
-                        children: [
-                            {name: "保留配置", link: 'index/', isDisabel: false},
-                            {name: "恢复配置", link: 'index/', isDisabel: false},
-                            {name: "系统管理员", link: 'index/', isDisabel: false},
+            ]
+          },
+          {
+            name:"维护",
+            isDisabel: false,
+            link:'index/',
+            children:[
+              {name:"保留配置", link:'index/', isDisabel: false},
+              {name:"恢复配置", link:'index/', isDisabel: false},
+              {name:"系统管理员", link:'index/', isDisabel: false},
 
-                        ]
-                    },
-                    {
-                        name: "固件更新",
-                        isDisabel: false,
-                        link: 'index/',
-                        children: [
-                            {name: "固件更新", link: 'index/', isDisabel: false},
-                            {name: "协议配置", link: 'index/', isDisabel: false},
+            ]
+          },
+          {
+            name:"固件更新",
+            isDisabel: false,
+            link:'index/',
+            children:[
+              {name:"固件更新", link:'index/', isDisabel: false},
+              {name:"协议配置", link:'index/', isDisabel: false},
 
-                        ]
-                    },
-                ]
-            }
-        }
+            ]
+          },
+        ]
     }
+  }
+}
 </script>
 

+ 1 - 22
src/router/index.js

@@ -27,30 +27,9 @@ const router = new Router({
                 {
                     path: 'fan',  component: r => require.ensure([], () => r(require('../views/fan')), 'fan'),
                 },
-                {
+                 {
                     path: 'fru_info',  component: r => require.ensure([], () => r(require('../views/FRUInfo')), 'fan'),
                 },
-                {
-                    path: 'active_directory',
-                    meta: {
-                        title: 'Active Directory'
-                    },
-                    component: r => require.ensure([], () => r(require('../views/configuration/ActiveDirectory')), 'configuration'),
-                },
-                {
-                    path: 'dns',
-                    meta: {
-                        title: 'DNS'
-                    },
-                    component: r => require.ensure([], () => r(require('../views/configuration/DNS')), 'configuration'),
-                },
-                {
-                    path: 'event_log',
-                    meta: {
-                        title: '事件日志'
-                    },
-                    component: r => require.ensure([], () => r(require('../views/configuration/EventLog')), 'configuration'),
-                },
             ]
         },
         {

+ 154 - 153
src/views/FRUInfo.vue

@@ -1,174 +1,175 @@
 <template>
-    <div class="dashboard_box" style="width: 1180px;margin: auto;">
-        <table class="table">
-            <thead>
-            <tr>
-                <th>名称</th>
-                <th>速度(RPM)</th>
-                <th style="width: 200px">模式</th>
-                <th style="width: 200px">任务(%)</th>
-                <th style="width: 120px;">操作</th>
-            </tr>
-            </thead>
-            <tbody id="tableContent">
-            <tr v-for='(item, index) in fanList' :key="index">
-                <td>{{item.name}}</td>
-                <td>{{item.speed}}RPM</td>
-                <td>
-                    <select v-model='item.model' class="form-control">
-                        <option value="1">自动</option>
-                        <option value="2">手动</option>
-                    </select>
-                </td>
-                <td>
-                    <input type="text" v-model='item.duty' class="form-control">
-                </td>
-                <td>
-                    <Button type="primary" @click='set(item)'>设置</Button>
-                </td>
-            </tr>
+	<div class="dashboard_box" style="width: 1180px;margin: auto;">
+		<table class="table">
+			<thead>
+				<tr>
+					<th>名称</th>
+					<th>速度(RPM)</th>
+					<th style="width: 200px">模式</th>
+					<th style="width: 200px">任务(%)</th>
+					<th style="width: 120px;">操作</th>
+				</tr>
+			</thead>
+			<tbody id="tableContent">
+				<tr v-for='item in fanList'>
+	                <td>{{item.name}}</td>
+	                <td>{{item.speed}}RPM</td>
+	                <td>
+	                    <select v-model='item.model' class="form-control">
+	                        <option value="1" >自动</option>
+	                        <option value="2">手动</option>
+	                    </select>
+	                </td>
+	                <td>
+	                    <input type="text" v-model='item.duty' class="form-control">
+	                </td>
+	                <td>
+	                   <Button type="primary" @click='set(item)'>设置</Button>
+	                </td>
+            	</tr>
 
-            </tbody>
-        </table>
-    </div>
+			</tbody>
+		</table>
+	</div>
 </template>
 <script>
-    export default {
-        name: 'dashbord1',
-        data() {
-            return {
-                fanList: [
-                    {name: 'fan1', speed: 1000, model: 1, duty: 56.3},
-                    {name: 'fan2', speed: 1000, model: 1, duty: 56.3},
-                    {name: 'fan3', speed: 1000, model: 2, duty: 56.3},
-                    {name: 'fan4', speed: 1000, model: 2, duty: 56.3},
-                    {name: 'fan5', speed: 1000, model: 1, duty: 56.3}
-                ]
-            }
-        },
-        created() {
-            console.log("111111111111111111")
-        },
-        methods: {
-            set(item) {
-                console.log(item)
-            }
-        }
-    }
+export default {
+	name: 'dashbord1',
+	data(){
+		return{
+			fanList:[
+				{name:'fan1', speed: 1000, model: 1, duty:56.3},
+				{name:'fan2', speed: 1000, model: 1, duty:56.3},
+				{name:'fan3', speed: 1000, model: 2, duty:56.3},
+				{name:'fan4', speed: 1000, model: 2, duty:56.3},
+				{name:'fan5', speed: 1000, model: 1, duty:56.3}
+			]
+		}
+	},
+	created() {
+		console.log("111111111111111111")
+	},
+	methods:{
+		set(item){
+			console.log(item)
+		}
+	}
+}
 </script>
 <style lang="scss" scoped>
-    * {
-        box-sizing: border-box;
-    }
+* {
+	box-sizing: border-box;
+}
 
-    input {
-        margin: 0;
-    }
+input {
+	margin: 0;
+}
 
-    .dashboard_box {
-        background: -webkit-linear-gradient(bottom, #FFFFFF, #D1E3FF);
-        /* Safari 5.1 - 6.0 */
-        background: -o-linear-gradient(top, #FFFFFF, #D1E3FF);
-        /* Opera 11.1 - 12.0 */
-        background: -moz-linear-gradient(top, #FFFFFF, #D1E3FF);
-        /* Firefox 3.6 - 15 */
-        background: linear-gradient(to top, #FFFFFF, #D1E3FF);
-        height: 100%;
-        overflow-y: auto;
-        /*margin-top:30px;*/
-    }
+.dashboard_box {
+	background: -webkit-linear-gradient(bottom, #FFFFFF, #D1E3FF);
+	/* Safari 5.1 - 6.0 */
+	background: -o-linear-gradient(top, #FFFFFF, #D1E3FF);
+	/* Opera 11.1 - 12.0 */
+	background: -moz-linear-gradient(top, #FFFFFF, #D1E3FF);
+	/* Firefox 3.6 - 15 */
+	background: linear-gradient(to top, #FFFFFF, #D1E3FF);
+	height: 100%;
+	overflow-y: auto;
+	/*margin-top:30px;*/
+}
 
-    .table {
-        border-spacing: 0;
-        border-collapse: collapse;
-        width: 100%;
-        max-width: 100%;
-        font-size: 13px;
-    }
+.table {
+	border-spacing: 0;
+	border-collapse: collapse;
+	width: 100%;
+	max-width: 100%;
+	font-size:13px;
+}
 
-    .table td,
-    .table th {
-        padding: 8px;
-        text-align: center;
-    }
+.table td,
+.table th {
+	padding: 8px;
+	text-align: center;
+}
 
-    .form-control {
-        display: block;
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        padding: 4px 12px;
-        font-size: 13px;
-        background: transparent;
-        border: 1px solid #1874FF;
-        color: #003C97;
-        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-        -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-        -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-        transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-    }
+.form-control {
+	display: block;
+	width: 100%;
+	height: 30px;
+	line-height: 30px;
+	padding: 4px 12px;
+	font-size: 13px;
+	background: transparent;
+	border: 1px solid #1874FF;
+	color: #003C97;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+	-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
 
-    .form-control:focus {
-        border-color: #66afe9;
-        outline: 0;
-        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
-        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
-    }
+.form-control:focus {
+	border-color: #66afe9;
+	outline: 0;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
+	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
+}
 
-    .btn {
-        display: inline-block;
-        padding: 4px 20px;
-        margin-bottom: 0;
-        font-size: 13px;
-        font-weight: 400;
-        line-height: 1.42857143;
-        text-align: center;
-        white-space: nowrap;
-        vertical-align: middle;
-        -ms-touch-action: manipulation;
-        touch-action: manipulation;
-        cursor: pointer;
-        -webkit-user-select: none;
-        -moz-user-select: none;
-        -ms-user-select: none;
-        user-select: none;
-        background-image: none;
-        border: 1px solid transparent;
-    }
+.btn {
+	display: inline-block;
+	padding: 4px 20px;
+	margin-bottom: 0;
+	font-size: 13px;
+	font-weight: 400;
+	line-height: 1.42857143;
+	text-align: center;
+	white-space: nowrap;
+	vertical-align: middle;
+	-ms-touch-action: manipulation;
+	touch-action: manipulation;
+	cursor: pointer;
+	-webkit-user-select: none;
+	-moz-user-select: none;
+	-ms-user-select: none;
+	user-select: none;
+	background-image: none;
+	border: 1px solid transparent;
+}
 
-    .btn:focus {
-        outline: none;
-    }
+.btn:focus {
+	outline: none;
+}
 
-    .btn-primary {
-        color: #fff;
-        background-color: #1874FF;
-        border-color: #1874FF;
-        border-radius: 3px;
-    }
+.btn-primary {
+	color: #fff;
+	background-color: #1874FF;
+	border-color: #1874FF;
+	border-radius: 3px;
+}
 
-    .btn-primary:hover {
-        color: #fff;
-        background-color: #0364F7;
-        border-color: #0364F7;
-    }
+.btn-primary:hover {
+	color: #fff;
+	background-color: #0364F7;
+	border-color: #0364F7;
+}
 
-    .dashboard_box table tr:nth-of-type(odd) {
-        background-color: rgba(24, 116, 255, 0.06);;
-    }
+.dashboard_box table tr:nth-of-type(odd) {
+	background-color: rgba(24, 116, 255, 0.06);
+	;
+}
 
-    .dashboard_box table thead tr {
-        background-color: transparent !important;
-    }
+.dashboard_box table thead tr {
+	background-color: transparent !important;
+}
 
-    .dashboard_box table tr td {
-        color: #003C97;
-    }
+.dashboard_box table tr td {
+	color: #003C97;
+}
 
-    .dashboard_box table tr th {
-        color: #022B7D;
-        padding: 14px 8px;
-        font-weight: normal;
-    }
+.dashboard_box table tr th {
+	color: #022B7D;
+	padding: 14px 8px;
+	font-weight: normal;
+}
 </style>

+ 119 - 0
src/views/SensorHistory.vue

@@ -0,0 +1,119 @@
+<template>
+	<div class="dashboard_box" style="width: 1180px;margin: auto;">
+		<div class="dashboard_box">
+			<h3>
+				传感器读值
+			</h3>
+			<p>
+				所有传感器相关的信息都在这里显示。在一条记录上双击去触发特定传感器的开和关。
+			</p>
+			<Row>
+				<Col :span='12'>
+				<select id="_sensorType">
+					<option value="0">All Sensors</option>
+					<option value="1">Temperature Sensors</option>
+					<option value="2">Voltage Sensors</option>
+					<option value="3">Current Sensors</option>
+				</select>
+				</Col>
+				<Col style='font-size:12px;text-align: right;' :span='12'>
+					<strong> Sensor Count:  </strong>14 sensors
+				</Col>
+			</Row>
+		</div>
+	</div>
+</template>
+<script>
+export default {
+	name: 'dashbord1',
+	data() {
+		return {
+			fanList: [
+				{ name: 'fan1', speed: 1000, model: 1, duty: 56.3 },
+				{ name: 'fan2', speed: 1000, model: 1, duty: 56.3 },
+				{ name: 'fan3', speed: 1000, model: 2, duty: 56.3 },
+				{ name: 'fan4', speed: 1000, model: 2, duty: 56.3 },
+				{ name: 'fan5', speed: 1000, model: 1, duty: 56.3 }
+			]
+		}
+	},
+	created() {
+		console.log("111111111111111111")
+	},
+	methods: {
+		set(item) {
+			console.log(item)
+		}
+	}
+}
+</script>
+<style lang="scss" scoped>
+* {
+	box-sizing: border-box;
+}
+
+input {
+	margin: 0;
+}
+
+table {
+	font-size: 12px;
+}
+
+tr {
+	height: 26px;
+}
+
+td {
+	width: 40%;
+}
+
+.dashboard_box {
+	width: 1180px;
+	margin: auto;
+	margin-top: 10px;
+	/* background: #040C19; */
+	padding: 10px 0;
+	color: #fff;
+
+	h3 {
+		color: #fff;
+		margin-bottom: 0;
+		padding-bottom: 5px;
+	}
+
+	p {
+		padding: 10px 0;
+		font-size: 12px;
+	}
+}
+
+h4 {
+	font-size: 15px;
+	width: auto;
+	margin: 3px;
+	padding: 2px;
+}
+
+h3 {
+	color: #fff;
+	font-size: 20px;
+	padding-bottom: 0px;
+	/*margin-top: 5px;*/
+	border-bottom: 1px solid #000;
+}
+
+select {
+	border-radius: 3px;
+	height: 34px;
+	padding: 0 10px;
+	background: #fff;
+	border: 1px solid #1874FF;
+	color: #003C97;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+	-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+</style>

+ 1 - 13
src/views/dashbord.vue

@@ -167,18 +167,6 @@
 				</Row>
 			</div>
 		</div>
-		<!-- <Row type="flex" justify="start" align="top"  >
-			<Col span="8">
-				
-			</Col>
-
-			<Col span="10" >
-				
-			</Col>
-			<Col span="6">
-				
-			</Col>
-		</Row> -->
 	</div>
 </template>
 <script>
@@ -302,7 +290,7 @@ export default {
 <style lang='scss' scoped>
 .dashbord-context {
 	color: #fff;
-	overflow-x: scroll;
+	/*overflow-x: scroll;*/
 	padding-bottom: 30px;
 	.dashboard_box_h3 {
 		border-bottom: none;

+ 12 - 3
src/views/index.vue

@@ -3,8 +3,10 @@
       <Header></Header>
       <div class='dashbord-contanier'>
           <Menu></Menu>
-          <div class="content">
-              <router-view></router-view>
+          <div style="width:1180px;overflow:hidden">
+            <div class="content">
+                <router-view></router-view>
+            </div>
           </div>
       </div>
   </div>
@@ -31,11 +33,18 @@ export default {
   
 }
 .dashbord-contanier{
-  height: 800px;
+  
   margin: 10 auto;
 
 }
 .content{
+  width: 1200px;
   margin: 10px auto;
+  height: 800px;
+  overflow-y: scroll;
+  overflow-x: hidden;
+}
+.content::-webkit-scrollbar {
+    /*display: none;*/
 }
 </style>