<commit_before>window.c.admin.ProjectInsights = (function(m, c, models){
  return {
    controller: function(args) {
      var vm = m.postgrest.filtersVM({project_id: 'eq'}),
          projectDetails = m.prop([]),
          contributionsPerDay = m.prop([]);

      vm.project_id(args.root.getAttribute('data-id'));

      models.projectDetail.getRow(vm.parameters()).then(projectDetails);
      models.projectContributionsPerDay.getRow(vm.parameters()).then(contributionsPerDay);

      return {
        vm: vm,
        projectDetails: projectDetails,
        contributionsPerDay: contributionsPerDay
      };
    },
    view: function(ctrl) {
      return ctrl.projectDetails().map(function(project){
        return m('.project-insights',[
          m('.w-row.u-marginbottom-40', [
            m('.w-col.w-col-2'),
            m('.w-col.w-col-8.dashboard-header.u-text-center', [
              m.component(c.AdminProjectDetailsCard, {resource: project}),
              m.component(c.AdminProjectDetailsExplanation, {resource: project})
            ]),
            m('.w-col.w-col-2')
          ]),
          (function(project){
            if (project.is_published) {
              return [
                m('.divider'),
                m('.w-section.section-one-column.bg-gray.before-footer',[
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', {style: {'min-height': '300px'}}, [
                      m.component(c.ProjectChartContributionTotalPerDay, {collection: ctrl.contributionsPerDay})
                    ]),
                  ]),
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', {style: {'min-height': '300px'}}, [
                      m.component(c.ProjectChartContributionAmountPerDay, {collection: ctrl.contributionsPerDay})
                    ]),
                  ]),
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', {style: {'min-height': '300px'}}, [
                      m.component(c.ProjectReminderCount, {resource: project})
                    ]),
                  ])
                ])
              ];
            }
          }(project))
        ]);
      });
    }
  };
}(window.m, window.c, window.c.models));<commit_msg>added section for mount contributions per location table on project insights [#101746808]<commit_after>window.c.admin.ProjectInsights = (function(m, c, models){
  return {
    controller: function(args) {
      var vm = m.postgrest.filtersVM({project_id: 'eq'}),
          projectDetails = m.prop([]),
          contributionsPerDay = m.prop([]);

      vm.project_id(args.root.getAttribute('data-id'));

      models.projectDetail.getRow(vm.parameters()).then(projectDetails);
      models.projectContributionsPerDay.getRow(vm.parameters()).then(contributionsPerDay);

      return {
        vm: vm,
        projectDetails: projectDetails,
        contributionsPerDay: contributionsPerDay
      };
    },
    view: function(ctrl) {
      return ctrl.projectDetails().map(function(project){
        return m('.project-insights',[
          m('.w-row.u-marginbottom-40', [
            m('.w-col.w-col-2'),
            m('.w-col.w-col-8.dashboard-header.u-text-center', [
              m.component(c.AdminProjectDetailsCard, {resource: project}),
              m.component(c.AdminProjectDetailsExplanation, {resource: project})
            ]),
            m('.w-col.w-col-2')
          ]),
          (function(project){
            if (project.is_published) {
              return [
                m('.divider'),
                m('.w-section.section-one-column.bg-gray.before-footer',[
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', {style: {'min-height': '300px'}}, [
                      m.component(c.ProjectChartContributionTotalPerDay, {collection: ctrl.contributionsPerDay})
                    ]),
                  ]),
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', {style: {'min-height': '300px'}}, [
                      m.component(c.ProjectChartContributionAmountPerDay, {collection: ctrl.contributionsPerDay})
                    ]),
                  ]),
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', [
                      m.component(c.ProjectContributionsPerLocationTable, {resourceId: ctrl.vm.project_id()})
                    ]),
                  ]),
                  m('.w-row', [
                    m('.w-col.w-col-12.dashboard-header.u-text-center', [
                      m.component(c.ProjectReminderCount, {resource: project})
                    ]),
                  ])
                ])
              ];
            }
          }(project))
        ]);
      });
    }
  };
}(window.m, window.c, window.c.models));
{'fraction_non_alphanumeric': 0.15816119886593763, 'fraction_numerical': 0.009720534629404616, 'mean_word_length': 1.6568047337278107, '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': '6861821', 'n_tokens_mistral': 1466, 'n_tokens_neox': 1377, 'n_words': 162}