Skip to content

Commit

Permalink
Merge pull request #3600 from dlabrecq/project_name
Browse files Browse the repository at this point in the history
Rename project_name
  • Loading branch information
dlabrecq authored Jan 8, 2024
2 parents dffc994 + d8b1180 commit 63db85d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/api/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { PagedLinks, PagedMetaData } from './api';
export interface SettingsData {
clusters?: string[];
default?: boolean;
project_name?: string;
project?: string;
group?: string;
uuid?: string;
key?: string;
Expand Down
8 changes: 4 additions & 4 deletions src/routes/settings/platformProjects/platformProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const PlatformProjects: React.FC<PlatformProjectsProps> = ({ canWrite }) => {
} else if (action === 'page') {
const newSelectedItems = [...selectedItems];
getCategories().map(val => {
if (!newSelectedItems.find(item => item.project_name === val.project_name)) {
if (!newSelectedItems.find(item => item.project === val.project)) {
newSelectedItems.push(val);
}
});
Expand All @@ -149,7 +149,7 @@ const PlatformProjects: React.FC<PlatformProjectsProps> = ({ canWrite }) => {
const handleOnAdd = () => {
if (selectedItems.length > 0) {
const payload = selectedItems.map(item => ({
project_name: item.project_name,
project: item.project,
group: GroupType.platform,
}));
setSelectedItems([], () => {
Expand All @@ -176,7 +176,7 @@ const PlatformProjects: React.FC<PlatformProjectsProps> = ({ canWrite }) => {
const handleOnRemove = () => {
if (selectedItems.length > 0) {
const payload = selectedItems.map(item => ({
project_name: item.project_name,
project: item.project,
group: null,
}));
setSelectedItems([], () => {
Expand All @@ -197,7 +197,7 @@ const PlatformProjects: React.FC<PlatformProjectsProps> = ({ canWrite }) => {
items.map(item => newItems.push(item));
} else {
items.map(item => {
newItems = newItems.filter(val => val.project_name !== item.project_name);
newItems = newItems.filter(val => val.project !== item.project);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CostCategoryBase extends React.Component<CostCategoryProps, CostCategorySt
name: '', // Selection column
},
{
orderBy: 'project_name', // Todo: update filter name
orderBy: 'project', // Todo: update filter name
name: intl.formatMessage(messages.detailsResourceNames, { value: 'name' }),
...(computedItems.length && { isSortable: true }),
},
Expand All @@ -90,7 +90,7 @@ class CostCategoryBase extends React.Component<CostCategoryProps, CostCategorySt
cells: [
{}, // Empty cell for row selection
{
value: item.project_name ? item.project_name : '',
value: item.project ? item.project : '',
style: styles.nameColumn,
},
{
Expand All @@ -104,7 +104,7 @@ class CostCategoryBase extends React.Component<CostCategoryProps, CostCategorySt
{ value: <Cluster clusters={item.clusters} groupBy="clusters" />, style: styles.groupColumn },
],
item,
selected: selectedItems && selectedItems.find(val => val.project_name === item.project_name) !== undefined,
selected: selectedItems && selectedItems.find(val => val.project === item.project) !== undefined,
selectionDisabled: !canWrite || item.default,
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class CostCategoryToolbarBase extends React.Component<CostCategoryToolbar
{
ariaLabelKey: 'name',
placeholderKey: 'name',
key: 'project_name',
key: 'project',
name: intl.formatMessage(messages.filterByValues, { value: 'name' }),
},
{
Expand Down

0 comments on commit 63db85d

Please sign in to comment.