# all files / candela/components/TrackerDash/ TopInfoBar.js

84.91% Statements 45/53
75.61% Branches 31/41
80% Functions 8/10
46.67% Lines 7/15
9 statements, 2 functions, 16 branches Ignored

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    311×

    1×
    1×

    1×
    1×

    1×

     import $ from 'jquery';

    import topInfoBar from './templates/topInfoBar.jade';
    import VisComponent from '../../VisComponent';

    class TopInfoBar extends VisComponent {
      constructor (el, settings) {
        super(el);
        this.$el = $(this.el);

        this.name = settings.name || 'Ground Truth';
        this.branch = settings.branch || 'No branch set';
        this.day = settings.day || this.getToday();
        this.submissionUuid = settings.submission_uuid;
        this.helpLink = settings.help_link || 'https://github.com/Trailmix/RedwoodInternal/wiki/Midas-for-Metrics-Based-Testing#performance-dashboards';
      }

      render () {
        this.$el.html(topInfoBar({
          name: this.name,
          branch: this.branch,
          day: this.day,
          uuid: this.submissionUuid,
          helpLink: this.helpLink
        }));
      }
    }

    export default TopInfoBar;