forked from mlflow-oidc/mlflow-oidc-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ui integration (mlflow-oidc#8)
* feat: integration with backendd * chore: refactoring * chore: refactoring * fix: allow use experiment_name and experiment_id simultaneously * chore: refactoring * chore: refactoring * fix: fix CRUD * fix: fix build script --------- Co-authored-by: Aleksei Moiseev <[email protected]>
- Loading branch information
1 parent
1e100ff
commit 9ce176e
Showing
102 changed files
with
1,332 additions
and
754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
<div class="container"> | ||
<ml-header [name]="name"></ml-header> | ||
<router-outlet> </router-outlet> | ||
</div> | ||
<ng-container *ngIf="!loading && this.user; else loader"> | ||
|
||
<div class="container"> | ||
<ml-header [name]="user.display_name"></ml-header> | ||
<router-outlet> </router-outlet> | ||
</div> | ||
|
||
</ng-container> | ||
|
||
|
||
<ng-template #loader> | ||
<div class="loader d-flex justify-content-center align-items-center"> | ||
<mat-spinner></mat-spinner> | ||
</div> | ||
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.loader { | ||
height: 100vh; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const API_URL = { | ||
ALL_EXPERIMENTS: '/api/2.0/mlflow/experiments', | ||
EXPERIMENTS_FOR_USER: '/api/2.0/mlflow/users/${userName}/experiments', | ||
USERS_FOR_EXPERIMENT: '/api/2.0/mlflow/experiments/${experimentName}/users', | ||
ALL_MODELS: '/api/2.0/mlflow/registered-models', | ||
MODELS_FOR_USER: '/api/2.0/mlflow/users/${userName}/registered-models', | ||
USERS_FOR_MODEL: '/api/2.0/mlflow/registered-models/${modelName}/users', | ||
CREATE_EXPERIMENT_PERMISSION: '/api/2.0/mlflow/experiments/permissions/create', | ||
CREATE_MODEL_PERMISSION: '/api/2.0/mlflow/registered-models/permissions/create', | ||
UPDATE_EXPERIMENT_PERMISSION: '/api/2.0/mlflow/experiments/permissions/update', | ||
UPDATE_MODEL_PERMISSION: '/api/2.0/mlflow/registered-models/permissions/update', | ||
DELETE_EXPERIMENT_PERMISSION: '/api/2.0/mlflow/experiments/permissions/delete', | ||
DELETE_MODEL_PERMISSION: '/api/2.0/mlflow/registered-models/permissions/delete', | ||
|
||
GET_ALL_USERS: '/api/2.0/mlflow/users', | ||
GET_ACCESS_TOKEN: '/api/2.0/mlflow/users/access-token', | ||
GET_CURRENT_USER: '/api/2.0/mlflow/users/current', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const CORE_CONFIGS = { | ||
SNACK_BAR_DURATION: 7_000, | ||
DEBOUNCE_TIME: 300, | ||
} | ||
|
||
export enum EntityEnum { | ||
EXPERIMENT = 'experiment', | ||
MODEL = 'model', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export enum PermissionEnum { | ||
EDIT = 'EDIT', | ||
READ = 'READ', | ||
MANAGE = 'MANAGE', | ||
} | ||
|
||
export const PERMISSIONS = [ | ||
{ | ||
value: PermissionEnum.EDIT, | ||
title: 'Edit' | ||
}, | ||
{ | ||
value: PermissionEnum.READ, | ||
title: 'Read' | ||
}, | ||
{ | ||
value: PermissionEnum.MANAGE, | ||
title: 'Manage' | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
web-ui/src/app/features/admin-page/components/admin-page/admin-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
<router-outlet></router-outlet> | ||
31 changes: 3 additions & 28 deletions
31
web-ui/src/app/features/admin-page/components/admin-page/admin-page.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,7 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { MatTabChangeEvent } from '@angular/material/tabs'; | ||
import { ActivatedRoute, Router } from '@angular/router'; | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ml-admin-page', | ||
templateUrl: './admin-page.component.html', | ||
styleUrls: ['./admin-page.component.scss'], | ||
template: '<router-outlet></router-outlet>', | ||
}) | ||
export class AdminPageComponent implements OnInit { | ||
|
||
constructor( | ||
private readonly router: Router, | ||
private readonly route: ActivatedRoute, | ||
) { | ||
} | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
foo(event: MatTabChangeEvent) { | ||
const mapping: { [key: number]: string } = { | ||
0: '/admin/user-permissions', | ||
1: '/admin/experiments-permissions', | ||
2: '/admin/models-permissions', | ||
} | ||
const route = mapping[event.index]; | ||
if (route) { | ||
void this.router.navigate([route], { relativeTo: this.route }); | ||
} | ||
} | ||
} | ||
export class AdminPageComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.