Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
14d5a8e6
Commit
14d5a8e6
authored
7 years ago
by
pratik24mac
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2508: when adding validityPeriod, default value shown in UI is not included in POST request
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
c26e9bcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
31 deletions
+13
-31
AddTimezoneItemView.js
dashboardv2/public/js/views/tag/AddTimezoneItemView.js
+13
-31
No files found.
dashboardv2/public/js/views/tag/AddTimezoneItemView.js
View file @
14d5a8e6
...
...
@@ -63,7 +63,6 @@ define(['require',
},
onRender
:
function
()
{
var
that
=
this
,
minDate
=
new
Date
(),
dateObj
=
{
"showDropdowns"
:
true
,
"timePicker"
:
true
,
...
...
@@ -75,41 +74,24 @@ define(['require',
"alwaysShowCalendars"
:
true
},
tzstr
=
'<option selected="selected" disabled="disabled">-- Select Timezone --</option>'
;
this
.
ui
.
timeZone
.
select2
({
allowClear
:
true
,
data
:
moment
.
tz
.
names
()
});
if
(
this
.
model
.
get
(
'startTime'
)
!==
""
)
{
this
.
ui
.
timeInterval
.
daterangepicker
({
"showDropdowns"
:
true
,
"timePicker"
:
true
,
"timePicker24Hour"
:
true
,
"startDate"
:
this
.
model
.
get
(
'startTime'
),
"endDate"
:
this
.
model
.
get
(
'endTime'
),
"locale"
:
{
format
:
'YYYY/MM/DD h:mm A'
},
"alwaysShowCalendars"
:
true
}).
on
(
'apply.daterangepicker'
,
function
(
fullDate
)
{
var
val
=
fullDate
.
currentTarget
.
value
.
split
(
' - '
);
that
.
model
.
set
(
'startTime'
,
val
[
0
]);
that
.
model
.
set
(
'endTime'
,
val
[
1
]);
});
this
.
ui
.
timeZone
.
select2
({
data
:
moment
.
tz
.
names
()
});
dateObj
[
"startDate"
]
=
this
.
model
.
get
(
'startTime'
);
dateObj
[
"endDate"
]
=
this
.
model
.
get
(
'endTime'
);
this
.
ui
.
timeZone
.
val
(
this
.
model
.
get
(
'timeZone'
)).
trigger
(
"change"
,
{
'manual'
:
true
});
}
else
{
this
.
ui
.
timeInterval
.
daterangepicker
(
dateObj
).
on
(
'apply.daterangepicker'
,
function
(
fullDate
)
{
var
val
=
fullDate
.
currentTarget
.
value
.
split
(
' - '
);
that
.
model
.
set
(
'startTime'
,
val
[
0
]);
that
.
model
.
set
(
'endTime'
,
val
[
1
]);
});
this
.
ui
.
timeZone
.
html
(
tzstr
);
this
.
ui
.
timeZone
.
select2
({
placeholder
:
"Select TimeZone"
,
allowClear
:
true
,
data
:
moment
.
tz
.
names
()
});
this
.
model
.
set
(
'startTime'
,
moment
(
dateObj
.
startDate
).
format
(
'YYYY/MM/DD h:mm A'
));
this
.
model
.
set
(
'endTime'
,
moment
(
dateObj
.
startDate
).
format
(
'YYYY/MM/DD h:mm A'
));
}
$
(
'[name="daterangepicker_start"]'
).
attr
(
'readonly'
,
true
);
+
this
.
ui
.
timeInterval
.
daterangepicker
(
dateObj
).
on
(
'apply.daterangepicker'
,
function
(
ev
,
picker
)
{
that
.
model
.
set
(
'startTime'
,
picker
.
startDate
.
format
(
'YYYY/MM/DD h:mm A'
));
that
.
model
.
set
(
'endTime'
,
picker
.
endDate
.
format
(
'YYYY/MM/DD h:mm A'
));
});
$
(
'[name="daterangepicker_start"]'
).
attr
(
'readonly'
,
true
);
$
(
'[name="daterangepicker_end"]'
).
attr
(
'readonly'
,
true
);
},
buttonActive
:
function
(
option
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment