From 9fbb2c4ed57dbdf9137bbd62f9925e177f940dd3 Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Mon, 18 Feb 2019 18:49:32 +0100 Subject: Increase Test coverage Increase Test coverage over 50 for SDN-R devicemanager Change-Id: I03eb5887d955abdfd4bdefa58c79c7f5356c9401 Issue-ID: SDNC-650 Signed-off-by: Herbert Eiselt --- .../plugins/head/_site/lang/en_strings.js | 177 +++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/_site/lang/en_strings.js (limited to 'sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/_site/lang/en_strings.js') diff --git a/sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/_site/lang/en_strings.js b/sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/_site/lang/en_strings.js new file mode 100644 index 000000000..3679dfbbc --- /dev/null +++ b/sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/_site/lang/en_strings.js @@ -0,0 +1,177 @@ +i18n.setKeys({ + "General.Elasticsearch": "Elasticsearch", + "General.LoadingAggs": "Loading Aggregations...", + "General.Searching": "Searching...", + "General.Search": "Search", + "General.Help": "Help", + "General.HelpGlyph": "?", + "General.CloseGlyph": "X", + "General.RefreshResults": "Refresh", + "General.ManualRefresh": "Manual Refresh", + "General.RefreshQuickly": "Refresh quickly", + "General.Refresh5seconds": "Refresh every 5 seconds", + "General.Refresh1minute": "Refresh every minute", + "AliasForm.AliasName": "Alias Name", + "AliasForm.NewAliasForIndex": "New Alias for {0}", + "AliasForm.DeleteAliasMessage": "type ''{0}'' to delete {1}. There is no undo", + "AnyRequest.DisplayOptions" : "Display Options", + "AnyRequest.AsGraph" : "Graph Results", + "AnyRequest.AsJson" : "Show Raw JSON", + "AnyRequest.AsTable" : "Show Search Results Table", + "AnyRequest.History" : "History", + "AnyRequest.RepeatRequest" : "Repeat Request", + "AnyRequest.RepeatRequestSelect" : "Repeat request every ", + "AnyRequest.Transformer" : "Result Transformer", + "AnyRequest.Pretty": "Pretty", + "AnyRequest.Query" : "Query", + "AnyRequest.Request": "Request", + "AnyRequest.Requesting": "Requesting...", + "AnyRequest.ValidateJSON": "Validate JSON", + "Browser.Title": "Browser", + "Browser.ResultSourcePanelTitle": "Result Source", + "Command.DELETE": "DELETE", + "Command.SHUTDOWN": "SHUTDOWN", + "Command.DeleteAliasMessage": "Delete Alias?", + "ClusterOverView.IndexName": "Index Name", + "ClusterOverview.NumShards": "Number of Shards", + "ClusterOverview.NumReplicas": "Number of Replicas", + "ClusterOverview.NewIndex": "New Index", + "IndexActionsMenu.Title": "Actions", + "IndexActionsMenu.NewAlias": "New Alias...", + "IndexActionsMenu.Refresh": "Refresh", + "IndexActionsMenu.Flush": "Flush", + "IndexActionsMenu.Optimize": "Optimize...", + "IndexActionsMenu.Snapshot": "Gateway Snapshot", + "IndexActionsMenu.Analyser": "Test Analyser", + "IndexActionsMenu.Open": "Open", + "IndexActionsMenu.Close": "Close", + "IndexActionsMenu.Delete": "Delete...", + "IndexInfoMenu.Title": "Info", + "IndexInfoMenu.Status": "Index Status", + "IndexInfoMenu.Metadata": "Index Metadata", + "IndexCommand.TextToAnalyze": "Text to Analyse", + "IndexCommand.ShutdownMessage": "type ''{0}'' to shutdown {1}. Node can NOT be restarted from this interface", + "IndexOverview.PageTitle": "Indices Overview", + "IndexSelector.NameWithDocs": "{0} ({1} docs)", + "IndexSelector.SearchIndexForDocs": "Search {0} for documents where:", + "FilterBrowser.OutputType": "Output Results: {0}", + "FilterBrowser.OutputSize": "Number of Results: {0}", + "Header.ClusterHealth": "cluster health: {0} ({1} of {2})", + "Header.ClusterNotConnected": "cluster health: not connected", + "Header.Connect": "Connect", + "Nav.AnyRequest": "Any Request", + "Nav.Browser": "Browser", + "Nav.ClusterHealth": "Cluster Health", + "Nav.ClusterState": "Cluster State", + "Nav.ClusterNodes": "Nodes Info", + "Nav.Info": "Info", + "Nav.NodeStats": "Nodes Stats", + "Nav.Overview": "Overview", + "Nav.Indices": "Indices", + "Nav.Plugins": "Plugins", + "Nav.Status": "Indices Stats", + "Nav.Templates": "Templates", + "Nav.StructuredQuery": "Structured Query", + "NodeActionsMenu.Title": "Actions", + "NodeActionsMenu.Shutdown": "Shutdown...", + "NodeInfoMenu.Title": "Info", + "NodeInfoMenu.ClusterNodeInfo": "Cluster Node Info", + "NodeInfoMenu.NodeStats": "Node Stats", + "NodeType.Client": "Client Node", + "NodeType.Coord": "Coordinator", + "NodeType.Master": "Master Node", + "NodeType.Tribe": "Tribe Node", + "NodeType.Worker": "Worker Node", + "NodeType.Unassigned": "Unassigned", + "OptimizeForm.OptimizeIndex": "Optimize {0}", + "OptimizeForm.MaxSegments": "Maximum # Of Segments", + "OptimizeForm.ExpungeDeletes": "Only Expunge Deletes", + "OptimizeForm.FlushAfter": "Flush After Optimize", + "OptimizeForm.WaitForMerge": "Wait For Merge", + "Overview.PageTitle" : "Cluster Overview", + "Output.JSON": "JSON", + "Output.Table": "Table", + "Output.CSV": "CSV", + "Output.ShowSource": "Show query source", + "Preference.SortCluster": "Sort Cluster", + "Sort.ByName": "By Name", + "Sort.ByAddress": "By Address", + "Sort.ByType": "By Type", + "Preference.SortIndices": "Sort Indices", + "SortIndices.Descending": "Descending", + "SortIndices.Ascending": "Ascending", + "Preference.ViewAliases": "View Aliases", + "ViewAliases.Grouped": "Grouped", + "ViewAliases.List": "List", + "ViewAliases.None": "None", + "Overview.IndexFilter": "Index Filter", + "TableResults.Summary": "Searched {0} of {1} shards. {2} hits. {3} seconds", + "QueryFilter.AllIndices": "All Indices", + "QueryFilter.AnyValue": "any", + "QueryFilter-Header-Indices": "Indices", + "QueryFilter-Header-Types": "Types", + "QueryFilter-Header-Fields": "Fields", + "QueryFilter.DateRangeHint.from": "From : {0}", + "QueryFilter.DateRangeHint.to": " To : {0}", + "Query.FailAndUndo": "Query Failed. Undoing last changes", + "StructuredQuery.ShowRawJson": "Show Raw JSON" +}); + +i18n.setKeys({ + "AnyRequest.TransformerHelp" : "\ +

The Result Transformer can be used to post process the raw json results from a request into a more useful format.

\ +

The transformer should contain the body of a javascript function. The return value from the function becomes the new value passed to the json printer

\ +

Example:
\ + return root.hits.hits[0]; would traverse a result set to show just the first match
\ + return Object.keys(root.nodes).reduce(function(tot, node) { return tot + root.nodes[node].os.mem.used_in_bytes; }, 0); would return the total memory used across an entire cluster

\ +

The following functions are available and can be useful processing arrays and objects
\ +

\ +

When Repeat Request is running, an extra parameter called prev is passed to the transformation function. This allows comparisons, and cumulative graphing

\ +

Example:
\ + var la = [ root.nodes[Object.keys(root.nodes)[0]].os.load_average[0] ]; return prev ? la.concat(prev) : la; would return the load average on the first cluster node over the last minute\ + This could be fed into the Graph to produce a load graph for the node\ + " +}); + +i18n.setKeys({ + "AnyRequest.DisplayOptionsHelp" : "\ +

Raw Json: shows complete results of the query and transformation in raw JSON format

\ +

Graph Results: To produce a graph of your results, use the result transformer to produce an array of values

\ +

Search Results Table: If your query is a search, you can display the results of the search in a table.

\ + " +}); + +i18n.setKeys({ + "QueryFilter.DateRangeHelp" : "\ +

Date fields accept a natural language query to produce a From and To date that form a range that the results are queried over.

\ +

The following formats are supported:

\ + \ + " +}); -- cgit 1.2.3-korg