-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* wip deprecation notice on timelion app * Add a deprecation notice on timelion app * Minor, add visualize and timelion on the docLinks * Chage the layout a bit * Change the deprecation notice message * Change the deprecation notice message Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
2bf5a2c
commit 2d958e5
Showing
7 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/plugins/timelion/public/components/timelion_deprecation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { EuiSpacer, EuiCallOut, EuiLink } from '@elastic/eui'; | ||
import React from 'react'; | ||
import { DocLinksStart } from '../../../../core/public'; | ||
|
||
export const TimelionDeprecation = ({ links }: DocLinksStart) => { | ||
const timelionDeprecationLink = links.visualize.timelionDeprecation; | ||
return ( | ||
<> | ||
<EuiCallOut | ||
title={ | ||
<FormattedMessage | ||
id="timelion.deprecation.message" | ||
defaultMessage="Deprecated since 7.0, the Timelion app will be removed in 8.0. To continue using your Timelion worksheets, {timeLionDeprecationLink}." | ||
values={{ | ||
timeLionDeprecationLink: ( | ||
<EuiLink href={timelionDeprecationLink} target="_blank" external> | ||
<FormattedMessage | ||
id="timelion.deprecation.here" | ||
defaultMessage="migrate them to a dashboard." | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
} | ||
color="warning" | ||
iconType="alert" | ||
size="s" | ||
/> | ||
<EuiSpacer size="s" /> | ||
</> | ||
); | ||
}; |
41 changes: 41 additions & 0 deletions
41
src/plugins/timelion/public/components/timelion_deprecation_directive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import React from 'react'; | ||
import { TimelionDeprecation } from './timelion_deprecation'; | ||
|
||
export function initTimelionTDeprecationDirective(app, deps) { | ||
app.directive('timelionDeprecation', function (reactDirective) { | ||
return reactDirective( | ||
() => { | ||
return ( | ||
<deps.core.i18n.Context> | ||
<TimelionDeprecation links={deps.core.docLinks.links} /> | ||
</deps.core.i18n.Context> | ||
); | ||
}, | ||
[], | ||
{ | ||
restrict: 'E', | ||
scope: { | ||
docLinks: '=', | ||
}, | ||
} | ||
); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters