This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <!-- Add this to <head> --> | |
| <link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap@next/dist/css/bootstrap.min.css"/> | |
| <link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css"/> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.2/vue.js"></script> | |
| <!-- Add this after vue.js --> | |
| <script src="//unpkg.com/babel-polyfill@latest/dist/polyfill.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <!-- <script src="https://unpkg.com/vue"></script> --> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.6/vue.min.js"></script> | |
| <script src="https://unpkg.com/[email protected]/dist/vue-chartjs.full.min.js"></script> | |
| <head> | |
| <body class="container-fluid"> | |
| <div id="ticker" class="ticker"> | |
| <line-chart :chart-data="datacollection" :options="{ responsive: true, maintainAspectRatio: false }"></line-chart> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| this is my dashboard | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| data: function() { | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const expressVue = require('express-vue') | |
| , Promise = require('bluebird') | |
| , express = require('express') | |
| , path = require('path') | |
| , app = express() | |
| , bodyParser = require('body-parser') | |
| , session = require('express-session') | |
| app.use(expressVueMiddleware); | |
| app.use(express.static(path.join(__dirname, '/views'))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('dotenv').config() | |
| const Promise = require('bluebird') | |
| , WmiClient = require('wmi-client') | |
| var servers = [ | |
| { host:'10.0.10.95', name:'server1', username:process.env.ad_user, password:process.env.ad_pass }, | |
| { host:'10.0.10.10', name:'server2', username:process.env.ad_user, password:process.env.ad_pass } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var io = require('socket.io').listen(server); | |
| // ----------------- https server --------- | |
| app.use(express.static(__dirname+'/public')); | |
| app.use(bodyParser.urlencoded({ extended: false })) | |
| // ---------------------------custom function ----------------------- | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express') | |
| , app = express(); | |
| let port = 3080; | |
| app.use('/', require('./publicRoutes.js')()); | |
| app.use('/api', require('./secureRoutes.js')()); | |
| app.listen(port) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('dotenv').config() | |
| module.exports = function() { | |
| return function(req, res, next) { | |
| console.log('middleware') | |
| next() | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const vueOptions = { | |
| rootPath: path.join(__dirname, '/views') | |
| , layout: { | |
| html: { | |
| start: '<!doctype html><html>', | |
| end: '</html>' | |
| }, | |
| body: { | |
| start:'<body class="container-fluid">', | |
| end:'</body>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let adConfig = { | |
| url:'', | |
| baseDN: '', | |
| username: '', | |
| password: '' | |
| } | |
| const ActiveDirectory = require('activedirectory2').promiseWrapper | |
| , ad = new ActiveDirectory(adConfig) |