Merge branch 'master' into develop
This commit is contained in:
@@ -4,7 +4,7 @@ export const msalInstance = new PublicClientApplication({
|
||||
auth: {
|
||||
clientId: '1ddbd871-9544-4a31-97a4-2968ce08e49a', //'d3fee0e3-49e0-4910-b0b4-805bfbd5488a',
|
||||
authority: 'https://login.microsoftonline.com/e0793d39-0939-496d-b129-198edd916feb/', //'https://login.microsoftonline.com/9dc4721e-4d54-4c40-a681-1dd740292901/', //
|
||||
redirectUri: 'http://localhost:5173/auth/callback', // or your deployed URL
|
||||
redirectUri: 'https://knowledge.olympus-wizardai.com/auth/callback', // or your deployed URL
|
||||
navigateToLoginRequestUrl: false
|
||||
},
|
||||
cache: {
|
||||
|
||||
@@ -303,7 +303,7 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
console.log('Delete resource:', response.data)
|
||||
ksdocuments.value.forEach(element => {
|
||||
if (element.id == id) {
|
||||
element.ingestionStatus = "LOADED"
|
||||
element.ingestionStatus = "DELETING"
|
||||
console.log("Updated element", element)
|
||||
}
|
||||
});
|
||||
@@ -319,13 +319,13 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
|
||||
//ingestion
|
||||
const startIndividualngestion = (id) => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion', life: 3000 });
|
||||
fe_status = "INGESTION_QUEUE"
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion...', life: 3000 });
|
||||
fe_status.value = "INGESTION_QUEUE"
|
||||
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 = "INGESTION_QUEUE"
|
||||
fe_status.value = "INGESTION_QUEUE"
|
||||
}
|
||||
if (response.data.status == "ERROR") {
|
||||
toast.add({ severity: 'error', summary: 'Success', detail: 'Error ingesting document:' + response.data.message, life: 3000 });
|
||||
|
||||
@@ -1,8 +1,39 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="card"> -->
|
||||
<Toast />
|
||||
<ConfirmPopup></ConfirmPopup>
|
||||
<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>
|
||||
|
||||
<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"
|
||||
@@ -13,36 +44,18 @@
|
||||
:globalFilterFields="['branch', 'cloneStatus', 'ingestionStatus', 'ingestionDateFormat']"
|
||||
tableStyle="min-width: 70rem" removableSort>
|
||||
<template #header>
|
||||
<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">
|
||||
<div class="flex flex-wrap gap-2 items-center justify-between">
|
||||
<h4 class="m-0">Manage Repositories</h4>
|
||||
<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" style="background: '#f3f3f3'">
|
||||
<div class="flex items-center gap-2">
|
||||
<img :alt="slotProps.data.repoName" :src="logoSrc" width="32" style="vertical-align: middle" />
|
||||
<span>{{ slotProps.data.repoName }}</span>
|
||||
</div>
|
||||
@@ -163,25 +176,25 @@
|
||||
</Column>
|
||||
|
||||
<!--Column header="Actions" headerStyle="width: 5rem; text-align: center" bodyStyle="text-align: center; overflow: visible"-->
|
||||
<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)" />
|
||||
<Column :exportable="false" style="min-width: 12rem">
|
||||
<template #body="slotProps">
|
||||
|
||||
<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="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 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-play"
|
||||
@click="reverserEnginneringGitRepo(slotProps.data)" v-tooltip.top="'Start RE of Repo'"
|
||||
:disabled="isButtonDisabled(slotProps.data)" />
|
||||
|
||||
<Button raised rounded type="button" icon="pi pi-trash"
|
||||
@click="deleteRecordsFromVectorStore(slotProps.data)" v-tooltip.top="'Delete Records'" />
|
||||
</template>
|
||||
</div>
|
||||
<!--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>
|
||||
</Column>
|
||||
|
||||
|
||||
@@ -194,13 +207,13 @@
|
||||
</template>
|
||||
|
||||
<template #groupfooter="slotProps">
|
||||
<div class="flex justify-end font-bold w-full" style="background-color: #f3f3f3;">
|
||||
<div class="flex justify-end font-bold w-full">
|
||||
Total Count: {{ calculateCustomerTotal(slotProps.data.repoName) }}
|
||||
</div>
|
||||
</template>
|
||||
</DataTable>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
Reference in New Issue
Block a user