Metrics error modal


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.


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

                    title: 'Error',
                    body: messageBody,
                    buttonText: 'OK'

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


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


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


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>';