All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.buoyant.admin.js.src.router_servers.js Maven / Gradle / Ivy

There is a newer version: 1.7.5
Show newest version
"use strict";

define([
  'jQuery',
  'lodash',
  'handlebars.runtime',
  'src/router_server',
  'template/compiled_templates'
], function($, _, Handlebars, RouterServer, templates) {
    var serverContainerTemplate = templates.router_server_container;
    var rateMetricPartial = templates["rate_metric.partial"];

    var RouterServers = (function() {
    return function (metricsCollector, initialData, $serverEl, routerName) {
      var servers = initialData[routerName].servers;
      Handlebars.registerPartial('rateMetricPartial', rateMetricPartial);

      _.map(servers, function(server) {
        var $el = $(serverContainerTemplate({server: server}));
        $serverEl.append($el);
        RouterServer(metricsCollector, server, $el, routerName);
      });
    }
  })();
  return RouterServers;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy