-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove usage of Lodash template
#10920
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
Changes from all commits
c12244e
adb78d2
2e2918d
e67ada5
d3f708d
fd13147
12400f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| breaking: | ||
| - Remove usage of lodash template ([#10920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/10920)) | ||
|
|
||
| infra: | ||
| - Add in eslint rule to prevent the use of lodash template ([#10920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/10920)) |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,10 +36,8 @@ import { Tooltip } from '../components/tooltip'; | |
| import { Chart } from './_chart'; | ||
| import { TimeMarker } from './time_marker'; | ||
| import { seriesTypes } from './point_series/series_types'; | ||
| import touchdownTmplHtml from '../partials/touchdown.tmpl.html'; | ||
|
|
||
| const seriTypes = seriesTypes; | ||
| const touchdownTmpl = _.template(touchdownTmplHtml); | ||
| /** | ||
| * Line Chart Visualization | ||
| * | ||
|
|
@@ -191,7 +189,14 @@ export class PointSeries extends Chart { | |
| } | ||
|
|
||
| function textFormatter() { | ||
| return touchdownTmpl(callPlay(d3.event)); | ||
| const { wholeBucket } = callPlay(d3.event); | ||
| return `<p class="visTooltip__header"> | ||
| <i class="fa fa-info-circle visTooltip__headerIcon"></i> | ||
| <span class="visTooltip__headerText"> | ||
| ${wholeBucket ? 'Part of this bucket' : 'This area'} | ||
| may contain partial data. The selected time range does not fully cover it. | ||
| </span> | ||
| </p>`; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. were u able to test this visually by any chance?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| const endzoneTT = new Tooltip('endzones', this.handler.el, textFormatter, null); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,4 +29,3 @@ | |
| */ | ||
|
|
||
| require('./child_process'); | ||
| require('./lodash_template'); | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds in tests for testing the output of
htmlConvertwithinsource.ts, since this wasn't in there beforehand.