Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Project2056
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aray
Project2056
Commits
53e16a9b
Commit
53e16a9b
authored
Feb 23, 2023
by
pg-ta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
service names updated by Admin
parent
ba7fb198
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
AdminDbConsoleController.java
...idate/assessment/controller/AdminDbConsoleController.java
+40
-3
No files found.
src/main/java/com/altimetrik/playground/candidate/assessment/controller/AdminDbConsoleController.java
View file @
53e16a9b
package
com
.
altimetrik
.
playground
.
candidate
.
assessment
.
controller
;
package
com
.
altimetrik
.
ee
.
demo
.
controller
;
public
class
AdminDbConsoleController
{
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.beans.factory.annotation.Value
;
}
@RestController
@RequestMapping
(
value
=
"/"
)
@CrossOrigin
public
class
Default
{
@Value
(
"${k8s.db.env}"
)
private
String
deploymentEnv
;
@GetMapping
(
value
=
"/"
,
produces
=
{
"text/html"
},
consumes
=
MediaType
.
ALL_VALUE
)
public
ResponseEntity
<
String
>
getUserDetailByGitlabEmailId
()
{
String
data
=
"Welcome to Playground Engineering Environment"
;
if
(
deploymentEnv
!=
null
&&
!
deploymentEnv
.
isEmpty
())
{
data
=
"<!DOCTYPE html>\n"
+
"<html>\n"
+
"<head>\n"
+
"<title>Playground Engineering Environment</title>\n"
+
"<style>\n"
+
"body {\n"
+
" background-color: white;\n"
+
" text-align: center;\n"
+
" color: black;\n"
+
"}\n"
+
"table {\n"
+
" align: center;\n"
+
" border-collapse: collapse;\n"
+
" width: 65%;\n"
+
"}\n"
+
"td, th {\n"
+
" border: 1px solid #dddddd;\n"
+
" padding: 8px;\n"
+
"}\n"
+
"tr:nth-child(even) {\n"
+
" background-color: #dddddd;\n"
+
"}\n"
+
"</style>\n"
+
"</head>\n"
+
"<body>\n"
+
"<img src='https://playground.altimetrik.com/assets/img/playground-logo2.svg' alt='Avatar' style='width:200px'>\n"
+
"<h2>Welcome to Playground Engineering Environment</h2>\n"
+
"<h3>Database access details</h3>\n"
+
"<table align=center>\n"
+
" <tr>\n"
+
" <th>DB Admin Console</th>\n"
+
" <th>JDBC URL</th>\n"
+
" <th>User Name</th>\n"
+
" <th>Password</th>\n"
+
" </tr>\n"
+
" <tr>\n"
+
" <td><a target='_blank' href='https://project1473.pg-sandbox.altimetrik.com/h2-console'>Database Admin Console</a></td>\n"
+
" <td>jdbc:h2:file:./src/main/resources/test</td>\n"
+
" <td>*********</td>\n"
+
" <td>**********</td>\n"
+
" </tr>\n"
+
"</table>\n<p>Please Cantact TA/Coach for Database details</p>"
+
"</body>\n"
+
"</html>\n"
;
}
return
new
ResponseEntity
<>(
data
,
HttpStatus
.
OK
);
}
}
\ No newline at end of file
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