Skip to content

Commit 348c914

Browse files
authored
feat(ui): organization dashboard (#1286)
1 parent 6448663 commit 348c914

File tree

146 files changed

+6409
-998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+6409
-998
lines changed

.github/workflows/push-image.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ env:
3838
GAR_REGISTRY: asia-docker.pkg.dev
3939
GO_VERSION: 1.21.10
4040
GO_BUILD_CONCURRENCY: 4 # Set the same number of apps to build.
41+
NODE_VERSION: "22.1"
42+
4143

4244
jobs:
4345
setup:
@@ -81,6 +83,9 @@ jobs:
8183
- uses: actions/setup-go@v5
8284
with:
8385
go-version: ${{ env.GO_VERSION }}
86+
- uses: actions/setup-node@v4
87+
with:
88+
node-version: ${{ env.NODE_VERSION }}
8489
- name: Install go dependencies
8590
run: make vendor
8691
- name: Build web and go applications

ui/dashboard/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@
2121
},
2222
"dependencies": {
2323
"@hookform/resolvers": "^3.9.0",
24+
"@radix-ui/react-checkbox": "^1.1.2",
2425
"@radix-ui/react-dialog": "^1.1.1",
2526
"@radix-ui/react-dropdown-menu": "^2.1.1",
2627
"@radix-ui/react-popover": "^1.1.1",
2728
"@radix-ui/react-scroll-area": "^1.1.0",
29+
"@radix-ui/react-tabs": "^1.1.1",
30+
"@radix-ui/react-tooltip": "^1.1.2",
2831
"@tailwindcss/forms": "^0.5.7",
32+
"@tanstack/react-query": "^5.55.4",
33+
"@tanstack/react-query-devtools": "^5.56.2",
34+
"@tanstack/react-table": "^8.20.5",
2935
"@testing-library/jest-dom": "^6.4.8",
3036
"@types/js-cookie": "^3.0.6",
3137
"axios": "^1.7.4",
3238
"class-variance-authority": "^0.7.0",
3339
"clsx": "^2.1.1",
40+
"date-fns": "^3.6.0",
3441
"i18next": "^23.14.0",
3542
"i18next-browser-languagedetector": "^8.0.0",
3643
"i18next-http-backend": "^2.6.1",
@@ -41,11 +48,13 @@
4148
"query-string": "^9.1.0",
4249
"react": "^18.3.1",
4350
"react-dom": "^18.3.1",
51+
"react-error-boundary": "^4.0.13",
4452
"react-hook-form": "^7.52.2",
4553
"react-i18next": "^15.0.1",
4654
"react-icons-material-design": "^1.0.4",
4755
"react-router-dom": "^6.26.0",
4856
"tailwind-merge": "^2.4.0",
57+
"timeago.js": "^4.0.2",
4958
"web-vitals": "^4.2.3",
5059
"yup": "^1.4.0"
5160
},
@@ -75,6 +84,7 @@
7584
"lint-staged": "^15.2.8",
7685
"postcss": "^8.4.41",
7786
"prettier-plugin-tailwindcss": "^0.6.5",
87+
"react-hot-toast": "^2.4.1",
7888
"svgo": "^3.3.2",
7989
"tailwindcss": "^3.4.9",
8090
"typescript": "^5.5.3",

ui/dashboard/public/locales/en/common.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2+
"active": "Active",
3+
"archived": "Archived",
24
"continue": "Continue",
35
"projects": "Projects",
6+
"environment": "Environment",
47
"environments": "Environments",
58
"organizations": "Organizations",
69
"members": "Members",
@@ -13,6 +16,29 @@
1316
"settings": "Settings",
1417
"integrations": "Integrations",
1518
"access": "Access",
19+
"documentation": "Documentation",
20+
"save": "Save",
21+
"cancel": "Cancel",
22+
"delete": "Delete",
23+
"filter": "Filter",
24+
"filters": "Filters",
25+
"add-filter": "Add Filter",
26+
"maintainer": "Maintainer",
27+
"name": "Name",
28+
"email": "Email",
29+
"role": "Role",
30+
"users": "Users",
31+
"new-project": "New Project",
32+
"update-project": "Update Project",
33+
"create-project": "Create Project",
34+
"new-org": "New Organization",
35+
"update-org": "Update Organization",
36+
"create-org": "Create Organization",
37+
"new-env": "New Environment",
38+
"update-env": "Update Environment",
39+
"create-env": "Create Environment",
40+
"organization-subtitle": "You can see all your clients data",
41+
"setting-subtitle": "Manage settings about the current organization",
1642
"navigation": {
1743
"my-projects": "My projects",
1844
"audit-logs": "Audit logs",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"general-info": "General Information",
3+
"placeholder-name": "Enter name",
4+
"placeholder-desc": "Enter description",
5+
"placeholder-code": "Enter url code",
6+
"placeholder-email": "Enter email",
7+
"placeholder-role": "Select role",
8+
"placeholder-url": "Enter URL",
9+
"placeholder-prj-id": "Enter project id",
10+
"placeholder-search-type": "Search notification type",
11+
"placeholder-firebase": "Enter firebase cloud messaging API key",
12+
"placeholder-tags": "Select",
13+
"placeholder-search-input": "Search Input",
14+
"url-code": "URL Code",
15+
"owner-email": "Owner's email",
16+
"project-id": "Project ID",
17+
"description": "Description",
18+
"optional": "Optional",
19+
"require-comments-flag": "Require comments for flag changes",
20+
"invite-member": "Invite Member",
21+
"user-details": "User Details",
22+
"add-to-env": "Add to Environment",
23+
"env-access": "Environment Access",
24+
"env-settings": "Environment Settings",
25+
"trial": "Trial"
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"flags": "Flags",
3+
"created-at": "Created At",
4+
"popover": {
5+
"edit-project": "Edit Project",
6+
"archive-project": "Archive Project",
7+
"edit-env": "Edit Environment",
8+
"archive-env": "Archive Environment",
9+
"edit-org": "Edit Organization",
10+
"archive-org": "Archive Organization",
11+
"unarchive-org": "UnArchive Organization",
12+
"edit-user": "Edit User",
13+
"archive-user": "Archive User"
14+
},
15+
"empty": {
16+
"project-title": "No registered projects",
17+
"project-desc": "There are no registered projects. Add a new one to start managing.",
18+
"project-org-desc": "There are no registered projects for this organization.",
19+
"org-title": "No registered organizations",
20+
"org-desc": "There are no registered organizations. Add a new one to start managing.",
21+
"env-title": "No registered environments",
22+
"env-desc": "There are no registered environments for this organization.",
23+
"user-title": "No registered users",
24+
"user-desc": "There are no registered users for this organization."
25+
}
26+
}

