[Code] add beta label for code (#38814)
This commit is contained in:
parent
35a5706e16
commit
ad19b6bb11
7
x-pack/plugins/code/common/constants.ts
Normal file
7
x-pack/plugins/code/common/constants.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
export const APP_TITLE = 'Code (Beta)';
|
|
@ -10,6 +10,7 @@ import moment from 'moment';
|
|||
import { resolve } from 'path';
|
||||
|
||||
import { init } from './server/init';
|
||||
import { APP_TITLE } from './common/constants';
|
||||
|
||||
export const code = (kibana: any) =>
|
||||
new kibana.Plugin({
|
||||
|
@ -20,7 +21,7 @@ export const code = (kibana: any) =>
|
|||
|
||||
uiExports: {
|
||||
app: {
|
||||
title: 'Code (Beta)',
|
||||
title: APP_TITLE,
|
||||
main: 'plugins/code/app',
|
||||
euiIconType: 'codeApp',
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'ui/autoload/styles';
|
|||
import chrome from 'ui/chrome';
|
||||
// @ts-ignore
|
||||
import { uiModules } from 'ui/modules';
|
||||
import { APP_TITLE } from '../common/constants';
|
||||
import { App } from './components/app';
|
||||
import { HelpMenu } from './components/help_menu';
|
||||
import { store } from './stores';
|
||||
|
@ -48,7 +49,7 @@ if (chrome.getInjected('codeUiEnabled')) {
|
|||
chrome.setRootController('code', RootController);
|
||||
chrome.breadcrumbs.set([
|
||||
{
|
||||
text: 'Code (Beta)',
|
||||
text: APP_TITLE,
|
||||
href: '#/',
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -9,6 +9,7 @@ import { connect } from 'react-redux';
|
|||
import { RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import chrome from 'ui/chrome';
|
||||
import { APP_TITLE } from '../../../common/constants';
|
||||
import { MainRouteParams } from '../../common/types';
|
||||
import { ShortcutsProvider } from '../shortcuts';
|
||||
import { Content } from './content';
|
||||
|
@ -35,7 +36,7 @@ class CodeMain extends React.Component<Props> {
|
|||
public setBreadcrumbs() {
|
||||
const { resource, org, repo } = this.props.match.params;
|
||||
chrome.breadcrumbs.set([
|
||||
{ text: 'Code', href: '#/' },
|
||||
{ text: APP_TITLE, href: '#/' },
|
||||
{
|
||||
text: `${org} → ${repo}`,
|
||||
href: `#/${resource}/${org}/${repo}`,
|
||||
|
@ -44,7 +45,7 @@ class CodeMain extends React.Component<Props> {
|
|||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
chrome.breadcrumbs.set([{ text: 'Code', href: '#/' }]);
|
||||
chrome.breadcrumbs.set([{ text: APP_TITLE, href: '#/' }]);
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
|
Loading…
Reference in a new issue