<commit_before><template>
    <div>
      <md-toolbar class="md-transparent gp-toolbar">
        <md-input-container style="flex: 1">
          <md-input placeholder="Search..." />
          <md-button class="md-icon-button md-xmini">
            <md-icon>clear</md-icon>
          </md-button>
        </md-input-container>
        <md-checkbox md-theme="orange"  id="my-test5" name="my-test5" class="md-primary">参数类型</md-checkbox>
        <md-checkbox md-theme="green"  id="my-test6" name="my-test6"  class="md-primary">Primary Green</md-checkbox>
        <md-checkbox md-theme="light-blue" id="my-test7" name="my-test7" class="md-primary">Primary Light Blue</md-checkbox>
        <div class="gp-spacer"></div>
        <md-button class="md-raised"
          @click.native="searchSetting">
          <md-icon>search</md-icon>
        </md-button>
        <md-button class="md-raised md-warn">
          <md-icon>save</md-icon>
        </md-button>
      </md-toolbar>
      <md-layout md-gutter="16">
        <md-table v-once>
          <md-table-header>
            <md-table-row>
              <md-table-head>Dessert (100g serving)</md-table-head>
              <md-table-head md-numeric>Calories (g)</md-table-head>
              <md-table-head md-numeric>Fat (g)</md-table-head>
              <md-table-head md-numeric>Carbs (g)</md-table-head>
              <md-table-head md-numeric>Protein (g)</md-table-head>
            </md-table-row>
          </md-table-header>

          <md-table-body>
            <md-table-row v-for="(setting, index) in settings" :key="index">
              <md-table-cell>{{ setting.group }}</md-table-cell>
              <md-table-cell>{{ setting.option }}</md-table-cell>
              <md-table-cell>{{ setting.value }}</md-table-cell>
              <md-table-cell>{{ setting.description }}</md-table-cell>
              <md-table-cell>ttt</md-table-cell>
            </md-table-row>
          </md-table-body>
        </md-table>
      </md-layout>
    </div>
</template>

<style lang="scss" scoped>
  .md-input-container{
    margin-right: 10px;
  }
</style>

<script>
  import httpOptions from '../../../utils/jwtToken';
  import { mapGetters } from 'vuex';
  import routePage from '../../common/RoutePage';
  export default {
    mixins: [routePage, httpOptions],
    data: () => {
      return {
        pageId: 'settings',
        settings: []
      };
    },
    computed: {
      ...mapGetters(['jwttoken', 'subject', 'audience', 'baseUrl'])
    },
    methods: {
      searchSetting() {
        let options = this.$httpOptions();

        this.$http.post(this.$httpUrl('sys-opts-query.do'), {group: 'BASIC'}, options).then(
        function(response) {

          console.log(response.body.meta);
          if (response.body.meta.state === 'success') {
            console.log('----- ok ');
            console.log(response.body.data);
            for ( let i; i < response.body.data.length; i++) {
              console.log(response.body.data[i]);
              this.settings.push(response.body.data[i]);
            }
          } else {

            console.log('----- fail ');
          }
        }, function(response) {
          console.log('----- fail ');
          console.log(response);
        });
      }
    }
  };
</script><commit_msg>successful fetch the setting from server<commit_after><template>
    <div>
      <md-toolbar class="md-transparent gp-toolbar">
        <md-input-container style="flex: 1">
          <md-input placeholder="Search..." />
          <md-button class="md-icon-button md-xmini">
            <md-icon>clear</md-icon>
          </md-button>
        </md-input-container>
        <md-checkbox md-theme="orange"  id="my-test5" name="my-test5" class="md-primary">参数类型</md-checkbox>
        <md-checkbox md-theme="green"  id="my-test6" name="my-test6"  class="md-primary">Primary Green</md-checkbox>
        <md-checkbox md-theme="light-blue" id="my-test7" name="my-test7" class="md-primary">Primary Light Blue</md-checkbox>
        <div class="gp-spacer"></div>
        <md-button class="md-raised"
          @click.native="searchSetting">
          <md-icon>search</md-icon>
        </md-button>
        <md-button class="md-raised md-warn">
          <md-icon>save</md-icon>
        </md-button>
      </md-toolbar>
      <md-layout md-gutter="16">
        <md-table >
          <md-table-header>
            <md-table-row>
              <md-table-head>Dessert (100g serving)</md-table-head>
              <md-table-head md-numeric>Calories (g)</md-table-head>
              <md-table-head md-numeric>Fat (g)</md-table-head>
              <md-table-head md-numeric>Carbs (g)</md-table-head>
              <md-table-head md-numeric>Protein (g)</md-table-head>
            </md-table-row>
          </md-table-header>

          <md-table-body>
            <md-table-row v-for="(setting, index) in settings" :key="index">
              <md-table-cell>{{ setting.group }}</md-table-cell>
              <md-table-cell>{{ setting.option }}</md-table-cell>
              <md-table-cell>{{ setting.value }}</md-table-cell>
              <md-table-cell>{{ setting.description }}</md-table-cell>
              <md-table-cell>ttt</md-table-cell>
            </md-table-row>
          </md-table-body>
        </md-table>
      </md-layout>
    </div>
</template>

<style lang="scss" scoped>
  .md-input-container{
    margin-right: 10px;
  }
</style>

<script>
  import httpOptions from '../../../utils/jwtToken';
  import { mapGetters } from 'vuex';
  import routePage from '../../common/RoutePage';
  export default {
    mixins: [routePage, httpOptions],
    data: () => {
      return {
        pageId: 'settings',
        settings: []
      };
    },
    computed: {
      ...mapGetters(['jwttoken', 'subject', 'audience', 'baseUrl'])
    },
    methods: {
      searchSetting() {
        let options = this.$httpOptions();

        this.$http.post(this.$httpUrl('sys-opts-query.do'), {group: 'BASIC'}, options).then(
        function(response) {
          let data = response.body.data;
          let meta = response.body.meta;

          console.log(meta);
          if (meta.state === 'success') {
            console.log('----- ok ');
            this.settings = data;

          } else {

            console.log('----- fail ');
          }
        }, function(response) {
          console.log('----- fail ');
          console.log(response);
        });
      }
    }
  };
</script>
{'fraction_non_alphanumeric': 0.1855972801730799, 'fraction_numerical': 0.004326997372894452, 'mean_word_length': 1.8867082961641393, 'pattern_counts': {'":': 0, '<': 134, '<?xml version=': 0, '>': 135, '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': '3096668', 'n_tokens_mistral': 2106, 'n_tokens_neox': 2069, 'n_words': 330}