function getDashboardFetcher(serviceUrl) {
    var dashboardVersions = null;

    return function dashboardFetcher() {
        if (!dashboardVersions) {
            var targetUrl = urlJoin(serviceUrl, "/dashboards/versions");
            return fetch(targetUrl)
                .then(function(response) { return response.json() })
                .then(function(versions) {
                    // Store in cache
                    dashboardVersions = versions;
                    return versions;
                })
                .catch(function(reason) {
                    console.log("Failed to fetch dashbaords versions from remote service. Reason: " + reason);
                });
        } else {
            var resultPromise = new Promise(function(resolve) {
                resolve(dashboardVersions);
            });

            return resultPromise;
        }
    }
}
Returns a fetcher function which retrieves the available dashboard versions.

@param {string} serviceUrl url of the service which returns all of the dashboards