@* * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. *@ @import scalaz.{\/} @import kafka.manager.model.ActorModel._ @import kafka.manager.{BrokerListExtended} @import kafka.manager.utils._ @import helper._ @import models.form._ @(cluster: String, topic: String, assignForm: List[(String, List[(Int,List[Int])])], brokers: BrokerListExtended, brokersViews: Map[Int, BVView], formErrors: Seq[FormError] )(implicit af: features.ApplicationFeatures, cf: kafka.manager.features.ClusterFeatures, messages: play.api.i18n.Messages, menus: models.navigation.Menus, request:RequestHeader) @implicitFieldConstructor = @{ b4.vertical.fieldConstructor() } @theMenu = { @views.html.navigation.clusterMenu(cluster,"Topic","Manual Partition Assignments",menus.clusterMenus(cluster)) } @color(brokerId: Int) = @{ java.security.MessageDigest.getInstance("MD5").digest("" + brokerId).map("%02X".format(_)).mkString.substring(0,6) } @toColor(brokerId: Int) = { #@color(brokerId) } @reverseColor(originalColor: String) = { #@originalColor.map({x => if(x == '#') x else "%X".format(0xf - Integer.parseInt(x.toString,16)).head}) } @replicaSelection(topicIdx: Int, assignIdx: Int, brokerIndex: Int, brokerId: Int) = { @if(brokers.list.filter({broker => broker.id == brokerId}).size > 0) { } else { Broker Down! } } @topHeading = {
Partition |
---|
Replica @brokerIndex: @replicaSelection(topicIdx, assgnIndex, brokerIndex, broker) |