Skip to content

Commit

Permalink
Fix for charts on dashboard and some build updates for vuejs 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
misterGF committed Nov 5, 2016
1 parent e3ce1fb commit c6fc673
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ test/e2e/reports
.tern-project
pubstorm.json
build_old
.netlify
1 change: 1 addition & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global env:true rm:true mkdir:true cp:true */
// https://github.com/shelljs/shelljs
require('./check-versions')()
require('shelljs/global')
Expand Down
6 changes: 6 additions & 0 deletions config/dev.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
32 changes: 32 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')

module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css']
},
dev: {
env: require('./dev.env'),
port: 8080,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
}
3 changes: 3 additions & 0 deletions config/prod.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
NODE_ENV: '"production"'
}
6 changes: 6 additions & 0 deletions config/test.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var merge = require('webpack-merge')
var devEnv = require('./dev.env')

module.exports = merge(devEnv, {
NODE_ENV: '"testing"'
})
107 changes: 58 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "copilot",
"version": "0.2.0",
"version": "0.2.1",
"description": "A fully responsive admin template based on AdminLTE with vue.js integration",
"author": "Gil Ferreira <[email protected]>",
"repository": "https://github.com/misterGF/CoPilot",
Expand Down Expand Up @@ -31,54 +31,63 @@
"vuex": "^2.0.0"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"chromedriver": "^2.21.2",
"connect-history-api-fallback": "^1.1.0",
"cross-spawn": "^2.1.5",
"css-loader": "^0.23.0",
"eslint": "^2.0.0",
"eslint-config-standard": "^5.1.0",
"eslint-friendly-formatter": "^1.2.2",
"eslint-loader": "^1.3.0",
"eslint-plugin-html": "^1.3.0",
"eslint-plugin-promise": "^1.0.8",
"eslint-plugin-standard": "^1.3.2",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.4",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.12.0",
"inject-loader": "^2.0.1",
"isparta-loader": "^2.0.0",
"jasmine-core": "^2.4.1",
"json-loader": "^0.5.4",
"karma": "^0.13.15",
"karma-coverage": "^0.5.5",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.24",
"karma-webpack": "^1.7.0",
"nightwatch": "^0.8.18",
"ora": "^0.2.0",
"phantomjs-prebuilt": "^2.1.3",
"selenium-server": "2.53.0",
"shelljs": "^0.6.0",
"url-loader": "^0.5.7",
"vue-hot-reload-api": "^2.0.6",
"vue-html-loader": "^1.2.3",
"vue-loader": "^9.7.0",
"vue-style-loader": "^1.0.0",
"webpack": "^1.12.2",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.0",
"webpack-merge": "^0.8.3"
"autoprefixer": "^6.4.0",
"babel-core": "^6.0.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.25.0",
"eslint": "^3.7.1",
"eslint-friendly-formatter": "^2.0.5",
"eslint-loader": "^1.5.0",
"eslint-plugin-html": "^1.3.0",
"eslint-config-standard": "^6.1.0",
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.17.2",
"json-loader": "^0.5.4",
"karma": "^1.3.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sinon-chai": "^1.2.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.26",
"karma-webpack": "^1.7.0",
"lolex": "^1.4.0",
"mocha": "^3.1.0",
"chai": "^3.5.0",
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0",
"inject-loader": "^2.0.1",
"isparta-loader": "^2.0.0",
"phantomjs-prebuilt": "^2.1.3",
"chromedriver": "^2.21.2",
"cross-spawn": "^4.0.2",
"nightwatch": "^0.9.8",
"selenium-server": "2.53.1",
"semver": "^5.3.0",
"opn": "^4.0.2",
"ora": "^0.3.0",
"shelljs": "^0.7.4",
"url-loader": "^0.5.7",
"vue-loader": "^9.4.0",
"vue-style-loader": "^1.0.0",
"webpack": "^1.13.2",
"webpack-dev-middleware": "^1.8.3",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1"
},
"engines": {
"node": ">= 4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions src/components/dash/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
<div class="box-header with-border">
<h3 class="box-title"></h3>
<div class="box-body">
<div class="col-md-6 col-xs-12"><iframe class="chartjs-hidden-iframe" tabindex="-1" style="width: 100%; display: block; border: 0px; height: 0px; margin: 0px; position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"></iframe>
<div class="col-sm-6 col-xs-12">
<p class="text-center">
<strong>Web Traffic Overview</strong>
</p>
<canvas id="trafficBar" ></canvas>
</div>
<hr class="visible-xs">
<div class="col-md-6 col-xs-12"><iframe class="chartjs-hidden-iframe" tabindex="-1" style="width: 100%; display: block; border: 0px; height: 0px; margin: 0px; position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"></iframe>
<div class="col-sm-6 col-xs-12">
<p class="text-center">
<strong>Language Overview</strong>
</p>
Expand Down Expand Up @@ -219,7 +219,7 @@ module.exports = {
},
options: {
responsive: true,
maintainAspectRatio: false,
maintainAspectRatio: true,
legend: {
position: 'bottom',
display: true
Expand Down Expand Up @@ -248,7 +248,7 @@ module.exports = {
},
options: {
responsive: true,
maintainAspectRatio: false,
maintainAspectRatio: true,
legend: {
position: 'bottom',
display: true
Expand Down

0 comments on commit c6fc673

Please sign in to comment.