Skip to content

Commit

Permalink
Add success toast on logs refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemBaskal committed Jun 17, 2020
1 parent 2ebdd6a commit 62191e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/src/__locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
"query_log_filtered": "Filtered by {{filter}}",
"query_log_confirm_clear": "Are you sure you want to clear the entire query log?",
"query_log_cleared": "The query log has been successfully cleared",
"query_log_updated": "The query log has been successfully updated",
"query_log_clear": "Clear query logs",
"query_log_retention": "Query logs retention",
"query_log_enable": "Enable log",
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Logs/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const Table = (props) => {
filterable={false}
sortable={false}
resizable={false}
data={logs}
data={logs || []}
loading={isLoading}
showPageJump={false}
showPageSizeOptions={false}
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/Logs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { getFilteringStatus } from '../../actions/filtering';
import { getClients } from '../../actions';
import { getDnsConfig } from '../../actions/dnsConfig';
import { getLogsConfig } from '../../actions/queryLogs';
import { addSuccessToast } from '../../actions/toasts';

const INITIAL_REQUEST = true;
const INITIAL_REQUEST_DATA = ['', TABLE_FIRST_PAGE, INITIAL_REQUEST];
Expand Down Expand Up @@ -132,6 +133,7 @@ const Logs = (props) => {
dispatch(setLogsPage(TABLE_FIRST_PAGE)),
getLogs(...INITIAL_REQUEST_DATA),
]);
dispatch(addSuccessToast('query_log_updated'));
setIsLoading(false);
};

Expand Down

0 comments on commit 62191e4

Please sign in to comment.