Skip to content

Commit

Permalink
POST后生成任务
Browse files Browse the repository at this point in the history
TODO 获取用户的有权限的project_id
  • Loading branch information
xsir317 committed Nov 18, 2014
1 parent 36dab05 commit c09d8fc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions publisher/app/controllers/ProjectsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ public function publish()
return View::make('projects/publish',array('project'=>$project));
}

public function dopublish()
{
//TODO 根据用户权限判断
$id = intval(Input::get('id'));
$version = trim(Input::get('version'));

//project version
//servers

}

public function getSrclog()
{
//TODO 根据用户权限判断
Expand Down
1 change: 1 addition & 0 deletions publisher/app/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Route::any('projects/edit' , array('before' => 'auth', 'uses' => 'ProjectsController@editProject'));
Route::get('projects/publish',array('before' => 'auth', 'uses' => 'ProjectsController@publish'));
Route::get('projects/srclog',array('before' => 'auth', 'uses' => 'ProjectsController@getSrclog'));
Route::post('projects/dopublish',array('before' => 'auth', 'uses' => 'ProjectsController@dopublish'));
Route::any('servers/add',array('before' => 'auth', 'uses' => 'ServersController@addServers'));
Route::any('servers/edit',array('before' => 'auth', 'uses' => 'ServersController@editServers'));

Expand Down
7 changes: 6 additions & 1 deletion publisher/app/views/projects/publish.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,12 @@
if(window.confirm(_confirm))
{
//提交
alert("yes");
$.post($("#publish_form").attr("action"),$("#publish_form").serialize(),function(_data){
//状态,提示信息
//设定项目update的任务号
//设定每个服务器更新的任务号
//启动轮询
},'json');
}
});
Expand Down

0 comments on commit c09d8fc

Please sign in to comment.