Skip to content

Commit 19417ca

Browse files
committed
Merge branch 'release-updates' of github.com:code-kern-ai/refinery-ui into release-updates
2 parents 58e2f76 + 9168231 commit 19417ca

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/components/projects/projectId/settings/ProjectSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export default function ProjectSettings() {
333333
</div>
334334
</div>
335335

336-
<Embeddings />
336+
<Embeddings refetchEmbeddings={refetchEmbeddingsAndPostProcess} />
337337
<LabelingTasks />
338338
{isManaged && <GatesIntegration />}
339339
<ProjectMetaData />

src/components/projects/projectId/settings/embeddings/Embeddings.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import LoadingIcon from "@/src/components/shared/loading/LoadingIcon";
22
import { selectIsManaged } from "@/src/reduxStore/states/general";
3-
import { openModal, setModalStates } from "@/src/reduxStore/states/modal";
3+
import { closeModal, openModal, setModalStates } from "@/src/reduxStore/states/modal";
44
import { selectAttributes, selectEmbeddings } from "@/src/reduxStore/states/pages/settings";
55
import { selectProjectId } from "@/src/reduxStore/states/project";
66
import { Embedding, EmbeddingState } from "@/src/types/components/projects/projectId/settings/embeddings";
@@ -19,7 +19,7 @@ import DeleteEmbeddingModal from "./DeleteEmbeddingModal";
1919
import { useWebsocket } from "@/src/services/base/web-sockets/useWebsocket";
2020

2121

22-
export default function Embeddings() {
22+
export default function Embeddings(props: { refetchEmbeddings: () => void }) {
2323
const dispatch = useDispatch();
2424
const router = useRouter();
2525

@@ -58,6 +58,7 @@ export default function Embeddings() {
5858
const loadingEmbeddingsDictCopy = { ...loadingEmbeddingsDict }
5959
delete loadingEmbeddingsDictCopy[msgParts[2]];
6060
setLoadingEmbeddingsDict(loadingEmbeddingsDictCopy);
61+
props.refetchEmbeddings();
6162
} else if (msgParts[1] == 'upload_embedding_payload') {
6263
if (loadingEmbeddingsDict[msgParts[2]] == undefined) {
6364
const loadingEmbeddingsDictCopy = { ...loadingEmbeddingsDict };
@@ -119,7 +120,7 @@ export default function Embeddings() {
119120
<IconNotes onClick={() => embedding.onQdrant ? dispatch(setModalStates(ModalEnum.FILTERED_ATTRIBUTES, { embeddingId: embedding.id, open: true, attributeNames: prepareAttributeDataByNames(embedding.filterAttributes), showEditOption: showEditOption })) : null}
120121
className={`h-6 w-6 ${embedding.filterAttributes && embedding.filterAttributes.length > 0 ? 'text-gray-700' : 'text-gray-300'} ${embedding.onQdrant ? "" : "cursor-not-allowed opacity-50"}`} />
121122
</Tooltip>
122-
</td> : <td><LoadingIcon /></td>}
123+
</td> : <td className="whitespace-nowrap text-center px-3 py-2 text-sm text-gray-500 flex justify-center"><LoadingIcon /></td>}
123124
<td className="whitespace-nowrap text-center px-3 py-2 text-sm text-gray-500">
124125
<div className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800">
125126
{embedding.state == EmbeddingState.QUEUED ? '' : embedding.type == 'ON_ATTRIBUTE' ? 'Attribute Specific' : 'Token Specific'}

src/components/projects/projectId/settings/embeddings/FilterAttributesModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ export default function FilterAttributesModal(props: FilterAttributesModalProps)
2929

3030
function saveFilteredAttributes() {
3131
props.setShowEditOption(false);
32+
dispatch(closeModal(ModalEnum.FILTERED_ATTRIBUTES));
3233
dispatch(setModalStates(ModalEnum.FILTERED_ATTRIBUTES, { showEditOption: false }));
33-
updateEmbeddingPayloadMut({ variables: { projectId: projectId, embeddingId: modalFilteredAttributes.embeddingId, filterAttributes: JSON.stringify(props.filterAttributesUpdate) } }).then((res) => { });
34+
updateEmbeddingPayloadMut({ variables: { projectId: projectId, embeddingId: modalFilteredAttributes.embeddingId, filterAttributes: JSON.stringify(props.filterAttributesUpdate) } }).then((res) => {
35+
});
3436
}
3537

3638
useEffect(() => {

0 commit comments

Comments
 (0)