Browse Source

open

master
pioneer 2 years ago
commit
3f71b56b3c
  1. 6
      README.md
  2. BIN
      lib/finekit-10.0.jar
  3. 25
      plugin.xml
  4. 6
      src/main/java/com/fr/plugin/third/party/jsdbagdb/CustomisedThemeConstants.java
  5. 19
      src/main/java/com/fr/plugin/third/party/jsdbagdb/ErrorResourcePathTransformer.java
  6. 22
      src/main/java/com/fr/plugin/third/party/jsdbagdb/PluginLifecycleMonitor.java
  7. 265
      src/main/java/com/fr/plugin/third/party/jsdbagdb/Utils.java
  8. 55
      src/main/java/com/fr/plugin/third/party/jsdbagdb/config/CustomDataConfig.java
  9. 39
      src/main/java/com/fr/plugin/third/party/jsdbagdb/http/ConfigHttpHandler.java
  10. 14
      src/main/java/com/fr/plugin/third/party/jsdbagdb/http/CustomHttpHandlerProvider.java
  11. 15
      src/main/java/com/fr/plugin/third/party/jsdbagdb/http/CustomURLAliasProvider.java
  12. 38
      src/main/java/com/fr/plugin/third/party/jsdbagdb/http/HealthHttpHandler.java
  13. 41
      src/main/java/com/fr/plugin/third/party/jsdbagdb/web/CustomisedThemeMain.java
  14. 59
      src/main/java/com/fr/plugin/third/party/jsdbagdb/web/MainFilesComponent.java
  15. 18
      src/main/java/com/fr/plugin/third/party/jsdbagdb/web/WebComponent.java
  16. 18
      src/main/java/com/fr/plugin/third/party/jsdbagdb/web/WebResource.java
  17. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/background-img.png
  18. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/banner.png
  19. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/decison-log.png
  20. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/favorite-logo.png
  21. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/full-screen-logo.png
  22. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/menu-button-line.png
  23. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/msg-logo.png
  24. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/search-logo.png
  25. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/search-no-data.png
  26. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/search1-logo.png
  27. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/second-level-menu-item-others.png
  28. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/second-level-menu-item.png
  29. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/theme-logo.png
  30. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-others.png
  31. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-select-bottom.png
  32. 67
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/errorIframe.html
  33. 638
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/main.css
  34. 2182
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/main.js
  35. 92
      src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/web.js

6
README.md

@ -0,0 +1,6 @@
# open-JSD-10631
JSD-10631 主题插件\
免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\
仅作为开发者学习参考使用!禁止用于任何商业用途!\
为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系【pioneer】处理。

BIN
lib/finekit-10.0.jar

Binary file not shown.

25
plugin.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin>
<id>com.fr.plugin.third.party.jsdbagdb</id>
<name><![CDATA[定制化主题_EK]]></name>
<active>yes</active>
<version>1.0.20</version>
<env-version>10.0~11.0</env-version>
<jartime>2019-01-01</jartime>
<vendor>fr.open</vendor>
<description><![CDATA[
定制化主题
]]></description>
<change-notes><![CDATA[
]]></change-notes>
<extra-decision>
<ThemeVariousProvider class="com.fr.plugin.third.party.jsdbagdb.web.CustomisedThemeMain"/>
<HttpHandlerProvider class="com.fr.plugin.third.party.jsdbagdb.http.CustomHttpHandlerProvider"/>
<URLAliasProvider class="com.fr.plugin.third.party.jsdbagdb.http.CustomURLAliasProvider"/>
<!--<WebResourceProvider class="com.fr.plugin.third.party.jsdbagdb.web.WebResource"/>-->
</extra-decision>
<extra-core>
<ResourcePathTransformer class="com.fr.plugin.third.party.jsdbagdb.ErrorResourcePathTransformer"/>
</extra-core>
<function-recorder class="com.fr.plugin.third.party.jsdbagdb.Utils"/>
<lifecycle-monitor class="com.fr.plugin.third.party.jsdbagdb.PluginLifecycleMonitor"/>
</plugin>

6
src/main/java/com/fr/plugin/third/party/jsdbagdb/CustomisedThemeConstants.java

@ -0,0 +1,6 @@
package com.fr.plugin.third.party.jsdbagdb;
public class CustomisedThemeConstants {
public static String PLUGIN_ID = "com.fr.plugin.third.party.jsdbagdb";
}

19
src/main/java/com/fr/plugin/third/party/jsdbagdb/ErrorResourcePathTransformer.java

@ -0,0 +1,19 @@
package com.fr.plugin.third.party.jsdbagdb;
import com.fr.stable.fun.impl.AbstractResourcePathTransformer;
public class ErrorResourcePathTransformer extends AbstractResourcePathTransformer {
public boolean accept(String path) {
return "/com/fr/web/core/errorIframe.html".equals(path);
}
/**
* 转变资源读取的路径
*
* @param path 待转换的路径
* @return 资源文件的新路径
*/
public String transform(String path) {
return "/com/fr/plugin/third/party/jsdbagdb/web/errorIframe.html";
}
}

22
src/main/java/com/fr/plugin/third/party/jsdbagdb/PluginLifecycleMonitor.java

@ -0,0 +1,22 @@
package com.fr.plugin.third.party.jsdbagdb;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor;
import com.fr.plugin.third.party.jsdbagdb.config.CustomDataConfig;
import com.fr.record.analyzer.EnableMetrics;
/**
* 配置信息初始化
*/
@EnableMetrics
public class PluginLifecycleMonitor extends AbstractPluginLifecycleMonitor {
@Override
public void afterRun(PluginContext pluginContext) {
CustomDataConfig.getInstance();
}
@Override
public void beforeStop(PluginContext pluginContext) {
}
}

265
src/main/java/com/fr/plugin/third/party/jsdbagdb/Utils.java

@ -0,0 +1,265 @@
package com.fr.plugin.third.party.jsdbagdb;
import com.fr.base.Parameter;
import com.fr.base.ParameterHelper;
import com.fr.decision.webservice.v10.login.LoginService;
import com.fr.decision.webservice.v10.user.UserService;
import com.fr.general.GeneralUtils;
import com.fr.general.http.HttpToolbox;
import com.fr.i18n.LanguageConfig;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.json.JSONArray;
import com.fr.json.JSONObject;
import com.fr.locale.InterProviderFactory;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginContexts;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider;
import com.fr.third.org.apache.http.HttpEntity;
import com.fr.third.org.apache.http.HttpStatus;
import com.fr.third.org.apache.http.client.config.RequestConfig;
import com.fr.third.org.apache.http.client.methods.CloseableHttpResponse;
import com.fr.third.org.apache.http.client.methods.HttpGet;
import com.fr.third.org.apache.http.impl.client.CloseableHttpClient;
import com.fr.third.org.apache.http.util.EntityUtils;
import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
@EnableMetrics
public class Utils {
@Focus(id = "com.fr.plugin.theme.azure", text = "plugin-theme-azure", source = Original.PLUGIN)
public static void logFunction() {
//功能点记录
}
/**
* 根据请求获取语言
*
* @param req
* @return
* @throws Exception
*/
public static Locale getLanguageByRequest(HttpServletRequest req) throws Exception {
Locale global = LanguageConfig.getInstance().getLocale();
Locale locale = "zh_CN".equals(global.toString()) ? WebUtils.getLocale(req) : global;
String userName = getUserNameByRequest(req);
if ((userName == null) || (userName.length() <= 0)) {
return locale;
}
String language = UserService.getInstance().getUserByUserName(userName).getLanguage();
if ((language == null) || (language.length() <= 0)) {
return locale;
}
locale = GeneralUtils.createLocale(language);
return locale;
}
/**
* 获取对应国际化文本
* @param key
* @param locale
* @return
*/
public static String i18nText(String key, Locale locale) {
return InterProviderFactory.getProvider().getLocText(key, locale);
}
public static String i18nText(String key) {
return InterProviderFactory.getProvider().getLocText(key);
}
/**
* 根据请求获取用户名
*
* @param req 请求
* @return
*/
public static String getUserNameByRequest(HttpServletRequest req) {
String userName = LoginService.getInstance().getCurrentUserNameFromRequest(req);
if ((userName != null) && (userName.length() >= 1)) {
return userName;
}
userName = LoginService.getInstance().getCurrentUserNameFromRequestCookie(req);
if ((userName != null) && (userName.length() >= 1)) {
return userName;
}
Map<String, Object> values = WebUtils.parameters4SessionIDInfor(req);
if (values == null) {
return "";
}
Object value = values.get("fr_username");
if (value == null) {
return "";
}
userName = (String) value;
return userName;
}
/**
* 判断插件是否要升级
* <br/>只能判断fr10的插件版本是否升级
*
* @param pluginID 插件ID
* @return
*/
public static boolean isPluginUpgraded(String pluginID) throws IOException {
String versionUrl = "https://market.fanruan.com/commodities?pg=plugin&id=" + pluginID;
String userAgentValue = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36";
String refererValue = "https://market.fanruan.com/plugin/" + pluginID;
CloseableHttpClient httpClient = HttpToolbox.getHttpClient(versionUrl);
HttpGet httpGet = new HttpGet(versionUrl);
httpGet.addHeader("User-Agent", userAgentValue);
httpGet.addHeader("Referer", refererValue);
httpGet.addHeader("Sec-Fetch-Site", "same-origin");
httpGet.addHeader("Sec-Fetch-Mode", "cors");
httpGet.addHeader("Sec-Fetch-Dest", "empty");
//设置请求状态参数
RequestConfig requestConfig = RequestConfig.custom()
.setConnectionRequestTimeout(3000)
.setSocketTimeout(3000)
.setConnectTimeout(3000).build();
httpGet.setConfig(requestConfig);
String pluginInfo = null;
CloseableHttpResponse response = httpClient.execute(httpGet);
//获取返回状态值
int status = response.getStatusLine().getStatusCode();
//请求成功
if (status == HttpStatus.SC_OK) {
HttpEntity httpEntity = response.getEntity();
if (httpEntity != null) {
pluginInfo = EntityUtils.toString(httpEntity, "UTF-8");
}
}
if (pluginInfo == null) {
return false;
}
JSONObject jsonObject = new JSONObject(pluginInfo);
String stateValue = jsonObject.getString("state");
if (!"ok".equalsIgnoreCase(stateValue)) {
return false;
}
JSONObject resultJSONObject = jsonObject.getJSONObject("result");
if (resultJSONObject == null) {
return false;
}
JSONArray relatedPluginsJSONArray = resultJSONObject.getJSONArray("relatedPlugins");
if ((relatedPluginsJSONArray == null) || (relatedPluginsJSONArray.size() <= 0)) {
return false;
}
JSONObject pluginJSONObject = relatedPluginsJSONArray.getJSONObject(0);
String pluginServerVersion = pluginJSONObject.getString("pluginversion");
if (pluginServerVersion == null) {
return false;
}
//本地版本号
PluginContext pluginContext = PluginContexts.currentContext();
String pluginLocalVersion = pluginContext.getVersion();
int compareValue = pluginServerVersion.compareTo(pluginLocalVersion);
if (compareValue >= 1) {
return true;
}
return false;
}
/**
* 替换文本中参数
*
* @param textContent 文本内容
* @return
*/
public static String replaceParametersInText(String textContent) {
if (textContent == null) {
return "";
}
String content = "";
Calculator cal = Calculator.createCalculator();
Parameter[] parameters = ParameterHelper.analyze4Parameters(textContent, false);
content = replaceParametersInText(textContent, cal, parameters);
return content;
}
/**
* 替换文本中参数
*
* @param textContent 文本内容
* @param cal 计算器
* @return
*/
public static String replaceParametersInText(String textContent, Calculator cal) {
if (textContent == null) {
return "";
}
String content = "";
Parameter[] parameters = ParameterHelper.analyze4Parameters(textContent, false);
content = replaceParametersInText(textContent, cal, parameters);
return content;
}
/**
* 替换文本中参数
*
* @param textContent 文本内容
* @param cal 计算器
* @param parameters 参数
* @return
*/
public static String replaceParametersInText(String textContent, Calculator cal, ParameterProvider[] parameters) {
if (textContent == null) {
return "";
}
String content = "";
Parameter[] paras = processParameters(parameters, cal);
content = ParameterHelper.analyzeCurrentContextTableData4Templatee(textContent, paras);
return content;
}
/**
* 处理参数,计算出参数对应的值
*
* @param paras 参数
* @param cal 计算器
* @return
*/
public static Parameter[] processParameters(ParameterProvider[] paras, Calculator cal) {
if ((paras == null) || (paras.length <= 0)) {
return new Parameter[0];
}
return Parameter.providers2Parameter(Calculator.processParameters(cal, paras));
}
private static final ThreadLocal<SimpleDateFormat> sdf = new ThreadLocal<SimpleDateFormat>() {
@Override
protected SimpleDateFormat initialValue() {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
}
};
public static String formatDateWithMillisecond(Date date) {
return sdf.get().format(date);
}
}

55
src/main/java/com/fr/plugin/third/party/jsdbagdb/config/CustomDataConfig.java

@ -0,0 +1,55 @@
package com.fr.plugin.third.party.jsdbagdb.config;
import com.fr.config.*;
import com.fr.config.holder.Conf;
import com.fr.config.holder.factory.Holders;
/**
* 配置数据保存
*/
@Visualization(category = "定制化主题")
public class CustomDataConfig extends DefaultConfiguration {
@Override
public String getNameSpace() {
return this.getClass().getName();
}
private static volatile CustomDataConfig config = null;
public static CustomDataConfig getInstance() {
if (config == null) {
config = ConfigContext.getConfigInstance(CustomDataConfig.class);
}
return config;
}
@Identifier(value = "showSystemMessage", name = "显示系统消息图标", description = "", status = Status.SHOW)
private Conf<Boolean> showSystemMessage = Holders.simple(true);
@Identifier(value = "showFullScreen", name = "显示全屏图标", description = "", status = Status.SHOW)
private Conf<Boolean> showFullScreen = Holders.simple(true);
public Boolean isShowSystemMessage() {
return showSystemMessage.get();
}
public void setShowSystemMessage(Boolean showSystemMessage) {
this.showSystemMessage.set(showSystemMessage);
}
public Boolean isShowFullScreen() {
return showFullScreen.get();
}
public void setShowFullScreen(Boolean showFullScreen) {
this.showFullScreen.set(showFullScreen);
}
@Override
public Object clone() throws CloneNotSupportedException {
CustomDataConfig cloned = (CustomDataConfig) super.clone();
cloned.showSystemMessage = (Conf<Boolean>) showSystemMessage.clone();
cloned.showFullScreen = (Conf<Boolean>) showFullScreen.clone();
return cloned;
}
}

39
src/main/java/com/fr/plugin/third/party/jsdbagdb/http/ConfigHttpHandler.java

@ -0,0 +1,39 @@
package com.fr.plugin.third.party.jsdbagdb.http;
import com.fr.decision.fun.impl.BaseHttpHandler;
import com.fr.json.JSONObject;
import com.fr.plugin.third.party.jsdbagdb.config.CustomDataConfig;
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 保存下载文件配置
*/
public class ConfigHttpHandler extends BaseHttpHandler {
@Override
public RequestMethod getMethod() {
return RequestMethod.GET;
}
@Override
public String getPath() {
return "/jsdbagdb/config";
}
@Override
public boolean isPublic() {
return false;
}
@Override
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception {
res.setContentType("application/json; charset=utf-8");
JSONObject json = new JSONObject();
json.put("showSystemMessage", CustomDataConfig.getInstance().isShowSystemMessage());
json.put("showFullScreen", CustomDataConfig.getInstance().isShowFullScreen());
WebUtils.printAsJSON(res, json);
}
}

14
src/main/java/com/fr/plugin/third/party/jsdbagdb/http/CustomHttpHandlerProvider.java

@ -0,0 +1,14 @@
package com.fr.plugin.third.party.jsdbagdb.http;
import com.fr.decision.fun.impl.AbstractHttpHandlerProvider;
import com.fr.decision.fun.impl.BaseHttpHandler;
public class CustomHttpHandlerProvider extends AbstractHttpHandlerProvider {
@Override
public BaseHttpHandler[] registerHandlers() {
return new BaseHttpHandler[]{
new ConfigHttpHandler(),
new HealthHttpHandler()
};
}
}

15
src/main/java/com/fr/plugin/third/party/jsdbagdb/http/CustomURLAliasProvider.java

@ -0,0 +1,15 @@
package com.fr.plugin.third.party.jsdbagdb.http;
import com.fr.decision.fun.impl.AbstractURLAliasProvider;
import com.fr.decision.webservice.url.alias.URLAlias;
import com.fr.decision.webservice.url.alias.URLAliasFactory;
public class CustomURLAliasProvider extends AbstractURLAliasProvider {
@Override
public URLAlias[] registerAlias() {
return new URLAlias[]{
URLAliasFactory.createPluginAlias("/jsdbagdb/config", "/jsdbagdb/config", false),
URLAliasFactory.createPluginAlias("/jsdbagdb/health", "/jsdbagdb/health", false),
};
}
}

38
src/main/java/com/fr/plugin/third/party/jsdbagdb/http/HealthHttpHandler.java

@ -0,0 +1,38 @@
package com.fr.plugin.third.party.jsdbagdb.http;
import com.fr.decision.fun.impl.BaseHttpHandler;
import com.fr.json.JSONObject;
import com.fr.plugin.third.party.jsdbagdb.config.CustomDataConfig;
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 检测监控状况
*/
public class HealthHttpHandler extends BaseHttpHandler {
@Override
public RequestMethod getMethod() {
return RequestMethod.GET;
}
@Override
public String getPath() {
return "/jsdbagdb/health";
}
@Override
public boolean isPublic() {
return false;
}
@Override
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception {
res.setContentType("application/json; charset=utf-8");
JSONObject json = new JSONObject();
json.put("health", true);
WebUtils.printAsJSON(res, json);
}
}

41
src/main/java/com/fr/plugin/third/party/jsdbagdb/web/CustomisedThemeMain.java

@ -0,0 +1,41 @@
package com.fr.plugin.third.party.jsdbagdb.web;
import com.fr.decision.fun.impl.AbstractThemeVariousProvider;
import com.fr.decision.web.MainComponent;
import com.fr.plugin.third.party.jsdbagdb.Utils;
import com.fr.stable.fun.Authorize;
import com.fr.web.struct.Atom;
/**
* 决策平台页面
*/
@Authorize(callSignKey = "com.fr.plugin.third.party.jsdbagdb")
public class CustomisedThemeMain extends AbstractThemeVariousProvider {
@Override
public Atom attach() {
//在平台主组件加载时添加我们自己的组件
return MainComponent.KEY;
}
@Override
public Atom client() {
//我们自己要引入的组件
Utils.logFunction();
return MainFilesComponent.KEY;
}
@Override
public String name() {
return "定制化主题";
}
@Override
public String text() {
return "定制化主题";
}
@Override
public String coverPath() {
return "com/fr/plugin/third/party/jsdbagdb/image/theme-logo.png";
}
}

59
src/main/java/com/fr/plugin/third/party/jsdbagdb/web/MainFilesComponent.java

