Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-analytics-dashboard
Commits
7740dcc8
Commit
7740dcc8
authored
Jul 18, 2016
by
Anjali Pal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the following rule violations:
* no-throw-literal * camelcase * strict * wrap-iife * yoda
parent
c4092471
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
24 deletions
+18
-24
.eslintrc.json
+2
-6
analytics_dashboard/static/js/application-main.js
+1
-1
analytics_dashboard/static/js/common.js
+1
-0
analytics_dashboard/static/js/test/spec-runner.js
+1
-1
analytics_dashboard/static/js/views/chart-view.js
+5
-5
analytics_dashboard/static/js/views/tracking-view.js
+2
-4
gulpfile.js
+6
-7
No files found.
.eslintrc.json
View file @
7740dcc8
...
...
@@ -23,11 +23,6 @@
"global-require"
:
"off"
,
"no-shadow"
:
"off"
,
"dollar-sign/dollar-sign"
:
"off"
,
"no-sequences"
:
"off"
,
"no-throw-literal"
:
"off"
,
"camelcase"
:
"off"
,
"strict"
:
"off"
,
"wrap-iife"
:
"off"
,
"yoda"
:
"off"
"no-sequences"
:
"off"
}
}
\ No newline at end of file
analytics_dashboard/static/js/application-main.js
View file @
7740dcc8
...
...
@@ -7,7 +7,7 @@ require(['bootstrap',
'vendor/domReady!'
,
'load/init-page'
,
'views/data-table-view'
,
'views/announcement-view'
],
function
(
bootstrap
,
bootstrap
_a
ccessibility
,
doc
,
page
,
DataTableView
,
AnnouncementView
)
{
function
(
bootstrap
,
bootstrap
A
ccessibility
,
doc
,
page
,
DataTableView
,
AnnouncementView
)
{
'use strict'
;
// Instantiate the announcement view(s)
...
...
analytics_dashboard/static/js/common.js
View file @
7740dcc8
...
...
@@ -8,4 +8,5 @@ require([
'load/init-page'
,
'js/application-main'
],
function
()
{
'use strict'
;
});
analytics_dashboard/static/js/test/spec-runner.js
View file @
7740dcc8
...
...
@@ -73,4 +73,4 @@
});
});
}
}
)(
);
}
()
);
analytics_dashboard/static/js/views/chart-view.js
View file @
7740dcc8
...
...
@@ -164,7 +164,7 @@ define(['d3', 'jquery', 'nvd3', 'underscore', 'utils/utils', 'views/attribute-li
* (e.g. nvd3.models.lineChart).
*/
getChart
:
function
()
{
throw
'Not implemented'
;
throw
'Not implemented'
;
// eslint-disable-line no-throw-literal
},
/**
...
...
@@ -184,8 +184,8 @@ define(['d3', 'jquery', 'nvd3', 'underscore', 'utils/utils', 'views/attribute-li
/**
* Truncate (e.g. add ellipses) long labels shown beneath the bar.
*/
truncateXTick
:
function
(
d
)
{
// jshint ignore:line
throw
'Not implemented'
;
truncateXTick
:
function
(
)
{
throw
'Not implemented'
;
// eslint-disable-line no-throw-literal
},
parseXData
:
function
(
d
)
{
...
...
@@ -268,8 +268,8 @@ define(['d3', 'jquery', 'nvd3', 'underscore', 'utils/utils', 'views/attribute-li
* Implement this to enable users to click on chart elements. This
* is called when render is complete and the click option is specified.
*/
addChartClick
:
function
(
d
)
{
// jshint ignore:line
throw
'Not implemented'
;
addChartClick
:
function
(
)
{
throw
'Not implemented'
;
// eslint-disable-line no-throw-literal
},
render
:
function
()
{
...
...
analytics_dashboard/static/js/views/tracking-view.js
View file @
7740dcc8
...
...
@@ -83,11 +83,9 @@ define(['backbone', 'jquery', 'underscore', 'utils/utils'],
if
(
_
.
isUndefined
(
self
.
segment
))
{
// This is taken directly from https://segment.io/docs/tutorials/quickstart-analytics.js/.
/* jshint ignore:start */
// jscs:disable
// eslint-disable-next-line
window
.
analytics
=
window
.
analytics
||
[],
window
.
analytics
.
methods
=
[
'identify'
,
'group'
,
'track'
,
'page'
,
'pageview'
,
'alias'
,
'ready'
,
'on'
,
'once'
,
'off'
,
'trackLink'
,
'trackForm'
,
'trackClick'
,
'trackSubmit'
],
window
.
analytics
.
factory
=
function
(
t
)
{
return
function
()
{
var
a
=
Array
.
prototype
.
slice
.
call
(
arguments
);
return
a
.
unshift
(
t
),
window
.
analytics
.
push
(
a
),
window
.
analytics
;
};
};
for
(
var
i
=
0
;
i
<
window
.
analytics
.
methods
.
length
;
i
++
)
{
var
key
=
window
.
analytics
.
methods
[
i
];
window
.
analytics
[
key
]
=
window
.
analytics
.
factory
(
key
);
}
window
.
analytics
.
load
=
function
(
t
)
{
if
(
!
document
.
getElementById
(
'analytics-js'
))
{
var
a
=
document
.
createElement
(
'script'
);
a
.
type
=
'text/javascript'
,
a
.
id
=
'analytics-js'
,
a
.
async
=
!
0
,
a
.
src
=
(
'https:'
===
document
.
location
.
protocol
?
'https://'
:
'http://'
)
+
'cdn.segment.io/analytics.js/v1/'
+
t
+
'/analytics.min.js'
;
var
n
=
document
.
getElementsByTagName
(
'script'
)[
0
];
n
.
parentNode
.
insertBefore
(
a
,
n
);
}
},
window
.
analytics
.
SNIPPET_VERSION
=
'2.0.9'
;
// jscs:enable
/* jshint ignore:end */
// shortcut to segment.io
self
.
segment
=
window
.
analytics
;
...
...
gulpfile.js
View file @
7740dcc8
(
function
()
{
(
function
()
{
'use strict'
;
var
eslint
=
require
(
'gulp-eslint'
),
...
...
@@ -39,7 +39,7 @@
karma
.
start
(
extend
(
defaultOptions
,
options
),
cb
);
}
gulp
.
task
(
'lint'
,
function
()
{
gulp
.
task
(
'lint'
,
function
()
{
return
gulp
.
src
(
paths
.
lint
)
.
pipe
(
eslint
())
.
pipe
(
eslint
.
format
())
...
...
@@ -49,11 +49,11 @@
// this task runs the tests. It doesn't give you very detailed results,
// so you may need to run the jasmine test page directly:
// http://127.0.0.1:8000/static/js/test/spec-runner.html
gulp
.
task
(
'test'
,
function
(
cb
)
{
gulp
.
task
(
'test'
,
function
(
cb
)
{
runKarma
(
paths
.
karmaConf
,
cb
);
});
gulp
.
task
(
'test-debug'
,
function
(
cb
)
{
gulp
.
task
(
'test-debug'
,
function
(
cb
)
{
runKarma
(
paths
.
karmaConf
,
cb
,
{
singleRun
:
false
,
autoWatch
:
true
,
...
...
@@ -66,13 +66,13 @@
gulp
.
task
(
'default'
,
[
'test'
,
'lint'
]);
// type 'gulp watch' to continuously run linting and tests
gulp
.
task
(
'watch'
,
function
()
{
gulp
.
task
(
'watch'
,
function
()
{
gulp
.
watch
(
paths
.
spec
,
[
'test'
,
'lint'
]);
});
// Proxy to django server (assuming that we're using port 8000 and
// localhost)
gulp
.
task
(
'browser-sync'
,
function
()
{
gulp
.
task
(
'browser-sync'
,
function
()
{
// there is a little delay before reloading b/c the sass files need to
// recompile, but we can't necessarily watch the generated directory
// because django creates a new css file that browser-sync doesn't
...
...
@@ -84,5 +84,4 @@
reloadDelay
:
1000
});
});
}());
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment