动态页面的修改

forge
sylor_huang@126.com 5 years ago
parent 2272cf4f90
commit 553e758bd3

@ -3,12 +3,13 @@ class ProjectTrendsController < ApplicationController
before_action :check_project_public
def index
@project_issues_count = @project.get_issues_count(nil)
@project_open_issues_count = @project.get_issues_count([1,2,3,4,6])
@project_close_issues_count = @project.get_issues_count(5)
@project_pr_count = @project.get_pull_requests_count(nil)
@project_new_pr_count = @project.get_pull_requests_count(0)
project_trends = @project.project_trends.includes(:user, trend: :user)
@project_open_issues_count = project_trends.where(trend_type: "Issue", action_type: "create").size
@project_close_issues_count = project_trends.where(trend_type: "Issue", action_type: "close").size
@project_issues_count = @project_open_issues_count + @project_close_issues_count
@project_pr_count = project_trends.where(trend_type: "PullRequest", action_type: "close").size
@project_new_pr_count = project_trends.where(trend_type: "PullRequest", action_type: "create").size
check_time = params[:time] #时间的筛选
check_type = params[:type] #动态类型的筛选,目前已知的有 Issue, PullRequest, Version
check_status = params[:status] #类型的选择 "create", "close", "journal",

@ -330,7 +330,8 @@ class PullRequestsController < ApplicationController
}
merge_pr = Gitea::PullRequest::MergeService.new(current_user, @repository.try(:identifier), @pull_request.try(:gpid), requests_params).call
if merge_pr
@pull_request.project_trends.create(user_id: current_user.id, project_id: @project.id, action_type: "merge")
@pull_request&.project_trends&.update_all(action_type: "close")
# @pull_request.project_trends.create(user_id: current_user.id, project_id: @project.id, action_type: "merge")
@issue.custom_journal_detail("merge", "", "该合并请求已被合并")
normal_status(1, "评审成功")
else

@ -20,6 +20,9 @@ json.project_trends do
json.partial! "issues/simple_issue_item", locals: {issue: trend.trend}
elsif trend.trend_type == "VersionRelease"
json.partial! "version_releases/simple_version_release", locals: {version: trend.trend}
else
json.name trend.trend.title
json.created_at format_time(trend.trend.created_at)
end
#后续需要天际pullrequest 和 版本的内容

@ -1,2 +1,3 @@
json.extract! version, :id, :name,:tag_name, :target_commitish, :tarball_url, :zipball_url,:url, :version_gid
json.created_at format_time(version.created_at)

@ -70,7 +70,7 @@
"./static/js/16.ec4dcede.chunk.js": "./static/js/16.ec4dcede.chunk.js",
"./static/js/160.24f63c24.chunk.js": "./static/js/160.24f63c24.chunk.js",
"./static/js/161.1289bb4c.chunk.js": "./static/js/161.1289bb4c.chunk.js",
"./static/js/162.1d59f021.chunk.js": "./static/js/162.1d59f021.chunk.js",
"./static/js/162.55ad5012.chunk.js": "./static/js/162.55ad5012.chunk.js",
"./static/js/163.c711c38f.chunk.js": "./static/js/163.c711c38f.chunk.js",
"./static/js/164.7d91d358.chunk.js": "./static/js/164.7d91d358.chunk.js",
"./static/js/165.dec54504.chunk.js": "./static/js/165.dec54504.chunk.js",
@ -273,7 +273,7 @@
"./static/js/98.88d3b919.chunk.js": "./static/js/98.88d3b919.chunk.js",
"./static/js/99.bb3d2c54.chunk.js": "./static/js/99.bb3d2c54.chunk.js",
"main.css": "./static/css/main.c0718fb6.css",
"main.js": "./static/js/main.e9f2f90f.js",
"main.js": "./static/js/main.686b5f70.js",
"static/media/KaTeX_AMS-Regular.ttf": "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf",
"static/media/KaTeX_AMS-Regular.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
"static/media/KaTeX_AMS-Regular.woff2": "static/media/KaTeX_AMS-Regular.e78e28b4.woff2",

@ -24,7 +24,7 @@
_host = 'https://ali-cdn.educoder.net/react/build/'
}
document.write('<script type="text/javascript" src="' + _host + 'js/js_min_all.js"><\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.e9f2f90f.js"><\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.686b5f70.js"><\/script>');
})()
</script>
<script>!function(){var t=location.href;"3007"===window.location.port?-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>'):-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')}()</script><script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script></body></html>

File diff suppressed because one or more lines are too long

@ -86,7 +86,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "./static/js/" + ({}[chunkId]||chunkId) + "." + {"0":"1bc3d7df","1":"976094c3","2":"bc3d8cf1","3":"87056bcb","4":"baba45fe","5":"7c4b83e5","6":"bb495cba","7":"231bff40","8":"e2184916","9":"6f9ef4ac","10":"e6f0d5df","11":"d878a337","12":"fb20694d","13":"891a29d9","14":"3129051e","15":"044bdca2","16":"ec4dcede","17":"3fcd4df4","18":"105e1eb7","19":"4d5ee4fc","20":"f22140b1","21":"397df705","22":"4c8bb333","23":"aebb159d","24":"22ef380a","25":"77a31c58","26":"4a47b24f","27":"0f0040a9","28":"d40ce852","29":"4131983c","30":"54f7104f","31":"6880ce04","32":"fedb209c","33":"100ad33d","34":"4291681f","35":"32a9f338","36":"cc9fadd2","37":"f93f5966","38":"7efa37da","39":"e36275c9","40":"a2782e03","41":"ec116e1a","42":"dbcf1df2","43":"4cdbff5f","44":"9be18220","45":"7b58fdd3","46":"c1e7062a","47":"9301a210","48":"5417c295","49":"a66e9054","50":"49a23628","51":"4eb1ce58","52":"f17e0e11","53":"cef5fcb3","54":"74e62ba5","55":"abe23415","56":"31429d59","57":"d2da64a0","58":"2165cb51","59":"d83cf48e","60":"d0d3ef52","61":"42df9549","62":"88296aa0","63":"3bac03de","64":"5eccd94a","65":"88707d5e","66":"908242da","67":"0f65cd89","68":"792bbdc2","69":"ad66f4c7","70":"adb8d0da","71":"7a76b045","72":"45dc0ea4","73":"227e2efb","74":"cfa0f703","75":"385cc133","76":"5a64bd52","77":"561da811","78":"2a0a496c","79":"de080f3a","80":"625007b9","81":"c2fc7f34","82":"3f3fb911","83":"b75fac03","84":"d215a611","85":"28e659a5","86":"c4fa328e","87":"3c551684","88":"4e63f179","89":"b46c0b37","90":"ebdbda62","91":"fc359bf8","92":"9e9e70b1","93":"8a6c50b0","94":"fa90d379","95":"f1ba604f","96":"46e744a4","97":"eb363f34","98":"88d3b919","99":"bb3d2c54","100":"83f3df30","101":"0c87bf65","102":"0ce6fecf","103":"cedaeca4","104":"2169c06b","105":"929a96f0","106":"d798b463","107":"b0d826f1","108":"ec1d356b","109":"41a33a1a","110":"057de435","111":"48228f82","112":"ffd52d92","113":"dcb2ee6d","114":"c6a6e101","115":"f156a00f","116":"a317fe46","117":"ead206c4","118":"d552e90d","119":"e184d9db","120":"384d526a","121":"3b8227c6","122":"186f854f","123":"8c68d28a","124":"408ebb33","125":"991269bf","126":"7167d483","127":"cd709423","128":"0f3f6907","129":"6615f7e4","130":"9bf98449","131":"255c7c43","132":"36844213","133":"9f06d0a5","134":"b8a3ed43","135":"a5093954","136":"9cd53ce0","137":"689cbd5d","138":"e8e1273e","139":"80419667","140":"7c2e7a32","141":"09f4d1b2","142":"0d52a9f3","143":"cb69da0b","144":"34ac3654","145":"f92c8ac0","146":"25c24567","147":"b1b48fca","148":"8847fe03","149":"96790f46","150":"2d8568a9","151":"9b55bafe","152":"235dc8d0","153":"cc337346","154":"6661c864","155":"ed22d6b2","156":"a71c0de3","157":"01fef202","158":"b8182b3b","159":"853da2bd","160":"24f63c24","161":"1289bb4c","162":"1d59f021","163":"c711c38f","164":"7d91d358","165":"dec54504","166":"3ff355b5","167":"7a30e1c2","168":"471f4346","169":"2649e466","170":"2de996df","171":"51f475db","172":"4764b871","173":"2709a7bb","174":"9c9c4f81","175":"1c50cd8c","176":"6ccf4497","177":"916a43d7","178":"e41d6fc9","179":"d9a714d5","180":"abba8537","181":"b42edfcd","182":"b7e3a0f2","183":"b34ed057","184":"c7d63100","185":"9c6c47a4","186":"ddb826e1","187":"5bb529c2","188":"c0498792","189":"8748b741","190":"b38f13e9","191":"23a85f14","192":"0f28a588","193":"4d2aadc1","194":"996d34c8","195":"f5b10b42","196":"c1938f28","197":"f187b9d8","198":"3f1fe6b4","199":"cdc117e7","200":"263ef8f9","201":"67de5466","202":"8dd9f7bd","203":"319c605d","204":"7dd26258","205":"e7b43efe","206":"0f428fc7","207":"b05232b2","208":"0f479a47","209":"45fb7894","210":"f9ead356","211":"dec10650","212":"1489d5e6","213":"41b93d37","214":"8b4e638e","215":"3f681e33","216":"1c11ff4a","217":"331d5d41","218":"d4e6c6c8","219":"8f881b85","220":"476d3205","221":"70a965d5","222":"6ff7c3b7","223":"da42fdf1","224":"8708dc05","225":"9d766db6","226":"c94ba386","227":"8318eb70","228":"be14e4ee","229":"d874d46d","230":"bacab125","231":"6bd1e3d6","232":"fab381d0","233":"4ca8923d","234":"da34a632","235":"ab39b18d","236":"4dc0b9dd","237":"c530e223","238":"fb04bcb0","239":"b524e5cf","240":"3b04fce4","241":"354099b6","242":"998125ba","243":"e1cdabfb","244":"141ea9dc","245":"66f26241","246":"e601a6c2","247":"7f43425c","248":"01a6e2ea","249":"1e8c844a","250":"27527155","251":"0b6b226f","252":"7bad99e9","253":"d9a942c0","254":"ca00cced","255":"5b01c41a","256":"6270e17d","257":"019f789a","258":"d512f87d","259":"c0a0fa96","260":"6f4efb64","261":"33c50e68","262":"e53199b9","263":"593b6526","264":"676040ff","265":"36b21858","266":"1c5a5491","267":"49d847d6","268":"ed711356","269":"97095b2d","270":"e1428571","271":"398770f4","272":"f6c4eaad"}[chunkId] + ".chunk.js";
/******/ script.src = __webpack_require__.p + "./static/js/" + ({}[chunkId]||chunkId) + "." + {"0":"1bc3d7df","1":"976094c3","2":"bc3d8cf1","3":"87056bcb","4":"baba45fe","5":"7c4b83e5","6":"bb495cba","7":"231bff40","8":"e2184916","9":"6f9ef4ac","10":"e6f0d5df","11":"d878a337","12":"fb20694d","13":"891a29d9","14":"3129051e","15":"044bdca2","16":"ec4dcede","17":"3fcd4df4","18":"105e1eb7","19":"4d5ee4fc","20":"f22140b1","21":"397df705","22":"4c8bb333","23":"aebb159d","24":"22ef380a","25":"77a31c58","26":"4a47b24f","27":"0f0040a9","28":"d40ce852","29":"4131983c","30":"54f7104f","31":"6880ce04","32":"fedb209c","33":"100ad33d","34":"4291681f","35":"32a9f338","36":"cc9fadd2","37":"f93f5966","38":"7efa37da","39":"e36275c9","40":"a2782e03","41":"ec116e1a","42":"dbcf1df2","43":"4cdbff5f","44":"9be18220","45":"7b58fdd3","46":"c1e7062a","47":"9301a210","48":"5417c295","49":"a66e9054","50":"49a23628","51":"4eb1ce58","52":"f17e0e11","53":"cef5fcb3","54":"74e62ba5","55":"abe23415","56":"31429d59","57":"d2da64a0","58":"2165cb51","59":"d83cf48e","60":"d0d3ef52","61":"42df9549","62":"88296aa0","63":"3bac03de","64":"5eccd94a","65":"88707d5e","66":"908242da","67":"0f65cd89","68":"792bbdc2","69":"ad66f4c7","70":"adb8d0da","71":"7a76b045","72":"45dc0ea4","73":"227e2efb","74":"cfa0f703","75":"385cc133","76":"5a64bd52","77":"561da811","78":"2a0a496c","79":"de080f3a","80":"625007b9","81":"c2fc7f34","82":"3f3fb911","83":"b75fac03","84":"d215a611","85":"28e659a5","86":"c4fa328e","87":"3c551684","88":"4e63f179","89":"b46c0b37","90":"ebdbda62","91":"fc359bf8","92":"9e9e70b1","93":"8a6c50b0","94":"fa90d379","95":"f1ba604f","96":"46e744a4","97":"eb363f34","98":"88d3b919","99":"bb3d2c54","100":"83f3df30","101":"0c87bf65","102":"0ce6fecf","103":"cedaeca4","104":"2169c06b","105":"929a96f0","106":"d798b463","107":"b0d826f1","108":"ec1d356b","109":"41a33a1a","110":"057de435","111":"48228f82","112":"ffd52d92","113":"dcb2ee6d","114":"c6a6e101","115":"f156a00f","116":"a317fe46","117":"ead206c4","118":"d552e90d","119":"e184d9db","120":"384d526a","121":"3b8227c6","122":"186f854f","123":"8c68d28a","124":"408ebb33","125":"991269bf","126":"7167d483","127":"cd709423","128":"0f3f6907","129":"6615f7e4","130":"9bf98449","131":"255c7c43","132":"36844213","133":"9f06d0a5","134":"b8a3ed43","135":"a5093954","136":"9cd53ce0","137":"689cbd5d","138":"e8e1273e","139":"80419667","140":"7c2e7a32","141":"09f4d1b2","142":"0d52a9f3","143":"cb69da0b","144":"34ac3654","145":"f92c8ac0","146":"25c24567","147":"b1b48fca","148":"8847fe03","149":"96790f46","150":"2d8568a9","151":"9b55bafe","152":"235dc8d0","153":"cc337346","154":"6661c864","155":"ed22d6b2","156":"a71c0de3","157":"01fef202","158":"b8182b3b","159":"853da2bd","160":"24f63c24","161":"1289bb4c","162":"55ad5012","163":"c711c38f","164":"7d91d358","165":"dec54504","166":"3ff355b5","167":"7a30e1c2","168":"471f4346","169":"2649e466","170":"2de996df","171":"51f475db","172":"4764b871","173":"2709a7bb","174":"9c9c4f81","175":"1c50cd8c","176":"6ccf4497","177":"916a43d7","178":"e41d6fc9","179":"d9a714d5","180":"abba8537","181":"b42edfcd","182":"b7e3a0f2","183":"b34ed057","184":"c7d63100","185":"9c6c47a4","186":"ddb826e1","187":"5bb529c2","188":"c0498792","189":"8748b741","190":"b38f13e9","191":"23a85f14","192":"0f28a588","193":"4d2aadc1","194":"996d34c8","195":"f5b10b42","196":"c1938f28","197":"f187b9d8","198":"3f1fe6b4","199":"cdc117e7","200":"263ef8f9","201":"67de5466","202":"8dd9f7bd","203":"319c605d","204":"7dd26258","205":"e7b43efe","206":"0f428fc7","207":"b05232b2","208":"0f479a47","209":"45fb7894","210":"f9ead356","211":"dec10650","212":"1489d5e6","213":"41b93d37","214":"8b4e638e","215":"3f681e33","216":"1c11ff4a","217":"331d5d41","218":"d4e6c6c8","219":"8f881b85","220":"476d3205","221":"70a965d5","222":"6ff7c3b7","223":"da42fdf1","224":"8708dc05","225":"9d766db6","226":"c94ba386","227":"8318eb70","228":"be14e4ee","229":"d874d46d","230":"bacab125","231":"6bd1e3d6","232":"fab381d0","233":"4ca8923d","234":"da34a632","235":"ab39b18d","236":"4dc0b9dd","237":"c530e223","238":"fb04bcb0","239":"b524e5cf","240":"3b04fce4","241":"354099b6","242":"998125ba","243":"e1cdabfb","244":"141ea9dc","245":"66f26241","246":"e601a6c2","247":"7f43425c","248":"01a6e2ea","249":"1e8c844a","250":"27527155","251":"0b6b226f","252":"7bad99e9","253":"d9a942c0","254":"ca00cced","255":"5b01c41a","256":"6270e17d","257":"019f789a","258":"d512f87d","259":"c0a0fa96","260":"6f4efb64","261":"33c50e68","262":"e53199b9","263":"593b6526","264":"676040ff","265":"36b21858","266":"1c5a5491","267":"49d847d6","268":"ed711356","269":"97095b2d","270":"e1428571","271":"398770f4","272":"f6c4eaad"}[chunkId] + ".chunk.js";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
@ -74678,8 +74678,8 @@ window._debugType=debugType;function initAxiosInterceptors(props){initOnlineOffl
// https://github.com/axios/axios/issues/1497
// TODO 读取到package.json中的配置
var//proxy = "http://localhost:3000"
proxy="http://123.59.135.93:56666";//proxy="http://localhost:3000"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// proxy="http://123.59.135.93:56666"
proxy="http://localhost:3000";// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制
var requestMap={};window.setfalseInRequestMap=function(keyName){requestMap[keyName]=false;};__WEBPACK_IMPORTED_MODULE_3_axios___default.a.interceptors.request.use(function(config){// if (token) { // 每次发送请求之前判断是否存在token如果存在则统一在http请求的header都加上token不用每次请求都手动添加了
// config.headers.Authorization = token;
Loading…
Cancel
Save