Bug ingestion status

This commit is contained in:
2025-03-27 14:52:42 +01:00
parent 1571410f53
commit 2a587275b5
4 changed files with 212 additions and 61 deletions

162
package-lock.json generated
View File

@@ -8,6 +8,7 @@
"name": "sakai-vue",
"version": "4.0.0",
"dependencies": {
"@heroicons/vue": "^2.2.0",
"@heroicons/vue": "^2.2.0",
"@matpool/vue-json-view": "^0.1.8",
"@primevue/themes": "^4.0.0",
@@ -17,15 +18,18 @@
"chart.js": "3.3.2",
"moment": "^2.30.1",
"pinia": "^2.3.0",
"pinia": "^2.3.0",
"primeicons": "^6.0.1",
"primevue": "^4.0.0",
"prismjs": "^1.29.0",
"sakai-vue": "file:",
"sakai-vue": "file:",
"sockjs-client": "^1.6.1",
"vue": "^3.4.34",
"vue-authenticate-2": "^2.2.0",
"vue-router": "^4.4.0",
"vue3-spinner": "^0.0.17",
"vue3-spinner": "^0.0.17",
"webstomp-client": "^1.2.6"
},
"devDependencies": {
@@ -43,6 +47,7 @@
"tailwindcss-primeui": "^0.3.2",
"unplugin-vue-components": "^0.27.3",
"vite": "^5.4.10"
"vite": "^5.4.10"
}
},
"node_modules/@alloc/quick-lru": {
@@ -542,6 +547,15 @@
"vue": ">= 3"
}
},
"node_modules/@heroicons/vue": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@heroicons/vue/-/vue-2.2.0.tgz",
"integrity": "sha512-G3dbSxoeEKqbi/DFalhRxJU4mTXJn7GwZ7ae8NuEQzd1bqdd0jAbdaBZlHPcvPD2xI1iGzNVB4k20Un2AguYPw==",
"license": "MIT",
"peerDependencies": {
"vue": ">= 3"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
@@ -846,6 +860,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"android"
@@ -860,6 +875,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"android"
@@ -874,6 +890,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -888,6 +905,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -930,6 +948,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -944,6 +963,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -958,6 +978,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -1000,6 +1021,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -1014,6 +1036,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -1028,6 +1051,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -1041,6 +1065,7 @@
"x64"
],
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -1055,6 +1080,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"linux"
@@ -1069,6 +1095,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"win32"
@@ -1083,6 +1110,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"win32"
@@ -1097,6 +1125,7 @@
],
"dev": true,
"license": "MIT",
"license": "MIT",
"optional": true,
"os": [
"win32"
@@ -1126,6 +1155,11 @@
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
"license": "MIT"
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/lodash": {
"version": "4.17.7",
@@ -1153,11 +1187,17 @@
}
},
"node_modules/@vue/compiler-core": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz",
"integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz",
"integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.25.3",
"@vue/shared": "3.5.13",
"@babel/parser": "^7.25.3",
"@vue/shared": "3.5.13",
"entities": "^4.5.0",
@@ -1166,6 +1206,10 @@
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz",
"integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz",
"integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==",
@@ -1173,14 +1217,25 @@
"dependencies": {
"@vue/compiler-core": "3.5.13",
"@vue/shared": "3.5.13"
"@vue/compiler-core": "3.5.13",
"@vue/shared": "3.5.13"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz",
"integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz",
"integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==",
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.25.3",
"@vue/compiler-core": "3.5.13",
"@vue/compiler-dom": "3.5.13",
"@vue/compiler-ssr": "3.5.13",
"@vue/shared": "3.5.13",
"@babel/parser": "^7.25.3",
"@vue/compiler-core": "3.5.13",
"@vue/compiler-dom": "3.5.13",
@@ -1189,10 +1244,16 @@
"estree-walker": "^2.0.2",
"magic-string": "^0.30.11",
"postcss": "^8.4.48",
"magic-string": "^0.30.11",
"postcss": "^8.4.48",
"source-map-js": "^1.2.0"
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz",
"integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz",
"integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==",
@@ -1200,6 +1261,8 @@
"dependencies": {
"@vue/compiler-dom": "3.5.13",
"@vue/shared": "3.5.13"
"@vue/compiler-dom": "3.5.13",
"@vue/shared": "3.5.13"
}
},
"node_modules/@vue/devtools-api": {
@@ -1222,15 +1285,24 @@
}
},
"node_modules/@vue/reactivity": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.13.tgz",
"integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.13.tgz",
"integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==",
"license": "MIT",
"dependencies": {
"@vue/shared": "3.5.13"
"@vue/shared": "3.5.13"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.13.tgz",
"integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.13.tgz",
"integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==",
@@ -1238,14 +1310,23 @@
"dependencies": {
"@vue/reactivity": "3.5.13",
"@vue/shared": "3.5.13"
"@vue/reactivity": "3.5.13",
"@vue/shared": "3.5.13"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz",
"integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz",
"integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==",
"license": "MIT",
"dependencies": {
"@vue/reactivity": "3.5.13",
"@vue/runtime-core": "3.5.13",
"@vue/shared": "3.5.13",
"@vue/reactivity": "3.5.13",
"@vue/runtime-core": "3.5.13",
"@vue/shared": "3.5.13",
@@ -1253,6 +1334,10 @@
}
},
"node_modules/@vue/server-renderer": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.13.tgz",
"integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.13.tgz",
"integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==",
@@ -1260,9 +1345,12 @@
"dependencies": {
"@vue/compiler-ssr": "3.5.13",
"@vue/shared": "3.5.13"
"@vue/compiler-ssr": "3.5.13",
"@vue/shared": "3.5.13"
},
"peerDependencies": {
"vue": "3.5.13"
"vue": "3.5.13"
}
},
"node_modules/@vue/shared": {
@@ -1270,6 +1358,10 @@
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz",
"integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
"license": "MIT"
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz",
"integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
"license": "MIT"
},
"node_modules/@websanova/vue-auth": {
"version": "4.2.1",
@@ -1792,6 +1884,7 @@
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"license": "BSD-2-Clause",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
@@ -2990,6 +3083,10 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"license": "ISC"
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"license": "ISC"
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -3073,6 +3170,7 @@
}
],
"license": "MIT",
"license": "MIT",
"dependencies": {
"nanoid": "^3.3.8",
"picocolors": "^1.1.1",
@@ -3412,8 +3510,10 @@
"integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==",
"dev": true,
"license": "MIT",
"license": "MIT",
"dependencies": {
"@types/estree": "1.0.6"
"@types/estree": "1.0.6"
},
"bin": {
"rollup": "dist/bin/rollup"
@@ -3492,6 +3592,10 @@
"resolved": "",
"link": true
},
"node_modules/sakai-vue": {
"resolved": "",
"link": true
},
"node_modules/sass": {
"version": "1.77.8",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz",
@@ -3592,6 +3696,10 @@
}
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"license": "BSD-3-Clause",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
@@ -4074,10 +4182,13 @@
"integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
"dev": true,
"license": "MIT",
"license": "MIT",
"dependencies": {
"esbuild": "^0.21.3",
"postcss": "^8.4.43",
"rollup": "^4.20.0"
"postcss": "^8.4.43",
"rollup": "^4.20.0"
},
"bin": {
"vite": "bin/vite.js"
@@ -4097,6 +4208,7 @@
"lightningcss": "^1.21.0",
"sass": "*",
"sass-embedded": "*",
"sass-embedded": "*",
"stylus": "*",
"sugarss": "*",
"terser": "^5.4.0"
@@ -4117,6 +4229,9 @@
"sass-embedded": {
"optional": true
},
"sass-embedded": {
"optional": true
},
"stylus": {
"optional": true
},
@@ -4129,6 +4244,10 @@
}
},
"node_modules/vue": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz",
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
"license": "MIT",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz",
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
@@ -4139,6 +4258,11 @@
"@vue/runtime-dom": "3.5.13",
"@vue/server-renderer": "3.5.13",
"@vue/shared": "3.5.13"
"@vue/compiler-dom": "3.5.13",
"@vue/compiler-sfc": "3.5.13",
"@vue/runtime-dom": "3.5.13",
"@vue/server-renderer": "3.5.13",
"@vue/shared": "3.5.13"
},
"peerDependencies": {
"typescript": "*"
@@ -4187,6 +4311,32 @@
}
}
},
"node_modules/vue-demi": {
"version": "0.14.10",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz",
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/vue-eslint-parser": {
"version": "9.4.3",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz",
@@ -4237,6 +4387,18 @@
"vue": "^3.2.41"
}
},
"node_modules/vue3-spinner": {
"version": "0.0.17",
"resolved": "https://registry.npmjs.org/vue3-spinner/-/vue3-spinner-0.0.17.tgz",
"integrity": "sha512-iiOa1rRxMOFWmEExdPYwAgY+EavW21kPa0G3khS3vRVnDxVV2QPXHugBucZxpuyNijMZxR4mq+/ryNV7ziHK2Q==",
"license": "MIT",
"dependencies": {
"vue": "^3.2.41"
},
"peerDependencies": {
"vue": "^3.2.41"
}
},
"node_modules/webpack-sources": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",

