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
c5464da3
Commit
c5464da3
authored
Apr 22, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3752 : UI: Login js improvment
parent
21e9f2f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
40 deletions
+36
-40
index.html.tpl
dashboardv2/public/index.html.tpl
+11
-0
atlasLogin.js
dashboardv2/public/js/modules/atlasLogin.js
+7
-20
index.html.tpl
dashboardv3/public/index.html.tpl
+11
-0
atlasLogin.js
dashboardv3/public/js/modules/atlasLogin.js
+7
-20
No files found.
dashboardv2/public/index.html.tpl
View file @
c5464da3
...
@@ -33,6 +33,17 @@
...
@@ -33,6 +33,17 @@
<title>
Atlas
</title>
<title>
Atlas
</title>
<meta
name=
"description"
content=
""
/>
<meta
name=
"description"
content=
""
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<script
type=
"text/javascript"
>
var
isHtmlInPath
=
window
.
location
.
pathname
.
indexOf
(
"index.html"
);
if
(
isHtmlInPath
===
-
1
)
{
var
pathname
=
window
.
location
.
pathname
.
replace
(
/
\/[\w
-
]
+.
(
jsp|html
)
|
\/
+$/ig
,
''
),
indexpath
=
pathname
+
"/index.html"
;
if
(
location
.
hash
.
length
>
2
)
{
indexpath
+=
location
.
hash
;
}
window
.
location
.
replace
(
indexpath
);
}
</script>
<link
rel=
"shortcut icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<link
rel=
"shortcut icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<link
rel=
"icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<link
rel=
"icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
...
...
dashboardv2/public/js/modules/atlasLogin.js
View file @
c5464da3
...
@@ -57,7 +57,7 @@ function doLogin() {
...
@@ -57,7 +57,7 @@ function doLogin() {
j_username
:
userName
,
j_username
:
userName
,
j_password
:
passwd
j_password
:
passwd
},
},
url
:
baseUrl
+
"j_spring_security_check"
,
url
:
baseUrl
+
"
/
j_spring_security_check"
,
type
:
"POST"
,
type
:
"POST"
,
headers
:
{
headers
:
{
"cache-control"
:
"no-cache"
"cache-control"
:
"no-cache"
...
@@ -103,18 +103,18 @@ function redirect(baseUrl) {
...
@@ -103,18 +103,18 @@ function redirect(baseUrl) {
PRIMARY_UI
=
data
[
"atlas.ui.default.version"
];
PRIMARY_UI
=
data
[
"atlas.ui.default.version"
];
}
}
if
(
PRIMARY_UI
!==
"v2"
)
{
if
(
PRIMARY_UI
!==
"v2"
)
{
indexpath
=
"index.html"
;
indexpath
=
"
/
index.html"
;
}
}
if
(
window
.
localStorage
.
last_ui_load
===
"v1"
)
{
if
(
window
.
localStorage
.
last_ui_load
===
"v1"
)
{
indexpath
=
"index.html"
;
indexpath
=
"
/
index.html"
;
}
else
if
(
window
.
localStorage
.
last_ui_load
===
"v2"
)
{
}
else
if
(
window
.
localStorage
.
last_ui_load
===
"v2"
)
{
indexpath
=
"/n/index.html"
;
indexpath
=
"/n/index.html"
;
}
}
indexpath
=
baseUrl
+
indexpath
;
if
(
location
.
hash
.
length
>
2
)
{
if
(
location
.
hash
.
length
>
2
)
{
window
.
location
.
replace
(
indexpath
+
location
.
hash
);
indexpath
+=
location
.
hash
;
}
else
{
window
.
location
.
replace
(
indexpath
);
}
}
window
.
location
.
replace
(
indexpath
);
},
},
error
:
function
()
{
error
:
function
()
{
window
.
location
.
replace
(
"index.html"
);
window
.
location
.
replace
(
"index.html"
);
...
@@ -123,20 +123,7 @@ function redirect(baseUrl) {
...
@@ -123,20 +123,7 @@ function redirect(baseUrl) {
}
}
function
getBaseUrl
()
{
function
getBaseUrl
()
{
if
(
!
window
.
location
.
origin
)
{
return
window
.
location
.
pathname
.
replace
(
/
\/[\w
-
]
+.
(
jsp|html
)
|
\/
+$/ig
,
''
)
window
.
location
.
origin
=
window
.
location
.
protocol
+
"//"
+
window
.
location
.
hostname
+
(
window
.
location
.
port
?
":"
+
window
.
location
.
port
:
""
);
}
var
baseUrl
=
window
.
location
.
origin
+
window
.
location
.
pathname
.
substring
(
window
.
location
.
pathname
.
indexOf
(
"/"
,
2
)
+
1
,
0
);
if
(
baseUrl
.
lastIndexOf
(
"/"
)
!=
baseUrl
.
length
-
1
)
{
if
(
baseUrl
)
{
baseUrl
=
baseUrl
+
"/"
;
}
else
{
baseUrl
=
"/"
;
}
}
return
baseUrl
;
}
}
$
(
function
()
{
$
(
function
()
{
...
...
dashboardv3/public/index.html.tpl
View file @
c5464da3
...
@@ -33,6 +33,17 @@
...
@@ -33,6 +33,17 @@
<title>
Atlas
</title>
<title>
Atlas
</title>
<meta
name=
"description"
content=
""
/>
<meta
name=
"description"
content=
""
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<script
type=
"text/javascript"
>
var
isHtmlInPath
=
window
.
location
.
pathname
.
indexOf
(
"index.html"
);
if
(
isHtmlInPath
===
-
1
)
{
var
pathname
=
window
.
location
.
pathname
.
replace
(
/
\/[\w
-
]
+.
(
jsp|html
)
|
\/
+$/ig
,
''
),
indexpath
=
pathname
+
"/index.html"
;
if
(
location
.
hash
.
length
>
2
)
{
indexpath
+=
location
.
hash
;
}
window
.
location
.
replace
(
indexpath
);
}
</script>
<link
rel=
"shortcut icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<link
rel=
"shortcut icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<link
rel=
"icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<link
rel=
"icon"
href=
"img/favicon.ico?bust=<%- bust %>"
type=
"image/x-icon"
/>
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
...
...
dashboardv3/public/js/modules/atlasLogin.js
View file @
c5464da3
...
@@ -57,7 +57,7 @@ function doLogin() {
...
@@ -57,7 +57,7 @@ function doLogin() {
j_username
:
userName
,
j_username
:
userName
,
j_password
:
passwd
j_password
:
passwd
},
},
url
:
baseUrl
+
"j_spring_security_check"
,
url
:
baseUrl
+
"
/
j_spring_security_check"
,
type
:
"POST"
,
type
:
"POST"
,
headers
:
{
headers
:
{
"cache-control"
:
"no-cache"
"cache-control"
:
"no-cache"
...
@@ -103,18 +103,18 @@ function redirect(baseUrl) {
...
@@ -103,18 +103,18 @@ function redirect(baseUrl) {
PRIMARY_UI
=
data
[
"atlas.ui.default.version"
];
PRIMARY_UI
=
data
[
"atlas.ui.default.version"
];
}
}
if
(
PRIMARY_UI
!==
"v2"
)
{
if
(
PRIMARY_UI
!==
"v2"
)
{
indexpath
=
"index.html"
;
indexpath
=
"
/
index.html"
;
}
}
if
(
window
.
localStorage
.
last_ui_load
===
"v1"
)
{
if
(
window
.
localStorage
.
last_ui_load
===
"v1"
)
{
indexpath
=
"index.html"
;
indexpath
=
"
/
index.html"
;
}
else
if
(
window
.
localStorage
.
last_ui_load
===
"v2"
)
{
}
else
if
(
window
.
localStorage
.
last_ui_load
===
"v2"
)
{
indexpath
=
"/n/index.html"
;
indexpath
=
"/n/index.html"
;
}
}
indexpath
=
baseUrl
+
indexpath
;
if
(
location
.
hash
.
length
>
2
)
{
if
(
location
.
hash
.
length
>
2
)
{
window
.
location
.
replace
(
indexpath
+
location
.
hash
);
indexpath
+=
location
.
hash
;
}
else
{
window
.
location
.
replace
(
indexpath
);
}
}
window
.
location
.
replace
(
indexpath
);
},
},
error
:
function
()
{
error
:
function
()
{
window
.
location
.
replace
(
"index.html"
);
window
.
location
.
replace
(
"index.html"
);
...
@@ -123,20 +123,7 @@ function redirect(baseUrl) {
...
@@ -123,20 +123,7 @@ function redirect(baseUrl) {
}
}
function
getBaseUrl
()
{
function
getBaseUrl
()
{
if
(
!
window
.
location
.
origin
)
{
return
window
.
location
.
pathname
.
replace
(
/
\/[\w
-
]
+.
(
jsp|html
)
|
\/
+$/ig
,
''
)
window
.
location
.
origin
=
window
.
location
.
protocol
+
"//"
+
window
.
location
.
hostname
+
(
window
.
location
.
port
?
":"
+
window
.
location
.
port
:
""
);
}
var
baseUrl
=
window
.
location
.
origin
+
window
.
location
.
pathname
.
substring
(
window
.
location
.
pathname
.
indexOf
(
"/"
,
2
)
+
1
,
0
);
if
(
baseUrl
.
lastIndexOf
(
"/"
)
!=
baseUrl
.
length
-
1
)
{
if
(
baseUrl
)
{
baseUrl
=
baseUrl
+
"/"
;
}
else
{
baseUrl
=
"/"
;
}
}
return
baseUrl
;
}
}
$
(
function
()
{
$
(
function
()
{
...
...
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