Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchParapheur
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchParapheur
Commits
f81e6dba
Commit
f81e6dba
authored
4 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FIX #15550 TIME 0:10 remove confirm modal
parent
8d445b2d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/frontend/app/administration/connection/connection.component.ts
+19
-22
19 additions, 22 deletions
...end/app/administration/connection/connection.component.ts
with
19 additions
and
22 deletions
src/frontend/app/administration/connection/connection.component.ts
+
19
−
22
View file @
f81e6dba
...
@@ -2,12 +2,11 @@ import { Component, OnInit } from '@angular/core';
...
@@ -2,12 +2,11 @@ import { Component, OnInit } from '@angular/core';
import
{
SignaturesContentService
}
from
'
../../service/signatures.service
'
;
import
{
SignaturesContentService
}
from
'
../../service/signatures.service
'
;
import
{
NotificationService
}
from
'
../../service/notification.service
'
;
import
{
NotificationService
}
from
'
../../service/notification.service
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
MatDialog
}
from
'
@angular/material/dialog
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
finalize
}
from
'
rxjs/operators
'
;
import
{
finalize
}
from
'
rxjs/operators
'
;
import
{
ConfirmComponent
}
from
'
../../plugins/confirm.component
'
;
import
{
AuthService
}
from
'
../../service/auth.service
'
;
import
{
AuthService
}
from
'
../../service/auth.service
'
;
import
{
AlertController
}
from
'
@ionic/angular
'
;
export
interface
Privilege
{
export
interface
Privilege
{
...
@@ -42,8 +41,13 @@ export class ConnectionComponent implements OnInit {
...
@@ -42,8 +41,13 @@ export class ConnectionComponent implements OnInit {
currentConnection
:
Connection
;
currentConnection
:
Connection
;
constructor
(
public
http
:
HttpClient
,
private
translate
:
TranslateService
,
private
route
:
ActivatedRoute
,
private
router
:
Router
,
public
signaturesService
:
SignaturesContentService
,
public
notificationService
:
NotificationService
,
public
dialog
:
MatDialog
,
public
authService
:
AuthService
)
{
constructor
(
}
public
http
:
HttpClient
,
public
signaturesService
:
SignaturesContentService
,
public
notificationService
:
NotificationService
,
public
alertController
:
AlertController
,
public
authService
:
AuthService
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -71,23 +75,16 @@ export class ConnectionComponent implements OnInit {
...
@@ -71,23 +75,16 @@ export class ConnectionComponent implements OnInit {
});
});
}
}
changeConnection
(
connection
:
any
)
{
async
changeConnection
(
connection
:
any
)
{
const
dialogRef
=
this
.
dialog
.
open
(
ConfirmComponent
,
{
autoFocus
:
false
,
data
:
{
mode
:
'
warning
'
,
title
:
'
lang.confirmMsg
'
,
msg
:
'
lang.changeConnectionWarn
'
}
});
this
.
http
.
patch
(
'
../rest/configurations/
'
+
this
.
id
,
{
label
:
this
.
label
,
value
:
connection
})
.
pipe
(
dialogRef
.
afterClosed
().
subscribe
(
result
=>
{
finalize
(()
=>
this
.
loading
=
false
)
if
(
result
===
'
yes
'
)
{
)
this
.
loading
=
true
;
.
subscribe
({
this
.
http
.
patch
(
'
../rest/configurations/
'
+
this
.
id
,
{
label
:
this
.
label
,
value
:
connection
})
next
:
()
=>
{
.
pipe
(
this
.
authService
.
authMode
=
connection
;
finalize
(()
=>
this
.
loading
=
false
)
this
.
notificationService
.
success
(
'
lang.connectionModeUpdated
'
);
)
},
.
subscribe
({
});
next
:
()
=>
{
this
.
authService
.
updateUserInfoWithTokenRefresh
();
this
.
notificationService
.
success
(
'
lang.connectionModeUpdated
'
);
},
});
}
});
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment