This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add group, hide user management in aad schema(2) * add group, hide user management in aad schema.3 * add group, hide user management in aad schema.4 * group manege plugin * group manege plugin.2 * group manege plugin.2 * group manege plugin.2 * Update TopBar.jsx
- Loading branch information
1 parent
81830df
commit dd40f56
Showing
5 changed files
with
294 additions
and
211 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
src/webportal/src/app/job/job-view/fabric/JobList/TopBar.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,60 @@ | ||
<!-- Modal component for vc add --> | ||
<div class="modal fade" id="virtualClustersList" tabindex="-1" role="dialog" aria-labelledby="virtualClustersAddTitle"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h3 class="modal-title" id="virtualClustersAddTitle"> | ||
Add New Virtual Cluster | ||
</h3> | ||
<h5 class="modal-title">The capacity of new virtual cluster will be split from the "default" virtual cluster</h5> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="modal-vc-content row"> | ||
<div class="form-group"> | ||
<input name="vcname" class="add-vc-fild form-control" placeholder="Virtual Cluster Name"> | ||
</div> | ||
<div class="form-group"> | ||
<input name="capacity" class="add-vc-fild form-control" placeholder="Virtual Cluster Capacity"> | ||
</div> | ||
<button type="button" class="btn btn-lg btn-primary btn-block" id="virtualClustersListAdd"> | ||
Add Virtual Cluster | ||
</button> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal fade" id="virtualClustersList" tabindex="-1" role="dialog" aria-labelledby="virtualClustersAddTitle"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h3 class="modal-title" id="virtualClustersAddTitle"> | ||
Add New Shared VC | ||
</h3> | ||
<h5 class="modal-title">The capacity of new virtual cluster will be split from the "default" virtual cluster</h5> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="modal-vc-content row"> | ||
<div class="form-group"> | ||
<input name="vcname" class="add-vc-fild form-control" placeholder="Virtual Cluster Name"> | ||
</div> | ||
<div class="form-group"> | ||
<input name="capacity" class="add-vc-fild form-control" placeholder="Virtual Cluster Capacity"> | ||
</div> | ||
<button type="button" class="btn btn-lg btn-primary btn-block" id="virtualClustersListAdd"> | ||
Add Shared VC | ||
</button> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Modal component for vc edit --> | ||
<div class="modal fade" id="virtualClustersEdit" tabindex="-1" role="dialog" aria-labelledby="virtualClustersEditTitle"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h3 class="modal-title" id="virtualClustersEditTitle"> | ||
Edit Virtual Cluster | ||
</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="modal-vc-content"> | ||
<div class="form-group edit-group"> | ||
<label for="editName" class="edit-group-item">Name</label> | ||
<input id="editName" name="nameEdit" class="add-vc-fild form-control" placeholder="Virtual Cluster Name" readonly> | ||
</div> | ||
<div class="form-group edit-group"> | ||
<label for="editCapacity" class="edit-group-item">Capacity</label> | ||
<input id="editCapacity" name="capacityEdit" class="add-vc-fild form-control" placeholder="Virtual Cluster Capacity"> | ||
</div> | ||
<div class="remarks">The new capacity can be set in range of 0%~<%= vcDefault.capacity %>%, the variation will be split from or return to default virtual cluster.</div> | ||
<button type="button" class="btn btn-lg btn-primary btn-block" id="virtualClustersListEdit"> | ||
Update Virtual Cluster | ||
</button> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h3 class="modal-title" id="virtualClustersEditTitle"> | ||
Edit Virtual Cluster | ||
</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="modal-vc-content"> | ||
<div class="form-group edit-group"> | ||
<label for="editName" class="edit-group-item">Name</label> | ||
<input id="editName" name="nameEdit" class="add-vc-fild form-control" placeholder="Virtual Cluster Name" readonly> | ||
</div> | ||
<div class="form-group edit-group"> | ||
<label for="editCapacity" class="edit-group-item">Capacity</label> | ||
<input id="editCapacity" name="capacityEdit" class="add-vc-fild form-control" placeholder="Virtual Cluster Capacity"> | ||
</div> | ||
<div class="remarks">The new capacity can be set in range of 0%~<%= vcDefault.capacity %>%, the variation will be split from or return to default virtual cluster.</div> | ||
<button type="button" class="btn btn-lg btn-primary btn-block" id="virtualClustersListEdit"> | ||
Update Virtual Cluster | ||
</button> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,139 @@ | ||
<section class='content-header'> | ||
<%= breadcrumb({ breadcrumbTitle: "Virtual Clusters" }) %> | ||
</section> | ||
|
||
<section class='content'> | ||
<div class='box'> | ||
<div class='box-body'> | ||
<% if (isAdmin === 'true') { %> | ||
<button class="btn btn-success btn-lg add-vc-btn" id="virtualClustersBtn" onclick="virtualClusterShow()">Add Virtual Cluster</button> | ||
<% } %> | ||
<table id='vc-table' class='table table-bordered table-hover table-condensed' style='vertical-align:middle'> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Capacity</th> | ||
<th>Utilization</th> | ||
<th>Memory</th> | ||
<th>CPUs</th> | ||
<th>GPUs</th> | ||
<th>Active Jobs</th> | ||
<th>Status</th> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% for (let vcName in data) { %> | ||
<% if (specifiedVc && vcName !== specifiedVc) continue; %> | ||
<tr> | ||
<td> | ||
<a href="virtual-clusters.html?vcName=<%= vcName %>"><%= vcName %></a> | ||
</td> | ||
<td> | ||
<%= formatNumber(data[vcName]['capacity'], 2) %> % | ||
</td> | ||
<td> | ||
<%= formatNumber(data[vcName]['capacity'] === 0 ? 0 : data[vcName]['usedCapacity'] / data[vcName]['capacity'] * 100, 2) %> % | ||
</td> | ||
<td> | ||
<%= data[vcName]['resourcesUsed']['memory'] %> MB | ||
</td> | ||
<td> | ||
<%= data[vcName]['resourcesUsed']['vCores'] %> | ||
</td> | ||
<td> | ||
<%= data[vcName]['resourcesUsed']['GPUs'] %> | ||
</td> | ||
<td> | ||
<%= data[vcName]['numJobs'] %> | ||
</td> | ||
<td width="8%"> | ||
<%= convertState(vcName, data[vcName]['status']) %> | ||
</td> | ||
<td> | ||
<a href="job-list.html?vcName=<%= vcName %>">View Jobs</a> | ||
| | ||
<a href="<%= yarnWebPortalUri %>/cluster/scheduler?openQueues=<%= vcName %>" target="_blank">Go to Yarn Page</a> | ||
<% if (isAdmin === 'true') { %> | ||
| | ||
<a onclick="deleteVcItem('<%= vcName %>'), deleteGroup('<%= vcName %>')" class="<%= vcName === 'default' ? 'default' : 'item-btn' %>">Delete</a> | ||
| | ||
<a onclick="editVcItem('<%= vcName %>', '<%= formatNumber(data[vcName]['capacity'], 2) %> %')" class="<%= vcName === 'default' ? 'default' : 'item-btn' %>">Edit</a> | ||
<% } %> | ||
</td> | ||
</tr> | ||
<% } %> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div> | ||
<ul class="nav nav-tabs" role="tablist"> | ||
<li role="presentation" class="active"><a href="#sharedvc" role="tab" data-toggle="tab">Shared vc</a></li> | ||
<li role="presentation"><a href="#dedicatedvc" role="tab" data-toggle="tab">Dedicated VC</a></li> | ||
</ul> | ||
</div> | ||
<div class="tab-content"> | ||
<div role="tabpanel" class="tab-pane active box" id="sharedvc"> | ||
<div class='box-body'> | ||
<div class="message-text">Shared VCs share the physical cluster's GPU, CPU and Memory resources by percentage. It provides cluster the flexibility to allocate resources in different nodes in a transparent manner. We support users to add new shared VC from WebUI, the new shared VC's capacity will be allocated from the current default shared VC.</div> | ||
<% if (isAdmin === 'true') { %> | ||
<button class="btn btn-success btn-xl add-vc-btn" id="virtualClustersBtn" onclick="virtualClusterShow()">Add Shared VC</button> | ||
<% } %> | ||
<table id='common-table' class='table table-bordered table-hover table-condensed' style='vertical-align:middle'> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Capacity</th> | ||
<th title="Bonus is an ability to use other shared VCs' resource">Bonus</th> | ||
<th>Utilization</th> | ||
<th>Memory</th> | ||
<th>CPUs</th> | ||
<th>GPUs</th> | ||
<th>Active Jobs</th> | ||
<th>State</th> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% for (let vcName in data) { %> | ||
<% if (specifiedVc && vcName !== specifiedVc) continue; %> | ||
<% if (data[vcName]['dedicated'] === false) { %> | ||
<tr> | ||
<td> | ||
<%= vcName %> | ||
</td> | ||
<td> | ||
<%= formatNumber(data[vcName]['capacity'], 2) %> % | ||
</td> | ||
<td> | ||
<%= data[vcName]['capacity'] < data[vcName]['maxCapacity'] || data[vcName]['maxCapacity'] === 100 ? 'enabled' : 'disabled' %> | ||
</td> | ||
<td> | ||
<%= formatNumber(data[vcName]['capacity'] === 0 ? 0 : data[vcName]['usedCapacity'] / data[vcName]['capacity'] * 100, 2) %> % | ||
</td> | ||
<td> | ||
<%= Math.floor(data[vcName]['resourcesUsed']['memory']) %> / <%= Math.floor(data[vcName]['resourcesTotal']['memory']) %> MB | ||
</td> | ||
<td> | ||
<%= Math.floor(data[vcName]['resourcesUsed']['vCores']) %> / <%= Math.floor(data[vcName]['resourcesTotal']['vCores']) %> | ||
</td> | ||
<td> | ||
<%= Math.floor(data[vcName]['resourcesUsed']['GPUs']) %> / <%= Math.floor(data[vcName]['resourcesTotal']['GPUs']) %> | ||
</td> | ||
<td> | ||
<%= data[vcName]['numJobs'] %> | ||
</td> | ||
<td width="8%"> | ||
<%= convertState(vcName, data[vcName]['status']) %> | ||
</td> | ||
<td> | ||
<a href="job-list.html?vcName=<%= vcName %>">View Jobs</a> | ||
| | ||
<a href="<%= yarnWebPortalUri %>/cluster/scheduler?openQueues=<%= vcName %>" target="_blank">Go to Yarn Page</a> | ||
<% if (isAdmin === 'true') { %> | ||
| | ||
<a onclick="deleteVcItem('<%= vcName %>')" class="<%= vcName === 'default' ? 'default' : 'item-btn' %>">Delete</a> | ||
| | ||
<a onclick="editVcItem('<%= vcName %>', '<%= formatNumber(data[vcName]['capacity'], 2) %> %')" class="<%= vcName === 'default' ? 'default' : 'item-btn' %>">Edit</a> | ||
<% } %> | ||
</td> | ||
</tr> | ||
<% } %> | ||
<% } %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div role="tabpanel" class="tab-pane box" id="dedicatedvc"> | ||
<div class='box-body'> | ||
<div class="message-text">Dedicated VCs are designed for jobs need dedicated compute resource, a dedicated VC is binding to 1 or more physical nodes. When creating a dedicated VC, currently only supported in <a href="https://github.com/microsoft/pai/blob/master/docs/tools/dedicated_vc.md" class="ms-Link">cmdline tool</a>, we will allocate the nodes from the Shared VC pool and isolate these node(s) for jobs submitting to this new created dedicated VC only. Once the dedicated VC is created, shared VCs are no longer allowed to use compute resources on this dedicated VC.</div> | ||
<table id='dedicated-table' class='table table-bordered table-hover table-condensed' style='vertical-align:middle'> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Utilization</th> | ||
<th>Memory</th> | ||
<th>CPUs</th> | ||
<th>GPUs</th> | ||
<th>Active Jobs</th> | ||
<th>State</th> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% for (let vcName in data) { %> | ||
<% if (specifiedVc && vcName !== specifiedVc) continue; %> | ||
<% if (data[vcName]['dedicated'] === true) { %> | ||
<tr> | ||
<td> | ||
<%= vcName %> | ||
</td> | ||
<td> | ||
<%= formatNumber(data[vcName]['capacity'] === 0 ? 0 : data[vcName]['usedCapacity'] / data[vcName]['capacity'] * 100, 2) %> % | ||
</td> | ||
<td> | ||
<%= Math.floor(data[vcName]['resourcesUsed']['memory']) %> / <%= Math.floor(data[vcName]['resourcesTotal']['memory']) %> MB | ||
</td> | ||
<td> | ||
<%= Math.floor(data[vcName]['resourcesUsed']['vCores']) %> / <%= Math.floor(data[vcName]['resourcesTotal']['vCores']) %> | ||
</td> | ||
<td> | ||
<%= Math.floor(data[vcName]['resourcesUsed']['GPUs']) %> / <%= Math.floor(data[vcName]['resourcesTotal']['GPUs']) %> | ||
</td> | ||
<td> | ||
<%= data[vcName]['numJobs'] %> | ||
</td> | ||
<td width="8%"> | ||
<%= convertState(vcName, data[vcName]['status']) %> | ||
</td> | ||
<td> | ||
<a href="job-list.html?vcName=<%= vcName %>">View Jobs</a> | ||
| | ||
<a href="<%= yarnWebPortalUri %>/cluster/scheduler?openQueues=<%= vcName %>" target="_blank">Go to Yarn Page</a> | ||
</td> | ||
</tr> | ||
<% } %> | ||
<% } %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
<%= modal({'vcDefault': data.default}) %> | ||
</section> | ||
</section> |
Oops, something went wrong.