Copy change for Schedules (#3175)

# What this PR does

- Replaced `LoadingPlaceholder` with normal `Text` on the Escalations
page
- Changed the copy for the loading indicator on Schedules

Both changes have been done to be consistent with the style used on the
other pages.
This commit is contained in:
Rares Mardare 2023-10-20 16:52:18 +03:00 committed by GitHub
parent 79d1b0a77e
commit bf197b09c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 24 deletions

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Button, HorizontalGroup, Icon, IconButton, LoadingPlaceholder, Tooltip, VerticalGroup } from '@grafana/ui';
import { Button, HorizontalGroup, Icon, IconButton, Tooltip, VerticalGroup } from '@grafana/ui';
import cn from 'classnames/bind';
import { observer } from 'mobx-react';
import { RouteComponentProps, withRouter } from 'react-router-dom';
@ -176,7 +176,11 @@ class EscalationChainsPage extends React.Component<EscalationChainsPageProps, Es
{(item) => <EscalationChainCard id={item.id} />}
</GList>
) : (
<LoadingPlaceholder className={cx('loading')} text="Loading..." />
<VerticalGroup>
<Text type="primary" className={cx('loading')}>
Loading...
</Text>
</VerticalGroup>
)}
</div>
</div>

View file

@ -124,28 +124,24 @@ class SchedulesPage extends React.Component<SchedulesPageProps, SchedulesPageSta
/>
</div>
{results === undefined ? (
<LoadingPlaceholder text="Loading Schedules..." />
) : (
<Table
columns={this.getTableColumns()}
data={results}
loading={!results}
pagination={{
page,
total: Math.ceil((count || 0) / (page_size || PAGE_SIZE_DEFAULT)),
onChange: this.handlePageChange,
}}
rowKey="id"
expandable={{
expandedRowKeys: expandedRowKeys,
onExpand: this.handleExpandRow,
expandedRowRender: this.renderSchedule,
expandRowByClick: true,
}}
emptyText={this.renderNotFound()}
/>
)}
<Table
columns={this.getTableColumns()}
data={results}
loading={!results}
pagination={{
page,
total: Math.ceil((count || 0) / (page_size || PAGE_SIZE_DEFAULT)),
onChange: this.handlePageChange,
}}
rowKey="id"
expandable={{
expandedRowKeys: expandedRowKeys,
onExpand: this.handleExpandRow,
expandedRowRender: this.renderSchedule,
expandRowByClick: true,
}}
emptyText={results === undefined ? 'Loading...' : this.renderNotFound()}
/>
</div>
{showNewScheduleSelector && (