Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpaixao committed Nov 30, 2016
0 parents commit 2691a02
Show file tree
Hide file tree
Showing 63 changed files with 27,524 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
14 changes: 14 additions & 0 deletions .jscs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"esnext": true,
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"validateIndentation": 2
}
37 changes: 37 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"browser": true,
"esnext": true,
"bitwise":false,
"curly": true,
"eqnull": true,
"strict": false,
"devel": true,
"eqeqeq": true,
"forin": false,
"immed": true,
"supernew": true,
"expr": true,
"indent": 2,
"latedef": false,
"newcap": true,
"noarg": true,
"noempty": true,
"undef": true,
"boss": true,
"trailing": true,
"laxbreak": true,
"laxcomma": true,
"sub": true,
"unused": true,
"maxdepth": 6,
"maxlen": 140,

"globals": {
"System": true,
"Promise": true,
"define": true,
"require": true,
"Chromath": false,
"setImmediate": true
}
}
105 changes: 105 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
module.exports = function(grunt) {

require('load-grunt-tasks')(grunt);

grunt.loadNpmTasks('grunt-execute');
grunt.loadNpmTasks('grunt-contrib-clean');

grunt.initConfig({

clean: ["dist"],

copy: {
src_to_dist: {
cwd: 'src',
expand: true,
src: ['**/*', '!**/*.js', '!**/*.scss'],
dest: 'dist'
},
node_modules_to_dist: {
cwd: 'node_modules',
expand: true,
src: [
'lodash/lodash.js',
'crypto-js/crypto-js.js',
'moment/moment.js'
],
dest: 'dist',
flatten: true
},
pluginDef: {
expand: true,
src: ['plugin.json', 'src/README.md'],
dest: 'dist',
}
},

watch: {
rebuild_all: {
files: ['src/**/*', 'plugin.json', 'README.md'],
tasks: ['default'],
options: {spawn: false}
},
},

babel: {
options: {
sourceMap: true,
presets: ["es2015"],
plugins: ['transform-es2015-modules-systemjs', "transform-es2015-for-of"],
},
dist: {
files: [{
cwd: 'src',
expand: true,
src: ['**/*.js'],
dest: 'dist',
ext:'.js'
}]
},
},

jshint: {
source: {
files: {
src: ['src/**/*.js'],
}
},
options: {
jshintrc: true,
reporter: require('jshint-stylish'),
ignores: [
'node_modules/*',
'dist/*',
]
}
},

jscs: {
src: ['src/**/*.js'],
options: {
config: ".jscs.json",
},
}

});

grunt.registerTask('default', [
'clean',
'copy:src_to_dist',
'copy:node_modules_to_dist',
'copy:pluginDef',
'babel'
]);

grunt.registerTask('test', [
'clean',
'copy:src_to_dist',
'copy:node_modules_to_dist',
'copy:pluginDef',
'babel',
'jshint',
'jscs'
]);

};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 BelugaCDN

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## BelugaCDN Metrics Plugin

The BelugaCDN Grafana Application plugin allows you to access available CDN site metrics through Grafana.

#### Screenshots

![dashboard image](https://cdn.rawgit.com/belugacdn/grafana-belugacdn-app/master/dist/img/dashboard_1.png)
![panel image](https://cdn.rawgit.com/belugacdn/grafana-belugacdn-app/master/dist/img/panel_1.png)

-------

![img](https://circleci.com/gh/belugacdn/grafana-belugacdn-app.svg?style=shield&circle-token=:circle-token)

## Features

- Grafana Datasource to access all available metrics through the BelugaCDN API
- BelugaCDN Metrics Dashboard giving an overview of your sites activity
- Current Requests & Throughput per Second
- Total Errors over time
- Requests breakdown by HTTP Status Code
- Traffic breakdown by CDN region

## Change Log

##### v1.0.0
- initial version with API based Grafana Datasource & example Dashboard

## Installation

#### On Linux systems:
- Install by doing `git clone https://github.com/belugacdn/grafana-belugacdn-app.git` in to `/var/lib/grafana/plugins`

#### On Macs or Windows systems:
- Install by doing `git clone https://github.com/belugacdn/grafana-belugacdn-app.git` in to `data/plugins`

## Feedback and Questions

Please submit any issues with the app on [Github](https://github.com/belugacdn/grafana-belugacdn-app/issues).
12 changes: 12 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
machine:
node:
version: 4.0

dependencies:
override:
- npm install

test:
override:
# js tests
- ./node_modules/grunt-cli/bin/grunt test
30 changes: 30 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## BelugaCDN Metrics Plugin

The BelugaCDN Grafana Application plugin allows you to access available CDN site metrics through Grafana.

#### Screenshots

![dashboard image](https://cdn.rawgit.com/belugacdn/grafana-belugacdn-app/master/dist/img/dashboard_1.png)
![panel image](https://cdn.rawgit.com/belugacdn/grafana-belugacdn-app/master/dist/img/panel_1.png)

-------

![img](https://circleci.com/gh/belugacdn/grafana-belugacdn-app.svg?style=shield&circle-token=:circle-token)

## Features

- Grafana Datasource to access all available metrics through the BelugaCDN API
- BelugaCDN Metrics Dashboard giving an overview of your sites activity
- Current Requests & Throughput per Second
- Total Errors over time
- Requests breakdown by HTTP Status Code
- Traffic breakdown by CDN region

## Change Log

##### v1.0.0
- initial version with API based Grafana Datasource & example Dashboard

## Feedback and Questions

Please submit any issues with the app on [Github](https://github.com/belugacdn/grafana-belugacdn-app/issues).
16 changes: 16 additions & 0 deletions dist/components/config.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<h2 class="page-heading">BelugaCDN Authentication Information</h2>

<div class="gf-form-group">
<div class="gf-form-inline">
<p>Enter your User Interface username &amp; password below to configure the plugin:</p>
<div class="gf-form">
<span class="gf-form-label">BelugaCDN Username</span>
<input type="text" class="gf-form-input" ng-model="ctrl.appModel.jsonData.username" >
</div>
<div class="gf-form">
<span class="gf-form-label">Password</span>
<input type="password" class="gf-form-input" ng-model="ctrl.appModel.jsonData.password" >
</div>
<p>You can change the settings later at anytime by configuring the <a href="/datasources">"BelugaCDN API" Grafana Datasource</a>.</p>
</div>
</div>
104 changes: 104 additions & 0 deletions dist/components/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/components/config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2691a02

Please sign in to comment.