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
90f5b4ad
Commit
90f5b4ad
authored
Oct 22, 2020
by
Mandar Ambawane
Committed by
Nikhil Bonte
Oct 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3984 Add UI Date Timezone and UI Date Format in Session api
Signed-off-by:
Nikhil P Bonte
<
nbonte@apache.org
>
parent
82cdd700
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
AdminResource.java
...in/java/org/apache/atlas/web/resources/AdminResource.java
+13
-2
No files found.
webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
View file @
90f5b4ad
...
...
@@ -133,6 +133,9 @@ public class AdminResource {
private
static
final
String
DEFAULT_EDITABLE_ENTITY_TYPES
=
"hdfs_path"
;
private
static
final
String
DEFAULT_UI_VERSION
=
"atlas.ui.default.version"
;
private
static
final
String
UI_VERSION_V2
=
"v2"
;
private
static
final
String
UI_DATE_TIMEZONE_FORMAT_ENABLED
=
"atlas.ui.date.timezone.format.enabled"
;
private
static
final
String
UI_DATE_FORMAT
=
"atlas.ui.date.format"
;
private
static
final
String
UI_DATE_DEFAULT_FORMAT
=
"MM/DD/YYYY hh:mm:ss A"
;
private
static
final
List
TIMEZONE_LIST
=
Arrays
.
asList
(
TimeZone
.
getAvailableIDs
());
@Context
...
...
@@ -159,6 +162,8 @@ public class AdminResource {
private
final
AtlasAuditService
auditService
;
private
final
String
defaultUIVersion
;
private
final
EntityAuditRepository
auditRepository
;
private
final
boolean
isTimezoneFormatEnabled
;
private
final
String
uiDateFormat
;
static
{
try
{
...
...
@@ -191,9 +196,13 @@ public class AdminResource {
this
.
auditRepository
=
auditRepository
;
if
(
atlasProperties
!=
null
)
{
defaultUIVersion
=
atlasProperties
.
getString
(
DEFAULT_UI_VERSION
,
UI_VERSION_V2
);
this
.
defaultUIVersion
=
atlasProperties
.
getString
(
DEFAULT_UI_VERSION
,
UI_VERSION_V2
);
this
.
isTimezoneFormatEnabled
=
atlasProperties
.
getBoolean
(
UI_DATE_TIMEZONE_FORMAT_ENABLED
,
true
);
this
.
uiDateFormat
=
atlasProperties
.
getString
(
UI_DATE_FORMAT
,
UI_DATE_DEFAULT_FORMAT
);
}
else
{
defaultUIVersion
=
UI_VERSION_V2
;
this
.
defaultUIVersion
=
UI_VERSION_V2
;
this
.
isTimezoneFormatEnabled
=
true
;
this
.
uiDateFormat
=
UI_DATE_DEFAULT_FORMAT
;
}
}
...
...
@@ -339,6 +348,8 @@ public class AdminResource {
responseData
.
put
(
"userName"
,
userName
);
responseData
.
put
(
"groups"
,
groups
);
responseData
.
put
(
"timezones"
,
TIMEZONE_LIST
);
responseData
.
put
(
UI_DATE_TIMEZONE_FORMAT_ENABLED
,
isTimezoneFormatEnabled
);
responseData
.
put
(
UI_DATE_FORMAT
,
uiDateFormat
);
response
=
Response
.
ok
(
AtlasJson
.
toV1Json
(
responseData
)).
build
();
...
...
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