Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
2d2e0b7d
Commit
2d2e0b7d
authored
Feb 23, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor stat_graph_contributors_graph to es6 module syntax
parent
2f09c23c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
274 additions
and
282 deletions
+274
-282
app/assets/javascripts/graphs/graphs_bundle.js
app/assets/javascripts/graphs/graphs_bundle.js
+0
-1
app/assets/javascripts/graphs/stat_graph_contributors.js
app/assets/javascripts/graphs/stat_graph_contributors.js
+2
-3
app/assets/javascripts/graphs/stat_graph_contributors_graph.js
...ssets/javascripts/graphs/stat_graph_contributors_graph.js
+269
-273
spec/javascripts/graphs/stat_graph_contributors_graph_spec.js
.../javascripts/graphs/stat_graph_contributors_graph_spec.js
+3
-5
No files found.
app/assets/javascripts/graphs/graphs_bundle.js
View file @
2d2e0b7d
require
(
'
./stat_graph_contributors_graph
'
);
require
(
'
./stat_graph_contributors
'
);
app/assets/javascripts/graphs/stat_graph_contributors.js
View file @
2d2e0b7d
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, one-var, camelcase, one-var-declaration-per-line, quotes, no-param-reassign, quote-props, comma-dangle, prefer-template, max-len, no-return-assign */
/* global ContributorsGraph */
/* global ContributorsAuthorGraph */
/* global ContributorsMasterGraph */
import
{
ContributorsGraph
,
ContributorsAuthorGraph
,
ContributorsMasterGraph
}
from
'
./stat_graph_contributors_graph
'
;
import
ContributorsStatGraphUtil
from
'
./stat_graph_contributors_util
'
;
/* global d3 */
...
...
app/assets/javascripts/graphs/stat_graph_contributors_graph.js
View file @
2d2e0b7d
/* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, max-len, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, comma-dangle, no-return-assign, prefer-arrow-callback, quotes, prefer-template, newline-per-chained-call, no-else-return */
/* global d3 */
/* global ContributorsGraph */
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, max-len, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, comma-dangle, no-return-assign, prefer-arrow-callback, quotes, prefer-template, newline-per-chained-call, no-else-return, no-shadow */
window
.
d3
=
require
(
'
d3
'
)
;
import
d3
from
'
d3
'
;
(
function
()
{
var
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
},
extend
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
},
hasProp
=
{}.
hasOwnProperty
;
const
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
};
const
extend
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
};
const
hasProp
=
{}.
hasOwnProperty
;
this
.
ContributorsGraph
=
(
function
()
{
export
const
ContributorsGraph
=
(
function
()
{
function
ContributorsGraph
()
{}
ContributorsGraph
.
prototype
.
MARGIN
=
{
...
...
@@ -91,9 +88,9 @@ window.d3 = require('d3');
};
return
ContributorsGraph
;
})();
})();
this
.
ContributorsMasterGraph
=
(
function
(
superClass
)
{
export
const
ContributorsMasterGraph
=
(
function
(
superClass
)
{
extend
(
ContributorsMasterGraph
,
superClass
);
function
ContributorsMasterGraph
(
data1
)
{
...
...
@@ -195,9 +192,9 @@ window.d3 = require('d3');
};
return
ContributorsMasterGraph
;
})(
ContributorsGraph
);
})(
ContributorsGraph
);
this
.
ContributorsAuthorGraph
=
(
function
(
superClass
)
{
export
const
ContributorsAuthorGraph
=
(
function
(
superClass
)
{
extend
(
ContributorsAuthorGraph
,
superClass
);
function
ContributorsAuthorGraph
(
data1
)
{
...
...
@@ -272,5 +269,4 @@ window.d3 = require('d3');
};
return
ContributorsAuthorGraph
;
})(
ContributorsGraph
);
}).
call
(
window
);
})(
ContributorsGraph
);
spec/javascripts/graphs/stat_graph_contributors_graph_spec.js
View file @
2d2e0b7d
/* eslint-disable quotes, jasmine/no-suite-dupes, vars-on-top, no-var, max-len */
/* global d3 */
/* global ContributorsGraph */
/* global ContributorsMasterGraph */
/* eslint-disable quotes, jasmine/no-suite-dupes, vars-on-top, no-var */
require
(
'
~/graphs/stat_graph_contributors_graph
'
);
import
d3
from
'
d3
'
;
import
{
ContributorsGraph
,
ContributorsMasterGraph
}
from
'
~/graphs/stat_graph_contributors_graph
'
;
describe
(
"
ContributorsGraph
"
,
function
()
{
describe
(
"
#set_x_domain
"
,
function
()
{
...
...
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