Metrics error modal


#1

Anyone know where I would find the below modal defined? A search in git of “Please contact your administrator with the following information” does not find it for me. We want to overwrite it with custom text that is user friendly vs developer friendly. It doesnt seem to be a translation either.


#2

I did found this text in UIDataLoader.js, where this modal is loaded as follows

                env.get('messageModal').set({
                    title: 'Error',
                    body: messageBody,
                    buttonText: 'OK'
                }).show();

the UIDataLoader is the component responsible of loading data so I guess when it fails in your case it;s showing the error.


#3

Thanks Bachir- where is that modal? Would one be able to overwrite it in a customer repo with custom language?


#4

@udit.garg yes given that UIDataLoader should be a type you can remix in customer repo


#5

Unfortunately this string is hard coded so you definitely have to remix copy past the whole getFetchFunc function and modify the message.
Create a new file UIDataLoader.c3typ in your project

remix type UIDataLoader {
  getFetchFunc: ~ js client
}

Then the javascript implementation file UIDataLoader.js like this

function getFetchFunc(nodeHash, kpiHash, grain, startDate, endDate, isPrevious) {
  . . .
                    // this is where you will have to change the modal message
                    messageBody = 'Please contact your administrator with the following information: <br><pre>' +
                                JSON.stringify(errorInfo, null, 4) + '</pre>';

}