Things work together

This commit is contained in:
2015-03-08 22:16:27 +07:00
parent 132a726744
commit 8d45e846ff
3 changed files with 36 additions and 16 deletions
+18 -2
View File
@@ -94,17 +94,33 @@ var TeamStats = React.createClass({
});
var UserStats = React.createClass({
mixins: [Router.Navigation, Router.State],
render: function(){
var topRepos = "/api/stat/users/top"+
"?org="+ this.getParams().org +
"&author="+ this.getParams().user +
"&item=repo",
repoURL = "/app/"+ this.getParams().org +"/repos/";
return (
<section className="content">User stats!</section>
<section className="content">
<BarChart api={topRepos} link={repoURL}/>
</section>
);
}
});
var RepoStats = React.createClass({
mixins: [Router.Navigation, Router.State],
render: function(){
var topAuthors = "/api/stat/repos/top"+
"?org="+ this.getParams().org +
"&repo="+ this.getParams().repo +
"&item=author",
userURL = "/app/"+ this.getParams().org +"/users/";
return (
<section className="content">Repo Stats!</section>
<section className="content">
<BarChart api={topAuthors} link={userURL}/>
</section>
);
}
});