浏览代码

Merge pull request #11664 from kunalaswani/HPCC-19866new

HPCC-19866 Log Visualization displays wrong information if not installed

Reviewed-By: Gordon Smith <gordon.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 年之前
父节点
当前提交
6fe6f10e78
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 6 2
      esp/src/eclwatch/HPCCPlatformOpsWidget.js
  2. 2 0
      esp/src/eclwatch/nls/hpcc.js

+ 6 - 2
esp/src/eclwatch/HPCCPlatformOpsWidget.js

@@ -77,17 +77,21 @@ define([
                             style: "border: 0; width: 100%; height: 100%"
                         }));
                     } else if (currSel.id === this.id + "_LogVisualization") {
+                        var context = this;
                         WsELK.GetConfigDetails({
                             request: {}
                         }).then(function (response) {
-                            if (lang.exists("GetConfigDetailsResponse", response)) {
+                            if (lang.exists("GetConfigDetailsResponse.IntegrateKibana", response) && response.GetConfigDetailsResponse.IntegrateKibana === true) {
                                 var elk = response.GetConfigDetailsResponse;
                                 currSel.set("content", dojo.create("iframe", {
                                     src: dojoConfig.urlInfo.pathname + "?Widget=IFrameWidget&src=" + encodeURIComponent(elk.KibanaAddress + ":" + elk.KibanaPort + elk.KibanaEntryPointURI),
                                     style: "border: 0; width: 100%; height: 100%"
                                 }));
                             } else {
-                                //load LogVisualizationWidget and show status there
+                                currSel.set("content", dojo.create ("div",{
+                                    innerHTML: "<p>" + context.i18n.LogVisualizationUnconfigured + "</p> <br> <a href = 'https://hpccsystems.com/blog/ELK_visualizations'>" + context.i18n.LearnMore + "</a>",
+                                    style: "margin: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: medium; color: #c91312"
+                                }));
                             }
                         });
                     } else if (currSel.init) {

+ 2 - 0
esp/src/eclwatch/nls/hpcc.js

@@ -334,6 +334,7 @@ define({root:
     LastNHours: "Last N Hours",
     LastNRows: "Last N Rows",
     LastRun: "Last Run",
+    LearnMore: "Learn More",
     LegacyForm: "Legacy Form",
     Legend: "Legend",
     LDAPWarning: "<b>LDAP Services Error:</b>  &lsquo;Too Many Users&rsquo; - Please use a Filter.",
@@ -366,6 +367,7 @@ define({root:
     Logout: "Log Out",
     Logs: "Logs",
     LogVisualization: "Log Visualization",
+    LogVisualizationUnconfigured: "Log Visualization is not configured, please check your confriguration manager settings.",
     log_analysis_1: "log_analysis_1*",
     LostFile: "Lost Files",
     LostFile2: "Lost Files",