+ );
+ },
+ },
+ ]}
+ disableSelectionZone
+ items={groupDetails.groups}
+ layoutMode={DetailsListLayoutMode.justified}
+ selectionMode={SelectionMode.none}
+ />
+
+ );
+}
+
+GroupDetailDialog.propTypes = {
+ groupDetails: PropTypes.object.isRequired,
+ setGroupDetails: PropTypes.func.isRequired,
+};
diff --git a/src/webportal/src/app/home/home/virtual-cluster-statistics.jsx b/src/webportal/src/app/home/home/virtual-cluster-statistics.jsx
index 9030465a27..0d6df5bdfc 100644
--- a/src/webportal/src/app/home/home/virtual-cluster-statistics.jsx
+++ b/src/webportal/src/app/home/home/virtual-cluster-statistics.jsx
@@ -1,19 +1,5 @@
-// Copyright (c) Microsoft Corporation
-// All rights reserved.
-//
-// MIT License
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
-// documentation files (the "Software"), to deal in the Software without restriction, including without limitation
-// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
-// to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
-// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
import c from 'classnames';
import PropTypes from 'prop-types';
@@ -26,8 +12,9 @@ import {
StackItem,
FontClassNames,
Link,
+ DefaultButton,
} from 'office-ui-fabric-react';
-import React, { useMemo } from 'react';
+import React, { useMemo, useState } from 'react';
import Card from '../../components/card';
import { UtilizationChart } from './utilization-chart';
@@ -37,6 +24,7 @@ import config from '../../config/webportal.config';
import t from '../../components/tachyons.scss';
import { ResourceBar } from './resource-bar';
+import GroupDetailDialog from './groupDetailDialog';
const getResouceUtilization = (used, guaranteed) => {
if (Math.abs(guaranteed) < 1e-5) {
@@ -45,118 +33,173 @@ const getResouceUtilization = (used, guaranteed) => {
return used / guaranteed;
};
+const getGrantedGroupsDescription = groups => {
+ const str = groups.map(group => group.groupname).join();
+ if (str.length < 25) {
+ return str;
+ } else {
+ return str.substring(0, 22) + '...';
+ }
+};
+
const isAdmin = cookies.get('admin') === 'true';
-const vcListColumns = [
- {
- key: 'name',
- minWidth: 45,
- maxWidth: 100,
- name: 'Name',
- isResizable: true,
- onRender(vc) {
- return (
-
- {isAdmin ? (
-
- {vc.dedicated ? vc.name + ' (dedicated)' : vc.name}
-
- ) : (
-