|
|
|
@ -23,12 +23,11 @@ import { DatasourceData, FormattedData } from '@shared/models/widget.models'; |
|
|
|
import { DataKeyType } from '@shared/models/telemetry/telemetry.models'; |
|
|
|
import { |
|
|
|
createLabelFromPattern, |
|
|
|
fillDataPattern, |
|
|
|
flatFormattedData, |
|
|
|
filteringData, |
|
|
|
formattedDataFormDatasourceData, |
|
|
|
hashCode, isDefinedAndNotNull, |
|
|
|
isNotEmptyStr, |
|
|
|
parseFunction, processDataPattern, |
|
|
|
parseFunction, |
|
|
|
safeExecute |
|
|
|
} from '@core/utils'; |
|
|
|
import cssjs from '@core/css/css'; |
|
|
|
@ -119,7 +118,8 @@ export class MarkdownWidgetComponent extends PageComponent implements OnInit { |
|
|
|
const data = formattedDataFormDatasourceData(initialData); |
|
|
|
let markdownText = this.settings.useMarkdownTextFunction ? |
|
|
|
safeExecute(this.markdownTextFunction, [data]) : this.settings.markdownTextPattern; |
|
|
|
markdownText = createLabelFromPattern(markdownText, data[0]); |
|
|
|
const allData: FormattedData = filteringData(data); |
|
|
|
markdownText = createLabelFromPattern(markdownText, allData); |
|
|
|
if (this.markdownText !== markdownText) { |
|
|
|
this.markdownText = this.utils.customTranslation(markdownText, markdownText); |
|
|
|
this.cd.detectChanges(); |
|
|
|
|