"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/grafana-data/src/field/fieldDisplay.test.ts" between
grafana-8.0.0.tar.gz and grafana-8.0.1.tar.gz

About: Grafana is a visualization tool for monitoring, metric analytics and dashboards for Graphite, InfluxDB, Prometheus and many more.

fieldDisplay.test.ts  (grafana-8.0.0):fieldDisplay.test.ts  (grafana-8.0.1)
skipping to change at line 262 skipping to change at line 262
], ],
}); });
const result = getFieldDisplayValues(options); const result = getFieldDisplayValues(options);
expect(result[0].display.title).toEqual('A'); expect(result[0].display.title).toEqual('A');
expect(result[0].display.text).toEqual('10'); expect(result[0].display.text).toEqual('10');
expect(result[1].display.title).toEqual('B'); expect(result[1].display.title).toEqual('B');
expect(result[1].display.text).toEqual('20'); expect(result[1].display.text).toEqual('20');
}); });
it('With cached display processor', () => {
const options = createDisplayOptions({
reduceOptions: {
values: true,
calcs: [],
},
data: [
toDataFrame({
fields: [
{ name: 'Name', values: ['A', 'B'] },
{ name: 'Value', values: [10, 10] },
],
}),
],
});
const cache = { numeric: 10, text: 'Value' };
options.data![0].fields[1].display = (v: any) => {
return cache;
};
const result = getFieldDisplayValues(options);
expect(result[0].display.title).toEqual('A');
expect(result[1].display.title).toEqual('B');
});
it('Single string field multiple value fields', () => { it('Single string field multiple value fields', () => {
const options = createDisplayOptions({ const options = createDisplayOptions({
reduceOptions: { reduceOptions: {
values: true, values: true,
calcs: [], calcs: [],
}, },
data: [ data: [
toDataFrame({ toDataFrame({
fields: [ fields: [
{ name: 'Name', values: ['A', 'B'] }, { name: 'Name', values: ['A', 'B'] },
 End of changes. 1 change blocks. 
0 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)