<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Regard developer portal</title>
  <link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
  
  <script type="text/x-handlebars" data-template-name="user-welcome" >
    <h1>User welcome template</h1>
  </script>
    
  <script type="text/x-handlebars" data-template-name="application">
    <div class="off-canvas-wrap" data-offcanvas>
      <div class="inner-wrap">
        <nav class="tab-bar">
          {{#unless isAnonymous}}
          <section class="left-small">
            <a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a>
          </section>
          {{/unless}}

          <section class="middle tab-bar-section">
            <h1 class="title">{{outlet title}}</h1>
          </section>
          
          <section class="right-large">
            <div class="right">
              {{#if canEdit}}
                {{name}}
                <a href="/logout">Log out</a>
              {{else}}
                <a href="/login">Log in</a>
              {{/if}}
            </div>
          </section>
        </nav>

        <aside class="left-off-canvas-menu">
          <ul class="off-canvas-list">
            <li>
              <label>Projects 
                {{#if canEdit}}
                  <span class="label" {{action "createProject"}}>New</span>
                {{/if}}
              </label>
            </li>
            {{#each project in projects}}
              <li>
                {{#link-to 'project' project}}            
                  {{project.name}}
                  {{#if canEdit}}
                    <span class="right" {{action "deleteProject" project}}>&times;</span> 
                  {{/if}}
                {{/link-to}}
              </li>
            {{else}}
              You don't have any projects
            {{/each}}
          </ul>
        </aside>

        <section class="main-section">
          {{outlet}}
        </section>

        <a class="exit-off-canvas"></a>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" data-template-name="project-title" >
    {{editable value=name editable=canEdit}}
  </script>
  
  <script type="text/x-handlebars" id="project">
    <ul class="left-side-nav">
      <li class="heading">Investigations {{#if canEdit}}<span class="secondary label" {{action "createInvestigation"}}>New</span>{{/if}}</li>
      {{#each investigation in investigations}}
        <li>
          {{#link-to 'investigation' investigation}}            
            {{investigation.name}}
          {{/link-to}}
        </li>  
      {{else}}
        <li class="muted">
          You haven't created any investigations yet.
        </li>
      {{/each}}
    </ul>  
      
    <div class="main-container">
      {{outlet}}
    </div>
  </script>
  
  <script type="text/x-handlebars" id="investigation">
    <div class="row full-width">
      <div class="medium-12 columns">
        <h3>{{editable value=name editable=canEdit}}</h3>
        <a {{action 'deleteInvestigation' this}}>delete investigation</a>
        {{outlet}}
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="investigation/index">
    {{bar-chart width=800 data=chartdata xAxisLabel=xAxisLabel yAxisLabel=yAxisLabel}}
  </script>
  
  <script type="text/x-handlebars" id="investigation/new">
    <div class="medium-4 columns">
      
      {{view Ember.Select content=eventTypes value=selectedEventType}}
      {{view Ember.Select content=verbs value=selectedVerb}}
      {{input value=xAxisLabel placeholder="x axis"}}
      {{input value=yAxisLabel placeholder="y axis"}}
      <button {{action 'createBarChart'}}>Create chart</button>
      
      <pre>{{queryDefinition}}</pre>
    </div>
  </script>
      
  <script type="text/x-handlebars" id="projects/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Project not found</h3>
        <p>This project may be private. If someone gave you this link, they may need to invite you to the project.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="investigation/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Investigation not found</h3>
        <p>This investigation may be private. If someone gave you this link, they may need to invite you to the project.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="project/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Project not found</h3>
        <p>This project may be private. If someone gave you this link, they may need to invite you to the project.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="user/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Failed to connect to API.</h3>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="userevents">
    <div class="row pad">
      <div class="medium-8 columns">
        <h3>Brackets is collecting your data with Regard.</h3>
        <p>Here's all the data we have on you. You can see how Brackets are using the data {{#link-to 'projects'}} here {{/link-to}}</p>
      </div>
      <div class="medium-3 columns">
        <a class="button alert" {{action 'deleteData'}}>Delete my data</a>
      </div>
      <div class="medium-12 medium-centered columns">
        {{print-json events}}
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="index">
    <div class="row pad">
      <div class="medium-12 medium-centered columns text-center">
        <img src="/assets/img/regard-logo-color.svg" height="200px" width="200px"/>
        <h1>Regard</h1>
        <p>Get answers to questions about a user's behavior and their environment.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="project/loading">
    <div class="row pad">
      <div class="medium-12 medium-centered columns text-center">
        {{partial "spinner"}}
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="_spinner">
    <div class="spinner">
      <div class="bounce1"></div>
      <div class="bounce2"></div>
      <div class="bounce3"></div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="components/bar-chart">
    <g {{bind-attr transform=transformG}}>
      <g class="x axis" {{bind-attr transform=transformX}}>
        <text class="axis-label" transform="translate(0,-30)">{{xAxisLabel}}</text>
      </g>
      <g class="y axis" {{bind-attr transform=transformY}}>
        <text class="axis-label">{{yAxisLabel}}</text>
      </g>
      <g class="value axis"></g>
      <g class="chart"></g>
    </g>
  </script>
  
  <script src="portal/libs/jquery-1.10.2.js"></script>
  <script src="portal/libs/handlebars-1.1.2.js"></script>
  <script src="portal/libs/ember.js"></script>
  <script src="portal/libs/ember-data.js"></script>
  <script src="portal/libs/d3.min.js"></script>
  
  <script src="portal/app.js"></script>
  <script src="portal/router.js"></script>
  
  <script src="portal/controllers/AuthenticationController.js"></script>    
  <script src="portal/controllers/ApplicationController.js"></script>
  <script src="portal/controllers/ProjectController.js"></script>
  <script src="portal/controllers/InvestigationController.js"></script>
  <script src="portal/controllers/InvestigationNewController.js"></script>
  
  <script src="portal/models/ProjectModel.js"></script>
  <script src="portal/models/InvestigationModel.js"></script>
  <script src="portal/models/UserModel.js"></script>
  <script src="portal/models/UserEventModel.js"></script>
  
  <script src="portal/components/BarChartComponent.js"></script>
  
  <script src="/assets/js/foundation.min.js"></script>
  <script src="/assets/js/main.js"></script>
</body>
</html><commit_msg>Only show delete link if can edit<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Regard developer portal</title>
  <link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
  
  <script type="text/x-handlebars" data-template-name="user-welcome" >
    <h1>User welcome template</h1>
  </script>
    
  <script type="text/x-handlebars" data-template-name="application">
    <div class="off-canvas-wrap" data-offcanvas>
      <div class="inner-wrap">
        <nav class="tab-bar">
          {{#unless isAnonymous}}
          <section class="left-small">
            <a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a>
          </section>
          {{/unless}}

          <section class="middle tab-bar-section">
            <h1 class="title">{{outlet title}}</h1>
          </section>
          
          <section class="right-large">
            <div class="right">
              {{#if canEdit}}
                {{name}}
                <a href="/logout">Log out</a>
              {{else}}
                <a href="/login">Log in</a>
              {{/if}}
            </div>
          </section>
        </nav>

        <aside class="left-off-canvas-menu">
          <ul class="off-canvas-list">
            <li>
              <label>Projects 
                {{#if canEdit}}
                  <span class="label" {{action "createProject"}}>New</span>
                {{/if}}
              </label>
            </li>
            {{#each project in projects}}
              <li>
                {{#link-to 'project' project}}            
                  {{project.name}}
                  {{#if canEdit}}
                    <span class="right" {{action "deleteProject" project}}>&times;</span> 
                  {{/if}}
                {{/link-to}}
              </li>
            {{else}}
              You don't have any projects
            {{/each}}
          </ul>
        </aside>

        <section class="main-section">
          {{outlet}}
        </section>

        <a class="exit-off-canvas"></a>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" data-template-name="project-title" >
    {{editable value=name editable=canEdit}}
  </script>
  
  <script type="text/x-handlebars" id="project">
    <ul class="left-side-nav">
      <li class="heading">Investigations {{#if canEdit}}<span class="secondary label" {{action "createInvestigation"}}>New</span>{{/if}}</li>
      {{#each investigation in investigations}}
        <li>
          {{#link-to 'investigation' investigation}}            
            {{investigation.name}}
          {{/link-to}}
        </li>  
      {{else}}
        <li class="muted">
          You haven't created any investigations yet.
        </li>
      {{/each}}
    </ul>  
      
    <div class="main-container">
      {{outlet}}
    </div>
  </script>
  
  <script type="text/x-handlebars" id="investigation">
    <div class="row full-width">
      <div class="medium-12 columns">
        <h3>{{editable value=name editable=canEdit}}</h3>
        {{#if canEdit}}
        <a {{action 'deleteInvestigation' this}}>delete investigation</a>
        {{/if}}
        {{outlet}}
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="investigation/index">
    {{bar-chart width=800 data=chartdata xAxisLabel=xAxisLabel yAxisLabel=yAxisLabel}}
  </script>
  
  <script type="text/x-handlebars" id="investigation/new">
    <div class="medium-4 columns">
      
      {{view Ember.Select content=eventTypes value=selectedEventType}}
      {{view Ember.Select content=verbs value=selectedVerb}}
      {{input value=xAxisLabel placeholder="x axis"}}
      {{input value=yAxisLabel placeholder="y axis"}}
      <button {{action 'createBarChart'}}>Create chart</button>
      
      <pre>{{queryDefinition}}</pre>
    </div>
  </script>
      
  <script type="text/x-handlebars" id="projects/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Project not found</h3>
        <p>This project may be private. If someone gave you this link, they may need to invite you to the project.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="investigation/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Investigation not found</h3>
        <p>This investigation may be private. If someone gave you this link, they may need to invite you to the project.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="project/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Project not found</h3>
        <p>This project may be private. If someone gave you this link, they may need to invite you to the project.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="user/error">
    <div class="row pad">
      <div class="medium-6 medium-centered columns text-center">
        <h3>Failed to connect to API.</h3>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="userevents">
    <div class="row pad">
      <div class="medium-8 columns">
        <h3>Brackets is collecting your data with Regard.</h3>
        <p>Here's all the data we have on you. You can see how Brackets are using the data {{#link-to 'projects'}} here {{/link-to}}</p>
      </div>
      <div class="medium-3 columns">
        <a class="button alert" {{action 'deleteData'}}>Delete my data</a>
      </div>
      <div class="medium-12 medium-centered columns">
        {{print-json events}}
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="index">
    <div class="row pad">
      <div class="medium-12 medium-centered columns text-center">
        <img src="/assets/img/regard-logo-color.svg" height="200px" width="200px"/>
        <h1>Regard</h1>
        <p>Get answers to questions about a user's behavior and their environment.</p>
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="project/loading">
    <div class="row pad">
      <div class="medium-12 medium-centered columns text-center">
        {{partial "spinner"}}
      </div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="_spinner">
    <div class="spinner">
      <div class="bounce1"></div>
      <div class="bounce2"></div>
      <div class="bounce3"></div>
    </div>
  </script>
  
  <script type="text/x-handlebars" id="components/bar-chart">
    <g {{bind-attr transform=transformG}}>
      <g class="x axis" {{bind-attr transform=transformX}}>
        <text class="axis-label" transform="translate(0,-30)">{{xAxisLabel}}</text>
      </g>
      <g class="y axis" {{bind-attr transform=transformY}}>
        <text class="axis-label">{{yAxisLabel}}</text>
      </g>
      <g class="value axis"></g>
      <g class="chart"></g>
    </g>
  </script>
  
  <script src="portal/libs/jquery-1.10.2.js"></script>
  <script src="portal/libs/handlebars-1.1.2.js"></script>
  <script src="portal/libs/ember.js"></script>
  <script src="portal/libs/ember-data.js"></script>
  <script src="portal/libs/d3.min.js"></script>
  
  <script src="portal/app.js"></script>
  <script src="portal/router.js"></script>
  
  <script src="portal/controllers/AuthenticationController.js"></script>    
  <script src="portal/controllers/ApplicationController.js"></script>
  <script src="portal/controllers/ProjectController.js"></script>
  <script src="portal/controllers/InvestigationController.js"></script>
  <script src="portal/controllers/InvestigationNewController.js"></script>
  
  <script src="portal/models/ProjectModel.js"></script>
  <script src="portal/models/InvestigationModel.js"></script>
  <script src="portal/models/UserModel.js"></script>
  <script src="portal/models/UserEventModel.js"></script>
  
  <script src="portal/components/BarChartComponent.js"></script>
  
  <script src="/assets/js/foundation.min.js"></script>
  <script src="/assets/js/main.js"></script>
</body>
</html>
{'fraction_non_alphanumeric': 0.17339108910891088, 'fraction_numerical': 0.007054455445544555, 'mean_word_length': 2.459858702633269, 'pattern_counts': {'":': 0, '<': 463, '<?xml version=': 0, '>': 463, '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': '185209', 'n_tokens_mistral': 5172, 'n_tokens_neox': 5039, 'n_words': 1092}