Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Task row memory progress chart misreports denominator units #10499

Closed
backspace opened this issue May 3, 2021 · 4 comments · Fixed by #11980
Closed

ui: Task row memory progress chart misreports denominator units #10499

backspace opened this issue May 3, 2021 · 4 comments · Fixed by #11980

Comments

@backspace
Copy link
Contributor

For this configuration:

      resources {
        cpu    = 250
        memory = 10
        memory_max = 12
      }

I’m seeing this tooltip:

task-row-units

It should be MiB, not Bytes.

@ttys3
Copy link
Contributor

ttys3 commented Feb 2, 2022

I found this too. Even on latest Nomad v1.2.5

@ttys3
Copy link
Contributor

ttys3 commented Feb 2, 2022

maybe related code:

ui/app/templates/allocations/allocation/index.hbs

  <div class="boxed-section">
    <div class="boxed-section-head">
      Tasks
    </div>
    <div class="boxed-section-body {{if this.sortedStates.length "is-full-bleed"}}">
      {{#if this.sortedStates.length}}
        <ListTable
          @source={{this.sortedStates}}
          @sortProperty={{this.sortProperty}}
          @sortDescending={{this.sortDescending}}
          @class="is-striped" as |t|>
          <t.head>
            <th class="is-narrow"></th>
            <t.sort-by @prop="name">Name</t.sort-by>
            <t.sort-by @prop="state">State</t.sort-by>
            <th>Last Event</th>
            <t.sort-by @prop="events.lastObject.time">Time</t.sort-by>
            <th>Volumes</th>
            <th>CPU</th>
            <th>Memory</th>
          </t.head>
          <t.body as |row|>
            <TaskRow
              @data-test-task-row={{row.model.name}}
              @task={{row.model}}
              @onClick={{action "taskClick" row.model.allocation row.model}} />
          </t.body>
        </ListTable>
      {{else}}
        <div data-test-empty-tasks-list class="empty-message">
          <h3 data-test-empty-tasks-list-headline class="empty-message-headline">No Tasks</h3>
          <p data-test-empty-tasks-list-body class="empty-message-body">Allocations will not have tasks until they are in a running state.</p>
        </div>
      {{/if}}
    </div>
  </div>

and ui/app/templates/components/task-row.hbs

 <div class="inline-chart tooltip" role="tooltip" aria-label="{{format-scheduled-bytes this.memory.used}} / {{format-scheduled-bytes this.taskStats.reservedMemory}}">
        <progress
          class="progress is-danger is-small"
          value="{{this.memory.percent}}"
          max="1">
          {{this.memory.percent}}
        </progress>
      </div>

default is {{format-scheduled-bytes bytes start="KiB"}}

I think {{format-scheduled-bytes this.taskStats.reservedMemory}} should be {{format-scheduled-bytes this.taskStats.reservedMemory start="MiB"}}

@ttys3
Copy link
Contributor

ttys3 commented Feb 2, 2022

yes. got it fixed

image

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants