版本库展开文件目录异步刷新
This commit is contained in:
parent
5571fb0f90
commit
c34209534d
|
@ -664,11 +664,11 @@ class ProjectsController < ApplicationController
|
||||||
# gpid, rev, ent_name, g
|
# gpid, rev, ent_name, g
|
||||||
def repository_tree_changes
|
def repository_tree_changes
|
||||||
rev = params[:rev]
|
rev = params[:rev]
|
||||||
ent_name = params[:ent_name]
|
ent_path = params[:ent_path]
|
||||||
gpid = params[:gpid]
|
gpid = params[:gpid]
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
begin
|
begin
|
||||||
result = g.rep_last_changes(gpid, :rev => rev, :path => ent_name)
|
result = g.rep_last_changes(gpid, :rev => rev, :path => ent_path)
|
||||||
# result.time = distance_of_time_in_words(result.time, Time.now)
|
# result.time = distance_of_time_in_words(result.time, Time.now)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
puts e
|
puts e
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
console.log("2222222222");
|
console.log("2222222222");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"<%= repository_tree_changes_project_path(@project, :rev => @rev, :ent_name => ent_name, :gpid => @project.gpid) %>",
|
url:"<%= repository_tree_changes_project_path(@project, :rev => @rev, :ent_path => ent_path, :gpid => @project.gpid) %>",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: "text",
|
data: "text",
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
Loading…
Reference in New Issue