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

Restyle Show explicit user name instead of avatar in lists. #4829

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions client/app/pages/alerts/AlertsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AlertsList extends React.Component {
totalCount={controller.totalItemsCount}
itemsPerPage={controller.itemsPerPage}
page={controller.page}
onChange={page => controller.updatePagination({ page })}
onChange={(page) => controller.updatePagination({ page })}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabrieldutra @kravets-levko if you format locally this file, does it change it like restyled try to do here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the local format is differing from restyled, something is wrong with it (I was waiting to see if it was only my PR or if there was others)

/>
</div>
)}
Expand Down Expand Up @@ -123,5 +123,5 @@ const AlertsListPage = itemsList(
export default routeWithUserSession({
path: "/alerts",
title: "Alerts",
render: pageProps => <AlertsListPage {...pageProps} currentPage="alerts" />,
render: (pageProps) => <AlertsListPage {...pageProps} currentPage="alerts" />,
});
10 changes: 5 additions & 5 deletions client/app/pages/dashboards/DashboardList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DashboardList extends React.Component {
className="m-b-10"
options={controller.pageSizeOptions}
value={controller.itemsPerPage}
onChange={itemsPerPage => controller.updatePagination({ itemsPerPage })}
onChange={(itemsPerPage) => controller.updatePagination({ itemsPerPage })}
/>
</Layout.Sidebar>
<Layout.Content>
Expand All @@ -114,7 +114,7 @@ class DashboardList extends React.Component {
totalCount={controller.totalItemsCount}
itemsPerPage={controller.itemsPerPage}
page={controller.page}
onChange={page => controller.updatePagination({ page })}
onChange={(page) => controller.updatePagination({ page })}
/>
</div>
)}
Expand All @@ -141,7 +141,7 @@ const DashboardListPage = itemsList(
}[currentPage];
},
getItemProcessor() {
return item => new Dashboard(item);
return (item) => new Dashboard(item);
},
}),
() => new UrlStateStorage({ orderByField: "created_at", orderByReverse: true })
Expand All @@ -151,11 +151,11 @@ export default [
routeWithUserSession({
path: "/dashboards",
title: "Dashboards",
render: pageProps => <DashboardListPage {...pageProps} currentPage="all" />,
render: (pageProps) => <DashboardListPage {...pageProps} currentPage="all" />,
}),
routeWithUserSession({
path: "/dashboards/favorites",
title: "Favorite Dashboards",
render: pageProps => <DashboardListPage {...pageProps} currentPage="favorites" />,
render: (pageProps) => <DashboardListPage {...pageProps} currentPage="favorites" />,
}),
];
8 changes: 4 additions & 4 deletions client/app/pages/dashboards/components/DashboardHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DashboardStatusEnum } from "../hooks/useDashboard";
import "./DashboardHeader.less";

function getDashboardTags() {
return getTags("api/dashboards/tags").then(tags => map(tags, t => t.name));
return getTags("api/dashboards/tags").then((tags) => map(tags, (t) => t.name));
}

function buttonType(value) {
Expand All @@ -36,7 +36,7 @@ function DashboardPageTitle({ dashboardOptions }) {
<h3>
<EditInPlace
isEditable={editingLayout}
onDone={name => updateDashboard({ name })}
onDone={(name) => updateDashboard({ name })}
value={dashboard.name}
ignoreBlanks
/>
Expand All @@ -51,7 +51,7 @@ function DashboardPageTitle({ dashboardOptions }) {
isArchived={dashboard.is_archived}
canEdit={canEditDashboard}
getAvailableTags={getDashboardTags}
onEdit={tags => updateDashboard({ tags })}
onEdit={(tags) => updateDashboard({ tags })}
/>
</div>
);
Expand Down Expand Up @@ -87,7 +87,7 @@ function RefreshButton({ dashboardOptions }) {
placement="bottomRight"
overlay={
<Menu onClick={onRefreshRateSelected} selectedKeys={[`${refreshRate}`]}>
{refreshRateOptions.map(option => (
{refreshRateOptions.map((option) => (
<Menu.Item key={`${option}`} disabled={!includes(allowedIntervals, option)}>
{durationHumanize(option)}
</Menu.Item>
Expand Down
14 changes: 7 additions & 7 deletions client/app/pages/queries-list/QueriesList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class QueriesList extends React.Component {
className="m-b-10"
options={controller.pageSizeOptions}
value={controller.itemsPerPage}
onChange={itemsPerPage => controller.updatePagination({ itemsPerPage })}
onChange={(itemsPerPage) => controller.updatePagination({ itemsPerPage })}
/>
</Layout.Sidebar>
<Layout.Content>
Expand All @@ -130,7 +130,7 @@ class QueriesList extends React.Component {
totalCount={controller.totalItemsCount}
itemsPerPage={controller.itemsPerPage}
page={controller.page}
onChange={page => controller.updatePagination({ page })}
onChange={(page) => controller.updatePagination({ page })}
/>
</div>
)}
Expand All @@ -155,7 +155,7 @@ const QueriesListPage = itemsList(
}[currentPage];
},
getItemProcessor() {
return item => new Query(item);
return (item) => new Query(item);
},
}),
() => new UrlStateStorage({ orderByField: "created_at", orderByReverse: true })
Expand All @@ -165,21 +165,21 @@ export default [
routeWithUserSession({
path: "/queries",
title: "Queries",
render: pageProps => <QueriesListPage {...pageProps} currentPage="all" />,
render: (pageProps) => <QueriesListPage {...pageProps} currentPage="all" />,
}),
routeWithUserSession({
path: "/queries/favorites",
title: "Favorite Queries",
render: pageProps => <QueriesListPage {...pageProps} currentPage="favorites" />,
render: (pageProps) => <QueriesListPage {...pageProps} currentPage="favorites" />,
}),
routeWithUserSession({
path: "/queries/archive",
title: "Archived Queries",
render: pageProps => <QueriesListPage {...pageProps} currentPage="archive" />,
render: (pageProps) => <QueriesListPage {...pageProps} currentPage="archive" />,
}),
routeWithUserSession({
path: "/queries/my",
title: "My Queries",
render: pageProps => <QueriesListPage {...pageProps} currentPage="my" />,
render: (pageProps) => <QueriesListPage {...pageProps} currentPage="my" />,
}),
];