Skip to content

Commit

Permalink
concord-server, concord-console2: add "process cards" (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
brig authored Mar 21, 2024
1 parent e56be84 commit 5c03cfa
Show file tree
Hide file tree
Showing 35 changed files with 1,834 additions and 578 deletions.
3 changes: 3 additions & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@
<item>
<code>java.class.externalClassExposedInAPI</code>
</item>
<item>
<code>java.method.numberOfParametersChanged</code>
</item>
</revapi.ignore>
</analysisConfiguration>
</configuration>
Expand Down
40 changes: 22 additions & 18 deletions console2/src/api/service/console/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* *****
* Concord
* -----
* Copyright (C) 2017 - 2018 Walmart Inc.
* Copyright (C) 2023 - 2018 Walmart Inc.
* -----
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,30 +18,34 @@
* =====
*/

import { ConcordKey, fetchJson, queryParams } from '../../../common';
import { ProcessEntry, ProcessStatus } from '../../../process';

export interface ProjectProcesses {
projectName: ConcordKey;
running: number;
}
import {ConcordId, ConcordKey, fetchJson, queryParams} from '../../../common';
import { ProcessEntry } from '../../../process';

export interface UserActivity {
processStats: {
status: ProcessStatus;
count: number;
};
orgProcesses?: {
orgName: ConcordKey;
processes: ProjectProcesses[];
};
processes: ProcessEntry[];
}

export interface ProcessCardEntry {
id: ConcordId;
orgName: ConcordKey;
projectName: ConcordKey;
repoName: ConcordKey;
entryPoint: string;
name: string;
description?: string;
icon?: string;
isCustomForm: boolean;
}

export const getActivity = (
maxProjectsPerOrg: number,
maxOwnProcesses: number
): Promise<UserActivity> =>
fetchJson(
`/api/service/console/user/activity?${queryParams({ maxProjectsPerOrg, maxOwnProcesses })}`
`/api/v2/service/console/user/activity?${queryParams({ maxOwnProcesses })}`
);

export const listProcessCards = (
): Promise<ProcessCardEntry[]> =>
fetchJson(
`/api/v1/processcard`
);
104 changes: 0 additions & 104 deletions console2/src/components/molecules/UserProcessByOrgCards/index.tsx

This file was deleted.

62 changes: 0 additions & 62 deletions console2/src/components/molecules/UserProcessStats/index.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions console2/src/components/molecules/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export { default as SingleOperationPopup } from './SingleOperationPopup';
export { default as TeamAccessDropdown } from './TeamAccessDropdown';
export { default as TeamAccessList } from './TeamAccessList';
export { default as TeamRoleDropdown } from './TeamRoleDropdown';
export { default as UserProcessByOrgCards } from './UserProcessByOrgCards';
export { default as UserProcessStats } from './UserProcessStats';
export { default as WithCopyToClipboard } from './WithCopyToClipboard';

// https://github.com/facebook/create-react-app/issues/6054
Expand Down
Loading

0 comments on commit 5c03cfa

Please sign in to comment.