1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-12-13 09:06:43 +00:00
This commit is contained in:
2019-04-23 16:57:15 +08:00
parent dbfe0c5bb7
commit 75657a7d6d
18 changed files with 396 additions and 123 deletions

View File

@@ -128,6 +128,10 @@ switch ($action) {
$res = agent_remove($job);
break;
case 'resource_list':
$res = resource_list();
break;
case 'workspace_list':
$rule = new CRObject();
$rule->set('offset', cr_get_GET('offset'));
@@ -138,9 +142,8 @@ switch ($action) {
case 'workspace_add':
$workspace = new CRObject();
$workspace->set('name', cr_get_POST('name'));
$workspace->set('content', cr_get_POST('content'));
$workspace->set('virtual_cluster', cr_get_POST('virtual_cluster'));
$workspace->set('permission', cr_get_POST('permission'));
$workspace->set('type', cr_get_POST('type'));
$workspace->set('git_repo', cr_get_POST('git_repo'));
$res = workspace_add($workspace);
break;
@@ -148,9 +151,8 @@ switch ($action) {
$workspace = new CRObject();
$workspace->set('id', cr_get_POST('id'));
$workspace->set('name', cr_get_POST('name'));
$workspace->set('content', cr_get_POST('content'));
$workspace->set('virtual_cluster', cr_get_POST('virtual_cluster'));
$workspace->set('permission', cr_get_POST('permission'));
$workspace->set('type', cr_get_POST('type'));
$workspace->set('git_repo', cr_get_POST('git_repo'));
$res = workspace_update($workspace);
break;
@@ -177,6 +179,11 @@ switch ($action) {
$res = oauth_get_url();
break;
case 'user_login':
$user = new CRObject();
$res = user_login($user);
break;
default:
break;
}