@ -0,0 +1,59 @@
package com.fr.plugin.third.party.jsdbagdb.web;
import com.fanruan.api.log.LogKit;
import com.fr.decision.config.AppearanceConfig;
import com.fr.plugin.context.PluginContexts;
import com.fr.plugin.third.party.jsdbagdb.CustomisedThemeConstants;
import com.fr.plugin.third.party.jsdbagdb.Utils;
import com.fr.web.struct.Component;
import com.fr.web.struct.Filter;
import com.fr.web.struct.browser.RequestClient;
import com.fr.web.struct.category.ParserType;
import com.fr.web.struct.category.ScriptPath;
import com.fr.web.struct.category.StylePath;
public class MainFilesComponent extends Component {
public static final MainFilesComponent KEY = new MainFilesComponent();
private MainFilesComponent(){}
/**
* 返回需要引入的JS脚本路径
* @param client 请求客户端描述
* @return JS脚本路径
*/
@Override
public ScriptPath script(RequestClient client ) {
//如果不需要就直接返回 ScriptPath.EMPTY
return ScriptPath.build("com/fr/plugin/third/party/jsdbagdb/web/main.js");
}
/**
* 返回需要引入的CSS样式路径
* @param client 请求客户端描述
* @return CSS样式路径
*/
@Override
public StylePath style(RequestClient client ) {
//如果不需要就直接返回 StylePath.EMPTY;
return StylePath.build("com/fr/plugin/third/party/jsdbagdb/web/main.css", ParserType.DYNAMIC);
}
/**
* 通过给定的资源过滤器控制是否加载这个资源
* @return 资源过滤器
*/
@Override
public Filter filter() {
return new Filter(){
@Override
public boolean accept() {
Utils.logFunction();
if (!PluginContexts.currentContext().isAvailable()) {
LogKit.error("定制化主题插件过期");
return false;
}
String loginPageId = AppearanceConfig.getInstance().getThemeId();
return CustomisedThemeConstants.PLUGIN_ID.equals(loginPageId);
}
};
}
}

18
src/main/java/com/fr/plugin/third/party/jsdbagdb/web/WebComponent.java

@ -0,0 +1,18 @@
package com.fr.plugin.third.party.jsdbagdb.web;
import com.fr.web.struct.Component;
import com.fr.web.struct.category.ScriptPath;
public class WebComponent extends Component {
public static final WebComponent KEY = new WebComponent();
private WebComponent() {
}
@Override
public ScriptPath script() {
return ScriptPath.build("com/fr/plugin/third/party/jsdbagdb/web/web.js");
}
}

18
src/main/java/com/fr/plugin/third/party/jsdbagdb/web/WebResource.java

@ -0,0 +1,18 @@
package com.fr.plugin.third.party.jsdbagdb.web;
import com.finebi.foundation.api.web.component.AssembleComponentFactory;
import com.fr.decision.fun.impl.AbstractWebResourceProvider;
import com.fr.web.struct.Atom;
public class WebResource extends AbstractWebResourceProvider {
@Override
public Atom attach() {
return AssembleComponentFactory.getShowComponent();
}
@Override
public Atom client() {
return WebComponent.KEY;
}
}

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/background-img.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/decison-log.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/favorite-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/full-screen-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/menu-button-line.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/msg-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/search-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/search-no-data.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/search1-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/second-level-menu-item-others.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/second-level-menu-item.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/theme-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-others.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

BIN
src/main/resources/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-select-bottom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

67
src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/errorIframe.html

@ -0,0 +1,67 @@
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=${charset}">
<meta name="author" content="FineReport"/>
<meta name="Copyright" content="FineReport"/>
<meta name="description" content="FineReport--Web Reporting Tool"/>
<meta name="keywords" content="FineReport,Web Reporting Tool"/>
<title>${title}</title>
<link rel="stylesheet" type="text/css"
href="${remoteServletURL}?op=resource&resource=/com/fr/web/core/css/error.css">
<style type="text/css">
.tab-content{
background-color: #091c3e !important;
color: #ffffff !important;
}
</style>
</head>
<body style="background-color: #0a1232;">
<div id="wrapper">
<div>
<div>
<div id="header" style="visibility: hidden;">
<img id="header-content"
src="${remoteServletURL}?op=resource&resource=/com/fr/web/images/error/error-with-solution-bg.png">
</div>
<div id="tip">
<div id="tip-oops">Oops!!!</div>
<div id="tip-detail">${errorTip}</div>
</div>
</div>
<div id="detail">
<div id='detail-message'>
<p>${message}</p>
</div>
<div id="exception-tab" class="tab tab-unselected">${exceptionTab}</div>
<div id="solution-tab" class="tab tab-selected">${solutionTab}</div>
<div id="exception" class="tab-content" style="display: none">
<pre>${exception}</pre>
</div>
<div id="solution" class="tab-content" style="display: block">
<pre>${solution}</pre>
</div>
</div>
</div>
</div>
<script type="text/javascript">
document.getElementById("exception-tab").onclick = function(){
document.getElementById("exception-tab").className = "tab tab-selected";
document.getElementById("solution-tab").className = "tab tab-unselected";
document.getElementById("exception").style.display = "block";
document.getElementById("solution").style.display = "none";
};
document.getElementById("solution-tab").onclick = function(){
document.getElementById("exception-tab").className = "tab tab-unselected";
document.getElementById("solution-tab").className = "tab tab-selected";
document.getElementById("exception").style.display = "none";
document.getElementById("solution").style.display = "block";
};
</script>
</body>
</html>

638
src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/main.css