View File

@@ -14,8 +14,9 @@ import '@/assets/tailwind.css';
import Nora from '@primevue/themes/nora';
import axios from 'axios';
import { LoadingStore } from './stores/LoadingStore.js';
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;//'http://localhost:8082' //'
console.log(import.meta.env.VITE_BACKEND_URL);
//axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL; //'http://localhost:8082'
//console.log(import.meta.env.VITE_BACKEND_URL);
axios.defaults.baseURL = 'http://localhost:8082';
import { createAuth } from '@websanova/vue-auth';

View File

@@ -147,6 +147,7 @@ const filters = ref();
const userPrefStore = UserPrefStore();
const ksDocumentStore = KsDocumentStore();
const loadingStore = LoadingStore();
const fe_status = ref('');
const initFilters = () => {
filters.value = {
@@ -319,20 +320,20 @@ const confirmDeleteFromVectorStore = (id) => {
//ingestion
const startIndividualngestion = (id) => {
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion', life: 3000 });
fe_status = "IN PROGRESS"
fe_status.value = "IN PROGRESS"
axios.get(`/test/ingest_document/${id}`)
.then(response => {
if (response.data.status == "OK") {
toast.add({ severity: 'success', summary: 'Success', detail: 'Document ingestion started...', life: 3000 });
fe_status = "IN PROGRESS"
fe_status.value = "IN PROGRESS"
}
if (response.data.status == "ERROR") {
toast.add({ severity: 'error', summary: 'Success', detail: 'Error ingesting document:' + response.data.message, life: 3000 });
fe_status = "ERROR"
fe_status.value = "ERROR"
}
ksdocuments.value.forEach(element => {
if (element.id == id) {
element.ingestionStatus = fe_status
element.ingestionStatus = fe_status.value
console.log("Updated element", element)
}
});

View File

@@ -1,39 +1,8 @@
<template>
<div>
<div class="content-section introduction big-title">
<div class="feature-intro">
<h1>Repository <span>DataTable</span></h1>
</div>
</div>
<div class="card">
<Toast />
<ConfirmPopup></ConfirmPopup>
<Toolbar class="mb-6">
<template #start>
<Button label="Refresh" icon="pi pi-refresh" class="mr-2"
@click="refreshPage" v-tooltip.top="'Refresh all records'" />
</template>
<template #end>
<Button label="Expand All" icon="pi pi-plus" class="mr-3"
@click="expandAll" v-tooltip.top="'Expand all records'" />
<Button label="Collapse All" icon="pi pi-minus" class="mr-3"
@click="collapseAll" v-tooltip.top="'Collapse all records'" />
<!--Button label="Add New Git Repo" icon="pi pi-plus" severity="secondary" rounded class="mr-3" @click="newCodeRepoForm()" v-tooltip.top="'Add New Git Repo'" class="mr-2" /-->
<!--Button label="Add Git Repo" icon="pi pi-bolt" severity="secondary" rounded @click="cloneRepoForm()" v-tooltip.top="'Add New Git Repo'" /-->
<Button label="New Git Repository" icon="pi pi-bolt"
@click="showDialog = true" v-tooltip.top="'Add New Git Repository'" />
<Dialog v-model:visible="showDialog" :style="{ width: '50rem' }" header="Repository Details"
:modal="true">
<div>
<cloneForm @submitForm="cloneRepo" @cancel="showDialog = false" />
</div>
</Dialog>
</template>
</Toolbar>
<!-- <div class="card"> -->
<Toast />
<ConfirmPopup></ConfirmPopup>
<DataTable v-model:filters="filters" v-model:expandedRows="expandedRows" @rowExpand="onRowExpand"
@rowCollapse="onRowCollapse" :value="codeRepoInfo" :paginator="true" :rows="10"
paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown"
@@ -44,18 +13,36 @@
:globalFilterFields="['branch', 'cloneStatus', 'ingestionStatus', 'ingestionDateFormat']"
tableStyle="min-width: 70rem" removableSort>
<template #header>
<div class="flex flex-wrap gap-2 items-center justify-between">
<h4 class="m-0">Manage Repositories</h4>
<div class="flex items-center justify-between gap-4 p-4 ">
<span class="text-xl font-bold">Repository DataTable</span>
<div class="flex items-center gap-2 flex-grow">
<IconField>
<InputIcon>
<i class="pi pi-search" />
</InputIcon>
<InputText v-model="filters['global'].value" placeholder="Search..." />
</IconField>
</div>
<Button icon="pi pi-refresh" rounded raised class="mr-1 p-button-sm"
@click="refreshPage" v-tooltip.top="'Refresh all records'" />
<Button icon="pi pi-plus" rounded raised class="mr-1 p-button-sm"
@click="expandAll" v-tooltip.top="'Expand all records'" />
<Button icon="pi pi-minus" rounded raised class="mr-1 p-button-sm"
@click="collapseAll" v-tooltip.top="'Collapse all records'" />
<!--Button label="Add New Git Repo" icon="pi pi-plus" severity="secondary" rounded class="mr-3" @click="newCodeRepoForm()" v-tooltip.top="'Add New Git Repo'" class="mr-1" /-->
<!--Button label="Add Git Repo" icon="pi pi-bolt" severity="secondary" rounded @click="cloneRepoForm()" v-tooltip.top="'Add New Git Repo'" /-->
<Button icon="pi pi-bolt" rounded raised class="p-button-sm"
@click="showDialog = true" v-tooltip.top="'Add New Git Repository'" />
<Dialog v-model:visible="showDialog" :style="{ width: '50rem' }" header="Repository Details"
:modal="true">
<div>
<cloneForm @submitForm="cloneRepo" @cancel="showDialog = false" />
</div>
</Dialog>
</div>
</template>
<template #groupheader="slotProps">
<div class="flex items-center gap-2">
<div class="flex items-center gap-2" style="background: '#f3f3f3'">
<img :alt="slotProps.data.repoName" :src="logoSrc" width="32" style="vertical-align: middle" />
<span>{{ slotProps.data.repoName }}</span>
</div>
@@ -176,25 +163,25 @@
</Column>
<!--Column header="Actions" headerStyle="width: 5rem; text-align: center" bodyStyle="text-align: center; overflow: visible"-->
<Column :exportable="false" style="min-width: 12rem">
<template #body="slotProps">
<Column field="id" header="A" :style="{minWidth: '12rem', position: 'sticky', right: '0', zIndex: '1', background: '#f3f3f3'}" :showFilterMatchModes="false">
<div class="flex justify-center items-center space-x-3">
<template #body="slotProps" class="flex justify-center items-center space-x-3">
<Button raised rounded type="button" class="mr-2" icon="pi pi-play"
@click="parseGitRepo(slotProps.data)" v-tooltip.top="'Start Parsing of Repo'"
:disabled="isButtonDisabled(slotProps.data)" />
<Button text raised rounded severity="info" type="button" class="mr-2" icon="pi pi-play"
@click="parseGitRepo(slotProps.data)" v-tooltip.top="'Start Parsing of Repo'"
:disabled="isButtonDisabled(slotProps.data)" />
<Button raised rounded type="button" class="mr-2" icon="pi pi-play"
@click="reverserEnginneringGitRepo(slotProps.data)" v-tooltip.top="'Start RE of Repo'"
:disabled="isButtonDisabled(slotProps.data)" />
<Button text raised rounded severity="warn" type="button" class="mr-2" icon="pi pi-play"
@click="reverserEnginneringGitRepo(slotProps.data)" v-tooltip.top="'Start RE of Repo'"
:disabled="isButtonDisabled(slotProps.data)" />
<!--Button raised rounded severity="warn" type="button" class="mr-2" icon="pi pi-forward"
@click="reIngestWithPullChanges(slotProps.data)"
v-tooltip.top="'Ingest Latest changes From Git'" /-->
<!--Button text raised rounded severity="warn" type="button" class="mr-2" icon="pi pi-forward"
@click="reIngestWithPullChanges(slotProps.data)"
v-tooltip.top="'Ingest Latest changes From Git'" /-->
<Button text raised rounded severity="danger" type="button" icon="pi pi-trash"
@click="deleteRecordsFromVectorStore(slotProps.data)" v-tooltip.top="'Delete Records'" />
</template>
<Button raised rounded type="button" icon="pi pi-trash"
@click="deleteRecordsFromVectorStore(slotProps.data)" v-tooltip.top="'Delete Records'" />
</template>
</div>
</Column>
@@ -207,13 +194,13 @@
</template>
<template #groupfooter="slotProps">
<div class="flex justify-end font-bold w-full">
<div class="flex justify-end font-bold w-full" style="background-color: #f3f3f3;">
Total Count: {{ calculateCustomerTotal(slotProps.data.repoName) }}
</div>
</template>
</DataTable>
</div>
</div>
<!-- </div> -->
</template>
<script setup>