<commit_before><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../styles/shared-styles.html">

<dom-module id="queries-view">
  <template>
    <style is="custom-style" include="shared-styles">
      :host {
        display: block;
      }
      bridgeit-query-list {
        --query-list-wrapper: {
          padding:10px 0 10px 0;
          background-color: transparent;
        };
        --query-list-button: {
          font: inherit;
          background-color:#F9F9F9;
          border-color: transparent;
          color:black;
          outline: none;
          box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
          text-transform: uppercase;
          cursor:pointer;
        };
      }
      bridgeit-query-results {
        --query-results-table: {
          width: 100%;
          margin-bottom: 50px;
        };
      }
      .buttons {
        text-align: center;
        background-color: transparent;
        padding:10px 0 10px 0;
      }
      .buttons button {
        font: inherit;
        background-color:#F9F9F9;
        border-color: transparent;
        color:black;
        outline: none;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
        text-transform: uppercase;
        cursor:pointer;
      }

      iron-selector > * {
        padding: 8px;
      }
      .horizontal-section {
        padding: 0;
        text-align: center;
      }
      .iron-selected {
        background-color: var(--google-blue-500);
        color: white;
      }
      paper-dropdown-menu {
        text-align: left;
        margin: auto;
        width: 180px;
      }
      paper-dropdown-menu.letters {
        width: 90px;
      }
      paper-tabs {
        color: #333;
      }
      .large {
        width:385px;
      }
      .small {
        width:190px;
      }
      .query-options {
        width:385px;
        margin:0 auto;
      }
      .currentquery {
        text-align:center;
        margin:10px;
      }
      .floatLeft {
        float:left;
      }
      .tab-content {
        border: 1px solid #777;
        padding: 10px;
        overflow-y:scroll;
        color: #333 !important;
        background-color: transparent !important;
      }
    </style>

    <br/>
    <paper-tabs selected="{{selectedTab}}" no-bar>
      <paper-tab>Queries</paper-tab>
      <paper-tab>Query Chain Editor</paper-tab>
    </paper-tabs>
    <iron-pages selected="{{selectedTab}}">
      <div class="tab-content">
        <h2 class="page-title">Queries</h2>
        <div class="buttons">
          Query Editor Controls:
          <button onclick="document.getElementById('queries').resetEditor();">New/Reset</button>
          <button onclick="document.getElementById('queries').runQuery();">Run</button>
          <button onclick="document.getElementById('queries').saveQueryWithPrompt();">Save</button>
          <button onclick="document.getElementById('queries').cloneQueryWithPrompt();">Clone</button>
          <button onclick="document.getElementById('queries').deleteQuery();">Delete</button>
          <bridgeit-query-list id="queryList" for="queries"></bridgeit-query-list>
          <bridgeit-message></bridgeit-message>
        </div>
        <div class="query-options">
          <paper-dropdown-menu label="Service:" class$="{{getClass(service)}}" style="padding-right:5px;">
            <iron-selector class="dropdown-content" attr-for-selected="name" selected={{service}}>
              <div name="location">Location</div>
              <div name="mailbox">Mailbox</div>
              <div name="documents">Document</div>
              <div name="metrics">Events</div>
              <div name="authadmin">AuthAdmin</div>
            </iron-selector>
          </paper-dropdown-menu>
          <div class="small floatLeft">
            <template is="dom-if" if="{{isEqual('documents', service)}}">
              <paper-input label="Collection:" value="{{collection}}"></paper-input>
            </template><commit_msg>Move queries list below service list.<commit_after><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../styles/shared-styles.html">

<dom-module id="queries-view">
  <template>
    <style is="custom-style" include="shared-styles">
      :host {
        display: block;
      }
      bridgeit-query-list {
        --query-list-wrapper: {
          padding:10px 0 10px 0;
          background-color: transparent;
          text-align:center;
        };
        --query-list-button: {
          font: inherit;
          background-color:#F9F9F9;
          border-color: transparent;
          color:black;
          outline: none;
          box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
          text-transform: uppercase;
          cursor:pointer;
        };
      }
      bridgeit-query-results {
        --query-results-table: {
          width: 100%;
          margin-bottom: 50px;
        };
      }
      .buttons {
        text-align: center;
        background-color: transparent;
        padding:10px 0 10px 0;
      }
      .buttons button {
        font: inherit;
        background-color:#F9F9F9;
        border-color: transparent;
        color:black;
        outline: none;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
        text-transform: uppercase;
        cursor:pointer;
      }

      iron-selector > * {
        padding: 8px;
      }
      .horizontal-section {
        padding: 0;
        text-align: center;
      }
      .iron-selected {
        background-color: var(--google-blue-500);
        color: white;
      }
      paper-dropdown-menu {
        text-align: left;
        margin: auto;
        width: 180px;
      }
      paper-dropdown-menu.letters {
        width: 90px;
      }
      paper-tabs {
        color: #333;
      }
      .large {
        width:385px;
      }
      .small {
        width:190px;
      }
      .query-options {
        width:385px;
        margin:0 auto;
      }
      .currentquery {
        text-align:center;
        margin:10px;
      }
      .floatLeft {
        float:left;
      }
      .tab-content {
        border: 1px solid #777;
        padding: 10px;
        overflow-y:scroll;
        color: #333 !important;
        background-color: transparent !important;
      }
    </style>

    <br/>
    <paper-tabs selected="{{selectedTab}}" no-bar>
      <paper-tab>Queries</paper-tab>
      <paper-tab>Query Chain Editor</paper-tab>
    </paper-tabs>
    <iron-pages selected="{{selectedTab}}">
      <div class="tab-content">
        <h2 class="page-title">Queries</h2>
        <div class="buttons">
          Query Editor Controls:
          <button onclick="document.getElementById('queries').resetEditor();">New/Reset</button>
          <button onclick="document.getElementById('queries').runQuery();">Run</button>
          <button onclick="document.getElementById('queries').saveQueryWithPrompt();">Save</button>
          <button onclick="document.getElementById('queries').cloneQueryWithPrompt();">Clone</button>
          <button onclick="document.getElementById('queries').deleteQuery();">Delete</button>
          <bridgeit-message></bridgeit-message>
        </div>
        <div class="query-options">
          <paper-dropdown-menu label="Service:" class$="{{getClass(service)}}" style="padding-right:5px;">
            <iron-selector class="dropdown-content" attr-for-selected="name" selected={{service}}>
              <div name="location">Location</div>
              <div name="mailbox">Mailbox</div>
              <div name="documents">Document</div>
              <div name="metrics">Events</div>
              <div name="authadmin">AuthAdmin</div>
            </iron-selector>
          </paper-dropdown-menu>
          <bridgeit-query-list id="queryList" for="queries"></bridgeit-query-list>
          <div class="small floatLeft">
            <template is="dom-if" if="{{isEqual('documents', service)}}">
              <paper-input label="Collection:" value="{{collection}}"></paper-input>
            </template>
{'fraction_non_alphanumeric': 0.14241486068111456, 'fraction_numerical': 0.026048895057115405, 'mean_word_length': 2.1153974060525442, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 113, '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': '4141928', 'n_tokens_mistral': 2955, 'n_tokens_neox': 2726, 'n_words': 611}