source_route 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98f0bf5a3ce05c2070f9f3f2873ef6db029c79c4
4
- data.tar.gz: b830a4923f7e9f31da43e40802660e6a70ecd0d5
3
+ metadata.gz: 82f25a60a8b061a03a9fccfb948f95a1e1407f0b
4
+ data.tar.gz: 7d134d77f00101e616a453c654489f93ed62930d
5
5
  SHA512:
6
- metadata.gz: 8b8dcd4d530e5e6d50c37536f699885c641e02011f41718c524883117584c8e77b93bde220712d829e110f085439013e37c5242a54cf649bfe7a90bbd1170c98
7
- data.tar.gz: b54647f405cbd24fdc41eb338c29f4b04b53086766d7bb8ec68e1013aa24c8a044dd7f9c37111d201a7ea9ab309b3cf658e240321004b06c135bcf6a65922288
6
+ metadata.gz: fd5cc4be1f8da6ca6040b902c8c77ae2945ce64ebffc4dffdf42f25279068bd20093a393488344a72efa1c4d0e32c03e4315746c651376b8b2b31151588b4517
7
+ data.tar.gz: 99cf2f120257158951289d5cd755915c3ec9ceffbfad25d711413abe974d5267ab4b26a08355291a02ee473aa4042798eafb33c4795f3b4da139c9825a4d0641
data/README.md CHANGED
@@ -77,8 +77,6 @@ see more usage in examples.
77
77
 
78
78
  ### TODO
79
79
 
80
- No need filter event on html when event is single. see html output file in test.
81
-
82
80
  Reorganize the call and return in html template. maybe make some additional work to insert return data of call when return event is open.
83
81
 
84
82
  Add debug option to provider more verbose messages of what has happened
@@ -22,17 +22,25 @@ html
22
22
  #trace-data(data-trace="#{JSON.dump(local_trace_data)}" data-tp-events="#{JSON.dump(@condition.events)}")
23
23
 
24
24
  .container(ng-controller="MainCtrl")
25
- .top-header
25
+ .top-header(style="margin-bottom: 2em")
26
26
 
27
- .btn-group
28
- button(ng-click="traceFilter.event = undefined") ALL
27
+ div(ng-if="tpEvents.length == 1")
28
+ button.btn.btn-default(ng-click="resetTraceFilter()")
29
+ span ALL Event :
30
+ span<(ng-bind="tpEvents[0]")
31
+
32
+ .btn-group(ng-if="tpEvents.length > 1")
33
+ button(ng-click="traceFilter = {}") ALL
29
34
  button.btn-link(ng-bind="event" ng-click="traceFilter.event = event" ng-repeat="event in tpEvents")
35
+ .pull-right
36
+ span Current Trace Count
37
+ span<(ng-bind="currentCounter()")
30
38
 
31
39
  .trace-flow
32
40
  .row
33
41
  .left-info.col-sm-4
34
42
  .well.well-sm(ng-repeat="klass in definedClasses")
35
- button.btn.btn-default(ng-click="selectKlass(klass)")
43
+ button.btn.btn-default(ng-click="traceFilter.defined_class = klass")
36
44
  span(ng-bind="klass")
37
45
  .center-info.col-sm-6
38
46
  .well.well-lg(ng-repeat="trace in traces | filter:traceFilter")
@@ -69,23 +77,18 @@ html
69
77
 
70
78
  javascript:
71
79
  sourceRoute = angular.module('SourceRoute', [])
72
- sourceRoute.controller('MainCtrl', function($scope) {
80
+ sourceRoute.controller('MainCtrl', function($scope, $filter) {
73
81
  $scope.traceFilter = {}
74
82
  $scope.traces = angular.element("#trace-data").data('trace')
75
-
76
83
  $scope.tpEvents = angular.element("#trace-data").data('tp-events')
77
84
 
78
- // it is possible to prevent dirty check on definedClasses after it was generated
79
85
  $scope.definedClasses = _.uniq(_.map($scope.traces, 'defined_class'))
80
- var all_counter = 'ALL ' + $scope.traces.length
81
- $scope.definedClasses.unshift(all_counter)
82
86
 
83
- $scope.selectKlass = function(klass) {
84
- if (klass == all_counter) {
85
- $scope.traceFilter.defined_class = undefined
86
- } else {
87
- $scope.traceFilter.defined_class = klass
88
- }
87
+ $scope.resetTraceFilter = function() {
88
+ $scope.traceFilter = {}
89
+ }
90
+ $scope.currentCounter = function() {
91
+ return $filter('filter')($scope.traces, $scope.traceFilter).length
89
92
  }
90
93
 
91
94
  })
@@ -1,3 +1,3 @@
1
1
  module SourceRoute
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/source_route.gemspec CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency 'awesome_print'
23
- spec.add_dependency 'colorize'
24
23
  spec.add_dependency 'slim'
25
24
 
26
25
  spec.add_development_dependency "bundler", "~> 1.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: source_route
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - raykin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-12 00:00:00.000000000 Z
11
+ date: 2014-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: colorize
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: slim
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -180,3 +166,4 @@ test_files:
180
166
  - test/source_route_test.rb
181
167
  - test/test_helper.rb
182
168
  - test/tp_filter_test.rb
169
+ has_rdoc: