add organization management and refine source repository view
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
+13
-1
@@ -22,10 +22,12 @@ import { BuildManagementPage } from './pages/applications/BuildManagementPage';
|
||||
import { DeploymentManagementPage } from './pages/applications/DeploymentManagementPage';
|
||||
import { MigrationManagementPage } from './pages/applications/MigrationManagementPage';
|
||||
import { ReleaseManagementPage } from './pages/applications/ReleaseManagementPage';
|
||||
import { RepositoryManagementPage } from './pages/applications/RepositoryManagementPage';
|
||||
import { SourceManagementPage as AppSourcesApiPage } from './pages/applications/SourceManagementPage';
|
||||
import { AdminManagementPage as AdminManagementApiPage } from './pages/operations/AdminManagementPage';
|
||||
import { LicensesPage as LicensesApiPage } from './pages/operations/LicensesPage';
|
||||
import { NoticesPage as NoticesApiPage } from './pages/operations/NoticesPage';
|
||||
import { OrganizationsPage as OrganizationsApiPage } from './pages/operations/OrganizationsPage';
|
||||
import { UserSessionsPage as UserSessionsApiPage } from './pages/operations/UserSessionsPage';
|
||||
import { RuntimeConfigPage as RuntimeConfigApiPage } from './pages/runtime/RuntimeConfigPage';
|
||||
import { RuntimeDeviceControlPage } from './pages/runtime/RuntimeDeviceControlPage';
|
||||
@@ -61,6 +63,7 @@ type ViewKey =
|
||||
| 'launcherCommonSettings'
|
||||
| 'notices'
|
||||
| 'appManagement'
|
||||
| 'appRepositories'
|
||||
| 'appSources'
|
||||
| 'appBuilds'
|
||||
| 'appReleases'
|
||||
@@ -82,6 +85,7 @@ type ViewKey =
|
||||
| 'runtimeLogs'
|
||||
| 'runtimeDeviceControl'
|
||||
| 'adminManagement'
|
||||
| 'organizations'
|
||||
| 'userSessions'
|
||||
| 'licenses';
|
||||
|
||||
@@ -93,6 +97,7 @@ const viewByLabel: Record<string, ViewKey> = {
|
||||
'공통 설정': 'launcherCommonSettings',
|
||||
공지사항: 'notices',
|
||||
'앱 관리': 'appManagement',
|
||||
'저장소 관리': 'appRepositories',
|
||||
'소스 관리': 'appSources',
|
||||
'빌드 관리': 'appBuilds',
|
||||
'릴리즈 관리': 'appReleases',
|
||||
@@ -114,6 +119,7 @@ const viewByLabel: Record<string, ViewKey> = {
|
||||
'로그/이벤트': 'runtimeLogs',
|
||||
'장비 제어': 'runtimeDeviceControl',
|
||||
'관리자 관리': 'adminManagement',
|
||||
'조직 관리': 'organizations',
|
||||
'사용자/세션': 'userSessions',
|
||||
라이센스: 'licenses'
|
||||
};
|
||||
@@ -128,6 +134,7 @@ const pathByView: Record<ViewKey, string> = {
|
||||
launcherCommonSettings: '/launcher/common-settings',
|
||||
notices: '/operations/notices',
|
||||
appManagement: '/applications/apps',
|
||||
appRepositories: '/applications/repositories',
|
||||
appSources: '/applications/sources',
|
||||
appBuilds: '/applications/builds',
|
||||
appReleases: '/applications/releases',
|
||||
@@ -149,6 +156,7 @@ const pathByView: Record<ViewKey, string> = {
|
||||
runtimeLogs: '/runtime/logs',
|
||||
runtimeDeviceControl: '/runtime/devices',
|
||||
adminManagement: '/operations/admins',
|
||||
organizations: '/operations/organizations',
|
||||
userSessions: '/operations/users',
|
||||
licenses: '/operations/licenses'
|
||||
};
|
||||
@@ -332,7 +340,7 @@ function loadAppReleases() {
|
||||
|
||||
function loadUserSessions() {
|
||||
return apiRequest<{ sessions?: UserSessionRow[] }>('/users/sessions')
|
||||
.then((response) => response.sessions ?? []);
|
||||
.then((response) => (response.sessions ?? []).filter((session) => session.sessionId));
|
||||
}
|
||||
|
||||
function loadNotices() {
|
||||
@@ -1490,12 +1498,16 @@ function App() {
|
||||
case 'adminManagement':
|
||||
if (!isOwner) return null;
|
||||
return <AdminManagementApiPage />;
|
||||
case 'organizations':
|
||||
return <OrganizationsApiPage />;
|
||||
case 'userSessions':
|
||||
return <UserSessionsApiPage />;
|
||||
case 'licenses':
|
||||
return <LicensesApiPage />;
|
||||
case 'appManagement':
|
||||
return <AppManagementApiPage />;
|
||||
case 'appRepositories':
|
||||
return <RepositoryManagementPage />;
|
||||
case 'appSources':
|
||||
return <AppSourcesApiPage />;
|
||||
case 'appBuilds':
|
||||
|
||||
Reference in New Issue
Block a user