Просмотр исходного кода

show toastr when rebuilding has failed

Yuki Takei 6 лет назад
Родитель
Сommit
ad9ab5a696
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      src/client/js/components/Admin/FullTextSearchManagement/RebuildIndex.jsx

+ 4 - 0
src/client/js/components/Admin/FullTextSearchManagement/RebuildIndex.jsx

@@ -56,6 +56,10 @@ class RebuildIndex extends React.Component {
         ...data,
         ...data,
       });
       });
     });
     });
+
+    socket.on('admin:rebuildingFailed', (data) => {
+      toastError(new Error(data.error), 'Rebuilding Index has failed.');
+    });
   }
   }
 
 
   async retrieveIndicesStatus() {
   async retrieveIndicesStatus() {