@ -0,0 +1,638 @@
.dec-frame-header {
background-color: #0a1232 !important;
/*border-bottom-color: rgba(255, 255, 255, 0.75);
border-bottom-width: 1px;
border-bottom-style: solid;*/
}
.dec-frame-menu {
background-color: #091C3E !important;
}
.account-down-arrow-font {
color: #006CB5 !important;
}
.account-up-arrow-font {
color: #006CB5 !important;
}
.msg-font .b-font:before {
content: unset !important;
color: unset !important;
}
.msg-font {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/msg-logo.png) center center no-repeat !important;
background-size: 16px 16px !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
.dec-frame-header-message.dec-header-message {
margin-right: 3px !important;
}
.jsdbagdb-favorite-font {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/favorite-logo.png) center center no-repeat !important;
background-size: 16px 16px !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
margin-right: 10px !important;
}
.jsdbagdb-full-screen-font {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/full-screen-logo.png) center center no-repeat !important;
background-size: 18px 18px !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
margin-right: 10px !important;
}
.jsdbagdb-platform-search-font {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/search-logo.png) center center no-repeat !important;
background-size: 16px 16px !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
margin-right: 3px !important;
}
.jsdbagdb-platform-search-button {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/search1-logo.png) center center no-repeat !important;
background-color: #0185FF !important;
background-size: 16px 16px !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
.dec-banner-jsdbagdb {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/banner.png) center center no-repeat !important;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
.dec-banner-platform-title-jsdbagdb {
left: 30px;
color: #FFFFFF !important;
font-weight: 500 !important;
padding-left: unset !important;
}
.dec-header-account-username.dec-frame-text {
color: #FFFFFF !important;
}
.dec-header-account{
margin-left: 10px;
}
.dec-platform-img-jsdbagdb {
left: 16px;
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/decison-log.png) center center no-repeat !important;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
.dec-frame-body {
/*background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/background-img.png) center center no-repeat !important;*/
background-color: #0a1333;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
}
.second-level-menu-items-jsdbagdb {
height: 32px;
margin-top: 15px;
margin-left: 332px;
float: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.menu-item-text-jsdbagdb {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 90px;
height: 100%;
margin-left: 15px;
font-size: 14px;
text-align: center;
color: rgba(255, 255, 255, 0.65);
line-height: 32px;
float: left;
}
.menu-item-text-jsdbagdb.active {
color: white !important;
font-weight: 500 !important;
}
.second-level-menu-item-jsdbagdb-others.active {
color: white !important;
}
.third-level-menu-item-jsdbagdb-others.active {
color: white !important;
}
.menu-item-more-vertical-jsdbagdb.right {
width: 0;
height: 0;
border-left: 6px solid #1371F8;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
z-index: 100;
margin-top: 10px;
margin-left: 185px;
}
.menu-item-more-vertical-jsdbagdb.right-down {
width: 0;
height: 0;
border-top: 6px solid rgba(19, 113, 248, 0.65);
border-left: 6px solid transparent;
border-right: 6px solid transparent;
z-index: 100;
margin-top: 12px;
margin-left: 183px;
}
.menu-item-more-jsdbagdb.up {
width: 0;
height: 0;
border-bottom: 6px solid #1371F8;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
z-index: 100;
margin-left: 100px;
margin-top: 13px;
}
.menu-item-more-vertical-jsdbagdb.left {
width: 0;
height: 0;
border-right: 6px solid #1371F8;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
z-index: 100;
margin-top: 10px;
margin-left: 5px;
}
.menu-item-more-jsdbagdb.down {
width: 0;
height: 0;
border-top: 6px solid rgba(19, 113, 248, 0.65);
border-left: 6px solid transparent;
border-right: 6px solid transparent;
z-index: 100;
margin-left: 105px;
margin-top: 13px;
}
.menu-item-more-vertical-jsdbagdb.down {
width: 0;
height: 0;
border-top: 6px solid rgba(19, 113, 248, 0.65);
border-left: 6px solid transparent;
border-right: 6px solid transparent;
z-index: 100;
margin-top: 13px;
margin-left: 1px;
}
.second-level-menu-item-horizontal-jsdbagdb {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/second-level-menu-item.png) center center no-repeat !important;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
width: 122px;
height: 32px;
float: left;
}
.second-level-menu-item-vertical-jsdbagdb {
height: 32px;
width: 100%;
border-top-style: solid;
border-top-width: 2px;
border-top-color: rgba(255, 255, 255, 0.06);
background-color: #0D2149;
}
.second-level-menu-item-jsdbagdb-others {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/second-level-menu-item-others.png) center center no-repeat !important;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
width: 61px;
height: 32px;
float: left;
font-size: 14px;
text-align: center;
color: rgba(255, 255, 255, 0.65);
line-height: 32px;
font-weight: 900;
}
.third-level-menu-items-jsdbagdb {
height: 32px;
margin-top: 8px;
margin-left: 14px;
float: left;
}
.third-level-menu-item-horizontal-jsdbagdb {
width: 122px;
height: 32px;
float: left;
border-width: 1px;
border-color: #092F68;
border-style: solid;
background-color: #05102B;
}
.third-level-menu-item-jsdbagdb-others {
width: 40px;
height: 32px;
float: left;
color: rgba(255, 255, 255, 0.65);
font-weight: 900;
text-align: center;
border-width: 1px;
border-color: #092F68;
border-style: solid;
background-color: #05102B;
}
.third-level-menu-item-vertical-jsdbagdb {
height: 32px;
width: 100%;
border-top-style: solid;
border-top-width: 2px;
border-top-color: rgba(255, 255, 255, 0.06);
background-color: #0D2149;
}
.third-level-menu-item-jsdbagdb-others-menu-show {
width: 122px;
height: auto;
top: 87px;
right: 10px;
position: absolute;
z-index: 200;
}
.fourth-level-menu-item-vertical-jsdbagdb {
height: 32px;
width: 100%;
border-top-style: solid;
border-top-width: 2px;
border-top-color: rgba(255, 255, 255, 0.06);
background-color: #0D2149;
}
.fifth-level-menu-item-vertical-jsdbagdb {
height: 32px;
width: 100%;
border-top-style: solid;
border-top-width: 2px;
border-top-color: rgba(255, 255, 255, 0.06);
background-color: #0D2149;
}
.sixth-level-menu-item-vertical-jsdbagdb {
height: 32px;
width: 100%;
border-top-style: solid;
border-top-width: 2px;
border-top-color: rgba(255, 255, 255, 0.06);
background-color: #0D2149;
}
.dec-frame-menu .dec-frame-menu-item.active {
color: #FFFFFF !important;
}
.dec-frame-menu .dec-frame-menu-item {
color: #57657D !important;
}
.dec-menu-button.dec-frame-menu-item {
margin-top: 0px !important;
margin-bottom: 0px !important;
height: 80px !important;
}
.dec-common-tabs > .dec-error-masker {
display: none;
}
.dec-common-tabs > .bi-iframe {
background-color: transparent;
}
.jsdbagdb-platform-search-result-no-data-tips-img {
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/search-no-data.png) center center no-repeat !important;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
width: 210px;
height: 88px;
margin-left: 35px;
margin-top: 50px;
}
.jsdbagdb-platform-search-result-no-data-tips-text {
width: 100%;
font-size: 14px;
color: rgba(255, 255, 255, 0.45);
text-align: center;
}
#search-report-key-jsdbagdb {
width: 230px;
height: 100%;
border: none;
outline: none;
padding: 0px;
margin: 0px;
margin-left: 6px;
inset: 0px;
position: absolute;
color: white;
}
.search-report-key-result-item-jsdbagdb {
width: 100%;
margin-top: 12px;
}
.search-report-key-result-item-text-jsdbagdb {
text-align: left;
font-size: 14px;
color: white;
margin-left: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 250px;
}
.search-report-key-result-item-text-jsdbagdb > span {
color: #0084FF !important;
}
.search-report-key-result-item-path-jsdbagdb {
font-size: 12px;
color: rgba(255, 255, 255, 0.75);
margin-left: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 3px;
width: 250px;
}
.dec-constant-account-items-jsdbagdb {
background-color: #05102b !important;
color: white !important;
border-width: 1px !important;
border-color: #092F68 !important;
border-style: solid !important;
}
.dec-account-setting-jsdbagdb {
background-color: #05102b !important;
color: white !important;
border-width: 1px !important;
border-color: #092F68 !important;
border-style: solid !important;
}
.dec-account-setting-jsdbagdb > .bi-message-title {
background-color: #05102b !important;
color: white !important;
border-width: 1px !important;
border-color: #092F68 !important;
border-style: solid !important;
}
/*
#wrapper > .bi-f-h.v-stretch.h-stretch {
top: 48px !important;
}*/
.menu-button-line {
background-color: unset;
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/menu-button-line.png) center center no-repeat !important;
height: 35px !important;
}
.third-level-menu-item-select-bottom {
width: 100%;
height: 5px;
margin-top: 29px;
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-select-bottom.png) center center no-repeat !important;
}
.third-level-menu-item-select-bottom-more {
width: 100%;
height: 5px;
margin-top: 11px;
background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-select-bottom.png) center center no-repeat !important;
}
.fourth-level-menu-item-text-jsdbagdb:hover {
color: #0085FF !important;
font-weight: 500 !important;
}
.fourth-level-menu-item-text-jsdbagdb {
width: 170px !important;
margin-left: 15px;
text-align: left;
}
.third-level-menu-item-vertical-text-jsdbagdb:hover {
color: #0085FF !important;
font-weight: 500 !important;
text-align: left !important;
}
.third-level-menu-item-vertical-text-jsdbagdb {
text-align: left !important;
}
.third-level-menu-item-jsdbagdb-others-img {
width: 24px;
height: 24px;
margin-left: 7px;
margin-top: 4px;
background: url(/webroot/decision/resources?path=/com/fr/plugin/third/party/jsdbagdb/image/third-level-menu-item-others.png) center center no-repeat !important;
background-size: 100% 100% !important;
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor;
}
.jsdbagdb-platform-search-result-content::-webkit-scrollbar-thumb {
background-color: #1371F8;
}
.jsdbagdb-platform-search-result-content::-webkit-scrollbar-thumb:hover {
background-color: #1371F8;
}
.third-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb {
background-color: #1371F8;
}
.third-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb:hover {
background-color: #1371F8;
}
.fourth-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb {
background-color: #1371F8;
}
.fourth-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb:hover {
background-color: #1371F8;
}
.fifth-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb {
background-color: #1371F8;
}
.fifth-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb:hover {
background-color: #1371F8;
}
.sixth-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb {
background-color: #1371F8;
}
.sixth-level-menu-item-jsdbagdb-more-menu-show::-webkit-scrollbar-thumb:hover {
background-color: #1371F8;
}
.close-search-show-jsdbagdb:hover {
color: #0085FF !important;
}
.jsdbagdb-dir-font-1 .b-font:before {
content: "\e76d";
color: inherit;
}
.jsdbagdb-dir-font-2 .b-font:before {
content: "\e89d";
color: inherit;
}
.jsdbagdb-dir-font-3 .b-font:before {
content: "\e88d";
color: inherit;
}
.jsdbagdb-dir-font-4 .b-font:before {
content: "\e629";
color: inherit;
}
.jsdbagdb-dir-font-5 .b-font:before {
content: "\e800";
color: inherit;
}
.jsdbagdb-dir-font-6 .b-font:before {
content: "\e674";
color: inherit;
}
.jsdbagdb-dir-font-7 .b-font:before {
content: "\e853";
color: inherit;
}
.jsdbagdb-dir-font-8 .b-font:before {
content: "\e89b";
color: inherit;
}
.jsdbagdb-dir-font-9 .b-font:before {
content: "\e74c";
color: inherit;
}
.jsdbagdb-dir-font-10 .b-font:before {
content: "\e747";
color: inherit;
}
.jsdbagdb-dir-font-11 .b-font:before {
content: "\e848";
color: inherit;
}
#header-content{
visibility: hidden !important;
}
/*
.dec-common-tabs {
margin-top: 56px;
}*/
/*
.bi-img.display-block.f-s-n.c-e.f-c {
display: none !important;
}
.dec-slider.dec-frame-popover {
display: none !important;
}*/

