You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2016/08/31 23:34:44 UTC
mesos git commit: Updated frameworks web UI page to reflect used
resources.
Repository: mesos
Updated Branches:
refs/heads/master fb2384521 -> ab58f9085
Updated frameworks web UI page to reflect used resources.
Frameworks currently show both 'used' and 'offered' resources in the
web UI. Since 'offered' resources are often transient, this sometimes
results in the web UI's display flickering between values; generally
the framework's total resource count with and without offers.
Operators generally expect this table to show 'used' resources.
The `offers.html` page can be used to view outstanding offers instead.
This closes #162.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ab58f908
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ab58f908
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ab58f908
Branch: refs/heads/master
Commit: ab58f908554e769cea88dbcbfb7aa614f6dfbc51
Parents: fb23845
Author: Miguel Bernadin <Mi...@gmail.com>
Authored: Fri Aug 26 16:06:09 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Wed Aug 31 16:33:39 2016 -0700
----------------------------------------------------------------------
src/webui/master/static/frameworks.html | 32 +++++++++++++-------------
src/webui/master/static/js/controllers.js | 8 +++----
2 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/ab58f908/src/webui/master/static/frameworks.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/frameworks.html b/src/webui/master/static/frameworks.html
index 52fd652..0c6fc1c 100644
--- a/src/webui/master/static/frameworks.html
+++ b/src/webui/master/static/frameworks.html
@@ -16,10 +16,10 @@
<th data-key="role">Role</th>
<th data-key="principal">Principal</th>
<th data-key="tasks.length">Active Tasks</th>
- <th data-key="resources.cpus">CPUs</th>
- <th data-key="resources.gpus">GPUs</th>
- <th data-key="resources.mem">Mem</th>
- <th data-key="resources.disk">Disk</th>
+ <th data-key="used_resources.cpus">CPUs</th>
+ <th data-key="used_resources.gpus">GPUs</th>
+ <th data-key="used_resources.mem">Mem</th>
+ <th data-key="used_resources.disk">Disk</th>
<th data-key="max_share">Max Share</th>
<th data-key="registered_time">Registered</th>
<th data-key="reregistered_time">Re-Registered</th>
@@ -47,10 +47,10 @@
<td>{{framework.role}}</td>
<td>{{framework.principal}}</td>
<td>{{framework.tasks.length}}</td>
- <td>{{framework.resources.cpus | number}}</td>
- <td>{{framework.resources.gpus | number}}</td>
- <td>{{framework.resources.mem * (1024 * 1024) | dataSize}}</td>
- <td>{{framework.resources.disk * (1024 * 1024) | dataSize}}</td>
+ <td>{{framework.used_resources.cpus | number}}</td>
+ <td>{{framework.used_resources.gpus | number}}</td>
+ <td>{{framework.used_resources.mem * (1024 * 1024) | dataSize}}</td>
+ <td>{{framework.used_resources.disk * (1024 * 1024) | dataSize}}</td>
<td>{{framework.max_share * 100 | number}}%</td>
<td>
<m-timestamp value="{{framework.registered_time * 1000}}"></m-timestamp>
@@ -74,10 +74,10 @@
<th data-key="role">Role</th>
<th data-key="principal">Principal</th>
<th data-key="tasks.length">Active Tasks</th>
- <th data-key="resources.cpus">CPUs</th>
- <th data-key="resources.gpus">GPUs</th>
- <th data-key="resources.mem">Mem</th>
- <th data-key="resources.disk">Disk</th>
+ <th data-key="used_resources.cpus">CPUs</th>
+ <th data-key="used_resources.gpus">GPUs</th>
+ <th data-key="used_resources.mem">Mem</th>
+ <th data-key="used_resources.disk">Disk</th>
<th data-key="max_share">Max Share</th>
<th data-key="registered_time">Registered</th>
<th data-key="reregistered_time">Re-Registered</th>
@@ -105,10 +105,10 @@
<td>{{framework.role}}</td>
<td>{{framework.principal}}</td>
<td>{{framework.tasks.length}}</td>
- <td>{{framework.resources.cpus | number}}</td>
- <td>{{framework.resources.gpus | number}}</td>
- <td>{{framework.resources.mem * (1024 * 1024) | dataSize}}</td>
- <td>{{framework.resources.disk * (1024 * 1024) | dataSize}}</td>
+ <td>{{framework.used_resources.cpus | number}}</td>
+ <td>{{framework.used_resources.gpus | number}}</td>
+ <td>{{framework.used_resources.mem * (1024 * 1024) | dataSize}}</td>
+ <td>{{framework.used_resources.disk * (1024 * 1024) | dataSize}}</td>
<td>{{framework.max_share * 100 | number}}%</td>
<td>
<m-timestamp value="{{framework.registered_time * 1000}}"></m-timestamp>
http://git-wip-us.apache.org/repos/asf/mesos/blob/ab58f908/src/webui/master/static/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/controllers.js b/src/webui/master/static/js/controllers.js
index cf8c2a4..29a5a1c 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -164,22 +164,22 @@
framework.cpus_share = 0;
if ($scope.total_cpus > 0) {
- framework.cpus_share = framework.resources.cpus / $scope.total_cpus;
+ framework.cpus_share = framework.used_resources.cpus / $scope.total_cpus;
}
framework.gpus_share = 0;
if ($scope.total_gpus > 0) {
- framework.gpus_share = framework.resources.gpus / $scope.total_gpus;
+ framework.gpus_share = framework.used_resources.gpus / $scope.total_gpus;
}
framework.mem_share = 0;
if ($scope.total_mem > 0) {
- framework.mem_share = framework.resources.mem / $scope.total_mem;
+ framework.mem_share = framework.used_resources.mem / $scope.total_mem;
}
framework.disk_share = 0;
if ($scope.total_disk > 0) {
- framework.disk_share = framework.resources.disk / $scope.total_disk;
+ framework.disk_share = framework.used_resources.disk / $scope.total_disk;
}
framework.max_share = Math.max(