@oneuptime/common 14.0.93 → 14.0.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/Models/DatabaseModels/Alert.d.mts +2 -0
  2. package/Models/DatabaseModels/Alert.d.ts +2 -0
  3. package/Models/DatabaseModels/Alert.js +54 -0
  4. package/Models/DatabaseModels/CloudAccount.d.mts +29 -0
  5. package/Models/DatabaseModels/CloudAccount.d.ts +29 -0
  6. package/Models/DatabaseModels/CloudAccount.js +546 -0
  7. package/Models/DatabaseModels/CloudAccount.mjs +2 -0
  8. package/Models/DatabaseModels/CloudResource.d.mts +8 -0
  9. package/Models/DatabaseModels/CloudResource.d.ts +8 -0
  10. package/Models/DatabaseModels/CloudResource.js +169 -0
  11. package/Models/DatabaseModels/CloudResourceLabelRule.d.mts +1 -0
  12. package/Models/DatabaseModels/CloudResourceLabelRule.d.ts +1 -0
  13. package/Models/DatabaseModels/CloudResourceLabelRule.js +40 -0
  14. package/Models/DatabaseModels/CloudResourceOwnerRule.d.mts +1 -0
  15. package/Models/DatabaseModels/CloudResourceOwnerRule.d.ts +1 -0
  16. package/Models/DatabaseModels/CloudResourceOwnerRule.js +40 -0
  17. package/Models/DatabaseModels/Incident.d.mts +2 -0
  18. package/Models/DatabaseModels/Incident.d.ts +2 -0
  19. package/Models/DatabaseModels/Incident.js +54 -0
  20. package/Models/DatabaseModels/Index.js +2 -0
  21. package/Models/DatabaseModels/Monitor.d.mts +2 -0
  22. package/Models/DatabaseModels/Monitor.d.ts +2 -0
  23. package/Models/DatabaseModels/Monitor.js +54 -0
  24. package/Models/DatabaseModels/OpenSourceDeployment.d.mts +1 -0
  25. package/Models/DatabaseModels/OpenSourceDeployment.d.ts +1 -0
  26. package/Models/DatabaseModels/OpenSourceDeployment.js +25 -6
  27. package/Models/DatabaseModels/ScheduledMaintenance.d.mts +1 -0
  28. package/Models/DatabaseModels/ScheduledMaintenance.d.ts +1 -0
  29. package/Models/DatabaseModels/ScheduledMaintenance.js +50 -0
  30. package/Types/AI/AiAffectedResources.d.mts +40 -0
  31. package/Types/AI/AiAffectedResources.d.ts +40 -0
  32. package/Types/AI/AiAffectedResources.js +292 -0
  33. package/Types/AI/AiAffectedResources.mjs +10 -0
  34. package/Types/Cloud/CloudAccountSummary.d.mts +25 -0
  35. package/Types/Cloud/CloudAccountSummary.d.ts +25 -0
  36. package/Types/Cloud/CloudAccountSummary.js +114 -0
  37. package/Types/Cloud/CloudAccountSummary.mjs +5 -0
  38. package/Types/Cloud/CloudEndpointMatch.d.mts +26 -0
  39. package/Types/Cloud/CloudEndpointMatch.d.ts +26 -0
  40. package/Types/Cloud/CloudEndpointMatch.js +134 -0
  41. package/Types/Cloud/CloudEndpointMatch.mjs +5 -0
  42. package/Types/Cloud/CloudInventory.d.mts +34 -0
  43. package/Types/Cloud/CloudInventory.d.ts +34 -0
  44. package/Types/Cloud/CloudInventory.js +362 -0
  45. package/Types/Cloud/CloudInventory.mjs +22 -0
  46. package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
  47. package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
  48. package/Types/Cloud/CloudResourceCatalog.js +29 -1
  49. package/Types/Cloud/CloudResourceCatalog.mjs +2 -0
  50. package/Types/Cloud/CloudResourceIndex.d.mts +44 -0
  51. package/Types/Cloud/CloudResourceIndex.d.ts +44 -0
  52. package/Types/Cloud/CloudResourceIndex.js +191 -0
  53. package/Types/Cloud/CloudResourceIndex.mjs +4 -0
  54. package/Types/CloudConnection/CloudConnectionCatalog.d.mts +3 -0
  55. package/Types/CloudConnection/CloudConnectionCatalog.d.ts +3 -0
  56. package/Types/CloudConnection/CloudConnectionCatalog.js +70 -12
  57. package/Types/CloudConnection/CloudConnectionCatalog.mjs +2 -0
  58. package/Types/CloudConnection/CloudConnectionPaste.js +7 -1
  59. package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +43 -3
  60. package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +43 -3
  61. package/Types/CloudConnection/CloudConnectionSetupCommands.js +280 -30
  62. package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +14 -0
  63. package/Types/CloudConnection/CloudConnectionTest.d.mts +1 -0
  64. package/Types/CloudConnection/CloudConnectionTest.d.ts +1 -0
  65. package/Types/CloudConnection/CloudConnectionTest.js +1 -0
  66. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.mts +19 -0
  67. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.d.ts +19 -0
  68. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +27 -1
  69. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.mjs +3 -0
  70. package/Types/Date.d.mts +1 -0
  71. package/Types/Date.d.ts +1 -0
  72. package/Types/Date.js +32 -6
  73. package/Types/DateLanguage.d.mts +2 -0
  74. package/Types/DateLanguage.d.ts +2 -0
  75. package/Types/DateLanguage.js +67 -12
  76. package/Types/DateLanguage.mjs +2 -0
  77. package/Types/Domain.d.mts +2 -0
  78. package/Types/Domain.d.ts +2 -0
  79. package/Types/Domain.js +27 -0
  80. package/Types/Email/EmailTemplateType.d.mts +1 -0
  81. package/Types/Email/EmailTemplateType.d.ts +1 -0
  82. package/Types/Email/EmailTemplateType.js +1 -0
  83. package/Types/Email.d.mts +1 -0
  84. package/Types/Email.d.ts +1 -0
  85. package/Types/Email.js +16 -0
  86. package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.mts +4 -0
  87. package/Types/Monitor/ExternalStatusPageMonitor/ExternalStatusPageMonitorResponse.d.ts +4 -0
  88. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.mts +3 -0
  89. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.d.ts +3 -0
  90. package/Types/Monitor/MonitorStepExternalStatusPageMonitor.js +35 -0
  91. package/Types/Monitor/MonitorTemplateSyncField.js +6 -1
  92. package/Types/Monitor/UptimeBarTooltipMaintenance.d.mts +15 -0
  93. package/Types/Monitor/UptimeBarTooltipMaintenance.d.ts +15 -0
  94. package/Types/Monitor/UptimeBarTooltipMaintenance.js +2 -0
  95. package/Types/Monitor/UptimeBarTooltipMaintenance.mjs +1 -0
  96. package/Types/Monitor/UptimeHistoryLabels.d.mts +5 -0
  97. package/Types/Monitor/UptimeHistoryLabels.d.ts +5 -0
  98. package/Types/Monitor/UptimeHistoryLabels.js +5 -0
  99. package/Types/ReadingDirection.d.mts +10 -0
  100. package/Types/ReadingDirection.d.ts +10 -0
  101. package/Types/ReadingDirection.js +171 -0
  102. package/Types/ReadingDirection.mjs +10 -0
  103. package/Types/Rules/RuleCriteriaFieldRegistry.js +2 -0
  104. package/Types/Runbook/HttpStepVariables.d.mts +8 -0
  105. package/Types/Runbook/HttpStepVariables.d.ts +8 -0
  106. package/Types/Runbook/HttpStepVariables.js +109 -0
  107. package/Types/Runbook/HttpStepVariables.mjs +5 -0
  108. package/Types/Runbook/RunbookStep.d.mts +1 -0
  109. package/Types/Runbook/RunbookStep.d.ts +1 -0
  110. package/Types/Runbook/RunnerFeatures.d.mts +1 -0
  111. package/Types/Runbook/RunnerFeatures.d.ts +1 -0
  112. package/Types/Runbook/RunnerFeatures.js +15 -3
  113. package/Types/Runbook/RunnerFeatures.mjs +1 -0
  114. package/Types/Runbook/SshHostKey.d.mts +22 -0
  115. package/Types/Runbook/SshHostKey.d.ts +22 -0
  116. package/Types/Runbook/SshHostKey.js +201 -0
  117. package/Types/Runbook/SshHostKey.mjs +10 -0
  118. package/Types/Runner/CodeRepositoryRunner.js +2 -3
  119. package/Types/Runner/GlobalAIAgentsGone.d.mts +1 -0
  120. package/Types/Runner/GlobalAIAgentsGone.d.ts +1 -0
  121. package/Types/Runner/GlobalAIAgentsGone.js +19 -0
  122. package/Types/Runner/GlobalAIAgentsGone.mjs +2 -0
  123. package/Types/Runner/GlobalRunnerWork.d.mts +1 -0
  124. package/Types/Runner/GlobalRunnerWork.d.ts +1 -0
  125. package/Types/Runner/GlobalRunnerWork.js +21 -1
  126. package/Types/Runner/GlobalRunnerWork.mjs +1 -0
  127. package/Types/SSO/SignInMethods.d.mts +31 -0
  128. package/Types/SSO/SignInMethods.d.ts +31 -0
  129. package/Types/SSO/SignInMethods.js +160 -0
  130. package/Types/SSO/SignInMethods.mjs +8 -0
  131. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.mts +24 -0
  132. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.d.ts +24 -0
  133. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.js +159 -0
  134. package/Types/ScheduledMaintenance/ScheduledMaintenancePublication.mjs +8 -0
  135. package/Types/StatusPage/StatusPageLanguage.d.mts +6 -0
  136. package/Types/StatusPage/StatusPageLanguage.d.ts +6 -0
  137. package/Types/StatusPage/StatusPageLanguage.js +17 -1
  138. package/Types/StatusPage/StatusPageLanguage.mjs +1 -0
  139. package/Types/Workflow/WorkflowPlan.d.mts +7 -0
  140. package/Types/Workflow/WorkflowPlan.d.ts +7 -0
  141. package/Types/Workflow/WorkflowPlan.js +39 -0
  142. package/Types/Workflow/WorkflowPlan.mjs +3 -0
  143. package/Types/Workspace/WorkspaceMessagePayload.d.mts +11 -0
  144. package/Types/Workspace/WorkspaceMessagePayload.d.ts +11 -0
  145. package/Utils/Dashboard/TableThresholds.d.mts +44 -0
  146. package/Utils/Dashboard/TableThresholds.d.ts +44 -0
  147. package/Utils/Dashboard/TableThresholds.js +288 -0
  148. package/Utils/Dashboard/TableThresholds.mjs +17 -0
  149. package/Utils/Dashboard/ValueWidgetSeries.d.mts +6 -0
  150. package/Utils/Dashboard/ValueWidgetSeries.d.ts +6 -0
  151. package/Utils/Dashboard/ValueWidgetSeries.js +70 -1
  152. package/Utils/Dashboard/ValueWidgetSeries.mjs +2 -0
  153. package/Utils/DeveloperDocs/ResourceProfiles.js +16 -0
  154. package/Utils/DeveloperDocs/TerraformSchema.d.mts +1 -0
  155. package/Utils/DeveloperDocs/TerraformSchema.d.ts +1 -0
  156. package/Utils/DeveloperDocs/TerraformSchema.js +17 -0
  157. package/Utils/DeveloperDocs/TerraformSchema.mjs +1 -0
  158. package/Utils/Monitor/ExternalStatusPageComponentNames.d.mts +17 -0
  159. package/Utils/Monitor/ExternalStatusPageComponentNames.d.ts +17 -0
  160. package/Utils/Monitor/ExternalStatusPageComponentNames.js +274 -0
  161. package/Utils/Monitor/ExternalStatusPageComponentNames.mjs +6 -0
  162. package/Utils/Monitor/ExternalStatusPageReading.d.mts +35 -0
  163. package/Utils/Monitor/ExternalStatusPageReading.d.ts +35 -0
  164. package/Utils/Monitor/ExternalStatusPageReading.js +380 -0
  165. package/Utils/Monitor/ExternalStatusPageReading.mjs +6 -0
  166. package/Utils/Monitor/ExternalStatusPageScope.d.mts +43 -0
  167. package/Utils/Monitor/ExternalStatusPageScope.d.ts +43 -0
  168. package/Utils/Monitor/ExternalStatusPageScope.js +213 -0
  169. package/Utils/Monitor/ExternalStatusPageScope.mjs +4 -0
  170. package/Utils/Runbook/SshHostKeyFingerprint.d.mts +8 -0
  171. package/Utils/Runbook/SshHostKeyFingerprint.d.ts +8 -0
  172. package/Utils/Runbook/SshHostKeyFingerprint.js +83 -0
  173. package/Utils/Runbook/SshHostKeyFingerprint.mjs +5 -0
  174. package/Utils/ScheduledMaintenanceStart.d.mts +6 -0
  175. package/Utils/ScheduledMaintenanceStart.d.ts +6 -0
  176. package/Utils/ScheduledMaintenanceStart.js +15 -0
  177. package/Utils/StatusPage/HistoryChartBarColors.d.mts +2 -0
  178. package/Utils/StatusPage/HistoryChartBarColors.d.ts +2 -0
  179. package/Utils/StatusPage/HistoryChartBarColors.js +12 -1
  180. package/Utils/StatusPage/HistoryChartBarColors.mjs +2 -0
  181. package/Utils/Telemetry/ChangeEventFields.d.mts +19 -1
  182. package/Utils/Telemetry/ChangeEventFields.d.ts +19 -1
  183. package/Utils/Telemetry/ChangeEventFields.js +52 -1
  184. package/Utils/Uptime/DayUptimeGraphUtil.d.mts +6 -0
  185. package/Utils/Uptime/DayUptimeGraphUtil.d.ts +6 -0
  186. package/Utils/Uptime/DayUptimeGraphUtil.js +37 -6
  187. package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +60 -0
  188. package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +60 -0
  189. package/Utils/Uptime/UptimeMaintenanceUtil.js +295 -0
  190. package/Utils/Uptime/UptimeMaintenanceUtil.mjs +3 -0
  191. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { PlanType } from "../Billing/SubscriptionPlan.mjs";