2182
src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/main.js

File diff suppressed because it is too large Load Diff

92
src/main/resources/com/fr/plugin/third/party/jsdbagdb/web/web.js

@ -0,0 +1,92 @@
!(function () {
debugger;
var a = BI.Utils.doJumpByTemplateId;
BI.Utils.doJumpByTemplateId = function (e, c) {
debugger;
var dec = getDec();
if ((dec != undefined) && (c.name == undefined)) {
console.log('a');
openTab(e, c);
return;
}
a(e, c);
}
function openTab(e, c) {
debugger;
var o = c.templateHelper;
var formData = {};
formData.parameter = c.parameter;
formData.clicked = c.clicked;
formData.linkedWidget = c.linkedWidget;
formData.sourceTemplateName = o.getName();
formData.form = true;
var sourceId = o.getId();
var toId = e;
var hyperlinkUrl = BI.fineServletURL + "/v5/design/report/design/hyperlink?reportId=" + sourceId + "&bi_entry_type=1";
$.ajax({
url: hyperlinkUrl,
data: JSON.stringify({
source: sourceId,
to: toId,
hyperlink: o.getBasePool().fine_hyperlink || "",
reportEntryId: o.getBasePool().reportEntryId || "",
digitalSignature: ""
}),
type: 'POST',
crossDomain: true,
dataType: 'json',
contentType: 'application/json;charset=utf-8',
success: function (data) {
if (data.success && (true == data.success)) {
var openUrl = BI.fineServletURL + "/v5/design/report/" + toId + "/view?form=true&fine_hyperlink=" + data.data;
var dec = getDec();
if (dec == undefined) {
return;
}
$.ajax({
url: openUrl,
data: {
parameter :encodeURIComponent(JSON.stringify(formData.parameter)),
clicked :encodeURIComponent(JSON.stringify(formData.clicked)),
linkedWidget :encodeURIComponent(JSON.stringify(formData.linkedWidget)),
sourceTemplateName :encodeURIComponent(JSON.stringify(formData.sourceTemplateName)),
form :formData.form
},
type: 'POST',
crossDomain: true,
dataType: 'html',
contentType: 'application/x-www-form-urlencoded',
success: function (data) {
debugger;
dec.Utils.jsdbagdbTheme.openIframeTab(data);
}
});
}
}
});
}
function getDec() {
var parentWindow = window.parent;
try {
while (parentWindow !== parentWindow.parent) {
if (parentWindow && parentWindow.Dec) {
return parentWindow.Dec;
} else {
parentWindow = parentWindow.parent;
}
}
if (parentWindow && parentWindow.Dec) {
return parentWindow.Dec;
}
} catch (e) {
}
return undefined;
}
})();
Loading…
Cancel
Save