Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
CTF
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grzegorz
CTF
Commits
b162112e
Commit
b162112e
authored
Apr 05, 2016
by
Antek Grzanka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Task description showing. Fixed auth redirect.
parent
fe57d070
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
10 deletions
+6
-10
loginController.js
...esources/assets/statics/js/controllers/loginController.js
+3
-3
main.js
service/src/main/resources/assets/statics/js/main.js
+2
-2
task.html
service/src/main/resources/assets/task.html
+1
-5
No files found.
service/src/main/resources/assets/statics/js/controllers/loginController.js
View file @
b162112e
(
function
(){
(
function
(){
angular
.
module
(
'ctfApp'
).
controller
(
'LoginController'
,
angular
.
module
(
'ctfApp'
).
controller
(
'LoginController'
,
[
'$scope'
,
'$rootScope'
,
'$location'
,
'AuthenticationService'
,
'$window'
,
'NavbarService'
,
[
'$scope'
,
'$rootScope'
,
'$location'
,
'AuthenticationService'
,
'$window'
,
'NavbarService'
,
'AppSettings'
,
function
(
$scope
,
$rootScope
,
$location
,
AuthenticationService
,
$window
,
NavbarService
)
{
function
(
$scope
,
$rootScope
,
$location
,
AuthenticationService
,
$window
,
NavbarService
,
AppSettings
)
{
// reset login status
// reset login status
AuthenticationService
.
clearCredentials
();
AuthenticationService
.
clearCredentials
();
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
$location
.
path
(
'/'
);
$location
.
path
(
'/'
);
AuthenticationService
.
setCredentials
(
$scope
.
username
,
$scope
.
password
,
response
.
team
);
AuthenticationService
.
setCredentials
(
$scope
.
username
,
$scope
.
password
,
response
.
team
);
// redirect to additional external auth point
// redirect to additional external auth point
$window
.
location
.
href
=
"http://"
+
$scope
.
username
+
":"
+
$scope
.
password
+
"@52.28.244.24:8080/api/v1/auth"
;
$window
.
location
.
href
=
AppSettings
.
getApiAddressWithCredentials
(
$scope
.
username
,
$scope
.
password
)
+
'/auth'
;
}
else
{
}
else
{
Materialize
.
toast
(
'Błąd logowania! Spróbuj jeszcze raz.'
,
5000
,
'toast-error'
);
Materialize
.
toast
(
'Błąd logowania! Spróbuj jeszcze raz.'
,
5000
,
'toast-error'
);
$scope
.
dataLoading
=
false
;
$scope
.
dataLoading
=
false
;
...
...
service/src/main/resources/assets/statics/js/main.js
View file @
b162112e
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
app
.
factory
(
'AppSettings'
,
[
'$http'
,
function
(
$http
)
{
app
.
factory
(
'AppSettings'
,
[
'$http'
,
function
(
$http
)
{
// fallback into defaults, if everything fails, world collapses and /startup will not resolve
// fallback into defaults, if everything fails, world collapses
, hell freezes
and /startup will not resolve
var
domainName
=
'52.2
8.244.2
4'
,
port
=
"http"
,
schema
=
8080
;
var
domainName
=
'52.2
5.28.6
4'
,
port
=
"http"
,
schema
=
8080
;
return
{
return
{
...
...
service/src/main/resources/assets/task.html
View file @
b162112e
...
@@ -18,11 +18,7 @@
...
@@ -18,11 +18,7 @@
</div>
</div>
</span>
</span>
<p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
{{task.description}}
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</p>
</p>
</div>
</div>
</div>
</div>
...
...
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