зеркало из https://github.com/Azure/ipam.git
Updated table settings in other components and tweaked save icon show time
This commit is contained in:
Родитель
fc4bcba76a
Коммит
34f446e6ed
|
@ -257,7 +257,7 @@ export default function DiscoverTable(props) {
|
|||
timer.current = setTimeout(
|
||||
function() {
|
||||
setSendResults(null);
|
||||
}, 3000
|
||||
}, 2000
|
||||
);
|
||||
}
|
||||
}, [timer, sendResults]);
|
||||
|
@ -333,8 +333,6 @@ export default function DiscoverTable(props) {
|
|||
const values = columnState.reduce((acc, colInfo) => {
|
||||
const { name, flex, visible } = colInfo;
|
||||
|
||||
var data = {}
|
||||
|
||||
acc[name] = { flex, visible };
|
||||
|
||||
return acc;
|
||||
|
@ -361,7 +359,7 @@ export default function DiscoverTable(props) {
|
|||
const response = await instance.acquireTokenSilent(request);
|
||||
await updateMe(response.accessToken, body);
|
||||
setSendResults(true);
|
||||
enqueueSnackbar("View settings saved", { variant: "success" });
|
||||
// enqueueSnackbar("View settings saved", { variant: "success" });
|
||||
dispatch(getMeAsync(response.accessToken));
|
||||
} catch (e) {
|
||||
if (e instanceof InteractionRequiredAuthError) {
|
||||
|
|
|
@ -79,7 +79,7 @@ const DataSection = styled("div")(({ theme }) => ({
|
|||
height: "100%",
|
||||
width: "100%",
|
||||
borderRadius: "4px",
|
||||
marginBottom: theme.spacing(1.5)
|
||||
// marginBottom: theme.spacing(1.5)
|
||||
}));
|
||||
|
||||
// Grid Styles
|
||||
|
@ -121,16 +121,16 @@ export default function Administration() {
|
|||
const adminLoadedRef = React.useRef(false);
|
||||
|
||||
const columns = [
|
||||
{ name: "name", header: "Name", lockable: false, defaultFlex: 0.5 },
|
||||
{ name: "email", header: "Email", lockable: false, defaultFlex: 1 },
|
||||
{ name: "id", header: "Object ID", lockable: false, defaultFlex: 0.75 },
|
||||
{ name: "delete", header: "Delete", width: 50, resizable: false, hideable: false, showColumnMenuTool: false, renderHeader: () => "", render: ({data}) => renderDelete(data) }
|
||||
{ name: "name", header: "Name", type: "string", defaultFlex: 0.5 },
|
||||
{ name: "email", header: "Email", type: "string", defaultFlex: 1 },
|
||||
{ name: "id", header: "Object ID", type: "string", defaultFlex: 0.75 },
|
||||
{ name: "delete", header: "Delete", width: 50, resizable: false, hideable: false, sortable: false, draggable: false, showColumnMenuTool: false, renderHeader: () => "", render: ({data}) => renderDelete(data) }
|
||||
];
|
||||
|
||||
const filterValue = [
|
||||
{ name: 'name', operator: 'contains', type: 'string', value: '' },
|
||||
{ name: 'email', operator: 'contains', type: 'string', value: '' },
|
||||
{ name: 'id', operator: 'contains', type: 'string', value: '' }
|
||||
{ name: "name", operator: "contains", type: "string", value: "" },
|
||||
{ name: "email", operator: "contains", type: "string", value: "" },
|
||||
{ name: "id", operator: "contains", type: "string", value: "" }
|
||||
];
|
||||
|
||||
const usersLoading = open && !options;
|
||||
|
@ -415,6 +415,8 @@ export default function Administration() {
|
|||
showActiveRowIndicator={false}
|
||||
enableColumnAutosize={false}
|
||||
showColumnMenuGroupOptions={false}
|
||||
showColumnMenuLockOptions={false}
|
||||
enableColumnFilterContextMenu={true}
|
||||
columns={columns}
|
||||
loading={loading || sending}
|
||||
loadingText={sending ? <Update>Updating</Update> : "Loading"}
|
||||
|
|
|
@ -91,12 +91,12 @@ export default function EditReservations(props) {
|
|||
const timer = React.useRef();
|
||||
|
||||
const columns = [
|
||||
{ name: "cidr", header: "CIDR", defaultFlex: 0.5 },
|
||||
{ name: "userId", header: "User ID", defaultFlex: 1 },
|
||||
{ name: "desc", header: "Description", defaultFlex: 1.5 },
|
||||
{ name: "createdOn", header: "Created Date", defaultFlex: 0.75, render: ({value}) => new Date(value * 1000).toLocaleString() },
|
||||
{ name: "status", header: "Status", headerAlign: "center", width: 90, resizable: false, hideable: false, sortable: false, showColumnMenuTool: false, render: renderStatus },
|
||||
{ name: "id", header: "", width: 25, resizable: false, hideable: false, showColumnMenuTool: false, sortable: false, renderHeader: () => "", render: renderId }
|
||||
{ name: "cidr", header: "CIDR", type: "string", defaultFlex: 0.5 },
|
||||
{ name: "userId", header: "User ID", type: "string", defaultFlex: 1 },
|
||||
{ name: "desc", header: "Description", type: "string", defaultFlex: 1.5 },
|
||||
{ name: "createdOn", header: "Created Date", type: "date", defaultFlex: 0.75, render: ({value}) => new Date(value * 1000).toLocaleString() },
|
||||
{ name: "status", header: "Status", headerAlign: "center", width: 90, resizable: false, hideable: false, sortable: false, draggable: false, showColumnMenuTool: false, render: renderStatus },
|
||||
{ name: "id", header: "", width: 25, resizable: false, hideable: false, sortable: false, draggable: false, showColumnMenuTool: false, renderHeader: () => "", render: renderId }
|
||||
];
|
||||
|
||||
function renderStatus({value}) {
|
||||
|
|
|
@ -62,11 +62,11 @@ const gridStyle = {
|
|||
};
|
||||
|
||||
const columns = [
|
||||
{ name: "name", header: "Name", defaultFlex: 1 },
|
||||
{ name: "resource_group", header: "Resource Group", defaultFlex: 1 },
|
||||
{ name: "subscription_name", header: "Subscription Name", defaultFlex: 1 },
|
||||
{ name: "subscription_id", header: "Subscription ID", defaultFlex: 1, defaultVisible: false },
|
||||
{ name: "prefixes", header: "Prefixes", defaultFlex: 0.75, render: ({value}) => value.join(", ") },
|
||||
{ name: "name", header: "Name", type: "string", defaultFlex: 1 },
|
||||
{ name: "resource_group", header: "Resource Group", type: "string", defaultFlex: 1 },
|
||||
{ name: "subscription_name", header: "Subscription Name", type: "string", defaultFlex: 1 },
|
||||
{ name: "subscription_id", header: "Subscription ID", type: "string", defaultFlex: 1, defaultVisible: false },
|
||||
{ name: "prefixes", header: "Prefixes", type: "array", defaultFlex: 0.75, render: ({value}) => value.join(", ") },
|
||||
];
|
||||
|
||||
export default function EditVnets(props) {
|
||||
|
|
|
@ -79,7 +79,7 @@ const DataSection = styled("div")(({ theme }) => ({
|
|||
height: "100%",
|
||||
width: "100%",
|
||||
borderRadius: "4px",
|
||||
marginBottom: theme.spacing(1.5)
|
||||
// marginBottom: theme.spacing(1.5)
|
||||
}));
|
||||
|
||||
const Update = styled("span")(({ theme }) => ({
|
||||
|
@ -111,15 +111,15 @@ const GridBody = styled("div")(({ theme }) => ({
|
|||
}));
|
||||
|
||||
const columns = [
|
||||
{ name: "name", header: "Subscription Name", lockable: false, defaultFlex: 1 },
|
||||
{ name: "subscription_id", header: "Subscription ID", lockable: false, defaultFlex: 1 },
|
||||
{ name: "type", header: "Subscription Type", lockable: false, defaultFlex: 0.75 },
|
||||
{ name: "name", header: "Subscription Name", type: "string", defaultFlex: 1 },
|
||||
{ name: "subscription_id", header: "Subscription ID", type: "string", defaultFlex: 1 },
|
||||
{ name: "type", header: "Subscription Type", type: "string", defaultFlex: 0.75 },
|
||||
];
|
||||
|
||||
const filterValue = [
|
||||
{ name: 'name', operator: 'contains', type: 'string', value: '' },
|
||||
{ name: 'subscription_id', operator: 'contains', type: 'string', value: '' },
|
||||
{ name: 'type', operator: 'contains', type: 'string', value: '' }
|
||||
{ name: "name", operator: "contains", type: "string", value: "" },
|
||||
{ name: "subscription_id", operator: "contains", type: "string", value: "" },
|
||||
{ name: "type", operator: "contains", type: "string", value: "" }
|
||||
];
|
||||
|
||||
export default function ManageExclusions() {
|
||||
|
@ -292,6 +292,8 @@ export default function ManageExclusions() {
|
|||
showActiveRowIndicator={false}
|
||||
enableColumnAutosize={false}
|
||||
showColumnMenuGroupOptions={false}
|
||||
showColumnMenuLockOptions={false}
|
||||
enableColumnFilterContextMenu={true}
|
||||
columns={columns}
|
||||
toggleRowSelectOnClick={true}
|
||||
loading={loading || sending || !subscriptions || !loadedExclusions}
|
||||
|
|
|
@ -21,7 +21,7 @@ function TabPanel(props) {
|
|||
{...other}
|
||||
>
|
||||
{value === index && (
|
||||
<Box sx={{ p: 3, height: 'calc(100vh - 161px)' }}>
|
||||
<Box sx={{ p: 3, height: 'calc(100vh - 113px)' }}>
|
||||
{children}
|
||||
</Box>
|
||||
)}
|
||||
|
@ -48,7 +48,7 @@ export default function AdminTabs() {
|
|||
let location = useLocation();
|
||||
|
||||
return (
|
||||
<Box sx={{ width: '100%', height: 'calc(100vh - 137px)'}}>
|
||||
<Box sx={{ width: '100%', height: 'calc(100vh - 64px)'}}>
|
||||
<React.Fragment>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs value={allTabs.indexOf(location.pathname)}>
|
||||
|
|
|
@ -21,7 +21,7 @@ function TabPanel(props) {
|
|||
{...other}
|
||||
>
|
||||
{value === index && (
|
||||
<Box sx={{ p: 3, height: 'calc(100vh - 161px)' }}>
|
||||
<Box sx={{ p: 3, height: 'calc(100vh - 113px)' }}>
|
||||
{children}
|
||||
</Box>
|
||||
)}
|
||||
|
@ -48,7 +48,7 @@ export default function AnalyzeTabs() {
|
|||
let location = useLocation();
|
||||
|
||||
return (
|
||||
<Box sx={{ width: '100%', height: 'calc(100vh - 137px)'}}>
|
||||
<Box sx={{ width: '100%', height: 'calc(100vh - 64px)'}}>
|
||||
<React.Fragment>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs value={allTabs.indexOf(location.pathname)}>
|
||||
|
|
|
@ -29,7 +29,7 @@ function TabPanel(props) {
|
|||
{...other}
|
||||
>
|
||||
{value === index && (
|
||||
<Box sx={{ p: 3, height: 'calc(100vh - 161px)' }}>
|
||||
<Box sx={{ p: 3, height: 'calc(100vh - 113px)' }}>
|
||||
{children}
|
||||
</Box>
|
||||
)}
|
||||
|
@ -56,7 +56,7 @@ export default function DiscoverTabs() {
|
|||
let location = useLocation();
|
||||
|
||||
return (
|
||||
<Box sx={{ width: '100%', height: 'calc(100vh - 137px)'}}>
|
||||
<Box sx={{ width: '100%', height: 'calc(100vh - 64px)'}}>
|
||||
<React.Fragment>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs value={allTabs.indexOf(location.pathname)}>
|
||||
|
|
Загрузка…
Ссылка в новой задаче