@@ -2,7 +2,7 @@ import { useDispatch, useSelector } from "react-redux";
22import DataSchema from "./DataSchema" ;
33import { selectProject , setActiveProject } from "@/src/reduxStore/states/project" ;
44import { useCallback , useEffect , useState } from "react" ;
5- import { selectAttributes , selectEmbeddings , selectGatesIntegration , setAllAttributes , setAllEmbeddings , setAllRecommendedEncodersDict , setGatesIntegration , setLabelingTasksAll , setRecommendedEncodersAll } from "@/src/reduxStore/states/pages/settings" ;
5+ import { selectAttributes , selectEmbeddings , setAllAttributes , setAllEmbeddings , setAllRecommendedEncodersDict , setLabelingTasksAll , setRecommendedEncodersAll } from "@/src/reduxStore/states/pages/settings" ;
66import { timer } from "rxjs" ;
77import { IconCamera , IconCheck , IconDots , IconPlus , IconUpload } from "@tabler/icons-react" ;
88import { ModalEnum } from "@/src/types/shared/modal" ;
@@ -12,7 +12,6 @@ import { setUploadFileType } from "@/src/reduxStore/states/upload";
1212import { UploadFileType } from "@/src/types/shared/upload" ;
1313import { Tooltip } from "@nextui-org/react" ;
1414import ProjectMetaData from "./ProjectMetaData" ;
15- import GatesIntegration from "./GatesIntegration" ;
1615import { selectAllUsers , selectIsManaged , selectOrganizationId , setBricksIntegrator , setComments } from "@/src/reduxStore/states/general" ;
1716import Embeddings from "./embeddings/Embeddings" ;
1817import { postProcessingEmbeddings , postProcessingRecommendedEncoders } from "@/src/util/components/projects/projectId/settings/embeddings-helper" ;
@@ -28,7 +27,7 @@ import ProjectSnapshotExportModal from "./ProjectSnapshotExportModal";
2827import { postProcessLabelingTasks , postProcessLabelingTasksSchema } from "@/src/util/components/projects/projectId/settings/labeling-tasks-helper" ;
2928import { getEmptyBricksIntegratorConfig } from "@/src/util/shared/bricks-integrator-helper" ;
3029import { useWebsocket } from "@/submodules/react-components/hooks/web-socket/useWebsocket" ;
31- import { getGatesIntegrationData , getLabelingTasksByProjectId , getProjectByProjectId , getProjectTokenization } from "@/src/services/base/project" ;
30+ import { getLabelingTasksByProjectId , getProjectByProjectId , getProjectTokenization } from "@/src/services/base/project" ;
3231import { getAllComments } from "@/src/services/base/comment" ;
3332import { getAttributes , getCheckCompositeKey } from "@/src/services/base/attribute" ;
3433import { getEmbeddings , getRecommendedEncoders } from "@/src/services/base/embedding" ;
@@ -41,10 +40,8 @@ export default function ProjectSettings() {
4140
4241 const project = useSelector ( selectProject ) ;
4342 const attributes = useSelector ( selectAttributes ) ;
44- const isManaged = useSelector ( selectIsManaged ) ;
4543 const embeddings = useSelector ( selectEmbeddings ) ;
4644 const allUsers = useSelector ( selectAllUsers ) ;
47- const gatesIntegrationData = useSelector ( selectGatesIntegration ) ;
4845
4946 const [ pKeyValid , setPKeyValid ] = useState < boolean | null > ( null ) ;
5047 const [ pKeyCheckTimer , setPKeyCheckTimer ] = useState ( null ) ;
@@ -56,7 +53,6 @@ export default function ProjectSettings() {
5653 if ( ! project ) return ;
5754 refetchAttributesAndPostProcess ( ) ;
5855 refetchEmbeddingsAndPostProcess ( ) ;
59- refetchAndSetGatesIntegrationData ( ) ;
6056 refetchLabelingTasksAndProcess ( ) ;
6157 checkProjectTokenization ( ) ;
6258
@@ -228,33 +224,12 @@ export default function ProjectSettings() {
228224 } ) ;
229225 if ( msgParts [ 2 ] == 'finished' ) timer ( 5000 ) . subscribe ( ( ) => checkProjectTokenization ( ) ) ;
230226 }
231- } else if ( msgParts [ 1 ] == 'gates_integration' ) {
232- refetchAndSetGatesIntegrationData ( ) ;
233- } else if ( [ 'information_source_deleted' , 'information_source_updated' ] . includes ( msgParts [ 1 ] ) ) {
234- if ( gatesIntegrationData ?. missingInformationSources ?. includes ( msgParts [ 2 ] ) ) {
235- refetchAndSetGatesIntegrationData ( ) ;
236- }
237- } else if ( msgParts [ 1 ] == 'tokenization' && msgParts [ 2 ] == 'docbin' && msgParts [ 3 ] == 'state' && msgParts [ 4 ] == 'FINISHED' ) {
238- refetchAndSetGatesIntegrationData ( ) ;
239- } else if ( msgParts [ 1 ] == 'embedding' && msgParts [ 3 ] == 'state' && msgParts [ 4 ] == 'FINISHED' ) {
240- if ( gatesIntegrationData ?. missingEmbeddings ?. includes ( msgParts [ 2 ] ) ) {
241- refetchAndSetGatesIntegrationData ( ) ;
242- }
243227 } else if ( msgParts [ 1 ] == 'embedding_deleted' ) {
244- if ( gatesIntegrationData ?. missingEmbeddings ?. includes ( msgParts [ 2 ] ) ) {
245- refetchAndSetGatesIntegrationData ( ) ;
246- }
247228 refetchEmbeddingsAndPostProcess ( ) ;
248229 } else if ( [ 'label_created' , 'label_deleted' , 'labeling_task_deleted' , 'labeling_task_updated' , 'labeling_task_created' ] . includes ( msgParts [ 1 ] ) ) {
249230 refetchLabelingTasksAndProcess ( ) ;
250231 }
251- } , [ project , embeddings , gatesIntegrationData , isAcRunning , tokenizationProgress ] ) ;
252-
253- function refetchAndSetGatesIntegrationData ( ) {
254- getGatesIntegrationData ( project . id , ( res ) => {
255- dispatch ( setGatesIntegration ( res . data [ 'getGatesIntegrationData' ] ) ) ;
256- } )
257- }
232+ } , [ project , embeddings , isAcRunning , tokenizationProgress ] ) ;
258233
259234 function refetchLabelingTasksAndProcess ( ) {
260235 getLabelingTasksByProjectId ( project . id , ( res ) => {
@@ -326,7 +301,6 @@ export default function ProjectSettings() {
326301
327302 < Embeddings refetchEmbeddings = { refetchEmbeddingsAndPostProcess } />
328303 < LabelingTasks />
329- { isManaged && < GatesIntegration /> }
330304 < ProjectMetaData />
331305 < CreateNewAttributeModal />
332306 < ProjectSnapshotExportModal > </ ProjectSnapshotExportModal >
0 commit comments