Skip to content

Commit

Permalink
#322 & Fixed a bug host tab in the Infrastructure page
Browse files Browse the repository at this point in the history
  • Loading branch information
yongsikgi committed Nov 12, 2021
1 parent d850f22 commit e8e7196
Show file tree
Hide file tree
Showing 8 changed files with 309 additions and 390 deletions.
11 changes: 4 additions & 7 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[]
awsPageStatus: RemoteDataState
hostsPageStatus: RemoteDataState
source: Source
focusedInstance: Instance
onClickTableRow: HostsPage['handleClickCspTableRow']
Expand Down Expand Up @@ -177,21 +177,18 @@ class CspHostsTable extends PureComponent<Props, State> {
}

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

.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

0 comments on commit e8e7196

Please sign in to comment.