Commit f37f3de7 by Abhishek Kadam Committed by nixonrodrigues

ATLAS-2764 :- Fix to load timezones from TimeZone.getAvailableIDs() on UI

parent f3f4fbfa
......@@ -19,9 +19,11 @@ define(['require',
'backbone',
'hbs!tmpl/tag/AddTimezoneView_tmpl',
'moment',
'utils/Enums',
'utils/Globals',
'moment-timezone',
'daterangepicker'
], function(require, Backbone, AddTimezoneViewTmpl, moment) {
], function(require, Backbone, AddTimezoneViewTmpl, moment, Enums, Globals) {
'use strict';
return Backbone.Marionette.ItemView.extend(
......@@ -89,7 +91,7 @@ define(['require',
this.ui.timeZone.html(tzstr);
this.ui.timeZone.select2({
data: moment.tz.names()
data: Globals.userLogedIn.response.timezones
});
if (!_.isEmpty(this.model.get('startTime')) || !_.isEmpty(this.model.get('endTime')) || !_.isEmpty(this.model.get('timeZone'))) {
......
......@@ -90,6 +90,7 @@ public class AdminResource {
private static final String isEntityCreateAllowed = "atlas.entity.create.allowed";
private static final String editableEntityTypes = "atlas.ui.editable.entity.types";
private static final String DEFAULT_EDITABLE_ENTITY_TYPES = "hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic,hbase_namespace";
private static final List TIMEZONE_LIST = Arrays.asList(TimeZone.getAvailableIDs());
@Context
private HttpServletRequest httpServletRequest;
......@@ -270,6 +271,7 @@ public class AdminResource {
responseData.put(editableEntityTypes, getEditableEntityTypes(atlasProperties));
responseData.put("userName", userName);
responseData.put("groups", groups);
responseData.put("timezones", TIMEZONE_LIST);
response = Response.ok(AtlasJson.toV1Json(responseData)).build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment