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
Show file tree
Hide file tree
Changes from 187 commits
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions docs/api/features.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The API returns the following:
"id": "discover",
"name": "Discover",
"icon": "discoverApp",
"navLinkId": "kibana:discover",
"navLinkId": "discover",
"app": [
"kibana"
],
Expand Down Expand Up @@ -74,7 +74,7 @@ The API returns the following:
"id": "visualize",
"name": "Visualize",
"icon": "visualizeApp",
"navLinkId": "kibana:visualize",
"navLinkId": "visualize",
"app": [
"kibana"
],
Expand Down Expand Up @@ -121,7 +121,7 @@ The API returns the following:
"id": "dashboard",
"name": "Dashboard",
"icon": "dashboardApp",
"navLinkId": "kibana:dashboard",
"navLinkId": "dashboards",
"app": [
"kibana"
],
Expand Down Expand Up @@ -173,7 +173,7 @@ The API returns the following:
"id": "dev_tools",
"name": "Dev Tools",
"icon": "devToolsApp",
"navLinkId": "kibana:dev_tools",
"navLinkId": "dev_tools",
"app": [
"kibana"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ init(server) {
defaultMessage: 'Dev Tools',
}),
icon: 'devToolsApp',
navLinkId: 'kibana:dev_tools',
navLinkId: 'dev_tools',
app: ['kibana'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
privileges: {
Expand Down Expand Up @@ -216,7 +216,7 @@ init(server) {
}),
order: 100,
icon: 'discoverApp',
navLinkId: 'kibana:discover',
navLinkId: 'discover',
app: ['kibana'],
catalogue: ['discover'],
privileges: {
Expand Down
2 changes: 1 addition & 1 deletion docs/user/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ to view an embedded dashboard.
* Generate a PNG report

TIP: To create a link to a dashboard by title, use: +
`${domain}/${basepath?}/app/kibana#/dashboards?title=${yourdashboardtitle}`
`${domain}/${basepath?}/app/dashboards#/list?title=${yourdashboardtitle}`

TIP: When sharing a link to a dashboard snapshot, use the *Short URL*. Snapshot
URLs are long and can be problematic for Internet Explorer and other
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class ChromeService {
forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
homeHref={http.basePath.prepend('/app/kibana#/home')}
homeHref={http.basePath.prepend('/app/home')}
isVisible$={this.isVisible$}
kibanaVersion={injectedMetadata.getKibanaVersion()}
legacyMode={injectedMetadata.getLegacyMode()}
Expand Down
1 change: 1 addition & 0 deletions src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export class Header extends Component<HeaderProps, State> {
href={this.props.homeHref}
forceNavigation={this.state.forceNavigation}
navLinks={navLinks}
navigateToApp={this.props.application.navigateToApp}
/>
</EuiHeaderSectionItem>

Expand Down
14 changes: 11 additions & 3 deletions src/core/public/chrome/ui/header/header_logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ function findClosestAnchor(element: HTMLElement): HTMLAnchorElement | void {
function onClick(
event: React.MouseEvent<HTMLAnchorElement>,
forceNavigation: boolean,
navLinks: NavLink[]
navLinks: NavLink[],
navigateToApp: (appId: string) => void
) {
const anchor = findClosestAnchor((event as any).nativeEvent.target);
if (!anchor) {
Expand All @@ -54,6 +55,12 @@ function onClick(
return;
}

if (!forceNavigation && !event.altKey && !event.metaKey && !event.ctrlKey) {
flash1293 marked this conversation as resolved.
Show resolved Hide resolved
navigateToApp('home');
event.preventDefault();
return;
}

if (
!forceNavigation ||
event.isDefaultPrevented() ||
Expand Down Expand Up @@ -87,14 +94,15 @@ interface Props {
href: string;
navLinks: NavLink[];
forceNavigation: boolean;
navigateToApp: (appId: string) => void;
}

export function HeaderLogo({ href, forceNavigation, navLinks }: Props) {
export function HeaderLogo({ href, forceNavigation, navLinks, navigateToApp }: Props) {
return (
<EuiHeaderLogo
data-test-subj="logo"
iconType="logoElastic"
onClick={e => onClick(e, forceNavigation, navLinks)}
onClick={e => onClick(e, forceNavigation, navLinks, navigateToApp)}
href={href}
aria-label={i18n.translate('core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel', {
defaultMessage: 'Go to home page',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('default route provider', () => {

expect(status).toEqual(302);
expect(header).toMatchObject({
location: '/hello/app/kibana',
location: '/hello/app/home',
});
});

Expand All @@ -71,7 +71,7 @@ describe('default route provider', () => {
const { status, header } = await kbnTestServer.request.get(root, '/');
expect(status).toEqual(302);
expect(header).toMatchObject({
location: '/hello/app/kibana',
location: '/hello/app/home',
});
});

Expand Down
44 changes: 0 additions & 44 deletions src/legacy/core_plugins/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default function(kibana) {
},

uiExports: {
hacks: ['plugins/kibana/dev_tools'],
app: {
id: 'kibana',
title: 'Kibana',
Expand All @@ -62,49 +61,6 @@ export default function(kibana) {
},
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
links: [
{
id: 'kibana:discover',
title: i18n.translate('kbn.discoverTitle', {
defaultMessage: 'Discover',
}),
order: 2000,
url: `${kbnBaseUrl}#/discover`,
euiIconType: 'discoverApp',
disableSubUrlTracking: true,
category: DEFAULT_APP_CATEGORIES.kibana,
},
{
id: 'kibana:visualize',
title: i18n.translate('kbn.visualizeTitle', {
defaultMessage: 'Visualize',
}),
order: 7000,
url: `${kbnBaseUrl}#/visualize`,
euiIconType: 'visualizeApp',
disableSubUrlTracking: true,
category: DEFAULT_APP_CATEGORIES.kibana,
},
{
id: 'kibana:dashboard',
title: i18n.translate('kbn.dashboardTitle', {
defaultMessage: 'Dashboard',
}),
order: 1000,
url: `${kbnBaseUrl}#/dashboards`,
euiIconType: 'dashboardApp',
disableSubUrlTracking: true,
category: DEFAULT_APP_CATEGORIES.kibana,
},
{
id: 'kibana:dev_tools',
title: i18n.translate('kbn.devToolsTitle', {
defaultMessage: 'Dev Tools',
}),
order: 9001,
url: '/app/kibana#/dev_tools',
euiIconType: 'devToolsApp',
category: DEFAULT_APP_CATEGORIES.management,
},
{
id: 'kibana:stack_management',
title: i18n.translate('kbn.managementTitle', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import 'ui/private';
import { pluginInstance } from './legacy';
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
import hits from 'fixtures/real_hits';
import { setScopedHistory } from '../../../../../../plugins/discover/public/kibana_services';
import { createBrowserHistory } from 'history';

let $parentScope;

Expand Down Expand Up @@ -58,6 +60,7 @@ const destroy = function() {
describe('docTable', function() {
let $elem;

before(() => setScopedHistory(createBrowserHistory()));
beforeEach(() => pluginInstance.initializeInnerAngular());
beforeEach(() => pluginInstance.initializeServices());
beforeEach(ngMock.module('app/discover'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import { getFakeRow, getFakeRowVals } from 'fixtures/fake_row';
import $ from 'jquery';
import { pluginInstance } from './legacy';
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
import { setScopedHistory } from '../../../../../../plugins/discover/public/kibana_services';
import { createBrowserHistory } from 'history';

describe('Doc Table', function() {
let $parentScope;
Expand All @@ -37,6 +39,7 @@ describe('Doc Table', function() {
let stubFieldFormatConverter;
beforeEach(() => pluginInstance.initializeServices());
beforeEach(() => pluginInstance.initializeInnerAngular());
before(() => setScopedHistory(createBrowserHistory()));
beforeEach(ngMock.module('app/discover'));
beforeEach(
ngMock.inject(function($rootScope, Private) {
Expand Down
3 changes: 0 additions & 3 deletions src/legacy/core_plugins/kibana/public/dev_tools/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/legacy/core_plugins/kibana/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
// bad cascading in the Editor layout
@import '../../../../plugins/maps_legacy/public/index';

// Home styles
@import '../../../../plugins/home/public/application/index';

// Management styles
@import './management/index';

Expand Down
10 changes: 0 additions & 10 deletions src/legacy/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,15 @@

// preloading (for faster webpack builds)
import routes from 'ui/routes';
import { uiModules } from 'ui/modules';
import { npSetup } from 'ui/new_platform';

// import the uiExports that we want to "use"
import 'uiExports/home';
import 'uiExports/visualize';
import 'uiExports/savedObjectTypes';
import 'uiExports/fieldFormatEditors';
import 'uiExports/navbarExtensions';
import 'uiExports/contextMenuActions';
import 'uiExports/managementSections';
import 'uiExports/indexManagement';
import 'uiExports/docViews';
import 'uiExports/embeddableFactories';
import 'uiExports/embeddableActions';
import 'uiExports/inspectorViews';
Expand All @@ -43,8 +39,6 @@ import 'uiExports/interpreter';

import 'ui/autoload/all';
import './management';
import './dev_tools';
import { showAppRedirectNotification } from '../../../../plugins/kibana_legacy/public';
import { localApplicationService } from './local_application_service';

npSetup.plugins.kibanaLegacy.registerLegacyAppAlias('doc', 'discover', { keepPrefix: true });
Expand All @@ -58,7 +52,3 @@ const { config } = npSetup.plugins.kibanaLegacy;
routes.otherwise({
redirectTo: `/${config.defaultAppId || 'discover'}`,
});

uiModules
.get('kibana')
.run($location => showAppRedirectNotification($location, npSetup.core.notifications.toasts));
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export class LocalApplicationService {
template: '<span></span>',
controller($location: ILocationService) {
const newPath = forwardDefinition.rewritePath($location.url());
npStart.core.application.navigateToApp(forwardDefinition.newAppId, { path: newPath });
window.location.replace(
npStart.core.http.basePath.prepend(`/app/${forwardDefinition.newAppId}/${newPath}`)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you give me some context on this change to location.replace? What is still using this now? Just management?

Copy link
Contributor Author

@flash1293 flash1293 May 12, 2020

Choose a reason for hiding this comment

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

This is the code path redirecting the old URLs to the new ones (e.g. app/kibana#/dashboards to app/dashboards#/list)

I think I changed the implementation here because of the bug in navigateToApp when switching to legacy applications (the one you fixed already). I will check whether it's still necessary.

Edit: I remember now why this was necessary - navigateToApp creates a history entry, but this redirect should work without an additional entry (because otherwise going "back" would just bring you to the same page again after two page loads)

},
});
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import sinon from 'sinon';

describe('EmptyState', () => {
it('should render normally', () => {
const component = shallow(<EmptyState onRefresh={() => {}} />);
const component = shallow(<EmptyState onRefresh={() => {}} prependBasePath={x => x} />);

expect(component).toMatchSnapshot();
});
Expand All @@ -34,7 +34,9 @@ describe('EmptyState', () => {
it('is called when refresh button is clicked', () => {
const onRefreshHandler = sinon.stub();

const component = shallow(<EmptyState onRefresh={onRefreshHandler} />);
const component = shallow(
<EmptyState onRefresh={onRefreshHandler} prependBasePath={x => x} />
);

component.find('[data-test-subj="refreshIndicesButton"]').simulate('click');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ import React from 'react';
import { EuiCallOut, EuiTextColor, EuiLink, EuiButton } from '@elastic/eui';

import { FormattedMessage } from '@kbn/i18n/react';
import { IBasePath } from 'kibana/public';

export const EmptyState = ({ onRefresh }: { onRefresh: () => void }) => (
export const EmptyState = ({
onRefresh,
prependBasePath,
}: {
onRefresh: () => void;
prependBasePath: IBasePath['prepend'];
}) => (
<div>
<EuiCallOut
color="warning"
Expand All @@ -48,15 +55,15 @@ export const EmptyState = ({ onRefresh }: { onRefresh: () => void }) => (
</EuiTextColor>
),
learnHowLink: (
<EuiLink href="#/home/tutorial_directory">
<EuiLink href={prependBasePath('/app/home#/tutorial_directory')}>
<FormattedMessage
id="kbn.management.createIndexPattern.emptyStateLabel.learnHowLink"
defaultMessage="Learn how"
/>
</EuiLink>
),
getStartedLink: (
<EuiLink href="#/home/tutorial_directory/sampleData">
<EuiLink href={prependBasePath('/app/home#/tutorial_directory/sampleData')}>
<FormattedMessage
id="kbn.management.createIndexPattern.emptyStateLabel.getStartedLink"
defaultMessage="get started with some sample data sets."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const services = {
changeUrl: jest.fn(),
openConfirm: overlays.openConfirm,
indexPatternCreationType: mockIndexPatternCreationType,
prependBasePath: jest.fn(x => x),
};

describe('CreateIndexPatternWizard', () => {
Expand Down
Loading