Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/push-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ env:
GAR_REGISTRY: asia-docker.pkg.dev
GO_VERSION: 1.21.10
GO_BUILD_CONCURRENCY: 4 # Set the same number of apps to build.
NODE_VERSION: "22.1"


jobs:
setup:
Expand Down Expand Up @@ -81,6 +83,9 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install go dependencies
run: make vendor
- name: Build web and go applications
Expand Down
10 changes: 10 additions & 0 deletions ui/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@
},
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.2",
"@tailwindcss/forms": "^0.5.7",
"@tanstack/react-query": "^5.55.4",
"@tanstack/react-query-devtools": "^5.56.2",
"@tanstack/react-table": "^8.20.5",
"@testing-library/jest-dom": "^6.4.8",
"@types/js-cookie": "^3.0.6",
"axios": "^1.7.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"i18next": "^23.14.0",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^2.6.1",
Expand All @@ -41,11 +48,13 @@
"query-string": "^9.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.52.2",
"react-i18next": "^15.0.1",
"react-icons-material-design": "^1.0.4",
"react-router-dom": "^6.26.0",
"tailwind-merge": "^2.4.0",
"timeago.js": "^4.0.2",
"web-vitals": "^4.2.3",
"yup": "^1.4.0"
},
Expand Down Expand Up @@ -75,6 +84,7 @@
"lint-staged": "^15.2.8",
"postcss": "^8.4.41",
"prettier-plugin-tailwindcss": "^0.6.5",
"react-hot-toast": "^2.4.1",
"svgo": "^3.3.2",
"tailwindcss": "^3.4.9",
"typescript": "^5.5.3",
Expand Down
26 changes: 26 additions & 0 deletions ui/dashboard/public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"active": "Active",
"archived": "Archived",
"continue": "Continue",
"projects": "Projects",
"environment": "Environment",
"environments": "Environments",
"organizations": "Organizations",
"members": "Members",
Expand All @@ -13,6 +16,29 @@
"settings": "Settings",
"integrations": "Integrations",
"access": "Access",
"documentation": "Documentation",
"save": "Save",
"cancel": "Cancel",
"delete": "Delete",
"filter": "Filter",
"filters": "Filters",
"add-filter": "Add Filter",
"maintainer": "Maintainer",
"name": "Name",
"email": "Email",
"role": "Role",
"users": "Users",
"new-project": "New Project",
"update-project": "Update Project",
"create-project": "Create Project",
"new-org": "New Organization",
"update-org": "Update Organization",
"create-org": "Create Organization",
"new-env": "New Environment",
"update-env": "Update Environment",
"create-env": "Create Environment",
"organization-subtitle": "You can see all your clients data",
"setting-subtitle": "Manage settings about the current organization",
"navigation": {
"my-projects": "My projects",
"audit-logs": "Audit logs",
Expand Down
26 changes: 26 additions & 0 deletions ui/dashboard/public/locales/en/form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"general-info": "General Information",
"placeholder-name": "Enter name",
"placeholder-desc": "Enter description",
"placeholder-code": "Enter url code",
"placeholder-email": "Enter email",
"placeholder-role": "Select role",
"placeholder-url": "Enter URL",
"placeholder-prj-id": "Enter project id",
"placeholder-search-type": "Search notification type",
"placeholder-firebase": "Enter firebase cloud messaging API key",
"placeholder-tags": "Select",
"placeholder-search-input": "Search Input",
"url-code": "URL Code",
"owner-email": "Owner's email",
"project-id": "Project ID",
"description": "Description",
"optional": "Optional",
"require-comments-flag": "Require comments for flag changes",
"invite-member": "Invite Member",
"user-details": "User Details",
"add-to-env": "Add to Environment",
"env-access": "Environment Access",
"env-settings": "Environment Settings",
"trial": "Trial"
}
26 changes: 26 additions & 0 deletions ui/dashboard/public/locales/en/table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"flags": "Flags",
"created-at": "Created At",
"popover": {
"edit-project": "Edit Project",
"archive-project": "Archive Project",
"edit-env": "Edit Environment",
"archive-env": "Archive Environment",
"edit-org": "Edit Organization",
"archive-org": "Archive Organization",
"unarchive-org": "UnArchive Organization",
"edit-user": "Edit User",
"archive-user": "Archive User"
},
"empty": {
"project-title": "No registered projects",
"project-desc": "There are no registered projects. Add a new one to start managing.",
"project-org-desc": "There are no registered projects for this organization.",
"org-title": "No registered organizations",
"org-desc": "There are no registered organizations. Add a new one to start managing.",
"env-title": "No registered environments",
"env-desc": "There are no registered environments for this organization.",
"user-title": "No registered users",
"user-desc": "There are no registered users for this organization."
}
}
26 changes: 26 additions & 0 deletions ui/dashboard/public/locales/ja/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"active": "Active",
"archived": "Archived",
"continue": "Continue",
"projects": "Projects",
"environment": "Environment",
"environments": "Environments",
"organizations": "Organizations",
"members": "Members",
Expand All @@ -13,6 +16,29 @@
"settings": "Settings",
"integrations": "Integrations",
"access": "Access",
"documentation": "Documentation",
"save": "Save",
"cancel": "Cancel",
"delete": "Delete",
"filter": "Filter",
"filters": "Filters",
"add-filter": "Add Filter",
"maintainer": "Maintainer",
"name": "Name",
"email": "Email",
"role": "Role",
"users": "Users",
"new-project": "New Project",
"update-project": "Update Project",
"create-project": "Create Project",
"new-org": "New Organization",
"update-org": "Update Organization",
"create-org": "Create Organization",
"new-env": "New Environment",
"update-env": "Update Environment",
"create-env": "Create Environment",
"organization-subtitle": "You can see all your clients data",
"setting-subtitle": "Manage settings about the current organization",
"navigation": {
"my-projects": "My projects",
"audit-logs": "Audit logs",
Expand Down
26 changes: 26 additions & 0 deletions ui/dashboard/public/locales/ja/form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"general-info": "General Information",
"placeholder-name": "Enter name",
"placeholder-desc": "Enter description",
"placeholder-code": "Enter url code",
"placeholder-email": "Enter email",
"placeholder-role": "Select role",
"placeholder-url": "Enter URL",
"placeholder-prj-id": "Enter project id",
"placeholder-search-type": "Search notification type",
"placeholder-firebase": "Enter firebase cloud messaging API key",
"placeholder-tags": "Select",
"placeholder-search-input": "Search Input",
"url-code": "URL Code",
"owner-email": "Owner's email",
"project-id": "Project ID",
"description": "Description",
"optional": "Optional",
"require-comments-flag": "Require comments for flag changes",
"invite-member": "Invite Member",
"user-details": "User Details",
"add-to-env": "Add to Environment",
"env-access": "Environment Access",
"env-settings": "Environment Settings",
"trial": "Trial"
}
26 changes: 26 additions & 0 deletions ui/dashboard/public/locales/ja/table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"flags": "Flags",
"created-at": "Created At",
"popover": {
"edit-project": "Edit Project",
"archive-project": "Archive Project",
"edit-env": "Edit Environment",
"archive-env": "Archive Environment",
"edit-org": "Edit Organization",
"archive-org": "Archive Organization",
"unarchive-org": "UnArchive Organization",
"edit-user": "Edit User",
"archive-user": "Archive User"
},
"empty": {
"project-title": "No registered projects",
"project-desc": "There are no registered projects. Add a new one to start managing.",
"project-org-desc": "There are no registered projects for this organization.",
"org-title": "No registered organizations",
"org-desc": "There are no registered organizations. Add a new one to start managing.",
"env-title": "No registered environments",
"env-desc": "There are no registered environments for this organization.",
"user-title": "No registered users",
"user-desc": "There are no registered users for this organization."
}
}
22 changes: 22 additions & 0 deletions ui/dashboard/src/@api/account/accounts-fetcher.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import axiosClient from '@api/axios-client';
import pickBy from 'lodash/pickBy';
import { AccountCollection, CollectionParams } from '@types';
import { isNotEmpty } from 'utils/data-type';

export interface AccountsFetcherParams extends CollectionParams {
organizationId?: string;
organizationRole?: number;
environmentId?: string;
environmentRole?: number;
}

export const accountsFetcher = async (
params?: AccountsFetcherParams
): Promise<AccountCollection> => {
return axiosClient
.post<AccountCollection>(
'/v1/account/list_accounts',
pickBy(params, v => isNotEmpty(v))
)
.then(response => response.data);
};
1 change: 1 addition & 0 deletions ui/dashboard/src/@api/account/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './account-organizations-fetcher';
export * from './account-me-fetcher';
export * from './accounts-fetcher';
2 changes: 1 addition & 1 deletion ui/dashboard/src/@api/axios-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ axiosClient.interceptors.response.use(
const newAccessToken = response.token.accessToken;
setTokenStorage(response.token);
originalRequest.headers.Authorization = `Bearer ${newAccessToken}`;
return axiosClient(originalRequest);
})
.catch(err => {
clearOrgIdStorage();
clearTokenStorage();
window.location.href = PAGE_PATH_ROOT;
return Promise.reject(err);
});
return axiosClient(originalRequest);
}
return Promise.reject(error);
}
Expand Down
6 changes: 6 additions & 0 deletions ui/dashboard/src/@api/organization/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './organizations-fetcher';
export * from './organization-creator';
export * from './organization-archive';
export * from './organization-unarchive';
export * from './organization-updater';
export * from './organization-details-fetcher';
15 changes: 15 additions & 0 deletions ui/dashboard/src/@api/organization/organization-archive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import axiosClient from '@api/axios-client';
import { AnyObject } from 'yup';

export interface OrganizationArchiveParams {
id: string;
command: AnyObject;
}

export const organizationArchive = async (
params?: OrganizationArchiveParams
) => {
return axiosClient
.post('/v1/environment/archive_organization', params)
.then(response => response.data);
};
23 changes: 23 additions & 0 deletions ui/dashboard/src/@api/organization/organization-creator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import axiosClient from '@api/axios-client';
import { Organization } from '@types';

export interface OrganizationCreatorCommand {
name: string;
urlCode: string;
description?: string;
isTrial?: boolean;
isSystemAdmin: boolean;
ownerEmail: string;
}

export interface OrganizationResponse {
organization: Array<Organization>;
}

export const organizationCreator = async (
params?: OrganizationCreatorCommand
): Promise<OrganizationResponse> => {
return axiosClient
.post<OrganizationResponse>('/v1/environment/create_organization', params)
.then(response => response.data);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import axiosClient from '@api/axios-client';
import { Organization } from '@types';

export interface OrganizationDetailsFetcherParams {
id: string;
}
export interface OrganizationDetailsResponse {
organization: Organization;
}

export const organizationDetailsFetcher = async (
params?: OrganizationDetailsFetcherParams
): Promise<OrganizationDetailsResponse> => {
return axiosClient
.post<OrganizationDetailsResponse>(
'/v1/environment/get_organization',
params
)
.then(response => response.data);
};
15 changes: 15 additions & 0 deletions ui/dashboard/src/@api/organization/organization-unarchive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import axiosClient from '@api/axios-client';
import { AnyObject } from 'yup';

export interface OrganizationUnArchiveParams {
id: string;
command: AnyObject;
}

export const organizationUnArchive = async (
params?: OrganizationUnArchiveParams
) => {
return axiosClient
.post('/v1/environment/unarchive_organization', params)
.then(response => response.data);
};
Loading
Loading