Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a026781
Draft for Date Dynamic values
gabrieldutra Jun 16, 2019
1e98d07
Use value with prefix instead of specific attr
gabrieldutra Jun 17, 2019
f7cca04
Fix not possible to select static value
gabrieldutra Jun 17, 2019
e595dc3
Update antd version
gabrieldutra Jun 23, 2019
7efcd39
Cleanup and DateRangeParameter
gabrieldutra Jun 27, 2019
050eb61
Dynamic DateTimeRange
gabrieldutra Jun 27, 2019
6af6091
Add Dynamic options to Date Parameters
gabrieldutra Jun 27, 2019
7df5aad
UI refinements
gabrieldutra Jun 30, 2019
ad8d03f
Add getDynamicValue function
gabrieldutra Jul 1, 2019
8044d18
Add 'This' options and prevent text clipping
gabrieldutra Jul 1, 2019
2b945a0
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 1, 2019
f3c013e
Make allowClear available
gabrieldutra Jul 1, 2019
e5981c4
Update ScheduleDialog snapshot
gabrieldutra Jul 1, 2019
fbe7e37
Add some protections and separate Date/DateRange
gabrieldutra Jul 2, 2019
b755989
Accept null values on date or daterange parameters
gabrieldutra Jul 2, 2019
ca7f481
Handle undefined values on Moment propType
gabrieldutra Jul 8, 2019
09a50d2
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 11, 2019
5933a4e
Move export to end of files
gabrieldutra Jul 11, 2019
89a3e7f
Remove Today/Now option
gabrieldutra Jul 16, 2019
c64eb83
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 16, 2019
ed1f53b
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 17, 2019
63d2e66
Update with Apply Changes
gabrieldutra Jul 17, 2019
e4f5896
Show name instead of value for dynamic values
gabrieldutra Jul 17, 2019
80d61d7
Add comment about supporting useCurrentDateTime
gabrieldutra Jul 17, 2019
1ef0d0d
Cypress Tests: Date Parameters
gabrieldutra Jul 17, 2019
8d7255f
Cypress Tests: Date Range Parameters
gabrieldutra Jul 17, 2019
cf42e97
Don't put null params in the url
gabrieldutra Jul 17, 2019
02e740f
Add workaround comments to Cypress tests
gabrieldutra Jul 18, 2019
e77b9c4
Fix Dynamic Value as default for global parameters
gabrieldutra Jul 18, 2019
f23540b
Update Back to Static Value
gabrieldutra Jul 18, 2019
f9dda5a
Add isValid to value on Date and DateRange inputs
gabrieldutra Jul 18, 2019
1f45ad0
CR suggestions
gabrieldutra Jul 18, 2019
b81b74f
Fix Back to Static Value for Dates
gabrieldutra Jul 18, 2019
7b8bc5a
Update Dynamic Value Styling
gabrieldutra Jul 18, 2019
ccb1e78
Fix failing Date tests
gabrieldutra Jul 18, 2019
b7dea34
Fix selectedDynamicValue
gabrieldutra Jul 21, 2019
323fd24
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 21, 2019
2b05dac
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 22, 2019
34ee589
Parameter spec: Remove date range clickThrough
gabrieldutra Jul 22, 2019
794fde7
Add transition
gabrieldutra Jul 23, 2019
4c2b034
Fix failing Cypress tests
gabrieldutra Jul 23, 2019
44a0ca9
Back with 'width: auto'
gabrieldutra Jul 23, 2019
43e3248
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 23, 2019
16bed9c
Check value is valid on Back to Static value
gabrieldutra Jul 23, 2019
9a7881a
CR
gabrieldutra Jul 24, 2019
184bd5e
Update Date Range width
gabrieldutra Jul 25, 2019
a9b25f1
Merge branch 'master' into parameter-dynamic-date-values
gabrieldutra Jul 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove Today/Now option
  • Loading branch information
gabrieldutra committed Jul 16, 2019
commit 89a3e7f543c7eb5aa39ae7c1339d942e2ce333b7
18 changes: 1 addition & 17 deletions client/app/components/EditParameterSettingsDialog.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

import { includes, startsWith, words, capitalize, clone, isNull } from 'lodash';
import { includes, words, capitalize, clone, isNull } from 'lodash';
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import Modal from 'antd/lib/modal';
import Form from 'antd/lib/form';
import Checkbox from 'antd/lib/checkbox';
import Button from 'antd/lib/button';
import Select from 'antd/lib/select';
import Input from 'antd/lib/input';
Expand All @@ -20,10 +19,6 @@ function getDefaultTitle(text) {
return capitalize(words(text).join(' ')); // humanize
}

function isTypeDate(type) {
return startsWith(type, 'date') && !isTypeDateRange(type);
}

function isTypeDateRange(type) {
return /-range/.test(type);
}
Expand Down Expand Up @@ -172,17 +167,6 @@ function EditParameterSettingsDialog(props) {
<Option value="datetime-range-with-seconds">Date and Time Range (with seconds)</Option>
</Select>
</Form.Item>
{isTypeDate(param.type) && (
<Form.Item label=" " colon={false} {...formItemProps}>
<Checkbox
defaultChecked={param.useCurrentDateTime}
onChange={e => setParam({ ...param, useCurrentDateTime: e.target.checked })}
data-test="UseCurrentDateTimeCheckbox"
>
Default to Today/Now if no other value is set
</Checkbox>
</Form.Item>
)}
{param.type === 'enum' && (
<Form.Item label="Values" help="Dropdown list values (newline delimeted)" {...formItemProps}>
<Input.TextArea
Expand Down