Commit 5b275634 by songweifeng

Merge remote-tracking branch 'origin/master'

parents 59c032ab c2fd26a8
......@@ -165,7 +165,7 @@
<report.url>http://localhost:8003/</report.url>
<admin.url>http://localhost:9020</admin.url>
<receiver.host>io-split-receiver-581358642.cn-north-1.elb.amazonaws.com.cn</receiver.host>
<receiver.host>ec2-54-223-170-25.cn-north-1.compute.amazonaws.com.cn</receiver.host>
<receiver.port>8081</receiver.port>
......@@ -183,7 +183,7 @@
<profile.table>kudu.default.profile_</profile.table>
<event.table>tkio_bigtable_view.event_</event.table>
<usergroup.table>tkio_bigtable.tkio_user_group_preview</usergroup.table>
<usergroup.table>tkio_bigtable.tkio_user_group</usergroup.table>
<hive.driver>org.apache.hive.jdbc.HiveDriver</hive.driver>
<hive.url>jdbc:hive2://ec2-54-223-146-236.cn-north-1.compute.amazonaws.com.cn:10000/tkio_bigtable</hive.url>
......@@ -198,9 +198,9 @@
<id>aws</id>
<properties>
<label>product</label>
<datasource.url>jdbc:mysql://tkio.cma5jkozme68.rds.cn-north-1.amazonaws.com.cn:3306/trackingio?characterEncoding=utf-8</datasource.url>
<datasource.username>trackingio</datasource.username>
<datasource.password>trackingio</datasource.password>
<datasource.url>jdbc:mysql://tkio.cma5jkozme68.rds.cn-north-1.amazonaws.com.cn:3306/userio?characterEncoding=utf-8</datasource.url>
<datasource.username>reyun</datasource.username>
<datasource.password>Reyun123</datasource.password>
<datasource.driver>com.mysql.jdbc.Driver</datasource.driver>
......@@ -211,6 +211,7 @@
<redis.surl.host>trackingioweb.nr7fi4.ng.0001.cnn1.cache.amazonaws.com.cn</redis.surl.host>
<redis.surl.port>6379</redis.surl.port>
<redis.surl.database>1</redis.surl.database>
<redis.event.host>trackingio-web.nr7fi4.0001.cnn1.cache.amazonaws.com.cn</redis.event.host>
<redis.event.port>6379</redis.event.port>
......@@ -218,17 +219,16 @@
<!--Redis setting//end-->
<awsneed>true</awsneed>
<awsneed>false</awsneed>
<mail.host>smtp.exmail.qq.com</mail.host>
<mail.username>service1@reyun.com</mail.username>
<mail.password>XSW29ijn</mail.password>
<mail.username>service4@reyun.com</mail.username>
<mail.password>3xy9cUFpe4VdPuoH</mail.password>
<mail.content_type>text/plain;charset\=GBK</mail.content_type>
<mail.list>zhangliang@reyun.com</mail.list>
<mail.list>zhangxiaoyan@reyun.com</mail.list>
<mail.valid_time>4320</mail.valid_time>
<track.url>http://uri6.com/tkio</track.url>
<report.url>http://internal-report-api-976419027.cn-north-1.elb.amazonaws.com.cn</report.url>
<admin.url>http://ec2-54-223-136-157.cn-north-1.compute.amazonaws.com.cn:8099</admin.url>
......@@ -239,30 +239,23 @@
<event.table>tkio_bigtable_view.event_</event.table>
<usergroup.table>tkio_bigtable.tkio_user_group</usergroup.table>
<file.rootdir>https://s3.cn-north-1.amazonaws.com.cn/reyundownload/trackingio</file.rootdir>
<shenma.download.dir>/data/shenmadownload/</shenma.download.dir>
<report.export.task>ExportReportTask</report.export.task>
<app.debug.task>AutoSyncAppDebugStatus</app.debug.task>
<tkiostreamdatasource.url>jdbc:mysql://etl.cma5jkozme68.rds.cn-north-1.amazonaws.com.cn:3306/tkio_stream?characterEncoding=utf-8</tkiostreamdatasource.url>
<tkiostreamdatasource.username>trackingio_rpt</tkiostreamdatasource.username>
<tkiostreamdatasource.password>trackingio_rpt</tkiostreamdatasource.password>
<tkiostreamdatasource.driver>com.mysql.jdbc.Driver</tkiostreamdatasource.driver>
<tkiostreamdatasource.minIdle>4</tkiostreamdatasource.minIdle>
<tkiostreamdatasource.maxIdle>8</tkiostreamdatasource.maxIdle>
<tkiostreamdatasource.maxActive>10</tkiostreamdatasource.maxActive>
<tkiostreamdatasource.initialSize>5</tkiostreamdatasource.initialSize>
<tkiostreamdatasource.maxWait>5000</tkiostreamdatasource.maxWait>
<presto.driver>com.facebook.presto.jdbc.PrestoDriver</presto.driver>
<presto.url>jdbc:presto://172.31.11.248:18889/hive/default</presto.url>
<presto.username>presto</presto.username>
<presto.password></presto.password>
<presto.minconnection>100</presto.minconnection>
<presto.maxconnection>500</presto.maxconnection>
<presto.timeoutvalue>3600000</presto.timeoutvalue>
<tkio.url>http://www.trackingio.com/</tkio.url>
<hive.driver>org.apache.hive.jdbc.HiveDriver</hive.driver>
<hive.url>jdbc:hive2://172.31.11.248:10000/test</hive.url>
<hive.username>root</hive.username>
<iscache>0</iscache>
<account.check.url>http://trackingio.com</account.check.url>
<account.check.url>http://io.reyun.com</account.check.url>
<messagecode.url>http://172.31.0.212:8890/message/sms/verifycode/send</messagecode.url>
<ddb.accesskey>AKIAPMJ4QRXP6BECFUVQ</ddb.accesskey>
<ddb.secretkey>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</ddb.secretkey>
</properties>
</profile>
</profiles>
......
package com.reyun.controller;
import com.reyun.repository.ConfigParamRepository;
import com.reyun.util.ResultModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* Created by nolan on 06/06/2017.
......@@ -10,4 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("index")
public class IndexController {
@Autowired
ConfigParamRepository configParamRepository;
@RequestMapping(value = "trackingio", method = RequestMethod.GET)
@ResponseBody
public ResultModel findUserIOUrl() {
return ResultModel.OK(configParamRepository.findParamsByKey("trackingio_login_url"));
}
}
......@@ -85,9 +85,11 @@ public class LoginController
Map<String, Object> rtnMap = Maps.newHashMap();
logger.info(email + "is login...");
Account account = loginService.login(email, password);
if (account != null) {
logger.info("login account:" + account.toString());
if(!account.getRoleCategory().equals(5L)) {
Boolean trackAndIoBothExhaust = accountFlowRestrictService.isIoExhaust(account.getId());
......
......@@ -55,8 +55,6 @@ public class LoginServiceImpl implements LoginService {
Account resultAccount = null;
Account queryAccount = accountRepository.findAccountByEmail(email);
logger.info("login email:{}, pwd:{}", email, pwd);
logger.info("login account:{}", queryAccount);
if (null != queryAccount) {
......@@ -76,7 +74,6 @@ public class LoginServiceImpl implements LoginService {
}
}
logger.info("authService.getOneAccount: {}", resultAccount);
}
return resultAccount;
......
......@@ -273,7 +273,7 @@ public class RegedServiceImpl implements RegedService {
String token = HashAlgorithms.MD5("superuser_" + account.getId());
//审核
final String sendEmailUrl = VERIFY_EMAIL_SEND_URL + account.getId()+"/"+token + "?ip=" + (StringUtil.isEmpty(ip)?"":ip);
final String sendEmailUrl = VERIFY_EMAIL_SEND_URL + account.getId()+"/"+token + "?ip=" + (StringUtil.isEmpty(ip)?"unknown":ip);
Thread sendEmailThread = new Thread(){
@Override
public void run(){
......
......@@ -37,11 +37,6 @@ public class Constant {
public static String iscache = commonBundle.getString("iscache");
public static String receiverHost = commonBundle.getString("receiver.host");
public static String receiverPort = commonBundle.getString("receiver.port");
public static String reportExportTask = commonBundle.getString("report.export.task");
public static String appDebugTask = commonBundle.getString("app.debug.task");
public static String tkioUrl = commonBundle.getString("tkio.url");
public static String awsAccessKey = commonBundle.getString("aws.accesskey");
public static String awsSecretKey = commonBundle.getString("aws.secret");
......
package com.reyun.util;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.Jedis;
......@@ -25,8 +26,14 @@ public class RedisUtilNew {
private RedisUtilNew() {
ResourceBundle resourceBundle = ResourceBundle.getBundle("redis");
pool = new JedisPool(resourceBundle.getString("redis.surl.host"),
Integer.valueOf(resourceBundle.getString("redis.surl.port")));
pool = new JedisPool(
new GenericObjectPoolConfig(),
resourceBundle.getString("redis.surl.host"),
Integer.valueOf(resourceBundle.getString("redis.surl.port")),
Integer.parseInt(Constant.REDIS_IP_REQUEST_TIMES),
null,
Integer.valueOf(resourceBundle.getString("redis.surl.database")),
null);
}
public static RedisUtilNew getInstance() {
......
......@@ -9,8 +9,3 @@ report.url=${report.url}
awsneed=${awsneed}
iscache=${iscache}
admin.url=${admin.url}
\ No newline at end of file
report.export.task=${report.export.task}
app.debug.task=${app.debug.task}
tkio.url=${tkio.url}
aws.accesskey=${aws.accesskey}
aws.secret=${aws.secret}
\ No newline at end of file
......@@ -4,9 +4,9 @@
<appender name="infoFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<Encoding>UTF-8</Encoding>
<file>/data/logs/trackingio.com/trackingio.log</file>
<file>/data/logs/saasio.com/saasio.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>/data/logs/trackingio.com/trackingio.%d{yyyy-MM-dd}.log.zip</FileNamePattern>
<FileNamePattern>/data/logs/saasio.com/saasio.%d{yyyy-MM-dd}.log.zip</FileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
......
......@@ -4,6 +4,7 @@ redis.ip.requesttimes=${redis.ip.requesttimes}
# token
redis.surl.host=${redis.surl.host}
redis.surl.port=${redis.surl.port}
redis.surl.database=${redis.surl.database}
# event
redis.event.host=${redis.event.host}
......
......@@ -84,10 +84,12 @@
<div class="header">
<div class="leftHeader">
<a href="javascript:void(0)">
<div class="iconfont icon-logo"></div>
<!-- <div class="iconfont icon-logo"></div> -->
<div class="logimg"></div>
</a>
</div>
<div class="rightHeader clearfix">
<div class="toggleBtn"><a href="{{trackUrl}}" target="_blank">进入TrackingIO</a></div>
<div class="flowinfo">
<div class="flowCircle" ng-if="flowKnow && !flowRestrict"></div>
</div>
......@@ -97,6 +99,9 @@
<div class="userInfoDetail">
<div class="itemInfo">
<div class="userflowText"><span class="userIcon"></span>{{loginuserName}}</div>
<div ng-if="!flowRestrict && (isSuper || isManage)" class="userflowType flowType" ng-class="{'flowTypeRed':flowLevel==5,'flowTypeRedLong':flowLevel==6,'userflowTypeLong':flowLevel==6}">
<p class="small-font smallsize-font">{{flowName}}</p>
</div>
</div>
<div class="itemInfo" ng-if="flowRestrict">
<span class="userPrizeIcon regPrize"></span>
......
......@@ -6,7 +6,7 @@
function toolservice($rootScope,$timeout,UtilService){
var service = {},that = $rootScope,
rootmenu = {"admonitor":"广告监测","behavior":"行为分析","export":"数据导出","management":"管理中心"},
rootmenu = {"dataview":"数据概览","action":"行为分析","user":"用户分析","event":"埋点管理","tool":"工具"},
menu = {"custommenu": "行业看单","eventstats": "事件分析","funnel": "漏斗转化","retention": "留存分析",
"intelligentpath": "智能路径","usergroup": "用户分群","event": "APP事件管理","profile": "用户属性管理",
"logtool": "日志流","report": "下载报表","app": "产品中心","auth": "成员管理"};
......@@ -404,7 +404,6 @@
//菜单报送数据
service.getMenuSubmitData = function(submenu){
if($rootScope.pagePath=="userinfo")return;
if(!rootmenu[$rootScope.mainMenu])return;
var cmids = service.getCMidInfo();
var company = service.getUser().company;
......@@ -412,21 +411,25 @@
company = "";
}
var appkey = "",appcategory = "",appname = "";
var appkey = "",appcategory = "",appname = "",rootmenukey;
if($rootScope.appInstance){
appkey = $rootScope.appInstance.appkey;
appcategory = $rootScope.appInstance.appGenreName;
appname = $rootScope.appInstance.name;
}
if(!submenu || submenu==''){submenu = menu[$rootScope.pagePath];}
for (var m in that.meauTree){
if(that.meauTree[m].indexOf($rootScope.pagePath)>-1){
rootmenukey = m;
}
}
var Uuser = UtilService.getUser();
var params = {
appid: UtilService.getTKAppkey(),
who:Uuser.email,
what:"pageview",
context:{
rootmenu:rootmenu[$rootScope.mainMenu], //菜单分类
rootmenu:rootmenu[rootmenukey], //菜单分类
menu:menu[$rootScope.pagePath], //当前菜单
submenu:submenu, //子菜单-看单
sessionid:UtilService.getCookie("JSESSIONID"),
......
......@@ -245,10 +245,16 @@
});
}
$scope.queryTrackUrl = function(){
var urlPM = HttpService.getInfo("/index/trackingio", {});
urlPM.then(function(data) {
$scope.trackUrl = data;
});
}
$scope.initpage = function(){
$scope.queryLimit();
$scope.queryApp();
$scope.queryTrackUrl();
}
var lpath = $location.path();
......@@ -277,12 +283,19 @@
$scope.flowKnow = true;
UtilService.setCookie("ryioRedCircle",true,7);
var params = {
accountId: auid
};
if(type == 'ioAlert'){
$scope.ioAlert = false;
params.ioFlow = true;
}
else if(type == 'ioDateAlert'){
$scope.ioDateAlert = false;
params.ioPastTime = true;
}
var closePM = HttpService.postInfo("mng/accountRestrict/confirm", params);
closePM.then(function(data) {});
}
$rootScope.menuSubmitData = function(submenu){
......
......@@ -3,7 +3,7 @@
.controller("collectCtrl",["$rootScope","$scope","$state","ToolService","$timeout",collectCtrl]);
function collectCtrl($rootScope,$scope,$state,ToolService,$timeout){
var meauTree = {
$rootScope.meauTree = {
"dataview":["custommenu"],
"action":["eventstats","funnel","retention","intelligentpath"],
"user":["usergroup"],
......@@ -28,8 +28,8 @@
n = n.substring(0,n);
}
$scope.menuCurFlag = "";
for(var k in meauTree){
var ms = meauTree[k];
for(var k in $rootScope.meauTree){
var ms = $rootScope.meauTree[k];
if(ms.indexOf(n)>-1){
$scope.menuCurFlag = k;
$scope.menustatus[k] = true;
......
......@@ -73,10 +73,32 @@
return false;
}
}
var panelH = $(".rightWrap");
$(".rightWrap").scroll(function(event){
if(panelH.get(0).scrollHeight<=panelH.height())return;
var _this = this;
$timeout(function() {
if($scope.isShow() && $scope.filterResult.length>0){
var viewH =$(_this).height(),//可见高度
contentH =$(_this).get(0).scrollHeight,//内容高度
scrollTop =$(_this).scrollTop();//滚动高度
if(scrollTop>=contentH -viewH){ //到达底部100px时,加载新内容
$scope.getMore();
}
}
}, 10);
});
$(".rightWrap").on('mousewheel', function(event){
if(panelH.get(0).scrollHeight>panelH.height() || event.originalEvent.deltaY<=0)return;
if($scope.isShow() && $scope.filterResult.length>0){
$timeout(function() {
$scope.getMore();
}, 10);
}
});
$scope.getMore = function(){
$scope.limitCount += $scope.limitCount+9;
};
$scope.limitCount += 9;
}
$scope.gopage = function(id,flag){
if(flag){
isLog = true;
......@@ -94,6 +116,8 @@
$scope.goReport = function(info,e){
if($(e.target).hasClass('copyBtn')) return;
$rootScope.isweb = info.platform == 'H5';
$('.rightWrap').unbind("scroll");
$('.rightWrap').unbind("mousewheel");
$scope.$emit("mngappTo",info.id);
var url = $rootScope.firstMeau.substring(1).replace('/','.');
......
......@@ -372,7 +372,7 @@ a{text-decoration:none;outline:none;}
.logo{
width:224px;
height:48px;
background:url(../images/logo1.png) no-repeat center center;
background:url(../images/logo.png) no-repeat center center;
margin:0 auto;
display: block;
cursor: pointer;
......
......@@ -26,9 +26,36 @@ html,body{
display:inline-block;
margin-right:3px;
}
.iconfont.active, .active>.iconfont,.sidebarNav li:hover .iconfont, .activemore>.iconfont{
.iconfont.active, .active>.iconfont, .activemore>.iconfont{
color:#4186ec;
}
.sidebarNav li:not(.activemore):hover .iconfont{
color: $menulihoverft;
}
.toggleBtn{
border-left: 1px solid #ffffff;
margin-left: -102px;
display:inline-block;
margin-top:4px;
a{
border:1px solid #ffffff;
border-radius:100px;
color:#ffffff;
width:118px;
height:24px;
color:#ffffff;
text-align:center;
line-height:24px;
display:inline-block;
margin-left:20px;
&:before{
content:url(../images/whiteArrow.png);
width:7px;
height:6px;
padding-right:6px;
}
}
}
.icon-logo{
font-size:25px;
color:#fff;
......@@ -250,13 +277,13 @@ ul li .darklabel,.darklabel{color:$darkfontcolor;}
float:left;
}
.leftHeader .logimg{
width:120px;
width:100px;
height:24px;
cursor: pointer;
margin-left:16px;
// margin-left:16px;
margin-top:11px;
background:url(../images/logo_2_2.png) no-repeat center center;
background-size:100%;
background:url(../images/logo_.png) no-repeat center center;
// background-size:100%;
}
.appicon{
@extend .myicon;
......@@ -1109,8 +1136,8 @@ textarea.iptform{
margin-top:15px;
margin-right: 18px;
}
.sidebarNav li:hover a{
color:$menuliactiveft;
.sidebarNav li:not(.activemore):not(.active):hover a{
color:$menulihoverft;
}
.sidebarNav li.active{
background-color:$menuliactivebg;
......@@ -1139,7 +1166,7 @@ textarea.iptform{
color:$menuliactiveft;
}
.sidebarNav .subli:hover{
color:$menuliactiveft;
background:$menulihoverbg;
}
.submenuIcon{
background:url(../images/submenu.png) no-repeat;
......@@ -6534,7 +6561,7 @@ pre{
color:$menuftcolor;
}
.smallMenu li:hover a{
color:$menuliactiveft;
color:$menulihoverft;
}
.sidebarNav .subli.active {
border-left-color: $menubgcolor;
......@@ -6932,7 +6959,6 @@ pre{
margin-right: -14px;
.appWrap{
width: 33.333%;
float: left;
box-sizing: border-box;
padding-right: 14px;
padding-top: 14px;
......@@ -6949,15 +6975,17 @@ pre{
box-shadow:0 1px 4px 0 rgba(0,0,0,0.10);
}
.setting{
background: url(../images/settings.png) no-repeat;
background: url(../images/settings.png) no-repeat center center;
width:16px;
height:16px;
cursor: pointer;
margin-right: 20px;
margin-right: 13px;
margin-top: -5px;
padding: 7px;
float: right;
position: relative;
&:hover{
background: url(../images/settings_hover.png) no-repeat;
background: url(../images/settings_hover.png) no-repeat center center;
}
ul{
background:#ffffff;
......@@ -6966,7 +6994,7 @@ pre{
border-radius:3px;
width:78px;
position: absolute;
top:17px;
top:25px;
right: 0px;
li{
height:32px;
......@@ -7017,24 +7045,16 @@ pre{
}
.more{
text-align: center;
background:#fafafa;
margin: auto;
color:#1964d4;
color:#666666;
cursor: pointer;
clear: both;
padding-top: 20px;
margin-top: 20px;
margin-right:15px;
width: auto;
span:before{
content: "";
background: url(../images/drop.png) no-repeat;
width: 10px;
height: 11px;
display: inline-block;
}
label{
padding-left: 5px;
color: #b5b0b0;
display: inline-block;
}
height:32px;
line-height:32px;
}
.noData{
text-align: center;
......
......@@ -16,7 +16,7 @@
<div class="iconfont platform" ng-class="{'iOS':'icon-ios','Android':'icon-android','H5':'icon-wrap'}[info.platform]"></div>
<span class="title">{{info.name}}</span>
<span class="copyBtnIcon copyBtn" data-clipboard-text="{{info.name}}" title="点击复制"></span>
<span class="setting" ng-click="info.isShow=!info.isShow" stop-event>
<span class="setting" ng-click="info.isShow=!info.isShow" stop-event ng-mouseleave="info.isShow=false">
<ul ng-show="info.isShow" ng-mouseleave="info.isShow=false">
<li ng-click="gopage(info.id)">编辑</li>
<li ng-click="doRemove(info.id)" ng-if="specialsAppkey.indexOf(info.appkey)==-1 && !isAppManage">删除</li>
......@@ -27,12 +27,12 @@
<span class="copyBtnIcon copyBtn" data-clipboard-text="{{info.appkey}}" title="点击复制"></span>
</div>
<div class="bottom">
<span stop-event>自动生成日志<div class="onOffBtn" ng-class="{'on':info.regedbutton == true}" ng-click="onOff(info)"></div></span>
<span class="right">创建时间:{{info.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
<!-- <span stop-event>自动生成日志<div class="onOffBtn" ng-class="{'on':info.regedbutton == true}" ng-click="onOff(info)"></div></span> -->
<span>创建时间:{{info.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
</div>
</div>
</div>
<div class="more" ng-click="getMore()" ng-show="isShow() && filterResult.length>0"><span>更多产品<label>(共{{resultList.length}}个产品)</label></span></div>
<div class="more" ng-click="getMore()" ng-show="isShow() && filterResult.length>0"><span>滑动/点击加载更多(共{{resultList.length}}个产品)</span></div>
<div class="noData" ng-if="resultList.length==0">
<span></span>
<div>暂无产品</div>
......@@ -42,4 +42,5 @@
<div>无搜索结果</div>
</div>
</div>
<div class="clear"></div>
<del-tip status="delstatus" delfn="removeInfo()">确定删除该产品?<br><b class="error">此应用的数据将彻底删除,无法恢复!</b></del-tip>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment