Skip to content

Commit

Permalink
Merge pull request #54 from SOCR/dev
Browse files Browse the repository at this point in the history
chore: Release 0.1.5-alpha.3
#SOCRFW-207
  • Loading branch information
alxndrkalinin committed Jan 22, 2016
2 parents 7ecf508 + ebfa97e commit 13adf2c
Show file tree
Hide file tree
Showing 21 changed files with 733 additions and 27,480 deletions.
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ module.exports = function (grunt) {
less: {
development: {
options: {
paths: ["styles/css"]
paths: ["styles"]
},
files: [ {
cwd: "<%= yeoman.app %>",
Expand Down Expand Up @@ -560,8 +560,8 @@ module.exports = function (grunt) {
'ngAnnotate',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
//'cssmin',
//'uglify',
'filerev',
'usemin',
'htmlmin'
Expand Down
29 changes: 25 additions & 4 deletions app/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ App.config([
templateUrl: 'partials/analysis/tools/machineLearning/kMeans/sidebar.html'
)
.state('charts'
url: '/charts/:projectId/:forkId'
url: '/charts'
views:
'main':
templateUrl: 'partials/analysis/charts/main.html'
Expand All @@ -143,7 +143,8 @@ App.run([
'app_analysis_charts_constructor'
#'app.utils.importer'
# ($rootScope, core, db, getData, wrangleData, qualRobEst, qualRobEstView, instrPerfEval) ->
($rootScope, core, db, getData, wrangleData, instrPerfEval, kMeans) ->
($rootScope, core, db, getData, wrangleData, instrPerfEval, kMeans, charts) ->


map = [
# msgFrom: 'add numbers'
Expand Down Expand Up @@ -203,14 +204,15 @@ App.run([
scopeTo: ['wrangleData']
,
msgFrom: 'get table'
scopeFrom: ['chartsView']
scopeFrom: ['charts']
msgTo: 'get table'
scopeTo: ['database']
,
msgFrom: 'take table'
scopeFrom: ['database']
msgTo: 'take table'
scopeTo: ['chartsView']
scopeTo: ['charts']

]

core.setEventsMapping map
Expand All @@ -236,8 +238,27 @@ App.run([
core.register 'kMeans', kMeans
core.start 'kMeans'

core.register 'charts', charts
core.start 'charts'
#core.register 'importer', importer
#core.start 'importer'
core.register 'charts', charts
core.start 'charts'

# add module to the list of Tools to appear in Tools tab dropdown
tools = [
id: 'instrPerfEval'
name: 'Instrument Performance Evaluation'
url: '/tools/instrperfeval'
,
id: 'kMeans'
name: '2D k-Means Clustering'
url: '/tools/kmeans'
]

# subscribe for request from MainCtrl for list of tool modules
$rootScope.$on 'app:get_tools', (event, args) ->
$rootScope.$broadcast 'app:set_tools', tools

$rootScope.$on "$stateChangeSuccess", (scope, next, change)->
console.log 'APP: state change: '
Expand Down
15 changes: 10 additions & 5 deletions app/partials/analysis-nav.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ ul.nav.navbar-nav
a(ng-href='#/wrangleData') Wrangle Data
li.dropdown
a(href="#", data-toggle="dropdown", role="button", aria-haspopup="true", aria-expanded="false").dropdown-toggle
| Tools
| Tools &nbsp;
span.caret
ul.dropdown-menu
li(ng-class="getClass('/tools/instrperfeval')")
a(ng-href='#/tools/instrperfeval') Instrument Performance Evaluation
li(ng-class="getClass('/tools/kmeans')")
a(ng-href='#/tools/kmeans') 2D k-Means Clustering
li
form.form-inline
div.form-group
label(for="nav-tool-search").sr-only Search tools
div.btn-group
input#nav-tool-search(ng-model='query', type='text', placeholder='Search for...').form-control
span#nav-clear-tool-search(ng-click="query=''").glyphicon.glyphicon-remove-circle
li(ng-repeat="tool in tools | filter:query", ng-class="getClass(tool.url)")
a(ng-href='#{{tool.url}}') {{tool.name}}
li(ng-class="getClass('/charts')")
a(ng-href='#/charts') Charts
li(ng-class="getClass('/results')")
Expand Down
17 changes: 5 additions & 12 deletions app/partials/analysis/charts/main.jade
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
div(ng-controller='chartsMainCtrl')
h2 Charts
div(ng-switch='currentPlot')
div(ng-switch-when='none')
span.alert Please choose variables and plot type.

nvd3-line-chart#exampleId(ng-switch-when='line',data='data', width='{{width}}', height='{{height}}', showxaxis='true', showyaxis='true')
svg

nvd3-cumulative-line-chart#showXAxisExample(ng-switch-when='cumulativeLine',data='data', width='550', height='350', showxaxis='false', showyaxis='true', x='xFunction()', y='yFunction()', xaxistickformat='xAxisTickFormatFunction()', margin='{left:50,top:50,bottom:50,right:50}')
svg

div.container-fluid(ng-controller="mainChartsCtrl")
h4 {{chartData.name}}
div.row-fluid
d3-charts
scatter-plot
34 changes: 17 additions & 17 deletions app/partials/analysis/charts/sidebar.jade
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
div(ng-controller="chartsSidebarCtrl")
form
fieldset
legend Project
label fork&nbsp;
input(ng-model="currentFork",disabled = true).input-small
legend Plots
label Choose one&nbsp;
select(ng-model="currentPlot")
option(ng-repeat='p in plots') {{p.label}}
legend Variables
label X&nbsp;
select(ng-model="xVariable")
option(ng-repeat="v in variables") {{v}}
label Y&nbsp;
select(ng-model="yVariable")
option(ng-repeat="v in variables") {{v}}
div(ng-controller="sideChartsCtrl")
h4 Graphs
select.form-control#chooseGraph(value="Choose a graph" ng-change="changeName()" ng-model="graphSelect" ng-options="g as g.name for g in graphs")
h4 Variables
div.form-inline
div.form-horizontal
label(for = "x") Add X
select#x.form-control(ng-change="changeVar(selector1,headers,'x');" ng-model="selector1" ng-options="v as v.value for v in headers")
div.form-horizontal
label(for = "y") Add Y
select#y.form-control(ng-change="changeVar(selector2,headers,'y');" ng-model="selector2" ng-options="v as v.value for v in headers")
div.form-horizontal
label(for = "z") Add Z
select#z.form-control(ng-change="changeVar(selector3,headers,'z');" ng-model="selector3" ng-options="v as v.value for v in headers")

//add variable options.
button.btn.btn-default(ng-click="createGraph()") Graph
8 changes: 8 additions & 0 deletions app/partials/analysis/charts/tab-head.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


//Top of graph tabs
li
a(data-toggle ='tab' href= "{{name}}") {{name}}
//Created by nponarul on 11/22/15.
Loading

0 comments on commit 13adf2c

Please sign in to comment.