<commit_before>/**
 * Operation 2.8
 */

angular.module(PKG.name+'.feature.operation28')
/* ------------------------------------------------------ */

  .controller('Op28CdapCtrl',
  function ($scope, $state, op28helper, MyDataSource) {

    var dataSrc = new MyDataSource($scope);

    $scope.panels = [
      ['Collect', 'EPS',    'collect.events'],
      ['Process', '%',      'process.busyness'],
      ['Store', 'B/s',      'dataset.store.bytes'],
      ['Query', 'QPS',      'query.requests']
    ].map(op28helper.panelMap);

    angular.forEach($scope.panels, function (panel) {
      var c = panel.chart;
      dataSrc.poll({
          _cdapPathV2: '/metrics/system/' +
              c.metric + '?start=now-60s&end=now',
          method: 'GET'
        },
        op28helper.pollCb.bind(c)
      );
    });

  })


/* ------------------------------------------------------ */


  .controller('Op28SystemCtrl',
  function ($scope, op28helper, MyDataSource) {

    var dataSrc = new MyDataSource($scope);

    $scope.panels = [
      ['AppFabric', 'Containers', ''],
      ['Processors', 'Cores',     ''],
      ['Memory', 'B',             ''],
      ['DataFabric', 'GB',        '']
    ].map(op28helper.panelMap);

    // angular.forEach($scope.panels, function (panel) {
    //   var c = panel.chart;
    //   dataSrc.poll({
    //       _cdapPathV2: '/metrics/system/'
    //         + c.metric + '?start=now-60s&end=now',
    //       method: 'GET'
    //     },
    //     op28helper.pollCb.bind(c)
    //   );
    // });

  })


/* ------------------------------------------------------ */


  .controller('Op28AppsCtrl',
  function ($scope, $state, $q, MyDataSource) {

    var dataSrc = new MyDataSource($scope);

    $scope.apps = [];

    dataSrc.request({
        _cdapNsPath: '/apps'
      })
      .then(function (apps) {<commit_msg>wire up Op28SystemCtrl with v2 api<commit_after>/**
 * Operation 2.8
 */

angular.module(PKG.name+'.feature.operation28')
/* ------------------------------------------------------ */

  .controller('Op28CdapCtrl',
  function ($scope, $state, op28helper, MyDataSource) {

    var dataSrc = new MyDataSource($scope);

    $scope.panels = [
      ['Collect', 'EPS',    'collect.events'],
      ['Process', '%',      'process.busyness'],
      ['Store', 'B/s',      'dataset.store.bytes'],
      ['Query', 'QPS',      'query.requests']
    ].map(op28helper.panelMap);

    angular.forEach($scope.panels, function (panel) {
      var c = panel.chart;
      dataSrc.poll({
          _cdapPathV2: '/metrics/system/' +
              c.metric + '?start=now-60s&end=now',
          method: 'GET'
        },
        op28helper.pollCb.bind(c)
      );
    });

  })


/* ------------------------------------------------------ */


  .controller('Op28SystemCtrl',
  function ($scope, op28helper, MyDataSource) {

    var dataSrc = new MyDataSource($scope);

    $scope.panels = [
      ['AppFabric', 'Containers', 'containers'],
      ['Processors', 'Cores',     'vcores'],
      ['Memory', 'B',             'memory'],
      ['DataFabric', 'GB',        'storage']
    ].map(op28helper.panelMap);

    angular.forEach($scope.panels, function (panel) {
      var c = panel.chart;
      dataSrc.poll({
          _cdapPathV2: '/metrics/system/resources.used.'
            + c.metric + '?start=now-60s&end=now',
          method: 'GET'
        },
        op28helper.pollCb.bind(c)
      );
    });

  })


/* ------------------------------------------------------ */


  .controller('Op28AppsCtrl',
  function ($scope, $state, $q, MyDataSource) {

    var dataSrc = new MyDataSource($scope);

    $scope.apps = [];

    dataSrc.request({
        _cdapNsPath: '/apps'
      })
      .then(function (apps) {
{'fraction_non_alphanumeric': 0.2588927520727467, 'fraction_numerical': 0.015779620219309978, 'mean_word_length': 1.65625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2631097', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1151, 'n_words': 189}