1
2
  declare enum WorkflowPlan {
2
3
  "Free" = 0,
3
4
  "Enterprise" = 9999999,
@@ -5,3 +6,9 @@ declare enum WorkflowPlan {
5
6
  "Scale" = 2000
6
7
  }
7
8
  export default WorkflowPlan;
9
+ export declare const LOWEST_PLAN_THAT_RUNS_WORKFLOWS: PlanType;
10
+ export declare function doesPlanRunWorkflows(plan: PlanType | string | null | undefined): boolean;
11
+ export declare function getWorkflowPlanRefusalMessage(data: {
12
+ plan: PlanType | string;
13
+ runsInLast30Days: number;
14
+ }): string;
@@ -1,3 +1,4 @@
1
+ import { PlanType } from "../Billing/SubscriptionPlan";
1
2
  declare enum WorkflowPlan {
2
3
  "Free" = 0,
3
4
  "Enterprise" = 9999999,
@@ -5,3 +6,9 @@ declare enum WorkflowPlan {
5
6
  "Scale" = 2000
6
7
  }
7
8
  export default WorkflowPlan;
9
+ export declare const LOWEST_PLAN_THAT_RUNS_WORKFLOWS: PlanType;
10
+ export declare function doesPlanRunWorkflows(plan: PlanType | string | null | undefined): boolean;
11
+ export declare function getWorkflowPlanRefusalMessage(data: {
12
+ plan: PlanType | string;
13
+ runsInLast30Days: number;
14
+ }): string;
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOWEST_PLAN_THAT_RUNS_WORKFLOWS = void 0;
4
+ exports.doesPlanRunWorkflows = doesPlanRunWorkflows;
5
+ exports.getWorkflowPlanRefusalMessage = getWorkflowPlanRefusalMessage;
6
+ const SubscriptionPlan_1 = require("../Billing/SubscriptionPlan");
7
+ // How many workflow runs a project of each plan may have in 30 days.
3
8
  var WorkflowPlan;
4
9
  (function (WorkflowPlan) {
5
10
  WorkflowPlan[WorkflowPlan["Free"] = 0] = "Free";
@@ -8,3 +13,37 @@ var WorkflowPlan;
8
13
  WorkflowPlan[WorkflowPlan["Scale"] = 2000] = "Scale";
9
14
  })(WorkflowPlan || (WorkflowPlan = {}));
10
15
  exports.default = WorkflowPlan;
16
+ /*
17
+ * The lowest plan whose projects run workflows: what a project on a plan
18
+ * that runs none is told to upgrade to.
19
+ */
20
+ exports.LOWEST_PLAN_THAT_RUNS_WORKFLOWS = SubscriptionPlan_1.PlanType.Growth;
21
+ /*
22
+ * Whether a project on this plan runs any workflow at all. A plan of 0 runs
23
+ * (Free) refuses every run, however it is started, so a workflow built there
24
+ * never does anything until the plan changes. An unknown plan - billing off,
25
+ * as on every self-hosted install, or a plan the server does not describe -
26
+ * runs them: the server has the last word.
27
+ */
28
+ function doesPlanRunWorkflows(plan) {
29
+ if (!plan) {
30
+ return true;
31
+ }
32
+ const runs = WorkflowPlan[plan];
33
+ if (typeof runs !== "number") {
34
+ return true;
35
+ }
36
+ return runs > 0;
37
+ }
38
+ /*
39
+ * What a run refused for its plan's runs says, in the run's log: a plan
40
+ * that runs none says so, and which plan does; a plan whose runs are used
41
+ * up says how many it allows.
42
+ */
43
+ function getWorkflowPlanRefusalMessage(data) {
44
+ if (!doesPlanRunWorkflows(data.plan)) {
45
+ return `Workflows do not run on the ${data.plan} plan. Upgrade to the ${exports.LOWEST_PLAN_THAT_RUNS_WORKFLOWS} plan or above to run them.`;
46
+ }
47
+ const runs = WorkflowPlan[data.plan];
48
+ return `Workflow cannot run because it already ran ${data.runsInLast30Days} in the last 30 days. Your current plan limit is ${runs}`;
49
+ }
@@ -1,2 +1,5 @@
1
1
  import commonJsModule from "./WorkflowPlan.js";
2
2
  export default commonJsModule.default;
3
+ export const LOWEST_PLAN_THAT_RUNS_WORKFLOWS = commonJsModule.LOWEST_PLAN_THAT_RUNS_WORKFLOWS;
4
+ export const doesPlanRunWorkflows = commonJsModule.doesPlanRunWorkflows;
5
+ export const getWorkflowPlanRefusalMessage = commonJsModule.getWorkflowPlanRefusalMessage;
@@ -110,6 +110,17 @@ export interface WorkspaceModalBlock extends WorkspaceMessageBlock {
110
110
  export interface WorkspacePayloadMarkdown extends WorkspaceMessageBlock {
111
111
  _type: "WorkspacePayloadMarkdown";
112
112
  text: string;
113
+ menu?: WorkspacePayloadMenu | undefined;
114
+ }
115
+ export interface WorkspacePayloadMenu {
116
+ actionId: string;
117
+ placeholder: string;
118
+ options: Array<WorkspacePayloadMenuOption>;
119
+ blockId?: string | undefined;
120
+ }
121
+ export interface WorkspacePayloadMenuOption {
122
+ label: string;
123
+ value: string;
113
124
  }
114
125
  export interface WorkspacePayloadContext extends WorkspaceMessageBlock {
115
126
  _type: "WorkspacePayloadContext";
@@ -110,6 +110,17 @@ export interface WorkspaceModalBlock extends WorkspaceMessageBlock {
110
110
  export interface WorkspacePayloadMarkdown extends WorkspaceMessageBlock {
111
111
  _type: "WorkspacePayloadMarkdown";
112
112
  text: string;
113
+ menu?: WorkspacePayloadMenu | undefined;
114
+ }
115
+ export interface WorkspacePayloadMenu {
116
+ actionId: string;
117
+ placeholder: string;
118
+ options: Array<WorkspacePayloadMenuOption>;
119
+ blockId?: string | undefined;
120
+ }
121
+ export interface WorkspacePayloadMenuOption {
122
+ label: string;
123
+ value: string;
113
124
  }
114
125
  export interface WorkspacePayloadContext extends WorkspaceMessageBlock {
115
126
  _type: "WorkspacePayloadContext";
@@ -0,0 +1,44 @@
1
+ import { TableColumnThresholds, TableThresholdDirection, TableThresholdLevel, TableThresholdStyle } from "../../Types/Dashboard/DashboardComponents/DashboardTableComponent.mjs";
2
+ export declare const TABLE_THRESHOLD_PERCENT_PRESET: Readonly<{
3
+ warning: number;
4
+ critical: number;
5
+ }>;
6
+ export declare const TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET: Readonly<{
7
+ warning: number;
8
+ critical: number;
9
+ }>;
10
+ export declare const readTableThresholdNumber: (value: unknown) => number | undefined;
11
+ export declare const readTableThresholdDirection: (value: unknown) => TableThresholdDirection;
12
+ export declare const readTableColumnThresholds: (value: unknown) => TableColumnThresholds | null;
13
+ export declare const readTableThresholdStyle: (value: unknown) => TableThresholdStyle;
14
+ export declare const getTableThresholdLevel: (data: {
15
+ value: number | null | undefined;
16
+ thresholds: TableColumnThresholds | null | undefined;
17
+ }) => TableThresholdLevel | null;
18
+ export declare const isTableThresholdOrderReversed: (thresholds: TableColumnThresholds | null | undefined) => boolean;
19
+ export interface TableColumnDisplay {
20
+ unit: string | undefined;
21
+ factor: number;
22
+ }
23
+ export declare const getTableColumnDisplay: (data: {
24
+ columnUnit?: string | undefined;
25
+ metricUnit?: string | undefined;
26
+ metricName?: string | undefined;
27
+ }) => TableColumnDisplay;
28
+ export declare const isTableColumnPercent: (display: TableColumnDisplay) => boolean;
29
+ export declare const getTableThresholdPreset: (display: TableColumnDisplay, direction?: TableThresholdDirection | undefined) => TableColumnThresholds;
30
+ export declare const isTableThresholdPreset: (data: {
31
+ thresholds: TableColumnThresholds | null | undefined;
32
+ display: TableColumnDisplay;
33
+ }) => boolean;
34
+ export declare const joinTableValueAndUnit: (formatted: string, unit: string | undefined) => string;
35
+ export declare const roundTableValue: (value: number, decimals: number) => number;
36
+ export declare const formatTableValue: (data: {
37
+ value: number;
38
+ decimals: number;
39
+ unit: string | undefined;
40
+ }) => string;
41
+ export declare const formatTableThreshold: (data: {
42
+ threshold: number;
43
+ unit: string | undefined;
44
+ }) => string;
@@ -0,0 +1,44 @@
1
+ import { TableColumnThresholds, TableThresholdDirection, TableThresholdLevel, TableThresholdStyle } from "../../Types/Dashboard/DashboardComponents/DashboardTableComponent";
2
+ export declare const TABLE_THRESHOLD_PERCENT_PRESET: Readonly<{
3
+ warning: number;
4
+ critical: number;
5
+ }>;
6
+ export declare const TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET: Readonly<{
7
+ warning: number;
8
+ critical: number;
9
+ }>;
10
+ export declare const readTableThresholdNumber: (value: unknown) => number | undefined;
11
+ export declare const readTableThresholdDirection: (value: unknown) => TableThresholdDirection;
12
+ export declare const readTableColumnThresholds: (value: unknown) => TableColumnThresholds | null;
13
+ export declare const readTableThresholdStyle: (value: unknown) => TableThresholdStyle;
14
+ export declare const getTableThresholdLevel: (data: {
15
+ value: number | null | undefined;
16
+ thresholds: TableColumnThresholds | null | undefined;
17
+ }) => TableThresholdLevel | null;
18
+ export declare const isTableThresholdOrderReversed: (thresholds: TableColumnThresholds | null | undefined) => boolean;
19
+ export interface TableColumnDisplay {
20
+ unit: string | undefined;
21
+ factor: number;
22
+ }
23
+ export declare const getTableColumnDisplay: (data: {
24
+ columnUnit?: string | undefined;
25
+ metricUnit?: string | undefined;
26
+ metricName?: string | undefined;
27
+ }) => TableColumnDisplay;
28
+ export declare const isTableColumnPercent: (display: TableColumnDisplay) => boolean;
29
+ export declare const getTableThresholdPreset: (display: TableColumnDisplay, direction?: TableThresholdDirection | undefined) => TableColumnThresholds;
30
+ export declare const isTableThresholdPreset: (data: {
31
+ thresholds: TableColumnThresholds | null | undefined;
32
+ display: TableColumnDisplay;
33
+ }) => boolean;
34
+ export declare const joinTableValueAndUnit: (formatted: string, unit: string | undefined) => string;
35
+ export declare const roundTableValue: (value: number, decimals: number) => number;
36
+ export declare const formatTableValue: (data: {
37
+ value: number;
38
+ decimals: number;
39
+ unit: string | undefined;
40
+ }) => string;
41
+ export declare const formatTableThreshold: (data: {
42
+ threshold: number;
43
+ unit: string | undefined;
44
+ }) => string;
@@ -0,0 +1,288 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.formatTableThreshold = exports.formatTableValue = exports.roundTableValue = exports.joinTableValueAndUnit = exports.isTableThresholdPreset = exports.getTableThresholdPreset = exports.isTableColumnPercent = exports.getTableColumnDisplay = exports.isTableThresholdOrderReversed = exports.getTableThresholdLevel = exports.readTableThresholdStyle = exports.readTableColumnThresholds = exports.readTableThresholdDirection = exports.readTableThresholdNumber = exports.TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET = exports.TABLE_THRESHOLD_PERCENT_PRESET = void 0;
7
+ const DashboardTableComponent_1 = require("../../Types/Dashboard/DashboardComponents/DashboardTableComponent");
8
+ const ValueFormatter_1 = __importDefault(require("../ValueFormatter"));
9
+ /*
10
+ * A metric table's threshold colors (issue #5231): each value column may
11
+ * have a warning and a critical threshold, and a value at or past one is
12
+ * drawn amber or red. React-free, so the widget, its settings and the tests
13
+ * all read one copy of the rules:
14
+ *
15
+ * - What is stored is read leniently (readTableColumnThresholds): a
16
+ * dashboard's config is JSON that the API, Terraform or a hand edit
17
+ * may have written, so "80" is 80, and a threshold that is not a number
18
+ * is no threshold.
19
+ * - A value is compared as the cell shows it (getTableColumnDisplay,
20
+ * roundTableValue): a usage metric OpenTelemetry sends as a fraction
21
+ * of 1 - system.cpu.utilization at 0.93 - shows as 93% and is compared
22
+ * against 93, rounded to the column's decimals, so thresholds are typed
23
+ * as the table reads and a cell that says 80% is at a warning of 80.
24
+ * - A threshold is reached AT its value, as the Value and Gauge widgets'
25
+ * are: 90 is critical for "critical at 90", and 80 is a warning for
26
+ * "warning at 80". Lower-is-worse columns reach theirs at or below.
27
+ * - A value that is missing is never colored: the cell says "-".
28
+ */
29
+ // The thresholds a percent column starts with when they are turned on.
30
+ exports.TABLE_THRESHOLD_PERCENT_PRESET = {
31
+ warning: 80,
32
+ critical: 90,
33
+ };
34
+ /*
35
+ * The same column's when lower is worse: free disk space or memory, the
36
+ * mirror of 80 and 90 in use. Picking Lower is worse on a percent column
37
+ * whose thresholds are still the preset moves them here, so the pick never
38
+ * leaves critical on the wrong side of warning.
39
+ */
40
+ exports.TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET = {
41
+ warning: 20,
42
+ critical: 10,
43
+ };
44
+ /*
45
+ * A stored threshold as a number: a finite number, or text that is one
46
+ * (" 90.5 "). Anything else - empty text, a word, NaN, Infinity - is no
47
+ * threshold at all.
48
+ */
49
+ const readTableThresholdNumber = (value) => {
50
+ if (typeof value === "number") {
51
+ return Number.isFinite(value) ? value : undefined;
52
+ }
53
+ if (typeof value === "string") {
54
+ const trimmed = value.trim();
55
+ if (trimmed === "") {
56
+ return undefined;
57
+ }
58
+ const parsed = Number(trimmed);
59
+ return Number.isFinite(parsed) ? parsed : undefined;
60
+ }
61
+ return undefined;
62
+ };
63
+ exports.readTableThresholdNumber = readTableThresholdNumber;
64
+ // A stored direction: lower is worse only when it says so.
65
+ const readTableThresholdDirection = (value) => {
66
+ return value === DashboardTableComponent_1.TableThresholdDirection.LowerIsWorse
67
+ ? DashboardTableComponent_1.TableThresholdDirection.LowerIsWorse
68
+ : DashboardTableComponent_1.TableThresholdDirection.HigherIsWorse;
69
+ };
70
+ exports.readTableThresholdDirection = readTableThresholdDirection;
71
+ /*
72
+ * A column's stored thresholds, or null when it has none in force: not an
73
+ * object, or neither threshold a number. The direction is always set on
74
+ * what comes back.
75
+ */
76
+ const readTableColumnThresholds = (value) => {
77
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
78
+ return null;
79
+ }
80
+ const stored = value;
81
+ const warning = (0, exports.readTableThresholdNumber)(stored["warning"]);
82
+ const critical = (0, exports.readTableThresholdNumber)(stored["critical"]);
83
+ if (warning === undefined && critical === undefined) {
84
+ return null;
85
+ }
86
+ const thresholds = {
87
+ direction: (0, exports.readTableThresholdDirection)(stored["direction"]),
88
+ };
89
+ if (warning !== undefined) {
90
+ thresholds.warning = warning;
91
+ }
92
+ if (critical !== undefined) {
93
+ thresholds.critical = critical;
94
+ }
95
+ return thresholds;
96
+ };
97
+ exports.readTableColumnThresholds = readTableColumnThresholds;
98
+ // How the table colors a value past a threshold: its number, unless it says the cell.
99
+ const readTableThresholdStyle = (value) => {
100
+ return value === DashboardTableComponent_1.TableThresholdStyle.Background
101
+ ? DashboardTableComponent_1.TableThresholdStyle.Background
102
+ : DashboardTableComponent_1.TableThresholdStyle.Text;
103
+ };
104
+ exports.readTableThresholdStyle = readTableThresholdStyle;
105
+ /*
106
+ * Whether `value` has reached `threshold`, the way the column's values go
107
+ * bad: at or above it when higher is worse, at or below it when lower is.
108
+ */
109
+ const hasReached = (value, threshold, direction) => {
110
+ if (threshold === undefined) {
111
+ return false;
112
+ }
113
+ return direction === DashboardTableComponent_1.TableThresholdDirection.LowerIsWorse
114
+ ? value <= threshold
115
+ : value >= threshold;
116
+ };
117
+ /*
118
+ * The level a value has reached - Critical before Warning, so a critical
119
+ * threshold always wins - or null when it has reached neither, when the
120
+ * column has no thresholds, or when there is no value to compare.
121
+ * `value` is in the scale the cell shows (getTableColumnDisplay).
122
+ */
123
+ const getTableThresholdLevel = (data) => {
124
+ const value = data.value;
125
+ if (typeof value !== "number" || !Number.isFinite(value)) {
126
+ return null;
127
+ }
128
+ const thresholds = (0, exports.readTableColumnThresholds)(data.thresholds);
129
+ if (!thresholds) {
130
+ return null;
131
+ }
132
+ const direction = (0, exports.readTableThresholdDirection)(thresholds.direction);
133
+ if (hasReached(value, thresholds.critical, direction)) {
134
+ return DashboardTableComponent_1.TableThresholdLevel.Critical;
135
+ }
136
+ if (hasReached(value, thresholds.warning, direction)) {
137
+ return DashboardTableComponent_1.TableThresholdLevel.Warning;
138
+ }
139
+ return null;
140
+ };
141
+ exports.getTableThresholdLevel = getTableThresholdLevel;
142
+ /*
143
+ * True when both thresholds are set and critical comes before warning - a
144
+ * critical of 80 under a warning of 90 when higher is worse. The values are
145
+ * still colored (critical wins from 80 up, so nothing is ever a warning);
146
+ * the settings say how to put them right.
147
+ */
148
+ const isTableThresholdOrderReversed = (thresholds) => {
149
+ const read = (0, exports.readTableColumnThresholds)(thresholds);
150
+ if (!read ||
151
+ read.warning === undefined ||
152
+ read.critical === undefined ||
153
+ read.warning === read.critical) {
154
+ return false;
155
+ }
156
+ return (0, exports.readTableThresholdDirection)(read.direction) ===
157
+ DashboardTableComponent_1.TableThresholdDirection.LowerIsWorse
158
+ ? read.critical > read.warning
159
+ : read.critical < read.warning;
160
+ };
161
+ exports.isTableThresholdOrderReversed = isTableThresholdOrderReversed;
162
+ /*
163
+ * How a column shows its values, from what its Unit setting says (blank is
164
+ * Auto) and the metric it reads:
165
+ *
166
+ * - a usage metric sent as a fraction of 1 - unit "1" and a name such as
167
+ * system.cpu.utilization (ValueFormatter.isFractionMetric) - is shown
168
+ * as a percent, x100, when the Unit is Auto or a percent: 0.93 reads
169
+ * 93.00%, as the Value, Gauge and Chart widgets show it;
170
+ * - any other unit "1" means a plain number, and is not written;
171
+ * - otherwise the Unit as typed, or the metric's own unit when Auto.
172
+ *
173
+ * A formula column has no metric of its own: it shows its Unit as typed.
174
+ */
175
+ const getTableColumnDisplay = (data) => {
176
+ const columnUnit = (data.columnUnit || "").trim();
177
+ const metricUnit = (data.metricUnit || "").trim();
178
+ const isFraction = metricUnit === "1" && ValueFormatter_1.default.isFractionMetric(data.metricName);
179
+ if (isFraction && columnUnit === "") {
180
+ return { unit: "%", factor: 100 };
181
+ }
182
+ if (isFraction && ValueFormatter_1.default.isPercentUnit(columnUnit)) {
183
+ return { unit: columnUnit, factor: 100 };
184
+ }
185
+ if (columnUnit !== "") {
186
+ return { unit: columnUnit, factor: 1 };
187
+ }
188
+ if (metricUnit === "" || metricUnit === "1") {
189
+ return { unit: undefined, factor: 1 };
190
+ }
191
+ return { unit: metricUnit, factor: 1 };
192
+ };
193
+ exports.getTableColumnDisplay = getTableColumnDisplay;
194
+ // Whether a column shows percents: its thresholds then start at 80 and 90.
195
+ const isTableColumnPercent = (display) => {
196
+ return ValueFormatter_1.default.isPercentUnit(display.unit);
197
+ };
198
+ exports.isTableColumnPercent = isTableColumnPercent;
199
+ /*
200
+ * The thresholds a column starts with when they are turned on: 80 and 90,
201
+ * higher is worse, for a percent column - CPU, memory and disk in use, what
202
+ * the High CPU Utilization alert template watches at 80 - and none yet for
203
+ * any other unit, whose scale only the person setting them knows. Asked
204
+ * for lower is worse, a percent column's are 20 and 10.
205
+ */
206
+ const getTableThresholdPreset = (display, direction) => {
207
+ const presetDirection = (0, exports.readTableThresholdDirection)(direction);
208
+ if (!(0, exports.isTableColumnPercent)(display)) {
209
+ return { direction: presetDirection };
210
+ }
211
+ const preset = presetDirection === DashboardTableComponent_1.TableThresholdDirection.LowerIsWorse
212
+ ? exports.TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET
213
+ : exports.TABLE_THRESHOLD_PERCENT_PRESET;
214
+ return {
215
+ warning: preset.warning,
216
+ critical: preset.critical,
217
+ direction: presetDirection,
218
+ };
219
+ };
220
+ exports.getTableThresholdPreset = getTableThresholdPreset;
221
+ /*
222
+ * Whether a column's thresholds are still the preset of their own
223
+ * direction, as they were turned on: nothing typed over them. A column
224
+ * whose numbers someone typed - or cleared - is not.
225
+ */
226
+ const isTableThresholdPreset = (data) => {
227
+ if (!data.thresholds) {
228
+ return false;
229
+ }
230
+ const stored = data.thresholds;
231
+ const preset = (0, exports.getTableThresholdPreset)(data.display, stored.direction);
232
+ return ((0, exports.readTableThresholdNumber)(stored.warning) === preset.warning &&
233
+ (0, exports.readTableThresholdNumber)(stored.critical) === preset.critical);
234
+ };
235
+ exports.isTableThresholdPreset = isTableThresholdPreset;
236
+ /*
237
+ * A number with its unit, as the table writes them: "93.00%", "12.5 ms".
238
+ * A percent, a degree or a per-mille sign follows the number with no space.
239
+ */
240
+ const joinTableValueAndUnit = (formatted, unit) => {
241
+ if (!unit) {
242
+ return formatted;
243
+ }
244
+ const noSpace = unit === "%" || unit === "°" || unit === "‰";
245
+ return noSpace ? `${formatted}${unit}` : `${formatted} ${unit}`;
246
+ };
247
+ exports.joinTableValueAndUnit = joinTableValueAndUnit;
248
+ // A column's decimals as the table can write them: 0 to 20, whole.
249
+ const getSafeDecimals = (decimals) => {
250
+ if (!Number.isFinite(decimals)) {
251
+ return 0;
252
+ }
253
+ return Math.max(0, Math.min(20, Math.floor(decimals)));
254
+ };
255
+ /*
256
+ * A value rounded to the decimals its cell shows: what the cell writes, and
257
+ * what its thresholds are compared against. A threshold reads the number on
258
+ * screen - "80%" for 79.6 at no decimals is a warning at 80 - and a fraction
259
+ * shown as a percent loses the float noise of its x100 (0.29 x 100 is
260
+ * 28.999999999999996, shown and compared as 29).
261
+ */
262
+ const roundTableValue = (value, decimals) => {
263
+ const factor = Math.pow(10, getSafeDecimals(decimals));
264
+ return Math.round(value * factor) / factor;
265
+ };
266
+ exports.roundTableValue = roundTableValue;
267
+ /*
268
+ * A cell's value as the table writes it: rounded to its decimals (never
269
+ * fewer than 0), grouped the browser's way, with its unit.
270
+ */
271
+ const formatTableValue = (data) => {
272
+ const safeDecimals = getSafeDecimals(data.decimals);
273
+ const rounded = (0, exports.roundTableValue)(data.value, safeDecimals);
274
+ const formatted = rounded.toLocaleString(undefined, {
275
+ minimumFractionDigits: safeDecimals,
276
+ maximumFractionDigits: safeDecimals,
277
+ });
278
+ return (0, exports.joinTableValueAndUnit)(formatted, data.unit);
279
+ };
280
+ exports.formatTableValue = formatTableValue;
281
+ /*
282
+ * A threshold as the table writes it, in the column's unit: as typed, with
283
+ * no trailing zeros ("80%", "0.5 s", "99.95%"), grouped like the cells.
284
+ */
285
+ const formatTableThreshold = (data) => {
286
+ return (0, exports.joinTableValueAndUnit)(data.threshold.toLocaleString(undefined, { maximumFractionDigits: 6 }), data.unit);
287
+ };
288
+ exports.formatTableThreshold = formatTableThreshold;
@@ -0,0 +1,17 @@
1
+ import commonJsModule from "./TableThresholds.js";
2
+ export const TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET = commonJsModule.TABLE_THRESHOLD_PERCENT_LOWER_IS_WORSE_PRESET;
3
+ export const TABLE_THRESHOLD_PERCENT_PRESET = commonJsModule.TABLE_THRESHOLD_PERCENT_PRESET;
4
+ export const formatTableThreshold = commonJsModule.formatTableThreshold;
5
+ export const formatTableValue = commonJsModule.formatTableValue;
6
+ export const getTableColumnDisplay = commonJsModule.getTableColumnDisplay;
7
+ export const getTableThresholdLevel = commonJsModule.getTableThresholdLevel;
8
+ export const getTableThresholdPreset = commonJsModule.getTableThresholdPreset;
9
+ export const isTableColumnPercent = commonJsModule.isTableColumnPercent;
10
+ export const isTableThresholdOrderReversed = commonJsModule.isTableThresholdOrderReversed;
11
+ export const isTableThresholdPreset = commonJsModule.isTableThresholdPreset;
12
+ export const joinTableValueAndUnit = commonJsModule.joinTableValueAndUnit;
13
+ export const readTableColumnThresholds = commonJsModule.readTableColumnThresholds;
14
+ export const readTableThresholdDirection = commonJsModule.readTableThresholdDirection;
15
+ export const readTableThresholdNumber = commonJsModule.readTableThresholdNumber;
16
+ export const readTableThresholdStyle = commonJsModule.readTableThresholdStyle;
17
+ export const roundTableValue = commonJsModule.roundTableValue;
@@ -34,4 +34,10 @@ export interface GetValueWidgetTrendData {
34
34
  windowEnd?: Date | undefined;
35
35
  bucketWidthMs?: number | undefined;
36
36
  }
37
+ export declare const VALUE_WIDGET_MAX_FILLED_POINTS: number;
38
+ export interface FillValueWidgetSeriesGapsData {
39
+ series: Array<ValueWidgetPoint>;
40
+ bucketWidthMs: number;
41
+ }
42
+ export declare const fillValueWidgetSeriesGaps: (data: FillValueWidgetSeriesGapsData) => Array<ValueWidgetPoint>;
37
43
  export declare const getValueWidgetTrend: (data: GetValueWidgetTrendData) => ValueWidgetTrend | null;
@@ -34,4 +34,10 @@ export interface GetValueWidgetTrendData {
34
34
  windowEnd?: Date | undefined;
35
35
  bucketWidthMs?: number | undefined;
36
36
  }
37
+ export declare const VALUE_WIDGET_MAX_FILLED_POINTS: number;
38
+ export interface FillValueWidgetSeriesGapsData {
39
+ series: Array<ValueWidgetPoint>;
40
+ bucketWidthMs: number;
41
+ }
42
+ export declare const fillValueWidgetSeriesGaps: (data: FillValueWidgetSeriesGapsData) => Array<ValueWidgetPoint>;
37
43
  export declare const getValueWidgetTrend: (data: GetValueWidgetTrendData) => ValueWidgetTrend | null;
@@ -23,7 +23,7 @@
23
23
  * metric and Data Source hosts share one definition.
24
24
  */
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getValueWidgetTrend = exports.getValueWidgetBucketWidthMs = exports.getValueWidgetSeries = exports.getValueWidgetPointTime = exports.getMeanOfValues = exports.VALUE_WIDGET_FLAT_TREND_PERCENT = exports.ValueWidgetTrendDirection = void 0;
26
+ exports.getValueWidgetTrend = exports.fillValueWidgetSeriesGaps = exports.VALUE_WIDGET_MAX_FILLED_POINTS = exports.getValueWidgetBucketWidthMs = exports.getValueWidgetSeries = exports.getValueWidgetPointTime = exports.getMeanOfValues = exports.VALUE_WIDGET_FLAT_TREND_PERCENT = exports.ValueWidgetTrendDirection = void 0;
27
27
  var ValueWidgetTrendDirection;
28
28
  (function (ValueWidgetTrendDirection) {
29
29
  ValueWidgetTrendDirection["Up"] = "Up";
@@ -149,6 +149,75 @@ exports.getValueWidgetBucketWidthMs = getValueWidgetBucketWidthMs;
149
149
  const isUsableDate = (date) => {
150
150
  return date instanceof Date && Number.isFinite(date.getTime());
151
151
  };
152
+ /*
153
+ * The most points a filled sparkline draws. The metrics API buckets a window
154
+ * into a few hundred at most (AggregationIntervalUtil); a series spread
155
+ * wider than this was not bucketed the way the caller thinks, and is drawn
156
+ * as it came.
157
+ */
158
+ exports.VALUE_WIDGET_MAX_FILLED_POINTS = 2000;
159
+ /*
160
+ * A sum's or a count's series with the empty buckets between its readings
161
+ * drawn as 0.
162
+ *
163
+ * The metrics API answers only the buckets that had a reading. A count of
164
+ * something that happens now and then - deploys, errors, sign-ups - comes
165
+ * back as a few buckets with hours between them, and a line through just
166
+ * those read flat ("4, then 4, then 4") while the arrow beside it, which
167
+ * compares totals per half of the range, said the count rose. For a sum or
168
+ * a count, a bucket with no reading counts nothing: it is a real 0. So each
169
+ * empty bucket between the first reading and the last is drawn at 0, and
170
+ * the spikes show as spikes.
171
+ *
172
+ * Only between readings: the newest bucket is often empty only because its
173
+ * readings have not landed yet, and a line that dropped to 0 at its right
174
+ * end on every refresh would read as an outage. Before the first reading
175
+ * there may be no metric yet at all. And only for a sum or a count: an
176
+ * average or a percentile of no readings is not 0 but unknown, and keeps
177
+ * its gaps. Nothing is filled when
178
+ *
179
+ * - a point does not sit on the bucket grid the caller names (a calendar
180
+ * month or year is not a fixed width, and a widget bucketed some other
181
+ * way must not get zeros between its real points);
182
+ * - the readings span more buckets than VALUE_WIDGET_MAX_FILLED_POINTS.
183
+ */
184
+ const fillValueWidgetSeriesGaps = (data) => {
185
+ var _a;
186
+ const series = data.series;
187
+ const widthMs = data.bucketWidthMs;
188
+ if (series.length < 2 || !Number.isFinite(widthMs) || widthMs <= 0) {
189
+ return series;
190
+ }
191
+ const firstMs = series[0].timestamp.getTime();
192
+ const lastMs = series[series.length - 1].timestamp.getTime();
193
+ const valuesByTime = new Map();
194
+ for (const point of series) {
195
+ const timeMs = point.timestamp.getTime();
196
+ if ((timeMs - firstMs) % widthMs !== 0) {
197
+ return series;
198
+ }
199
+ valuesByTime.set(timeMs, point.value);
200
+ }
201
+ const slotCount = (lastMs - firstMs) / widthMs + 1;
202
+ if (!Number.isFinite(slotCount) ||
203
+ slotCount > exports.VALUE_WIDGET_MAX_FILLED_POINTS) {
204
+ return series;
205
+ }
206
+ if (slotCount === series.length) {
207
+ // No bucket between the readings is empty.
208
+ return series;
209
+ }
210
+ const filled = [];
211
+ for (let slot = 0; slot < slotCount; slot++) {
212
+ const slotMs = firstMs + slot * widthMs;
213
+ filled.push({
214
+ timestamp: new Date(slotMs),
215
+ value: (_a = valuesByTime.get(slotMs)) !== null && _a !== void 0 ? _a : 0,
216
+ });
217
+ }
218
+ return filled;
219
+ };
220
+ exports.fillValueWidgetSeriesGaps = fillValueWidgetSeriesGaps;
152
221
  /*
153
222
  * How the widget's number moved across the time range: the second half of
154
223
  * the range against the first, each reduced the way the widget reduces the
@@ -1,6 +1,8 @@
1
1
  import commonJsModule from "./ValueWidgetSeries.js";
2
2
  export const VALUE_WIDGET_FLAT_TREND_PERCENT = commonJsModule.VALUE_WIDGET_FLAT_TREND_PERCENT;
3
+ export const VALUE_WIDGET_MAX_FILLED_POINTS = commonJsModule.VALUE_WIDGET_MAX_FILLED_POINTS;
3
4
  export const ValueWidgetTrendDirection = commonJsModule.ValueWidgetTrendDirection;
5
+ export const fillValueWidgetSeriesGaps = commonJsModule.fillValueWidgetSeriesGaps;
4
6
  export const getMeanOfValues = commonJsModule.getMeanOfValues;
5
7
  export const getValueWidgetBucketWidthMs = commonJsModule.getValueWidgetBucketWidthMs;
6
8
  export const getValueWidgetPointTime = commonJsModule.getValueWidgetPointTime;
@@ -1407,6 +1407,22 @@ exports.DEVELOPER_DOCS_PROFILES = {
1407
1407
  "labels",
1408
1408
  ],
1409
1409
  },
1410
+ /*
1411
+ * Its provider (aws, azure or gcp) is named like Terraform's own
1412
+ * provider meta-argument, so Terraform cannot set it: an account is
1413
+ * added by its connection, or with the API, and Terraform manages the
1414
+ * ones there are.
1415
+ */
1416
+ CloudAccount: {
1417
+ createNote: "Cloud accounts are added when a cloud connection first reads them. Create one only to name and label it before it is connected: its provider is aws, azure or gcp.",
1418
+ terraformCannotCreate: "A cloud connection adds an account the first time it reads it, and Terraform cannot set an account's provider, a name Terraform keeps for itself. Terraform can still manage the accounts you have: bring them in below.",
1419
+ fields: [
1420
+ field("name", literal("Production")),
1421
+ field("accountId", literal("123456789012"), "Its id in that cloud: an AWS account, an Azure subscription or a Google Cloud project."),
1422
+ field("description", literal("The checkout stack's production account.")),
1423
+ "labels",
1424
+ ],
1425
+ },
1410
1426
  NetworkDevice: {
1411
1427
  fields: [
1412
1428
  field("name", literal("core-switch-1")),