$onInit()

in modules/frontend/app/configuration/components/ui-ace.controller.js [26:91]


    $onInit() {
        delete this.data;

        const available = this.Version.available.bind(this.Version);

        // Setup generator.
        switch (this.generator) {
            case 'igniteConfiguration':
                this.generate = (cluster) => this.generatorFactory.cluster(cluster, this.Version.currentSbj.getValue(), this.client === 'true');

                break;
            case 'cacheStore':
            case 'cacheQuery':
                this.generate = (cache, domains) => {
                    const cacheDomains = _.reduce(domains, (acc, domain) => {
                        if (_.includes(cache.domains, domain.value))
                            acc.push(domain.meta);

                        return acc;
                    }, []);

                    return this.generatorFactory[this.generator](cache, cacheDomains, available);
                };

                break;
            case 'cacheNodeFilter':
                this.generate = (cache, igfss) => {
                    const cacheIgfss = _.reduce(igfss, (acc, igfs) => {
                        acc.push(igfs.igfs);

                        return acc;
                    }, []);

                    return this.generatorFactory.cacheNodeFilter(cache, cacheIgfss);
                };

                break;
            case 'clusterServiceConfiguration':
                this.generate = (cluster, caches) => {
                    return this.generatorFactory.clusterServiceConfiguration(cluster.serviceConfigurations, caches);
                };

                break;
            case 'clusterCheckpoint':
                this.generate = (cluster, caches) => {
                    return this.generatorFactory.clusterCheckpoint(cluster, available, caches);
                };

                break;
            case 'igfss':
                this.generate = (cluster, igfss) => {
                    const clusterIgfss = _.reduce(igfss, (acc, igfs) => {
                        if (_.includes(cluster.igfss, igfs.value))
                            acc.push(igfs.igfs);

                        return acc;
                    }, []);

                    return this.generatorFactory.clusterIgfss(clusterIgfss, available);
                };

                break;
            default:
                this.generate = (master) => this.generatorFactory[this.generator](master, available);
        }
    }