<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<svg:g class="node node-rect">
  <svg:foreignObject
    class="node-labels-container"
    [attr.y]="height ? -height / 2 : 0"
    [attr.width]="205"
    [attr.height]="height"
  >
    <xhtml:div
      class="node-label-wrapper"
      [style.border-color]="borderColor"
      [style.background-color]="backgroundColor"
    >
      <h4 class="content-wrap">
        <xhtml:div class="detail">{{ operator }}</xhtml:div>
        <xhtml:div class="detail description">{{ description }}</xhtml:div>
        <xhtml:div class="node-label">Parallelism: {{ parallelism }}</xhtml:div>
        <xhtml:div
          class="node-label metric"
          title="Maximum back pressured percentage across all subtasks"
        >
          Backpressured (max): {{ prettyPrint(backPressuredPercentage) }}
        </xhtml:div>
        <xhtml:div class="node-label metric" title="Maximum busy percentage across all subtasks">
          Busy (max): {{ prettyPrint(busyPercentage) }}
        </xhtml:div>
        <xhtml:div class="node-label metric" title="Data skew percentage across all subtasks">
          Data Skew: {{ prettyPrint(dataSkewPercentage) }}
        </xhtml:div>
        <xhtml:div class="node-label metric" *ngIf="lowWatermark">
          Low Watermark: {{ lowWatermark }}
        </xhtml:div>
        <xhtml:div class="detail last" *ngIf="operatorStrategy">
          Operation: {{ operatorStrategy }}
        </xhtml:div>
      </h4>
    </xhtml:div>
  </svg:foreignObject>
</svg:g>
