Skip to content

Commit 184d016

Browse files
committed
rewrite vis using angular directives, include app/components
Temporarily use custom built version of angular-ui-bootstrap while the fix for angular-ui/bootstrap#387 has not yet been released with additional patch to support tooltip-placement="mouse". Once angular-ui/bootstrap#527 is merged and 0.4.0 is released, can switch to including "angular-ui-bootstrap-bower": "~0.4.0" in bower.json.
1 parent 09ea288 commit 184d016

File tree

702 files changed

+122172
-11106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

702 files changed

+122172
-11106
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ manifest.mf
99
build.xml
1010
.project
1111
.settings
12-
app/components
1312
logs/*
1413
!.gitkeep

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ node_js:
55
before_script:
66
- export DISPLAY=:99.0
77
- sh -e /etc/init.d/xvfb start
8-
- npm install --quiet -g karma
8+
- npm install --quiet -g karma bower
9+
- bower install
910
- ./scripts/web-server.js > /dev/null &
1011
- sleep 1 # give server time to start
1112

app/_css/app.css

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6407,6 +6407,7 @@ html, body {
64076407

64086408
body {
64096409
background: url('../img/bg.png');
6410+
overflow: hidden;
64106411
}
64116412

64126413
small {
@@ -6496,6 +6497,7 @@ label.checkbox.inline, label.radio.inline {
64966497

64976498
.tooltip-inner {
64986499
font-size: 12.6px;
6500+
max-width: none;
64996501
}
65006502

65016503
.btn-give {
@@ -6778,6 +6780,21 @@ textarea {
67786780
}
67796781
}
67806782

6783+
.modal {
6784+
background-color: transparent;
6785+
}
6786+
6787+
.modal-header, .modal-body:not(#welcome) {
6788+
background-color: white;
6789+
}
6790+
6791+
.modal-header {
6792+
-webkit-border-top-left-radius: 6px;
6793+
border-top-left-radius: 6px;
6794+
-webkit-border-top-right-radius: 6px;
6795+
border-top-right-radius: 6px;
6796+
}
6797+
67816798
.modal.fade {
67826799
-webkit-transition: opacity 0.3s ease;
67836800
transition: opacity 0.3s ease;
@@ -6876,7 +6893,7 @@ textarea {
68766893

68776894
#welcome {
68786895
text-align: center;
6879-
background-color: black;
6896+
background-color: rgba(0, 0, 0, 0.3);
68806897
color: white;
68816898
}
68826899
#welcome .modal-body {
@@ -7265,6 +7282,14 @@ textarea.report {
72657282
left: 25px;
72667283
}
72677284

7285+
#vis-block {
7286+
position: absolute;
7287+
top: 0;
7288+
right: 0;
7289+
bottom: 0;
7290+
left: 0;
7291+
}
7292+
72687293
#vis-container, #vis {
72697294
height: 100%;
72707295
}
@@ -7302,6 +7327,14 @@ textarea.report {
73027327
stroke-opacity: 1 !important;
73037328
}
73047329

7330+
.peer {
7331+
opacity: 0.4;
7332+
}
7333+
7334+
.peer.connected {
7335+
opacity: 1;
7336+
}
7337+
73057338
.peer.get, #self.get {
73067339
fill: #ffcc66;
73077340
}
@@ -7330,54 +7363,53 @@ g.transferring .connection {
73307363
opacity: 1;
73317364
}
73327365

7333-
.tooltip.vis .tooltip-inner {
7334-
max-width: none;
7366+
.tooltip .vis {
73357367
text-align: left;
73367368
white-space: nowrap;
73377369
text-overflow: ellipsis;
73387370
}
7339-
.tooltip.vis .tooltip-inner .picture {
7371+
.tooltip .vis .picture {
73407372
height: 64px;
73417373
width: 64px;
73427374
margin: 5px 10px 0 0;
73437375
}
7344-
.tooltip.vis .tooltip-inner .picture, .tooltip.vis .tooltip-inner .headers {
7376+
.tooltip .vis .picture, .tooltip .vis .headers {
73457377
float: left;
73467378
}
7347-
.tooltip.vis .tooltip-inner .header {
7379+
.tooltip .vis .header {
73487380
font-weight: bold;
73497381
font-size: 14.7px;
73507382
}
7351-
.tooltip.vis .tooltip-inner .get .header, .tooltip.vis .tooltip-inner .get .type {
7383+
.tooltip .vis .get .header, .tooltip .vis .get .type {
73527384
color: #ffcc66;
73537385
}
7354-
.tooltip.vis .tooltip-inner .give .header, .tooltip.vis .tooltip-inner .give .type {
7386+
.tooltip .vis .give .header, .tooltip .vis .give .type {
73557387
color: #aad092;
73567388
}
7357-
.tooltip.vis .tooltip-inner .unknown .header, .tooltip.vis .tooltip-inner .unknown .type {
7389+
.tooltip .vis .unknown .header, .tooltip .vis .unknown .type {
73587390
color: #eeeeee;
73597391
}
7360-
.tooltip.vis .tooltip-inner .cloud .header, .tooltip.vis .tooltip-inner .laeproxy .header, .tooltip.vis .tooltip-inner .cloud .type, .tooltip.vis .tooltip-inner .laeproxy .type {
7392+
.tooltip .vis .cloud .header, .tooltip .vis .laeproxy .header, .tooltip .vis .cloud .type, .tooltip .vis .laeproxy .type {
73617393
color: green !important;
73627394
}
7363-
.tooltip.vis .tooltip-inner .type {
7395+
.tooltip .vis .type {
73647396
font-size: 10.5px;
73657397
}
7366-
.tooltip.vis .tooltip-inner .peerid, .tooltip.vis .tooltip-inner .id {
7398+
.tooltip .vis .peerid, .tooltip .vis .id {
73677399
font-size: 10.5px;
73687400
color: #999999;
73697401
}
7370-
.tooltip.vis .tooltip-inner .stats {
7402+
.tooltip .vis .stats {
73717403
clear: both;
73727404
font-size: 10.5px;
73737405
}
7374-
.tooltip.vis .tooltip-inner .lastConnected {
7406+
.tooltip .vis .lastConnected {
73757407
font-size: 10.5px;
73767408
}
7377-
.tooltip.vis .tooltip-inner .npeersEver {
7409+
.tooltip .vis .npeersEver {
73787410
color: #999999;
73797411
}
7380-
.tooltip.vis .tooltip-inner .give-colored {
7412+
.tooltip .vis .give-colored {
73817413
color: #aad092;
73827414
}
73837415

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.DS_Store
2+
node_modules
3+
components
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
/* global require, module, */
2+
3+
'use strict';
4+
5+
module.exports = function(grunt) {
6+
7+
// Project configuration.
8+
grunt.initConfig({
9+
pkg: grunt.file.readJSON('package.json'),
10+
meta: {
11+
banner: '/**\n' +
12+
' * <%= pkg.description %>\n' +
13+
' * @version v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
14+
' * @link <%= pkg.homepage %>\n' +
15+
' * @author <%= pkg.author %>\n' +
16+
' * @license MIT License, http://www.opensource.org/licenses/MIT\n' +
17+
' */\n'
18+
},
19+
dirs: {
20+
dest: 'dist'
21+
},
22+
concat: {
23+
options: {
24+
banner: '<%= meta.banner %>'
25+
},
26+
dist: {
27+
src: ['src/*.js'],
28+
dest: '<%= dirs.dest %>/<%= pkg.name %>.js'
29+
}
30+
},
31+
uglify: {
32+
options: {
33+
banner: '<%= meta.banner %>'
34+
},
35+
dist: {
36+
src: ['<%= concat.dist.dest %>'],
37+
dest: '<%= dirs.dest %>/<%= pkg.name %>.min.js'
38+
}
39+
},
40+
changelog: {
41+
options: {
42+
dest: 'CHANGELOG.md',
43+
versionFile: 'package.json'
44+
}
45+
},
46+
stage: {
47+
options: {
48+
files: ['CHANGELOG.md']
49+
}
50+
},
51+
release: {
52+
options: {
53+
commitMessage: '<%= version %>',
54+
tagName: 'v<%= version %>',
55+
file: 'package.json',
56+
push: false,
57+
tag: false,
58+
pushTags: false,
59+
npm: false
60+
}
61+
},
62+
jshint: {
63+
files: ['Gruntfile.js', 'src/*.js', 'test/unit/*.js'],
64+
options: {
65+
curly: false,
66+
browser: true,
67+
eqeqeq: true,
68+
immed: true,
69+
latedef: true,
70+
newcap: true,
71+
noarg: true,
72+
sub: true,
73+
undef: true,
74+
boss: true,
75+
eqnull: true,
76+
expr: true,
77+
node: true,
78+
globals: {
79+
exports: true,
80+
angular: false,
81+
$: false
82+
}
83+
}
84+
},
85+
// watch: {
86+
// files: '<config:jshint.files>',
87+
// tasks: 'default'
88+
// },
89+
karma: {
90+
test: {
91+
options: {
92+
reporters: ['dots'],
93+
singleRun: true
94+
}
95+
},
96+
server: {
97+
options: {
98+
singleRun: false
99+
}
100+
},
101+
options: {
102+
configFile: 'test/karma.conf.js'
103+
}
104+
}
105+
});
106+
107+
// Load the plugin that provides the "jshint" task.
108+
grunt.loadNpmTasks('grunt-contrib-jshint');
109+
110+
// Load the plugin that provides the "concat" task.
111+
grunt.loadNpmTasks('grunt-contrib-concat');
112+
113+
// Load the plugin that provides the "uglify" task.
114+
grunt.loadNpmTasks('grunt-contrib-uglify');
115+
116+
// Load the plugin that provides the "watch" task.
117+
//grunt.loadNpmTasks('grunt-contrib-watch');
118+
119+
grunt.loadNpmTasks('grunt-release');
120+
grunt.loadNpmTasks('grunt-conventional-changelog');
121+
122+
grunt.registerTask('stage', 'git add files before running the release task', function () {
123+
var files = this.options().files;
124+
grunt.util.spawn({
125+
cmd: process.platform === 'win32' ? 'git.cmd' : 'git',
126+
args: ['add'].concat(files)
127+
}, grunt.task.current.async());
128+
});
129+
130+
131+
132+
grunt.renameTask('release', 'originalRelease');
133+
134+
// Default task.
135+
grunt.registerTask('default', ['test']);
136+
137+
// Test tasks.
138+
grunt.registerTask('test', ['jshint', 'karma:test']);
139+
grunt.registerTask('test-server', ['karma:server']);
140+
141+
// Build task.
142+
grunt.registerTask('build', ['test', 'concat', 'uglify', 'changelog']);
143+
144+
// release task
145+
grunt.registerTask('release', ['build', 'changelog']);
146+
147+
148+
// Provides the "karma" task.
149+
grunt.registerMultiTask('karma', 'Starts up a karma server.', function() {
150+
var done = this.async();
151+
require('karma').server.start(this.options(), function(code) {
152+
done(code === 0);
153+
});
154+
});
155+
156+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# angular-google-analytics
2+
3+
A simple service that let you integrate google analytics tracker in your AngularJS applications.
4+
5+
Proudly brought to you by the [@revolunet](http://twitter.com/revolunet) team.
6+
7+
## features
8+
9+
- configurable
10+
- automatic page tracking
11+
- events tracking
12+
13+
## example
14+
15+
```js
16+
var app = angular.module('app', ['angular-google-analytics'])
17+
.config(function(AnalyticsProvider, function() {
18+
// initial configuration
19+
AnalyticsProvider.setAccount('UA-XXXXX-xx');
20+
21+
// track all routes (or not)
22+
AnalyticsProvider.trackPages(true);
23+
}))
24+
.controller('SampleController', function(Analytic) {
25+
// create a new pageview event
26+
Analytic.trackPage('/video/detail/XXX');
27+
28+
// create a new tracking event
29+
Analytic.trackEvent('video', 'play', 'django.mp4');
30+
});
31+
```
32+
33+
## configuration
34+
35+
```js
36+
// setup your account
37+
AnalyticsProvider.setAccount('UA-XXXXX-xx');
38+
// automatic route tracking (default=true)
39+
AnalyticsProvider.trackPages(false);
40+
```
41+
42+
## Licence
43+
As AngularJS itself, this module is released under the permissive [MIT license](http://revolunet.mit-license.org). Your contributions are always welcome.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"author": {
3+
"name": "revolunet"
4+
},
5+
"name": "angular-google-analytics",
6+
"description": "East Analytics for your AngularJS application",
7+
"version": "0.0.0",
8+
"homepage": "https://github.com/revolunet/angular-google-analytics",
9+
"repository": {
10+
"type": "git",
11+
"url": "git://github.com/revolunet/angular-google-analytics.git"
12+
},
13+
"main": "./dist/angular-google-analytics.js",
14+
"dependencies": {
15+
"angular": "1.0.6",
16+
"angular-mocks": "1.0.6",
17+
"angular-scenario": "1.0.6"
18+
},
19+
"gitHead": "d676e45a13a6cc0013cb3b8205315e7ecb5398e3",
20+
"readme": "# angular-google-analytics\n\nA simple service that let you integrate google analytics tracker in your AngularJS applications.\n\nProudly brought to you by the [@revolunet](http://twitter.com/revolunet) team.\n\n## features\n\n - configurable\n - automatic page tracking\n - events tracking\n\n## example\n\n```js\nvar app = angular.module('app', ['angular-google-analytics'])\n .config(function(AnalyticsProvider, function() {\n // initial configuration\n AnalyticsProvider.setAccount('UA-XXXXX-xx');\n\n // track all routes (or not)\n AnalyticsProvider.trackPages(true);\n }))\n .controller('SampleController', function(Analytic) {\n // create a new pageview event\n Analytic.trackPage('/video/detail/XXX');\n\n // create a new tracking event\n Analytic.trackEvent('video', 'play', 'django.mp4');\n });\n```\n\n## configuration\n\n```js\n// setup your account\nAnalyticsProvider.setAccount('UA-XXXXX-xx');\n// automatic route tracking (default=true)\nAnalyticsProvider.trackPages(false);\n```\n\n## Licence\nAs AngularJS itself, this module is released under the permissive [MIT license](http://revolunet.mit-license.org). Your contributions are always welcome.\n",
21+
"readmeFilename": "README.md",
22+
23+
"commit": "d676e45a13a6cc0013cb3b8205315e7ecb5398e3"
24+
}

0 commit comments

Comments
 (0)