-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI] Style and Help text changes (#29)
* Move new namespace input * Help text
- Loading branch information
1 parent
8dbaf31
commit f329cd3
Showing
10 changed files
with
132 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import {Popover, Icon} from 'antd'; | ||
import {getHelpText} from 'utils/helpText'; | ||
|
||
export default function HelpTooltip({helpTextKey, title, ...rest}) { | ||
return ( | ||
<Popover | ||
title={title} | ||
content={<div style={{maxWidth: 200}}>{getHelpText(helpTextKey)}</div>} | ||
trigger="click" | ||
{...rest}> | ||
<Icon | ||
style={{cursor: 'pointer', color: 'rgba(0,0,0,0.3)'}} | ||
type="question-circle-o" | ||
/> | ||
</Popover> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ body { | |
height: 100% | ||
} | ||
|
||
.ant-form-item-control { | ||
line-height: inherit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const helpText = { | ||
namespace: | ||
'Logical grouping of rules. The namespace name must be a valid service name.', | ||
'mapping-rule': | ||
'Configure the resolution, retention, and optional custom aggregation functions for metrics matching the filter.', | ||
'rollup-rule': | ||
'Configure how to roll up metrics matching the filter and the corresponding policies. A matching metric triggers the generation of a new rollup metric whose name, tags, and policies are defined by the rollup targets. ', | ||
'metric-filter': | ||
' A list of tag name:glob pattern pairs identifying matching metrics.', | ||
policy: | ||
'Defines the resolution, retention period, and optional custom aggregation functions for given metric.', | ||
target: | ||
'Defines how a new rollup metric is generated and its policies. The rollup metric will use “Rollup Metric Name” as its name, “Rollup Tags” as its tags, and “Policies” as its policies. ', | ||
'rollup-tag': 'Tags retained by the generated rollup metric.', | ||
'resolution:retention-period': | ||
'Describes the resolution at which the metric will be aggregated, and how long the metric will be stored for. ', | ||
'aggregation-function': | ||
'Defines how the given metric is aggregated. For example, an aggregation function of P99 returns the 99th percentile of the given metric.', | ||
'effective-time': 'The time at which the rule will be in effect', | ||
}; | ||
|
||
export function getHelpText(helpTextKey) { | ||
if (!helpText[helpTextKey]) { | ||
console.error(`The helpKey: ${helpTextKey} does not exist`); // eslint-disable-line | ||
} | ||
return helpText[helpTextKey] || ''; | ||
} |