Skip to content

Commit

Permalink
feat: Custom row feature implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
tbalar-splunk committed Mar 31, 2021
1 parent 34d19bd commit 308d847
Show file tree
Hide file tree
Showing 19 changed files with 976 additions and 414 deletions.
500 changes: 500 additions & 0 deletions splunk_add_on_ucc_framework/ucc_ui_lib/design_changes.patch

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<%!
app_name = cherrypy.request.path_info.split('/')[3]

%>\
<!doctype html>
<%! app_name = cherrypy.request.path_info.split('/')[3] %>\
<!DOCTYPE html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>${_('Loading')}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
</head>

<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>${_('Loading')}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
</head>

<body style="min-width:960px">
<script src="${make_url('/config?autoload=1')}" crossorigin="use-credentials"></script>
<script src="${make_url('/static/js/i18n.js')}"></script>
<script src="${make_url('/i18ncatalog?autoload=1')}"></script>
<script>
__splunkd_partials__ = ${json_decode(splunkd)};
</script>

<%
page_path = "/static/app/" + app_name + "/js/build/entry_page.js"
%>
<body style="min-width: 960px; background-color: #eee">
<script src="${make_url('/config?autoload=1')}" crossorigin="use-credentials"></script>
<script src="${make_url('/static/js/i18n.js')}"></script>
<script src="${make_url('/i18ncatalog?autoload=1')}"></script>
<script>
__splunkd_partials__ = ${json_decode(splunkd)};
</script>

<script src="${make_url(page_path)}"></script>
</body>
<% page_path = "/static/app/" + app_name + "/js/build/entry_page.js" %>

<script src="${make_url(page_path)}"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import CONTROL_TYPE_MAP from '../constants/ControlTypeMap';

const CustomElement = styled.div`
margin-left: 30px;
div {
width:100% !important
}
`;

const ControlGroupWrapper = styled(ControlGroup)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ class DeleteModal extends Component {
deleteMsg = _(`Are you sure you want to delete "`) + this.props.stanzaName + _(`" ? Ensure that no input is configured with "`) + this.props.stanzaName + _(`" as this will stop data collection for that input.`);
}
return (
<div>
<ModalWrapper onRequestClose={this.handleRequestClose} open={this.props.open}>
<ModalWrapper open={this.props.open}>
<Modal.Header
title={_("Delete Confirmation")}
onRequestClose={this.handleRequestClose}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function MultiInputComponent(props) {
allowNewValues={createSearchChoice}
onChange={handleChange}
inline
style={{ width: '100%' }}
>
{options && options.length > 0 && options}
</Multiselect>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class RadioComponent extends Component {
onChange={this.handleChange}
value={this.props.value}
key={this.props.field}
style={{ width: `50% !important` }}
>
{this.props.controlOptions.items.map(item => (
<RadioBar.Option key={item.value} value={item.value} label={item.label} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function SingleInputComponent(props) {
disabled={effectiveDisabled}
onChange={handleChange}
inline
style={{ width: '50%' }}
>
{options && options.length > 0 && options}
</Select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
import Text from '@splunk/react-ui/Text';

class TextComponent extends Component {

handleChange = (e, {value}) => {
handleChange = (e, { value }) => {
this.props.handleChange(this.props.field, value);
};

Expand All @@ -19,6 +18,7 @@ class TextComponent extends Component {
value={this.props.value}
onChange={this.handleChange}
type={this.props.encrypted ? 'password' : 'text'}
style={{ width: '100%' }}
/>
);
}
Expand All @@ -30,8 +30,8 @@ TextComponent.propTypes = {
field: PropTypes.string,
error: PropTypes.bool,
controlOptions: PropTypes.object,
encrypted:PropTypes.bool,
disabled:PropTypes.bool
encrypted: PropTypes.bool,
disabled: PropTypes.bool,
};

export default TextComponent;
Loading

0 comments on commit 308d847

Please sign in to comment.