MCPcopy Create free account
hub / github.com/Rello/analytics / renderDefaults

Function renderDefaults

js/dataset.js:827–836  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

825 const legacy = document.getElementById('wizardDatasetLegacyColumns');
826 const flexible = document.getElementById('wizardDatasetFlexibleColumns');
827 const renderDefaults = () => {
828 if (list.children.length) {
829 return;
830 }
831 list.append(
832 this.createColumnRow({name: t('analytics', 'Date'), type: 'date', role: 'dimension', nullable: false}),
833 this.createColumnRow({name: t('analytics', 'Region'), type: 'text', role: 'dimension', nullable: false}),
834 this.createColumnRow({name: t('analytics', 'Value'), type: 'decimal', role: 'measure', nullable: true, defaultAggregation: 'sum'})
835 );
836 };
837 document.querySelectorAll('input[name="wizardDatasetMode"]').forEach(input => {
838 input.addEventListener('change', () => {
839 const isFlexible = input.checked && input.value === OCA.Analytics.Flexible.STORAGE_MODE;

Callers 1

dataset.jsFile · 0.85

Calls 2

appendMethod · 0.80
tFunction · 0.50

Tested by

no test coverage detected