Skip to content
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

Dev 1.1.1 yongsik #325

Merged
merged 5 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
#322 & Fixed a bug host tab in the Infrastructure page
  • Loading branch information
yongsikgi committed Nov 12, 2021
commit d850f22d53d0e89ae4a8fecacec1fed491579d3a
11 changes: 7 additions & 4 deletions frontend/src/hosts/components/CspHostsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface Instance {
export interface Props {
cloudHosts: CloudHost[]
providerRegions: string[]
hostsPageStatus: RemoteDataState
awsPageStatus: RemoteDataState
source: Source
focusedInstance: Instance
onClickTableRow: HostsPage['handleClickCspTableRow']
Expand Down Expand Up @@ -177,18 +177,21 @@ class CspHostsTable extends PureComponent<Props, State> {
}

private get CloudTableContents(): JSX.Element {
const {cloudHosts, hostsPageStatus} = this.props
const {cloudHosts, awsPageStatus} = this.props
const {sortKey, sortDirection, searchTerm} = this.state
const sortedHosts = this.getSortedHosts(
cloudHosts,
searchTerm,
sortKey,
sortDirection
)
if (hostsPageStatus === RemoteDataState.Loading) {
if (
awsPageStatus === RemoteDataState.Loading ||
awsPageStatus === RemoteDataState.NotStarted
) {
return this.LoadingState
}
if (hostsPageStatus === RemoteDataState.Error) {
if (awsPageStatus === RemoteDataState.Error) {
return this.ErrorState
}
if (cloudHosts.length === 0) {
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/hosts/components/HostsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ class HostsTable extends PureComponent<Props, State> {
sortKey,
sortDirection
)
if (hostsPageStatus === RemoteDataState.Loading) {
if (
hostsPageStatus === RemoteDataState.Loading ||
hostsPageStatus === RemoteDataState.NotStarted
) {
return this.LoadingState
}
if (hostsPageStatus === RemoteDataState.Error) {
Expand Down
23 changes: 23 additions & 0 deletions frontend/src/hosts/components/graph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,29 @@
}
}

.time-series-status {
background-color: #bec2cc;
width: 12px;
height: 12px;
border-radius: 75px;
&.UsageIndacator {
background: #4ed8a0;
}

&.UsageIndacator--caution {
background: #ffb94a;
}

&.UsageIndacator--warning {
background: #ff8564;
}

&.UsageIndacator--danger {
background: red;
}
// margin: 0 auto;
}

.vertex {
&[btn-type='ipmi'] {
display: flex;
Expand Down
Loading