github.com/manicqin/nomad@v0.9.5/ui/app/components/children-status-bar.js (about)

     1  import { computed } from '@ember/object';
     2  import DistributionBar from './distribution-bar';
     3  
     4  export default DistributionBar.extend({
     5    layoutName: 'components/distribution-bar',
     6  
     7    job: null,
     8  
     9    'data-test-children-status-bar': true,
    10  
    11    data: computed('job.{pendingChildren,runningChildren,deadChildren}', function() {
    12      if (!this.job) {
    13        return [];
    14      }
    15  
    16      const children = this.job.getProperties(
    17        'pendingChildren',
    18        'runningChildren',
    19        'deadChildren'
    20      );
    21      return [
    22        { label: 'Pending', value: children.pendingChildren, className: 'queued' },
    23        { label: 'Running', value: children.runningChildren, className: 'running' },
    24        { label: 'Dead', value: children.deadChildren, className: 'complete' },
    25      ];
    26    }),
    27  });