HM-56. Добавлена страница для просмотра логов с фильтрацией, пагинацией (#20)
This commit is contained in:
15
src/api/StorageLogsAPI.js
Normal file
15
src/api/StorageLogsAPI.js
Normal file
@ -0,0 +1,15 @@
|
||||
import axios from 'axios';
|
||||
import {API_URL, ENDPOINTS} from './consts';
|
||||
|
||||
class StorageLogsApi {
|
||||
URL = `${API_URL}${ENDPOINTS.SERVER_LOGS}`;
|
||||
|
||||
request = async () => {
|
||||
const {data} = await axios.get(this.URL);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
const storageLogsApi = new StorageLogsApi();
|
||||
|
||||
export default storageLogsApi;
|
||||
@ -1,6 +1,6 @@
|
||||
import axios from 'axios';
|
||||
|
||||
import {API_URL, ENDPOINT, TESTING_HEADERS} from './consts';
|
||||
import {API_URL, ENDPOINTS, TESTING_HEADERS} from './consts';
|
||||
|
||||
/**
|
||||
* @interface Store
|
||||
@ -17,7 +17,7 @@ import {API_URL, ENDPOINT, TESTING_HEADERS} from './consts';
|
||||
* @class
|
||||
*/
|
||||
class StorageServiceApi {
|
||||
URL = `${API_URL}${ENDPOINT}`;
|
||||
URL = `${API_URL}${ENDPOINTS.STORE}`;
|
||||
|
||||
get defaultConfig () {
|
||||
if (location.hostname.includes('localhost')) {
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
|
||||
export const API_URL = 'http://api.storage.vigdorov.ru';
|
||||
|
||||
export const ENDPOINT = '/store';
|
||||
export const ENDPOINTS = {
|
||||
STORE: '/store',
|
||||
CLIENT_LOGS: '/logs/client',
|
||||
SERVER_LOGS: '/logs/server',
|
||||
};
|
||||
|
||||
export const TESTING_HEADERS = {
|
||||
'Api-Name': 'store-service-test',
|
||||
|
||||
Reference in New Issue
Block a user