Sha256: 7fe6fe1bd28765575069c4585b4a6a82837eb02012c4158defd3af655960e0c8

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

doctype html
html
  head
    title Source Route Result
    link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
    script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"
    script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"

  body(ng-app="SourceRoute")
    / workaround for following case:
    / pry(main)> ActiveRecord::Inheritance::ClassMethods.to_json => {} # Dont know why
    ruby:
      trace_data = @tp_attrs_results.map do |tp_result|
        tp_result[:defined_class] = tp_result[:defined_class].nature_value
        tp_result
      end

    .data-collect
      #trace-data data-trace="#{trace_data.to_json}"

    .container(ng-controller="MainCtrl")
      .top-header
        h4
          | Event:
          =< @conditions.event
      .trace-flow
        .row
          .left-info.col-sm-3
            .well.well-sm(ng-repeat="klass in definedClasses")
              p.text-center(ng-bind="klass")
          .center-info.col-sm-5
            .well.well-lg(ng-repeat="trace in traces")
              p
                span(ng-bind="trace.defined_class")
                span #
                span(ng-bind="trace.method_id")
          .right-info.col-sm-3

    script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"

    javascript:
      sourceRoute = angular.module('SourceRoute', [])
      sourceRoute.controller('MainCtrl', function($scope) {
        $scope.traces = angular.element("#trace-data").data('trace')
        // it is possible to prevent dirty check on definedClasses after it was generated
        $scope.definedClasses = _.uniq(_.map($scope.traces, 'defined_class'))
        $scope.definedClasses.unshift('ALL')
      })

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
source_route-0.0.1 lib/source_route/formats/html_template.slim