mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fixes session idle timeout (#91070)
* Fix calls to `/api/saved_objects_tagging/tags` Seen on all pages. * Fix calls to `/api/ui_counters/_report` Seen on all pages. * Fix calls to `/api/index_management/indices/reload` Seen on page: /app/management/data/index_management * Fix calls to `/api/watcher/watches` Seen on page: /app/management/insightsAndAlerting/watcher/watches * Fix calls to `/api/rollup/jobs` Seen on page: /app/management/data/rollup_jobs/job_list * Fix calls to `/api/cross_cluster_replication/follower_indices` Seen on page: /app/management/data/cross_cluster_replication/follower_indices * Fix calls to `/api/cross_cluster_replication/auto_follow_patterns` Seen on page: /app/management/data/cross_cluster_replication/auto_follow_patterns * Fix calls to `/api/transform/transforms` and `/api/transform/transforms/_stats` Seen on page: /app/management/data/transform * Fix calls to `/api/console/proxy` Seen on page: /app/dev_tools#/console * Fix calls to `/api/monitoring/v1/clusters` and `/api/monitoring/v1/elasticsearch_settings/check/cluster` Seen on page: /app/monitoring
This commit is contained in:
parent
7169714bf7
commit
2ef468ef82
31 changed files with 216 additions and 100 deletions
|
@ -9,8 +9,8 @@ import { UIM_CLUSTER_ADD, UIM_CLUSTER_UPDATE } from '../constants';
|
|||
import { trackUserRequest } from './ui_metric';
|
||||
import { sendGet, sendPost, sendPut, sendDelete } from './http';
|
||||
|
||||
export async function loadClusters() {
|
||||
return await sendGet();
|
||||
export async function loadClusters(options) {
|
||||
return await sendGet(undefined, options);
|
||||
}
|
||||
|
||||
export async function addCluster(cluster) {
|
||||
|
|
|
@ -10,11 +10,15 @@ import { API_BASE_PATH } from '../../../common/constants';
|
|||
|
||||
let _httpClient: HttpSetup;
|
||||
|
||||
interface SendGetOptions {
|
||||
asSystemRequest?: boolean;
|
||||
}
|
||||
|
||||
export function init(httpClient: HttpSetup): void {
|
||||
_httpClient = httpClient;
|
||||
}
|
||||
|
||||
export function getFullPath(path: string): string {
|
||||
export function getFullPath(path?: string): string {
|
||||
if (path) {
|
||||
return `${API_BASE_PATH}/${path}`;
|
||||
}
|
||||
|
@ -35,8 +39,11 @@ export function sendPost(
|
|||
});
|
||||
}
|
||||
|
||||
export function sendGet(path: string): Promise<HttpResponse> {
|
||||
return _httpClient.get(getFullPath(path));
|
||||
export function sendGet(
|
||||
path?: string,
|
||||
{ asSystemRequest }: SendGetOptions = {}
|
||||
): Promise<HttpResponse> {
|
||||
return _httpClient.get(getFullPath(path), { asSystemRequest });
|
||||
}
|
||||
|
||||
export function sendPut(
|
||||
|
|
|
@ -14,7 +14,7 @@ import { REFRESH_CLUSTERS_SUCCESS } from '../action_types';
|
|||
export const refreshClusters = () => async (dispatch) => {
|
||||
let clusters;
|
||||
try {
|
||||
clusters = await sendLoadClustersRequest();
|
||||
clusters = await sendLoadClustersRequest({ asSystemRequest: true });
|
||||
} catch (error) {
|
||||
return showApiWarning(
|
||||
error,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue