-
Notifications
You must be signed in to change notification settings - Fork 2
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
HOSTSD-227 HSB user pages #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
export default function Page() { | ||
useSecureRoute((state) => state.isOrganizationAdmin, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple way to force redirect. What I don't like about it is that the whole page needs to be use client
for it to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
); | ||
useSecureRoute((state) => state.isClient, '/'); | ||
|
||
return <Dashboard />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved all this common logic to a single component that both HSB and Client users can share.
return ( | ||
<Col> | ||
<h1></h1>All Servers | ||
<AllocationByStorageVolume organizations={organizations} serverItems={serverItems} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The all servers page chart doesn't expand correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
import { useAllocationByOS } from './hooks'; | ||
import { getColumns, getLabel } from './utils'; | ||
|
||
export interface IAllocationTableProps { | ||
/** Filter servers by their OS */ | ||
operatingSystem: OperatingSystems; | ||
operatingSystem?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the data out so that it can be passed in by the parent.
|
||
/** | ||
* Provides a function to filter server items. | ||
* @param operatingSystem Operating system filter. | ||
* @returns Function to filter server items by operating system and predicate. | ||
*/ | ||
export const useAllocationByOS = (operatingSystem: OperatingSystems) => { | ||
export const useAllocationByOS = (operatingSystem?: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved implementation to not require an enum
All pages for HSB users have been wired up with basic functionality. There are some UI issues, but all these can be addressed later.
Drive Space Chart
Multi Organization
Single Organization
Single OS
Single Server
All Servers