<commit_before><!--
<cytoscape :thing="props.row" :connectors="fieldFilter"></cytoscape>

data() {
          return {
            ..
            fieldFilter : ['upload_tags','email_ss'],
            ..
          }
-->
<template>
  <!-- b-table && are from buefy -->
  <div id="cy" ref="cy" class="b-table" :class="{ 'is-loading': loading }"></div>
</template>

<script>
import cytoscape from 'cytoscape'
import Weaver from "weaverjs";
import cxtmenu from 'cytoscape-cxtmenu'
import 'mdi/css/materialdesignicons.css'
import axios from 'axios'
cxtmenu(cytoscape)

async function getConnectors(doc,fields){
  return new Promise((resolve, reject) => {
    let connectors = []
    for (let i in fields) {
      let f = fields[i]
      if (doc[f]) {
        if (Array.isArray(doc[f])) {
          for (let j in doc[f]){
            if (doc[f][j].length > 0) connectors.push('"'+doc[f][j]+'"')
          }
        } else {
          if (doc[f].length > 0) connectors.push('"'+doc[f]+'"')
        }
      }
    }
	  resolve(connectors);
	})
}

async function findDocs(q,f){
  return new Promise((resolve, reject) => {
    let fl = '*,content:[value v=""]'
    if (Array.isArray(f) && f.length>0) {
      fl = f.join(',')
    }
    let q_url = `/solr/core1/select?&wt=json&fl=${fl}&q=${q}`
    console.log('findDocs',q, q_url)
    axios.get(q_url)
    .then(function (res) {<commit_msg>encodeURIComponent<commit_after><!--
<cytoscape :thing="props.row" :connectors="fieldFilter"></cytoscape>

data() {
          return {
            ..
            fieldFilter : ['upload_tags','email_ss'],
            ..
          }
-->
<template>
  <!-- b-table && are from buefy -->
  <div id="cy" ref="cy" class="b-table" :class="{ 'is-loading': loading }"></div>
</template>

<script>
import cytoscape from 'cytoscape'
import Weaver from "weaverjs";
import cxtmenu from 'cytoscape-cxtmenu'
import 'mdi/css/materialdesignicons.css'
import axios from 'axios'
cxtmenu(cytoscape)

async function getConnectors(doc,fields){
  return new Promise((resolve, reject) => {
    let connectors = []
    for (let i in fields) {
      let f = fields[i]
      if (doc[f]) {
        if (Array.isArray(doc[f])) {
          for (let j in doc[f]){
            if (doc[f][j].length > 0) connectors.push('"'+doc[f][j]+'"')
          }
        } else {
          if (doc[f].length > 0) connectors.push('"'+doc[f]+'"')
        }
      }
    }
	  resolve(connectors);
	})
}

async function findDocs(q,f){
  return new Promise((resolve, reject) => {
    let fl = '*,content:[value v=""]'
    if (Array.isArray(f) && f.length>0) {
      fl = f.join(',')
    }
    let q_url = `/solr/core1/select?&wt=json&fl=${fl}&q=${encodeURIComponent(q)}`
    console.log('findDocs',q, q_url)
    axios.get(q_url)
    .then(function (res) {
{'fraction_non_alphanumeric': 0.19287513494062614, 'fraction_numerical': 0.0028787333573227778, 'mean_word_length': 2.6821192052980134, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 31, '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': '1465991', 'n_tokens_mistral': 1018, 'n_tokens_neox': 996, 'n_words': 204}