mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 13:19:01 +08:00
🔥 Removing code or files. remove zipkin code
This commit is contained in:
1 parent
c11757d455
commit
c232239ae6
19 files changed
+2499
-1715
No files matched your search
File renamed without changes.
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : 本机mysql
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50724
|
||||
Source Host : localhost:3306
|
||||
Source Schema : pigxx_zipkin
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50724
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 22/02/2019 11:44:20
|
||||
*/
|
||||
USE pigxx_zipkin;
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for zipkin_annotations
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `zipkin_annotations`;
|
||||
CREATE TABLE `zipkin_annotations` (
|
||||
`trace_id_high` bigint(20) NOT NULL DEFAULT 0 COMMENT 'If non zero, this means the trace uses 128 bit traceIds instead of 64 bit',
|
||||
`trace_id` bigint(20) NOT NULL COMMENT 'coincides with zipkin_spans.trace_id',
|
||||
`span_id` bigint(20) NOT NULL COMMENT 'coincides with zipkin_spans.id',
|
||||
`a_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'BinaryAnnotation.key or Annotation.value if type == -1',
|
||||
`a_value` blob NULL COMMENT 'BinaryAnnotation.value(), which must be smaller than 64KB',
|
||||
`a_type` int(11) NOT NULL COMMENT 'BinaryAnnotation.type() or -1 if Annotation',
|
||||
`a_timestamp` bigint(20) NULL DEFAULT NULL COMMENT 'Used to implement TTL; Annotation.timestamp or zipkin_spans.timestamp',
|
||||
`endpoint_ipv4` int(11) NULL DEFAULT NULL COMMENT 'Null when Binary/Annotation.endpoint is null',
|
||||
`endpoint_ipv6` binary(16) NULL DEFAULT NULL COMMENT 'Null when Binary/Annotation.endpoint is null, or no IPv6 address',
|
||||
`endpoint_port` smallint(6) NULL DEFAULT NULL COMMENT 'Null when Binary/Annotation.endpoint is null',
|
||||
`endpoint_service_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Null when Binary/Annotation.endpoint is null',
|
||||
UNIQUE INDEX `trace_id_high`(`trace_id_high`, `trace_id`, `span_id`, `a_key`, `a_timestamp`) USING BTREE COMMENT 'Ignore insert on duplicate',
|
||||
INDEX `trace_id_high_2`(`trace_id_high`, `trace_id`, `span_id`) USING BTREE COMMENT 'for joining with zipkin_spans',
|
||||
INDEX `trace_id_high_3`(`trace_id_high`, `trace_id`) USING BTREE COMMENT 'for getTraces/ByIds',
|
||||
INDEX `endpoint_service_name`(`endpoint_service_name`) USING BTREE COMMENT 'for getTraces and getServiceNames',
|
||||
INDEX `a_type`(`a_type`) USING BTREE COMMENT 'for getTraces',
|
||||
INDEX `a_key`(`a_key`) USING BTREE COMMENT 'for getTraces',
|
||||
INDEX `trace_id`(`trace_id`, `span_id`, `a_key`) USING BTREE COMMENT 'for dependencies job'
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compressed;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for zipkin_dependencies
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `zipkin_dependencies`;
|
||||
CREATE TABLE `zipkin_dependencies` (
|
||||
`day` date NOT NULL,
|
||||
`parent` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`child` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`call_count` bigint(20) NULL DEFAULT NULL,
|
||||
`error_count` bigint(20) NULL DEFAULT NULL,
|
||||
UNIQUE INDEX `day`(`day`, `parent`, `child`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compressed;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for zipkin_spans
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `zipkin_spans`;
|
||||
CREATE TABLE `zipkin_spans` (
|
||||
`trace_id_high` bigint(20) NOT NULL DEFAULT 0 COMMENT 'If non zero, this means the trace uses 128 bit traceIds instead of 64 bit',
|
||||
`trace_id` bigint(20) NOT NULL,
|
||||
`id` bigint(20) NOT NULL,
|
||||
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`parent_id` bigint(20) NULL DEFAULT NULL,
|
||||
`debug` bit(1) NULL DEFAULT NULL,
|
||||
`start_ts` bigint(20) NULL DEFAULT NULL COMMENT 'Span.timestamp(): epoch micros used for endTs query and to implement TTL',
|
||||
`duration` bigint(20) NULL DEFAULT NULL COMMENT 'Span.duration(): micros used for minDuration and maxDuration query',
|
||||
UNIQUE INDEX `trace_id_high`(`trace_id_high`, `trace_id`, `id`) USING BTREE COMMENT 'ignore insert on duplicate',
|
||||
INDEX `trace_id_high_2`(`trace_id_high`, `trace_id`, `id`) USING BTREE COMMENT 'for joining with zipkin_annotations',
|
||||
INDEX `trace_id_high_3`(`trace_id_high`, `trace_id`) USING BTREE COMMENT 'for getTracesByIds',
|
||||
INDEX `name`(`name`) USING BTREE COMMENT 'for getTraces and getSpanNames',
|
||||
INDEX `start_ts`(`start_ts`) USING BTREE COMMENT 'for getTraces ordering and range'
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compressed;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
File renamed without changes.
File renamed without changes.
+3
-5
@@ -10,10 +10,8 @@ COPY ./db/2pigxx.sql /docker-entrypoint-initdb.d
|
||||
|
||||
COPY ./db/3pigxx_ac.sql /docker-entrypoint-initdb.d
|
||||
|
||||
COPY ./db/4pigxx_zipkin.sql /docker-entrypoint-initdb.d
|
||||
COPY ./db/4pigxx_job.sql /docker-entrypoint-initdb.d
|
||||
|
||||
COPY ./db/5pigxx_job.sql /docker-entrypoint-initdb.d
|
||||
COPY ./db/5pigxx_mp.sql /docker-entrypoint-initdb.d
|
||||
|
||||
COPY ./db/6pigxx_mp.sql /docker-entrypoint-initdb.d
|
||||
|
||||
COPY ./db/7pigxx_config.sql /docker-entrypoint-initdb.d
|
||||
COPY ./db/6pigxx_config.sql /docker-entrypoint-initdb.d
|
||||
+2
-11
@@ -18,7 +18,6 @@
|
||||
package com.pig4cloud.pigx.gateway.filter;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
|
||||
import com.pig4cloud.pigx.gateway.config.SwaggerProvider;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
@@ -47,7 +46,6 @@ import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.a
|
||||
*/
|
||||
@Component
|
||||
public class PigxRequestGlobalFilter implements GlobalFilter, Ordered {
|
||||
private static final String HEADER_NAME = "X-Forwarded-Prefix";
|
||||
|
||||
/**
|
||||
* Process the Web request and (optionally) delegate to the next
|
||||
@@ -74,16 +72,9 @@ public class PigxRequestGlobalFilter implements GlobalFilter, Ordered {
|
||||
.build();
|
||||
exchange.getAttributes().put(GATEWAY_REQUEST_URL_ATTR, newRequest.getURI());
|
||||
|
||||
// 3. 支持swagger添加X-Forwarded-Prefix header
|
||||
String path = request.getURI().getPath();
|
||||
if (!StringUtils.endsWithIgnoreCase(path, SwaggerProvider.API_URI)) {
|
||||
return chain.filter(exchange.mutate().request(newRequest).build());
|
||||
}
|
||||
String basePath = path.substring(0, path.lastIndexOf(SwaggerProvider.API_URI));
|
||||
return chain.filter(exchange.mutate()
|
||||
.request(newRequest.mutate()
|
||||
.header(HEADER_NAME, basePath)
|
||||
.build()).build());
|
||||
.request(newRequest.mutate()
|
||||
.build()).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,4 +12,7 @@ EXPOSE 8848
|
||||
|
||||
ADD ./pigx-register/target/pigx-register.jar ./
|
||||
|
||||
CMD java -Djava.security.egd=file:/dev/./urandom -jar pigx-register.jar
|
||||
|
||||
CMD sleep 10;java -Djava.security.egd=file:/dev/./urandom -jar pigx-register.jar
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
*
|
||||
* Date: 2016-08-08
|
||||
*/
|
||||
function(n){var e,p,b,r,o,h,d,m,M,l,u,w,k,i,S,g,s,c,y,T="sizzle"+1*new Date,_=n.document,x=0,a=0,f=ie(),v=ie(),L=ie(),C=function(e,t){return e===t&&(u=!0),0},D={}.hasOwnProperty,t=[],E=t.pop,O=t.push,N=t.push,Y=t.slice,j=function(e,t){for(var n=0,a=e.length;n<a;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",A="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",H="\\["+I+"*("+A+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+A+"))|)"+I+"*\\]",R=":("+A+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z=new RegExp(I+"+","g"),F=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),W=new RegExp("^"+I+"*,"+I+"*"),V=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),K=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),B=new RegExp(R),U=new RegExp("^"+A+"$"),q={ID:new RegExp("^#("+A+")"),CLASS:new RegExp("^\\.("+A+")"),TAG:new RegExp("^("+A+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){w()},oe=_e(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{N.apply(t=Y.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){O.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function re(e,t,n,a){var o,r,i,s,l,u,c,d=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!a&&((t?t.ownerDocument||t:_)!==k&&w(t),t=t||k,S)){if(11!==f&&(l=Q.exec(e)))if(o=l[1]){if(9===f){if(!(i=t.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&y(t,i)&&i.id===o)return n.push(i),n}else{if(l[2])return N.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return N.apply(n,t.getElementsByClassName(o)),n}if(p.qsa&&!L[e+" "]&&(!g||!g.test(e))){if(1!==f)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=T),r=(u=h(e)).length;r--;)u[r]="#"+s+" "+ye(u[r]);c=u.join(","),d=X.test(e)&&me(t.parentNode)||t}if(c)try{return N.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return m(e.replace(F,"$1"),t,n,a)}function ie(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function se(e){return e[T]=!0,e}function le(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function ce(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function fe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&oe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(i){return se(function(r){return r=+r,se(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=re.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(i=(k=a).documentElement,S=!o(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),p.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=le(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),p.getElemLine truncated
|
||||
function(n){var e,p,b,r,o,h,d,m,M,l,u,w,k,i,S,g,s,c,y,T="sizzle"+1*new Date,_=n.document,x=0,a=0,f=ie(),v=ie(),L=ie(),C=function(e,t){return e===t&&(u=!0),0},D={}.hasOwnProperty,t=[],E=t.pop,O=t.push,N=t.push,Y=t.slice,j=function(e,t){for(var n=0,a=e.length;n<a;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",A="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",H="\\["+I+"*("+A+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+A+"))|)"+I+"*\\]",R=":("+A+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z=new RegExp(I+"+","g"),F=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),W=new RegExp("^"+I+"*,"+I+"*"),V=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),K=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),B=new RegExp(R),U=new RegExp("^"+A+"$"),q={ID:new RegExp("^#("+A+")"),CLASS:new RegExp("^\\.("+A+")"),TAG:new RegExp("^("+A+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){w()},oe=_e(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{N.apply(t=Y.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){O.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function re(e,t,n,a){var o,r,i,s,l,u,c,d=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!a&&((t?t.ownerDocument||t:_)!==k&&w(t),t=t||k,S)){if(11!==f&&(l=Q.exec(e)))if(o=l[1]){if(9===f){if(!(i=t.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&y(t,i)&&i.id===o)return n.push(i),n}else{if(l[2])return N.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return N.apply(n,t.getElementsByClassName(o)),n}if(p.qsa&&!L[e+" "]&&(!g||!g.test(e))){if(1!==f)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=T),r=(u=h(e)).length;r--;)u[r]="#"+s+" "+ye(u[r]);c=u.join(","),d=X.test(e)&&me(t.parentNode)||t}if(c)try{return N.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return m(e.replace(F,"$1"),t,n,a)}function ie(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function se(e){return e[T]=!0,e}function le(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function ce(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function fe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&oe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(i){return se(function(r){return r=+r,se(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=re.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(i=(k=a).documentElement,S=!o(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),p.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=le(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),p.getElemLine truncated
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
|
||||
+66
-56
@@ -26,6 +26,7 @@ import com.pig4cloud.pigx.admin.api.entity.SysRouteConf;
|
||||
import com.pig4cloud.pigx.admin.mapper.SysRouteConfMapper;
|
||||
import com.pig4cloud.pigx.admin.service.SysRouteConfService;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import com.pig4cloud.pigx.common.gateway.support.DynamicRouteInitEvent;
|
||||
import com.pig4cloud.pigx.common.gateway.vo.RouteDefinitionVo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -87,72 +88,81 @@ public class SysRouteConfServiceImpl extends ServiceImpl<SysRouteConfMapper, Sys
|
||||
|
||||
// 遍历修改的routes,保存到Redis
|
||||
List<RouteDefinitionVo> routeDefinitionVoList = new ArrayList<>();
|
||||
routes.forEach(value -> {
|
||||
log.info("更新路由 ->{}", value);
|
||||
RouteDefinitionVo vo = new RouteDefinitionVo();
|
||||
Map<String, Object> map = (Map) value;
|
||||
|
||||
Object id = map.get("routeId");
|
||||
if (id != null) {
|
||||
vo.setId(String.valueOf(id));
|
||||
}
|
||||
try {
|
||||
routes.forEach(value -> {
|
||||
log.info("更新路由 ->{}", value);
|
||||
RouteDefinitionVo vo = new RouteDefinitionVo();
|
||||
Map<String, Object> map = (Map) value;
|
||||
|
||||
Object routeName = map.get("routeName");
|
||||
if (routeName != null) {
|
||||
vo.setRouteName(String.valueOf(routeName));
|
||||
}
|
||||
Object id = map.get("routeId");
|
||||
if (id != null) {
|
||||
vo.setId(String.valueOf(id));
|
||||
}
|
||||
|
||||
Object predicates = map.get("predicates");
|
||||
if (predicates != null) {
|
||||
JSONArray predicatesArray = (JSONArray) predicates;
|
||||
List<PredicateDefinition> predicateDefinitionList =
|
||||
predicatesArray.toList(PredicateDefinition.class);
|
||||
vo.setPredicates(predicateDefinitionList);
|
||||
}
|
||||
Object routeName = map.get("routeName");
|
||||
if (routeName != null) {
|
||||
vo.setRouteName(String.valueOf(routeName));
|
||||
}
|
||||
|
||||
Object filters = map.get("filters");
|
||||
if (filters != null) {
|
||||
JSONArray filtersArray = (JSONArray) filters;
|
||||
List<FilterDefinition> filterDefinitionList
|
||||
= filtersArray.toList(FilterDefinition.class);
|
||||
vo.setFilters(filterDefinitionList);
|
||||
}
|
||||
Object predicates = map.get("predicates");
|
||||
if (predicates != null) {
|
||||
JSONArray predicatesArray = (JSONArray) predicates;
|
||||
List<PredicateDefinition> predicateDefinitionList =
|
||||
predicatesArray.toList(PredicateDefinition.class);
|
||||
vo.setPredicates(predicateDefinitionList);
|
||||
}
|
||||
|
||||
Object uri = map.get("uri");
|
||||
if (uri != null) {
|
||||
vo.setUri(URI.create(String.valueOf(uri)));
|
||||
}
|
||||
Object filters = map.get("filters");
|
||||
if (filters != null) {
|
||||
JSONArray filtersArray = (JSONArray) filters;
|
||||
List<FilterDefinition> filterDefinitionList
|
||||
= filtersArray.toList(FilterDefinition.class);
|
||||
vo.setFilters(filterDefinitionList);
|
||||
}
|
||||
|
||||
Object order = map.get("order");
|
||||
if (order != null) {
|
||||
vo.setOrder(Integer.parseInt(String.valueOf(order)));
|
||||
}
|
||||
Object uri = map.get("uri");
|
||||
if (uri != null) {
|
||||
vo.setUri(URI.create(String.valueOf(uri)));
|
||||
}
|
||||
|
||||
pigxRedisTemplate.setHashValueSerializer(new Jackson2JsonRedisSerializer<>(RouteDefinitionVo.class));
|
||||
pigxRedisTemplate.opsForHash().put(CommonConstants.ROUTE_KEY, vo.getId(), vo);
|
||||
routeDefinitionVoList.add(vo);
|
||||
});
|
||||
Object order = map.get("order");
|
||||
if (order != null) {
|
||||
vo.setOrder(Integer.parseInt(String.valueOf(order)));
|
||||
}
|
||||
pigxRedisTemplate.setHashValueSerializer(new Jackson2JsonRedisSerializer<>(RouteDefinitionVo.class));
|
||||
pigxRedisTemplate.opsForHash().put(CommonConstants.ROUTE_KEY, vo.getId(), vo);
|
||||
routeDefinitionVoList.add(vo);
|
||||
});
|
||||
|
||||
// 逻辑删除全部
|
||||
SysRouteConf condition = new SysRouteConf();
|
||||
condition.setDelFlag(CommonConstants.STATUS_NORMAL);
|
||||
this.remove(new UpdateWrapper<>(condition));
|
||||
// 逻辑删除全部
|
||||
SysRouteConf condition = new SysRouteConf();
|
||||
condition.setDelFlag(CommonConstants.STATUS_NORMAL);
|
||||
this.remove(new UpdateWrapper<>(condition));
|
||||
|
||||
//插入生效路由
|
||||
List<SysRouteConf> routeConfList = routeDefinitionVoList.stream().map(vo -> {
|
||||
SysRouteConf routeConf = new SysRouteConf();
|
||||
routeConf.setRouteId(vo.getId());
|
||||
routeConf.setRouteName(vo.getRouteName());
|
||||
routeConf.setFilters(JSONUtil.toJsonStr(vo.getFilters()));
|
||||
routeConf.setPredicates(JSONUtil.toJsonStr(vo.getPredicates()));
|
||||
routeConf.setOrder(vo.getOrder());
|
||||
routeConf.setUri(vo.getUri().toString());
|
||||
return routeConf;
|
||||
}).collect(Collectors.toList());
|
||||
this.saveBatch(routeConfList);
|
||||
log.debug("更新网关路由结束 ");
|
||||
//插入生效路由
|
||||
List<SysRouteConf> routeConfList = routeDefinitionVoList.stream().map(vo -> {
|
||||
SysRouteConf routeConf = new SysRouteConf();
|
||||
routeConf.setRouteId(vo.getId());
|
||||
routeConf.setRouteName(vo.getRouteName());
|
||||
routeConf.setFilters(JSONUtil.toJsonStr(vo.getFilters()));
|
||||
routeConf.setPredicates(JSONUtil.toJsonStr(vo.getPredicates()));
|
||||
routeConf.setOrder(vo.getOrder());
|
||||
routeConf.setUri(vo.getUri().toString());
|
||||
return routeConf;
|
||||
}).collect(Collectors.toList());
|
||||
this.saveBatch(routeConfList);
|
||||
log.debug("更新网关路由结束 ");
|
||||
|
||||
this.applicationEventPublisher.publishEvent(new RefreshRoutesEvent(this));
|
||||
this.applicationEventPublisher.publishEvent(new RefreshRoutesEvent(this));
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("路由配置解析失败", e);
|
||||
// 回滚路由,重新加载即可
|
||||
this.applicationEventPublisher.publishEvent(new DynamicRouteInitEvent(this));
|
||||
// 抛出异常
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return Mono.empty();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<!--
|
||||
小技巧: 在根pom里面设置统一存放路径,统一管理方便维护
|
||||
<properties>
|
||||
<log-path>/Users/lengleng/</log-path>
|
||||
<log-path>/Users/lengleng</log-path>
|
||||
</properties>
|
||||
1. 其他模块加日志输出,直接copy本文件放在resources 目录即可
|
||||
2. 注意修改 <property name="log.path" value=""/> 的value模块
|
||||
2. 注意修改 <property name="${log-path}/log.path" value=""/> 的value模块
|
||||
-->
|
||||
<configuration debug="false" scan="false">
|
||||
<property name="log.path" value="${log-path}logs/pigx-upms"/>
|
||||
<property name="log.path" value="logs/pigx-upms"/>
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
data-drag="true"
|
||||
jqyoui-draggable="{onStart:'startDragCallback', onDrag:'dragCallback'}"
|
||||
data-jqyoui-options="{revert: 'invalid', helper: 'clone', opacity : 0.5}">
|
||||
|
||||
|
||||
<img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{item.icon}}" width="16px;" height="16px;"/>
|
||||
{{item.name}}
|
||||
</li>
|
||||
@@ -57,21 +57,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="canvasHelpWrapper" class="col-xs-9">
|
||||
<div class="canvas-wrapper" id="canvasSection"
|
||||
<div class="canvas-wrapper" id="canvasSection"
|
||||
ng-model="droppedElement"
|
||||
ng-model="droppedElement"
|
||||
data-drop="true"
|
||||
data-jqyoui-options
|
||||
jqyoui-droppable="{onDrop:'dropCallback',onOver: 'overCallback', onOut: 'outCallback'}">
|
||||
jqyoui-droppable="{onDrop:'dropCallback',onOver: 'overCallback', onOut: 'outCallback'}">
|
||||
<div class="canvas-message" id="model-modified-date"></div>
|
||||
<div class="Oryx_button"
|
||||
id="delete-button"
|
||||
<div class="Oryx_button"
|
||||
id="delete-button"
|
||||
title="{{'BUTTON.ACTION.DELETE.TOOLTIP' | translate}}"
|
||||
ng-click="deleteShape()"
|
||||
style="display:none">
|
||||
<img src="editor-app/images/delete.png"/>
|
||||
</div>
|
||||
<div class="Oryx_button"
|
||||
<div class="Oryx_button"
|
||||
id="morph-button"
|
||||
title="{{'BUTTON.ACTION.MORPH.TOOLTIP' | translate}}"
|
||||
ng-click="morphShape()"
|
||||
@@ -104,9 +104,9 @@
|
||||
<strong>{{'ELEMENT.AUTHOR' | translate}}: </strong> {{selectedItem.auditData.author}}
|
||||
</div>
|
||||
<div class="selected-item-title">
|
||||
<a ng-click="propertyWindowState.toggle()">
|
||||
<a ng-click="propertyWindowState.toggle()">
|
||||
<i class="glyphicon" ng-class="{'glyphicon-chevron-right': propertyWindowState.collapsed, 'glyphicon-chevron-down': !propertyWindowState.collapsed}"></i>
|
||||
<span ng-show="selectedItem.title != undefined && selectedItem.title != null && selectedItem.title.length > 0">{{selectedItem.title}}</span>
|
||||
<span ng-show="selectedItem.title != undefined && selectedItem.title != null && selectedItem.title.length > 0">{{selectedItem.title}}</span>
|
||||
<span ng-show="!selectedItem || selectedItem.title == undefined || selectedItem.title == null || selectedItem.title.length == 0">{{modelData.name}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@@ -117,7 +117,7 @@
|
||||
ng-click="propertyClicked($index)" ng-class="{'clear' : $index%2 == 0}">
|
||||
<span class="title" ng-if="!property.hidden">{{ property.title }} :</span>
|
||||
<span class="title-removed" ng-if="property.hidden"><i>{{ property.title }} ({{'PROPERTY.REMOVED' | translate}}) :</i></span>
|
||||
<span class="value">
|
||||
<span class="value">
|
||||
<ng-include
|
||||
src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode"></ng-include>
|
||||
<ng-include src="getPropertyReadModeTemplateUrl($index)"
|
||||
@@ -128,8 +128,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,15 +0,0 @@
|
||||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /pigx-zipkin
|
||||
|
||||
WORKDIR /pigx-zipkin
|
||||
|
||||
EXPOSE 5006
|
||||
|
||||
ADD ./pigx-visual/pigx-zipkin/target/pigx-zipkin.jar ./
|
||||
|
||||
CMD java -Djava.security.egd=file:/dev/./urandom -jar pigx-zipkin.jar
|
||||
@@ -1,109 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
~
|
||||
~ Redistribution and use in source and binary forms, with or without
|
||||
~ modification, are permitted provided that the following conditions are met:
|
||||
~
|
||||
~ Redistributions of source code must retain the above copyright notice,
|
||||
~ this list of conditions and the following disclaimer.
|
||||
~ Redistributions in binary form must reproduce the above copyright
|
||||
~ notice, this list of conditions and the following disclaimer in the
|
||||
~ documentation and/or other materials provided with the distribution.
|
||||
~ Neither the name of the pig4cloud.com developer nor the names of its
|
||||
~ contributors may be used to endorse or promote products derived from
|
||||
~ this software without specific prior written permission.
|
||||
~ Author: lengleng (wangiegie@gmail.com)
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>pigx-visual</artifactId>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<version>2.8.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>pigx-zipkin</artifactId>
|
||||
<description>pigx zipkin追踪服务</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--zipkin-->
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-server</artifactId>
|
||||
<version>${zipkin.version}</version>
|
||||
<!--排除log4j2 避免和logback冲突警告-->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-ui</artifactId>
|
||||
<version>${zipkin.version}</version>
|
||||
</dependency>
|
||||
<!-- 使用mysql存储-->
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-storage-mysql</artifactId>
|
||||
<version>${zipkin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-storage-mysql</artifactId>
|
||||
<version>${zipkin-storage-mysql.version}</version>
|
||||
</dependency>
|
||||
<!-- zipkin2.x 需要此包连接操作mysql -->
|
||||
<dependency>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.zipkin;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import zipkin.storage.mysql.MySQLStorage;
|
||||
import zipkin2.server.internal.EnableZipkinServer;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* @author 仙(๑ • ㅂ • ́)و✧酱
|
||||
* @date 2019/2/22
|
||||
* <p>
|
||||
* 服务链路追踪
|
||||
*/
|
||||
@EnableZipkinServer
|
||||
@SpringCloudApplication
|
||||
public class PigxZipkinApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PigxZipkinApplication.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MySQLStorage mySQLStorage(DataSource datasource) {
|
||||
return MySQLStorage.builder().datasource(datasource).executor(Runnable::run).build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
${AnsiColor.BRIGHT_YELLOW}
|
||||
|
||||
::::::::: ::::::::::: :::::::: ::: :::
|
||||
:+: :+: :+: :+: :+: :+: :+:
|
||||
+:+ +:+ +:+ +:+ +:+ +:+
|
||||
+#++:++#+ +#+ :#: +#++:+
|
||||
+#+ +#+ +#+ +#+# +#+ +#+
|
||||
#+# #+# #+# #+# #+# #+#
|
||||
### ########### ######## ### ###
|
||||
|
||||
www.pig4cloud.com
|
||||
|
||||
Pig Microservice Architecture
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
server:
|
||||
port: 5006
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
@@ -40,6 +40,5 @@
|
||||
<module>pigx-mp-manager</module>
|
||||
<module>pigx-sso-client-demo</module>
|
||||
<module>pigx-tx-manager</module>
|
||||
<module>pigx-zipkin</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -93,15 +93,6 @@
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
<!--服务追踪-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-sleuth</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
|
||||
</dependency>
|
||||
<!--断路器依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
||||
Reference in new issue
Block a user