ui/dashboard/public/locales/ja/common.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2+
"active": "Active",
3+
"archived": "Archived",
24
"continue": "Continue",
35
"projects": "Projects",
6+
"environment": "Environment",
47
"environments": "Environments",
58
"organizations": "Organizations",
69
"members": "Members",
@@ -13,6 +16,29 @@
1316
"settings": "Settings",
1417
"integrations": "Integrations",
1518
"access": "Access",
19+
"documentation": "Documentation",
20+
"save": "Save",
21+
"cancel": "Cancel",
22+
"delete": "Delete",
23+
"filter": "Filter",
24+
"filters": "Filters",
25+
"add-filter": "Add Filter",
26+
"maintainer": "Maintainer",
27+
"name": "Name",
28+
"email": "Email",
29+
"role": "Role",
30+
"users": "Users",
31+
"new-project": "New Project",
32+
"update-project": "Update Project",
33+
"create-project": "Create Project",
34+
"new-org": "New Organization",
35+
"update-org": "Update Organization",
36+
"create-org": "Create Organization",
37+
"new-env": "New Environment",
38+
"update-env": "Update Environment",
39+
"create-env": "Create Environment",
40+
"organization-subtitle": "You can see all your clients data",
41+
"setting-subtitle": "Manage settings about the current organization",
1642
"navigation": {
1743
"my-projects": "My projects",
1844
"audit-logs": "Audit logs",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"general-info": "General Information",
3+
"placeholder-name": "Enter name",
4+
"placeholder-desc": "Enter description",
5+
"placeholder-code": "Enter url code",
6+
"placeholder-email": "Enter email",
7+
"placeholder-role": "Select role",
8+
"placeholder-url": "Enter URL",
9+
"placeholder-prj-id": "Enter project id",
10+
"placeholder-search-type": "Search notification type",
11+
"placeholder-firebase": "Enter firebase cloud messaging API key",
12+
"placeholder-tags": "Select",
13+
"placeholder-search-input": "Search Input",
14+
"url-code": "URL Code",
15+
"owner-email": "Owner's email",
16+
"project-id": "Project ID",
17+
"description": "Description",
18+
"optional": "Optional",
19+
"require-comments-flag": "Require comments for flag changes",
20+
"invite-member": "Invite Member",
21+
"user-details": "User Details",
22+
"add-to-env": "Add to Environment",
23+
"env-access": "Environment Access",
24+
"env-settings": "Environment Settings",
25+
"trial": "Trial"
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"flags": "Flags",
3+
"created-at": "Created At",
4+
"popover": {
5+
"edit-project": "Edit Project",
6+
"archive-project": "Archive Project",
7+
"edit-env": "Edit Environment",
8+
"archive-env": "Archive Environment",
9+
"edit-org": "Edit Organization",
10+
"archive-org": "Archive Organization",
11+
"unarchive-org": "UnArchive Organization",
12+
"edit-user": "Edit User",
13+
"archive-user": "Archive User"
14+
},
15+
"empty": {
16+
"project-title": "No registered projects",
17+
"project-desc": "There are no registered projects. Add a new one to start managing.",
18+
"project-org-desc": "There are no registered projects for this organization.",
19+
"org-title": "No registered organizations",
20+
"org-desc": "There are no registered organizations. Add a new one to start managing.",
21+
"env-title": "No registered environments",
22+
"env-desc": "There are no registered environments for this organization.",
23+
"user-title": "No registered users",
24+
"user-desc": "There are no registered users for this organization."
25+
}
26+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import axiosClient from '@api/axios-client';
2+
import pickBy from 'lodash/pickBy';
3+
import { AccountCollection, CollectionParams } from '@types';
4+
import { isNotEmpty } from 'utils/data-type';
5+
6+
export interface AccountsFetcherParams extends CollectionParams {
7+
organizationId?: string;
8+
organizationRole?: number;
9+
environmentId?: string;
10+
environmentRole?: number;
11+
}
12+
13+
export const accountsFetcher = async (
14+
params?: AccountsFetcherParams
15+
): Promise<AccountCollection> => {
16+
return axiosClient
17+
.post<AccountCollection>(
18+
'/v1/account/list_accounts',
19+
pickBy(params, v => isNotEmpty(v))
20+
)
21+
.then(response => response.data);
22+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './account-organizations-fetcher';
22
export * from './account-me-fetcher';
3+
export * from './accounts-fetcher';

0 commit comments

Comments
 (0)