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

Function renderDefaults

js/dataset.js:856–865  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

854 const legacy = document.getElementById('wizardDatasetLegacyColumns');
855 const flexible = document.getElementById('wizardDatasetFlexibleColumns');
856 const renderDefaults = () => {
857 if (list.children.length) {
858 return;
859 }
860 list.append(
861 this.createColumnRow({name: t('analytics', 'Date'), type: 'date', role: 'dimension', nullable: false}),
862 this.createColumnRow({name: t('analytics', 'Region'), type: 'text', role: 'dimension', nullable: false}),
863 this.createColumnRow({name: t('analytics', 'Value'), type: 'decimal', role: 'measure', nullable: true, defaultAggregation: 'sum'})
864 );
865 };
866 document.querySelectorAll('input[name="wizardDatasetMode"]').forEach(input => {
867 input.addEventListener('change', () => {
868 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