mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
979fd4686e
commit
0069db1b8b
4 changed files with 8 additions and 15 deletions
|
@ -903,9 +903,8 @@ app.controller('graphuiPlugin', function (
|
|||
);
|
||||
return;
|
||||
}
|
||||
$scope.selectedIndex = selectedIndex;
|
||||
$scope.proposedIndex = selectedIndex;
|
||||
$route.current.locals.GetIndexPatternProvider.get(selectedIndex.id).then(indexPattern => {
|
||||
$scope.selectedIndex = indexPattern;
|
||||
initWorkspaceIfRequired();
|
||||
const {
|
||||
urlTemplates,
|
||||
|
|
|
@ -5,14 +5,9 @@
|
|||
*/
|
||||
|
||||
import { appStateToSavedWorkspace } from './serialize';
|
||||
import {
|
||||
GraphWorkspaceSavedObject,
|
||||
IndexPatternSavedObject,
|
||||
Workspace,
|
||||
WorkspaceEdge,
|
||||
AppState,
|
||||
} from '../../types';
|
||||
import { GraphWorkspaceSavedObject, Workspace, WorkspaceEdge, AppState } from '../../types';
|
||||
import { outlinkEncoders } from '../../helpers/outlink_encoders';
|
||||
import { IndexPattern } from 'src/legacy/core_plugins/data/public';
|
||||
|
||||
describe('serialize', () => {
|
||||
let appState: AppState;
|
||||
|
@ -61,10 +56,8 @@ describe('serialize', () => {
|
|||
},
|
||||
],
|
||||
selectedIndex: {
|
||||
attributes: {
|
||||
title: 'Testindexpattern',
|
||||
},
|
||||
} as IndexPatternSavedObject,
|
||||
title: 'Testindexpattern',
|
||||
} as IndexPattern,
|
||||
urlTemplates: [
|
||||
{
|
||||
description: 'Template',
|
||||
|
|
|
@ -96,7 +96,7 @@ export function appStateToSavedWorkspace(
|
|||
const mappedUrlTemplates = urlTemplates.map(serializeUrlTemplate);
|
||||
|
||||
const persistedWorkspaceState: SerializedWorkspaceState = {
|
||||
indexPattern: selectedIndex.attributes.title,
|
||||
indexPattern: selectedIndex.title,
|
||||
selectedFields: selectedFields.map(serializeField),
|
||||
blacklist,
|
||||
vertices,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
import { SimpleSavedObject } from 'src/core/public';
|
||||
import { IndexPattern } from 'src/legacy/core_plugins/data/public';
|
||||
import { Workspace } from './workspace_state';
|
||||
import { FontawesomeIcon } from '../helpers/style_choices';
|
||||
import { OutlinkEncoder } from '../helpers/outlink_encoders';
|
||||
|
@ -43,5 +44,5 @@ export interface AppState {
|
|||
workspace: Workspace;
|
||||
allFields: WorkspaceField[];
|
||||
selectedFields: WorkspaceField[];
|
||||
selectedIndex: IndexPatternSavedObject;
|
||||
selectedIndex: IndexPattern;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue