提交 0a99716b authored 作者: wangjiahao's avatar wangjiahao

Merge remote-tracking branch 'origin/main' into main

...@@ -6,7 +6,6 @@ import io.dataease.auth.entity.TokenInfo; ...@@ -6,7 +6,6 @@ import io.dataease.auth.entity.TokenInfo;
import io.dataease.auth.service.AuthUserService; import io.dataease.auth.service.AuthUserService;
import io.dataease.auth.util.JWTUtils; import io.dataease.auth.util.JWTUtils;
import io.dataease.commons.utils.CommonBeanFactory; import io.dataease.commons.utils.CommonBeanFactory;
import io.dataease.commons.utils.ServletUtils;
import io.dataease.i18n.Translator; import io.dataease.i18n.Translator;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationException;
......
...@@ -84,24 +84,17 @@ public class JWTUtils { ...@@ -84,24 +84,17 @@ public class JWTUtils {
*/ */
public static boolean loginExpire(String token){ public static boolean loginExpire(String token){
if (Login_Interval==0) { if (Login_Interval==0) {
String property = CommonBeanFactory.getBean(Environment.class).getProperty("dataease.login_timeout"); int minute = CommonBeanFactory.getBean(Environment.class).getProperty("dataease.login_timeout", Integer.class, 8*60);
// 默认超时时间是8h
int minute = StringUtils.isNotEmpty(property) ? Integer.parseInt(property): (8*60);
// 分钟换算成毫秒 // 分钟换算成毫秒
Login_Interval = minute * 1000 * 60; Login_Interval = minute * 1000 * 60;
} }
Long now = System.currentTimeMillis(); Long now = System.currentTimeMillis();
Long lastOperateTime = tokenLastOperateTime(token); Long lastOperateTime = tokenLastOperateTime(token);
if (ObjectUtils.isEmpty(lastOperateTime)) return true;
boolean isExpire = false; boolean isExpire = false;
if (lastOperateTime != null) { if (lastOperateTime != null) {
isExpire = now - lastOperateTime > Login_Interval; isExpire = now - lastOperateTime > Login_Interval;
} }
if (isExpire) {
// System.out.println("-----------------------");
// System.out.println("-----上次操作时间是["+lastOperateTime+"]-----");
// System.out.println("-----当前操作时间是["+now+"]-----");
// System.out.println("-----------------------");
}
return isExpire; return isExpire;
} }
...@@ -116,7 +109,7 @@ public class JWTUtils { ...@@ -116,7 +109,7 @@ public class JWTUtils {
} }
/** /**
* 生成签名,5min后过期 * 生成签名,1min后过期
* @param tokenInfo 用户信息 * @param tokenInfo 用户信息
* @param secret 用户的密码 * @param secret 用户的密码
* @return 加密的token * @return 加密的token
......
...@@ -7,12 +7,13 @@ import io.dataease.dto.panel.PanelSharePo; ...@@ -7,12 +7,13 @@ import io.dataease.dto.panel.PanelSharePo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
public interface ExtPanelShareMapper { public interface ExtPanelShareMapper {
int batchInsert(@Param("shares") List<PanelShare> shares); int batchInsert(@Param("shares") List<PanelShare> shares);
List<PanelSharePo> query(GridExample example); List<PanelSharePo> query(Map<String, Object> param);
List<PanelShare> queryWithResource(GridExample example); List<PanelShare> queryWithResource(GridExample example);
} }
...@@ -16,16 +16,17 @@ ...@@ -16,16 +16,17 @@
</foreach> </foreach>
</insert> </insert>
<select id="query" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="treeNodeMap"> <select id="query" resultMap="treeNodeMap">
select distinct s.panel_group_id as id, g.create_by as creator, g.name select distinct s.panel_group_id as id, g.create_by as creator, g.name
from panel_share s from panel_share s
left join panel_group g on g.id = s.panel_group_id left join panel_group g on g.id = s.panel_group_id
<if test="_parameter != null"> where
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" /> ( s.target_id = #{userId} and s.type = 0 ) or
</if> ( s.target_id = #{deptId} and s.type = 1 ) or
<if test="orderByClause != null"> s.target_id in
order by ${orderByClause} <foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
</if> #{roleId}
</foreach>
<if test="orderByClause == null"> <if test="orderByClause == null">
order by s.create_time desc order by s.create_time desc
</if> </if>
......
...@@ -21,18 +21,21 @@ ...@@ -21,18 +21,21 @@
<result column="dept_name" property="deptName" /> <result column="dept_name" property="deptName" />
</association> </association>
<association property="dept" column="dept_id" javaType="io.dataease.controller.sys.response.SysUserDept" resultMap="sysUserDept"/> <association property="dept" column="dept_id" javaType="io.dataease.controller.sys.response.SysUserDept" resultMap="sysUserDept"/>
<collection property="roles" ofType="io.dataease.controller.sys.response.SysUserRole" >
<id column="role_id" property="roleId" /> <collection property="roles"
<result column="role_name" property="roleName"/> javaType="java.util.ArrayList"
ofType="io.dataease.controller.sys.response.SysUserRole"
column="user_id"
select="queryRole">
</collection> </collection>
</resultMap> </resultMap>
<select id="query" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="BaseResultMap"> <select id="query" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="BaseResultMap">
select u.*,u.user_id as id, r.role_id,r.name as role_name , d.pid, d.name as dept_name select u.*,u.user_id as id, d.pid, d.name as dept_name
from sys_user u left join sys_users_roles ur on u.user_id = ur.user_id from sys_user u
left join sys_role r on r.role_id = ur.role_id
left join sys_dept d on d.dept_id = u.dept_id left join sys_dept d on d.dept_id = u.dept_id
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -45,4 +48,11 @@ ...@@ -45,4 +48,11 @@
order by u.update_time desc order by u.update_time desc
</if> </if>
</select> </select>
<select id="queryRole" resultMap="sysUserRole">
select r.role_id, r.name as role_name
from sys_users_roles sur
left join sys_role r on r.role_id = sur.role_id
where sur.user_id = #{user_id}
</select>
</mapper> </mapper>
...@@ -202,7 +202,7 @@ public class JdbcProvider extends DatasourceProvider { ...@@ -202,7 +202,7 @@ public class JdbcProvider extends DatasourceProvider {
tableFiled.setFieldSize(Integer.valueOf(resultSet.getString("COLUMN_SIZE"))); tableFiled.setFieldSize(Integer.valueOf(resultSet.getString("COLUMN_SIZE")));
String dbType = resultSet.getString("TYPE_NAME"); String dbType = resultSet.getString("TYPE_NAME");
tableFiled.setFieldType(dbType); tableFiled.setFieldType(dbType);
if(StringUtils.isNotEmpty(dbType) && dbType.equalsIgnoreCase("date") && tableFiled.getFieldSize() < 50 ){ if(StringUtils.isNotEmpty(dbType) && dbType.toLowerCase().contains("date") && tableFiled.getFieldSize() < 50 ){
tableFiled.setFieldSize(50); tableFiled.setFieldSize(50);
} }
list.add(tableFiled); list.add(tableFiled);
......
...@@ -73,13 +73,18 @@ public class ScheduleManager { ...@@ -73,13 +73,18 @@ public class ScheduleManager {
triggerBuilder.withIdentity(triggerKey); triggerBuilder.withIdentity(triggerKey);
Date nTimeByCron = getNTimeByCron(cron);
if (startTime.before(new Date())) { if (startTime.before(new Date())) {
triggerBuilder.startAt(getNTimeByCron(cron)); triggerBuilder.startAt(nTimeByCron);
} }
if (endTime != null) { if (endTime != null) {
if (endTime.before(nTimeByCron)) {
triggerBuilder.endAt(nTimeByCron);
} else {
triggerBuilder.endAt(endTime); triggerBuilder.endAt(endTime);
} }
}
triggerBuilder.withSchedule(CronScheduleBuilder.cronSchedule(cron)); triggerBuilder.withSchedule(CronScheduleBuilder.cronSchedule(cron));
...@@ -151,13 +156,18 @@ public class ScheduleManager { ...@@ -151,13 +156,18 @@ public class ScheduleManager {
triggerBuilder.withIdentity(triggerKey);// 触发器名,触发器组 triggerBuilder.withIdentity(triggerKey);// 触发器名,触发器组
Date nTimeByCron = getNTimeByCron(cron);
if (startTime.before(new Date())) { if (startTime.before(new Date())) {
triggerBuilder.startAt(getNTimeByCron(cron)); triggerBuilder.startAt(nTimeByCron);
} }
if (endTime != null) { if (endTime != null) {
if (endTime.before(nTimeByCron)) {
triggerBuilder.endAt(nTimeByCron);
} else {
triggerBuilder.endAt(endTime); triggerBuilder.endAt(endTime);
} }
}
triggerBuilder.withSchedule(CronScheduleBuilder.cronSchedule(cron));// 触发器时间设定 triggerBuilder.withSchedule(CronScheduleBuilder.cronSchedule(cron));// 触发器时间设定
......
...@@ -132,6 +132,8 @@ public class DataSetTableService { ...@@ -132,6 +132,8 @@ public class DataSetTableService {
dataSetTableFieldsService.deleteByTableId(id); dataSetTableFieldsService.deleteByTableId(id);
// 删除同步任务 // 删除同步任务
dataSetTableTaskService.deleteByTableId(id); dataSetTableTaskService.deleteByTableId(id);
// 删除关联关系
dataSetTableUnionService.deleteUnionByTableId(id);
try { try {
deleteDorisTable(id, table); deleteDorisTable(id, table);
} catch (Exception e) { } catch (Exception e) {
...@@ -359,7 +361,7 @@ public class DataSetTableService { ...@@ -359,7 +361,7 @@ public class DataSetTableService {
datasourceRequest.setDatasource(ds); datasourceRequest.setDatasource(ds);
String sql = new Gson().fromJson(dataSetTableRequest.getInfo(), DataTableInfoDTO.class).getSql(); String sql = new Gson().fromJson(dataSetTableRequest.getInfo(), DataTableInfoDTO.class).getSql();
// 使用输入的sql先预执行一次,并拿到所有字段 // 使用输入的sql先预执行一次,并拿到所有字段
if(StringUtils.isEmpty(sql)){ if (StringUtils.isEmpty(sql)) {
throw new Exception(Translator.get("i18n_sql_not_empty")); throw new Exception(Translator.get("i18n_sql_not_empty"));
} }
datasourceRequest.setQuery(sql); datasourceRequest.setQuery(sql);
......
...@@ -76,6 +76,14 @@ public class DataSetTableUnionService { ...@@ -76,6 +76,14 @@ public class DataSetTableUnionService {
return sourceList; return sourceList;
} }
public void deleteUnionByTableId(String tableId) {
DatasetTableUnionExample datasetTableUnionExample = new DatasetTableUnionExample();
DatasetTableUnionExample.Criteria criteriaSource = datasetTableUnionExample.createCriteria().andSourceTableIdEqualTo(tableId);
DatasetTableUnionExample.Criteria criteriaTarget = datasetTableUnionExample.createCriteria().andTargetTableIdEqualTo(tableId);
datasetTableUnionExample.or(criteriaTarget);
datasetTableUnionMapper.deleteByExample(datasetTableUnionExample);
}
private void checkUnion(DatasetTableUnion datasetTableUnion) { private void checkUnion(DatasetTableUnion datasetTableUnion) {
// check 关联关系是否存在 // check 关联关系是否存在
DatasetTableUnionExample datasetTableUnionExample = new DatasetTableUnionExample(); DatasetTableUnionExample datasetTableUnionExample = new DatasetTableUnionExample();
......
...@@ -27,10 +27,6 @@ import org.apache.commons.collections4.CollectionUtils; ...@@ -27,10 +27,6 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
...@@ -38,8 +34,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; ...@@ -38,8 +34,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.cluster.SlaveServer;
import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.row.ValueMetaInterface; import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.util.HttpClientManager;
import org.pentaho.di.core.util.Utils;
import org.pentaho.di.job.Job; import org.pentaho.di.job.Job;
import org.pentaho.di.job.JobExecutionConfiguration; import org.pentaho.di.job.JobExecutionConfiguration;
import org.pentaho.di.job.JobHopMeta; import org.pentaho.di.job.JobHopMeta;
...@@ -57,7 +51,6 @@ import org.pentaho.di.trans.step.StepMeta; ...@@ -57,7 +51,6 @@ import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.steps.excelinput.ExcelInputField; import org.pentaho.di.trans.steps.excelinput.ExcelInputField;
import org.pentaho.di.trans.steps.excelinput.ExcelInputMeta; import org.pentaho.di.trans.steps.excelinput.ExcelInputMeta;
import org.pentaho.di.trans.steps.excelinput.SpreadSheetType; import org.pentaho.di.trans.steps.excelinput.SpreadSheetType;
import org.pentaho.di.trans.steps.sql.ExecSQLMeta;
import org.pentaho.di.trans.steps.tableinput.TableInputMeta; import org.pentaho.di.trans.steps.tableinput.TableInputMeta;
import org.pentaho.di.trans.steps.textfileoutput.TextFileField; import org.pentaho.di.trans.steps.textfileoutput.TextFileField;
import org.pentaho.di.trans.steps.textfileoutput.TextFileOutputMeta; import org.pentaho.di.trans.steps.textfileoutput.TextFileOutputMeta;
...@@ -70,16 +63,11 @@ import org.springframework.context.annotation.Lazy; ...@@ -70,16 +63,11 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.naming.AuthenticationException;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -133,7 +121,7 @@ public class ExtractDataService { ...@@ -133,7 +121,7 @@ public class ExtractDataService {
switch (datasetTableField.getDeExtractType()) { switch (datasetTableField.getDeExtractType()) {
case 0: case 0:
if (datasetTableField.getSize() > 65533) { if (datasetTableField.getSize() > 65533) {
Column_Fields = Column_Fields + "String" + ",`"; Column_Fields = Column_Fields + "varchar(65533)" + ",`";
} else { } else {
Column_Fields = Column_Fields + "varchar(lenth)".replace("lenth", String.valueOf(datasetTableField.getSize())) + ",`"; Column_Fields = Column_Fields + "varchar(lenth)".replace("lenth", String.valueOf(datasetTableField.getSize())) + ",`";
} }
...@@ -513,9 +501,14 @@ public class ExtractDataService { ...@@ -513,9 +501,14 @@ public class ExtractDataService {
tmpSql = tmpSql + " limit 0"; tmpSql = tmpSql + " limit 0";
} }
datasourceRequest.setQuery(tmpSql); datasourceRequest.setQuery(tmpSql);
return String.join(",", datasourceProvider.fetchResultField(datasourceRequest).stream().map(TableFiled::getFieldName).collect(Collectors.toList())); List<String>dorisFileds = new ArrayList<>();
datasourceProvider.fetchResultField(datasourceRequest).stream().map(TableFiled::getFieldName).forEach(filed ->{
dorisFileds.add(DorisTableUtils.columnName(filed));
});
return String.join(",", dorisFileds);
} }
private void generateTransFile(String extractType, DatasetTable datasetTable, Datasource datasource, List<DatasetTableField> datasetTableFields, String selectSQL) throws Exception { private void generateTransFile(String extractType, DatasetTable datasetTable, Datasource datasource, List<DatasetTableField> datasetTableFields, String selectSQL) throws Exception {
TransMeta transMeta = new TransMeta(); TransMeta transMeta = new TransMeta();
String dorisOutputTable = null; String dorisOutputTable = null;
...@@ -532,6 +525,7 @@ public class ExtractDataService { ...@@ -532,6 +525,7 @@ public class ExtractDataService {
case mysql: case mysql:
MysqlConfigration mysqlConfigration = new Gson().fromJson(datasource.getConfiguration(), MysqlConfigration.class); MysqlConfigration mysqlConfigration = new Gson().fromJson(datasource.getConfiguration(), MysqlConfigration.class);
dataMeta = new DatabaseMeta("db", "MYSQL", "Native", mysqlConfigration.getHost(), mysqlConfigration.getDataBase(), mysqlConfigration.getPort().toString(), mysqlConfigration.getUsername(), mysqlConfigration.getPassword()); dataMeta = new DatabaseMeta("db", "MYSQL", "Native", mysqlConfigration.getHost(), mysqlConfigration.getDataBase(), mysqlConfigration.getPort().toString(), mysqlConfigration.getUsername(), mysqlConfigration.getPassword());
dataMeta.addExtraOption("MYSQL","characterEncoding", "UTF-8");
transMeta.addDatabase(dataMeta); transMeta.addDatabase(dataMeta);
if (extractType.equalsIgnoreCase("all_scope")) { if (extractType.equalsIgnoreCase("all_scope")) {
String tableName = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getTable(); String tableName = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getTable();
......
...@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service; ...@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -92,7 +93,14 @@ public class ShareService { ...@@ -92,7 +93,14 @@ public class ShareService {
Long deptId = user.getDeptId(); Long deptId = user.getDeptId();
List<Long> roleIds = user.getRoles().stream().map(CurrentRoleDto::getId).collect(Collectors.toList()); List<Long> roleIds = user.getRoles().stream().map(CurrentRoleDto::getId).collect(Collectors.toList());
List<Long> targetIds = new ArrayList<>(); Map<String, Object> param = new HashMap<>();
param.put("userId", userId);
param.put("deptId", deptId);
param.put("roleIds", roleIds);
List<PanelSharePo> datas = extPanelShareMapper.query(param);
/*List<Long> targetIds = new ArrayList<>();
targetIds.add(userId); targetIds.add(userId);
targetIds.add(deptId); targetIds.add(deptId);
targetIds.addAll(roleIds); targetIds.addAll(roleIds);
...@@ -105,14 +113,15 @@ public class ShareService { ...@@ -105,14 +113,15 @@ public class ShareService {
request.setConditions(new ArrayList<ConditionEntity>(){{add(condition);}}); request.setConditions(new ArrayList<ConditionEntity>(){{add(condition);}});
GridExample example = request.convertExample(); GridExample example = request.convertExample();
List<PanelSharePo> datas = extPanelShareMapper.query(example); List<PanelSharePo> datas = extPanelShareMapper.query(example);*/
List<PanelShareDto> dtoLists = datas.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po)).collect(Collectors.toList()); List<PanelShareDto> dtoLists = datas.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po)).collect(Collectors.toList());
return convertTree(dtoLists); return convertTree(dtoLists);
} }
//List构建Tree //List构建Tree
private List<PanelShareDto> convertTree(List<PanelShareDto> datas){ private List<PanelShareDto> convertTree(List<PanelShareDto> datas){
Map<String, List<PanelShareDto>> map = datas.stream().filter(panelShareDto -> StringUtils.isNotEmpty(panelShareDto.getCreator())).collect(Collectors.groupingBy(PanelShareDto::getCreator)); String username = AuthUtils.getUser().getUsername();
Map<String, List<PanelShareDto>> map = datas.stream().filter(panelShareDto -> StringUtils.isNotEmpty(panelShareDto.getCreator()) && !StringUtils.equals(username, panelShareDto.getCreator())).collect(Collectors.groupingBy(PanelShareDto::getCreator));
return map.entrySet().stream().map(entry -> { return map.entrySet().stream().map(entry -> {
PanelShareDto panelShareDto = new PanelShareDto(); PanelShareDto panelShareDto = new PanelShareDto();
panelShareDto.setName(entry.getKey()); panelShareDto.setName(entry.getKey());
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<defaultCache <defaultCache
eternal="false" eternal="false"
maxElementsInMemory="1000" maxElementsInMemory="1000"
overflowToDisk="false" overflowToDisk="true"
diskPersistent="false" diskPersistent="false"
timeToIdleSeconds="0" timeToIdleSeconds="0"
timeToLiveSeconds="600" timeToLiveSeconds="600"
...@@ -38,46 +38,46 @@ ...@@ -38,46 +38,46 @@
<cache <cache
name="users_info" name="users_info"
eternal="false" eternal="false"
maxElementsInMemory="100" maxElementsInMemory="1000"
maxElementsOnDisk="1000" maxElementsOnDisk="0"
overflowToDisk="true" overflowToDisk="true"
diskPersistent="true" diskPersistent="false"
timeToIdleSeconds="1800" timeToIdleSeconds="28800"
timeToLiveSeconds="3600" timeToLiveSeconds="36000"
memoryStoreEvictionPolicy="LRU" memoryStoreEvictionPolicy="LRU"
/> />
<cache <cache
name="users_roles_info" name="users_roles_info"
eternal="false" eternal="false"
maxElementsInMemory="100" maxElementsInMemory="1000"
maxElementsOnDisk="1000" maxElementsOnDisk="0"
overflowToDisk="true" overflowToDisk="true"
diskPersistent="true" diskPersistent="false"
timeToIdleSeconds="1800" timeToIdleSeconds="28800"
timeToLiveSeconds="3600" timeToLiveSeconds="36000"
memoryStoreEvictionPolicy="LRU" memoryStoreEvictionPolicy="LRU"
/> />
<cache <cache
name="users_permissions_info" name="users_permissions_info"
eternal="false" eternal="false"
maxElementsInMemory="100" maxElementsInMemory="1000"
maxElementsOnDisk="1000" maxElementsOnDisk="0"
overflowToDisk="true" overflowToDisk="true"
diskPersistent="true" diskPersistent="false"
timeToIdleSeconds="1800" timeToIdleSeconds="28800"
timeToLiveSeconds="3600" timeToLiveSeconds="36000"
memoryStoreEvictionPolicy="LRU" memoryStoreEvictionPolicy="LRU"
/> />
<cache <cache
name="tokens_expire" name="tokens_expire"
eternal="false" eternal="false"
maxElementsInMemory="100" maxElementsInMemory="1000"
maxElementsOnDisk="1000" maxElementsOnDisk="0"
overflowToDisk="true" overflowToDisk="true"
diskPersistent="true" diskPersistent="false"
timeToIdleSeconds="1800" timeToIdleSeconds="28800"
timeToLiveSeconds="3600" timeToLiveSeconds="36000"
memoryStoreEvictionPolicy="LRU" memoryStoreEvictionPolicy="LRU"
/> />
......
...@@ -119,11 +119,11 @@ export function fieldValues(fieldId) { ...@@ -119,11 +119,11 @@ export function fieldValues(fieldId) {
}) })
} }
export function isKettleRunning() { export function isKettleRunning(showLoading = true) {
return request({ return request({
url: '/dataset/group/isKettleRunning', url: '/dataset/group/isKettleRunning',
method: 'post', method: 'post',
loading: true loading: showLoading
}) })
} }
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
} }
</script> </script>
<style lang="css"> <style lang="css" scoped>
.cron { .cron {
text-align: left; text-align: left;
padding: 10px; padding: 10px;
......
...@@ -238,7 +238,9 @@ div:focus { ...@@ -238,7 +238,9 @@ div:focus {
color: #23beef; color: #23beef;
margin: 0 2px 0 0; margin: 0 2px 0 0;
} }
.el-popper{ .showRightPanel{
.el-popper{
position: fixed!important; position: fixed!important;
}
} }
...@@ -20,6 +20,7 @@ import Group from './group/Group' ...@@ -20,6 +20,7 @@ import Group from './group/Group'
import ChartHome from './data/ChartHome' import ChartHome from './data/ChartHome'
import ChartEdit from './view/ChartEdit' import ChartEdit from './view/ChartEdit'
import { removeClass } from '@/utils'
export default { export default {
name: 'Chart', name: 'Chart',
...@@ -30,6 +31,9 @@ export default { ...@@ -30,6 +31,9 @@ export default {
param: {} param: {}
} }
}, },
mounted() {
removeClass(document.body, 'showRightPanel')
},
methods: { methods: {
switchComponent(c) { switchComponent(c) {
this.param = c.param this.param = c.param
...@@ -49,7 +53,7 @@ export default { ...@@ -49,7 +53,7 @@ export default {
<style scoped> <style scoped>
.ms-aside-container { .ms-aside-container {
height: calc(100vh - 56px); height: calc(100vh - 56px);
padding: 15px; padding: 10px 15px;
min-width: 260px; min-width: 260px;
max-width: 460px; max-width: 460px;
} }
......
...@@ -281,7 +281,7 @@ export default { ...@@ -281,7 +281,7 @@ export default {
} }
.span-number{ .span-number{
color: #f18126; color: #0a7be0;
} }
.table-count{ .table-count{
color: #606266; color: #606266;
......
...@@ -335,7 +335,7 @@ export default { ...@@ -335,7 +335,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.span-number{ .span-number{
color: #f18126; color: #0a7be0;
} }
.table-count{ .table-count{
color: #606266; color: #606266;
......
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
}, },
methods: { methods: {
kettleState() { kettleState() {
isKettleRunning().then(res => { isKettleRunning(false).then(res => {
this.kettleRunning = res.data this.kettleRunning = res.data
}) })
}, },
......
...@@ -25,6 +25,7 @@ import AddSQL from './add/AddSQL' ...@@ -25,6 +25,7 @@ import AddSQL from './add/AddSQL'
import AddExcel from './add/AddExcel' import AddExcel from './add/AddExcel'
import AddCustom from './add/AddCustom' import AddCustom from './add/AddCustom'
import FieldEdit from './data/FieldEdit' import FieldEdit from './data/FieldEdit'
import { removeClass } from '@/utils'
export default { export default {
name: 'DataSet', name: 'DataSet',
...@@ -35,6 +36,9 @@ export default { ...@@ -35,6 +36,9 @@ export default {
param: {} param: {}
} }
}, },
mounted() {
removeClass(document.body, 'showRightPanel')
},
methods: { methods: {
switchComponent(c) { switchComponent(c) {
this.param = c.param this.param = c.param
...@@ -69,14 +73,14 @@ export default { ...@@ -69,14 +73,14 @@ export default {
<style scoped> <style scoped>
.ms-aside-container { .ms-aside-container {
height: calc(100vh - 56px); height: calc(100vh - 56px);
padding: 15px; padding: 10px 15px;
min-width: 260px; min-width: 260px;
max-width: 460px; max-width: 460px;
} }
.ms-main-container { .ms-main-container {
height: calc(100vh - 56px); height: calc(100vh - 56px);
padding: 15px 15px 0 15px; padding: 10px 15px 0 15px;
} }
</style> </style>
<template xmlns:el-col="http://www.w3.org/1999/html"> <template xmlns:el-col="http://www.w3.org/1999/html">
<el-col style="padding: 0 10px 0 10px;"> <el-col style="padding: 0 5px 0 5px;">
<el-col> <el-col>
<el-row> <el-row>
<span class="header-title">{{ $t('panel.default_panel') }}</span> <span class="header-title">{{ $t('panel.default_panel') }}</span>
......
<template> <template>
<de-container> <de-container>
<de-aside-container> <de-aside-container style="padding: 0 10px;">
<el-tabs v-model="activeName" class="tab-panel" :stretch="true" @tab-click="handleClick"> <el-tabs v-model="activeName" class="tab-panel" :stretch="true" @tab-click="handleClick">
<el-tab-pane name="PanelList"> <el-tab-pane name="PanelList">
<span slot="label"><i class="el-icon-document" />{{ $t('panel.panel_list') }}</span> <span slot="label"><i class="el-icon-document" />{{ $t('panel.panel_list') }}</span>
...@@ -107,4 +107,8 @@ export default { ...@@ -107,4 +107,8 @@ export default {
.tab-panel>>>.el-tabs__nav-wrap::after { .tab-panel>>>.el-tabs__nav-wrap::after {
height: 1px; height: 1px;
} }
.tab-panel>>>.el-tabs__item{
/* width: 10px; */
padding: 0 10px;
}
</style> </style>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<el-col v-if="panelInfo.name.length>0" class="panel-design"> <el-col v-if="panelInfo.name.length>0" class="panel-design">
<el-row class="panel-design-head"> <el-row class="panel-design-head">
<!--仪表板头部区域--> <!--仪表板头部区域-->
<div style="border-bottom: 1px solid #dfe4ed;height: 100%;">
<el-col :span="12" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px"> <el-col :span="12" style="text-overflow:ellipsis;overflow: hidden;white-space: nowrap;font-size: 14px">
<span>{{ panelInfo.name || '测试仪表板' }}</span> <span>{{ panelInfo.name || '测试仪表板' }}</span>
</el-col> </el-col>
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
</el-tooltip> </el-tooltip>
</span> </span>
</el-col> </el-col>
</div>
</el-row> </el-row>
<!-- 仪表板预览区域--> <!-- 仪表板预览区域-->
<el-row class="panel-design-preview"> <el-row class="panel-design-preview">
...@@ -217,9 +218,8 @@ export default { ...@@ -217,9 +218,8 @@ export default {
.panel-design-head { .panel-design-head {
height: 40px; height: 40px;
background-color: white; background-color: white;
padding: 0 6px; padding: 0 10px;
line-height: 40px; line-height: 40px;
border-bottom: 1px solid #dfe4ed;
} }
.panel-design-preview { .panel-design-preview {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论