<commit_before><template>
  <div>
    <el-button type="primary" icon="plus" @click="addVault"></el-button>
    <el-button type="primary" @click="loadAllVaults">Refresh</el-button>
    <el-dialog :title="currentVault.name" v-model="dialogEditVaultVisible">
      <el-form>
        <el-form-item label="Name">
          <el-input v-model="currentVault.name"></el-input>
        </el-form-item>
        <el-form-item label="Username">
          <el-input v-model="currentVault.username"></el-input>
        </el-form-item>
        <el-form-item label="Password">
          <el-input v-model="currentVault.password" type="password"></el-input>
        </el-form-item>
        <el-form-item label="Url">
          <el-input v-model="currentVault.url"></el-input>
        </el-form-item>
        <el-form-item label="Note">
          <el-input v-model="currentVault.note"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="setDialogVisible(false)">取 消</el-button>
        <el-button type="primary" @click="updateOrInsertVault">确 定</el-button>
      </div>
    </el-dialog>

    <el-table v-loading.body="loading" :data="vaults" height="250" border style="width: 100%">
      <el-table-column prop="name" label="Name" width="180">
      </el-table-column>
      <el-table-column prop="url" label="Url" width="180">
      </el-table-column>
      <el-table-column prop="note" label="Note" width="180">
      </el-table-column>
      <el-table-column prop="username" label="Username" width="180">
      </el-table-column>
      <el-table-column prop="password" label="Password">
      </el-table-column>
      <el-table-column label="CRUD">
        <template scope="scope">
          <el-button icon="edit" @click="handleEdit(scope.row, 'edit')"></el-button>
          <el-button icon="delete" @click="handleEdit(scope.row, 'delete')"></el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import Vault from '../models/vault'

export default {
  data() {
    return {
      vaults: [],
      loading: true,
      dialogEditVaultVisible: false,
      currentVault: {}
    }
  },
  computed: {
    userKey () {
      return this.$store.state.key
    }
  },
  created () {
    this.loadAllVaults()
  },
  methods: {
    setDialogVisible (value) {
      this.dialogEditVaultVisible = !!value
    },
    loadAllVaults () {<commit_msg>add grid to dashboard<commit_after><template>
  <div>
    <el-row>
      <el-col :span="16" :offset="4" :xs="{span:20, offset:2}" :sm="{span:16, offset:4}" :md="{span:18, offset:3}" :lg="{span:16, offset:4}">
        <el-button type="primary" icon="plus" @click="addVault"></el-button>
        <el-button type="primary" @click="loadAllVaults">Refresh</el-button>
        <el-table v-loading.body="loading" :data="vaults" height="250" border style="width: 100%">
          <el-table-column prop="name" label="Name" width="180">
          </el-table-column>
          <el-table-column prop="url" label="Url" width="180">
          </el-table-column>
          <el-table-column prop="note" label="Note" width="180">
          </el-table-column>
          <el-table-column prop="username" label="Username" width="180">
          </el-table-column>
          <el-table-column prop="password" label="Password">
          </el-table-column>
          <el-table-column label="CRUD">
            <template scope="scope">
              <el-button icon="edit" @click="handleEdit(scope.row, 'edit')"></el-button>
              <el-button icon="delete" @click="handleEdit(scope.row, 'delete')"></el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-col>
    </el-row>

    <el-dialog :title="currentVault.name" v-model="dialogEditVaultVisible">
      <el-form>
        <el-form-item label="Name">
          <el-input v-model="currentVault.name"></el-input>
        </el-form-item>
        <el-form-item label="Username">
          <el-input v-model="currentVault.username"></el-input>
        </el-form-item>
        <el-form-item label="Password">
          <el-input v-model="currentVault.password" type="password"></el-input>
        </el-form-item>
        <el-form-item label="Url">
          <el-input v-model="currentVault.url"></el-input>
        </el-form-item>
        <el-form-item label="Note">
          <el-input v-model="currentVault.note"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="setDialogVisible(false)">取 消</el-button>
        <el-button type="primary" @click="updateOrInsertVault">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import Vault from '../models/vault'

export default {
  data() {
    return {
      vaults: [],
      loading: true,
      dialogEditVaultVisible: false,
      currentVault: {}
    }
  },
  computed: {
    userKey () {
      return this.$store.state.key
    }
  },
  created () {
    this.loadAllVaults()
  },
  methods: {
    setDialogVisible (value) {
      this.dialogEditVaultVisible = !!value
    },
    loadAllVaults () {
{'fraction_non_alphanumeric': 0.18966518289142636, 'fraction_numerical': 0.009870330946390556, 'mean_word_length': 2.5543328748280607, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, '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': '748657', 'n_tokens_mistral': 1762, 'n_tokens_neox': 1729, 'n_words': 271}