files widget

This commit is contained in:
Jan Prochazka
2021-03-11 09:42:14 +01:00
parent a93aff1bb7
commit d5ebea3764
20 changed files with 296 additions and 33 deletions

View File

@@ -1,16 +1,16 @@
import _ from 'lodash';
import { openedConnections, currentDatabase } from '../stores';
import axios from './axios';
import axiosInstance from './axiosInstance';
const doServerPing = value => {
axios.post('server-connections/ping', { connections: value });
axiosInstance.post('server-connections/ping', { connections: value });
};
const doDatabasePing = value => {
const database = _.get(value, 'name');
const conid = _.get(value, 'connection._id');
if (conid && database) {
axios.post('database-connections/ping', { conid, database });
axiosInstance.post('database-connections/ping', { conid, database });
}
};