Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
webui
Commits
c94e88f0
Commit
c94e88f0
authored
3 years ago
by
AlexKarpov
Browse files
Options
Download
Email Patches
Plain Diff
NAS-113651: Redirect + open slide-in form
parent
31377c33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/pages/credentials/backup-credentials/backup-credentials.component.ts
+14
-1
...ntials/backup-credentials/backup-credentials.component.ts
src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts
+3
-2
...tion/cloudsync/cloudsync-form/cloudsync-form.component.ts
with
17 additions
and
3 deletions
+17
-3
src/app/pages/credentials/backup-credentials/backup-credentials.component.ts
View file @
c94e88f0
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Navigation
,
Router
}
from
'
@angular/router
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
KeychainCredentialType
}
from
'
app/enums/keychain-credential-type.enum
'
;
...
...
@@ -28,15 +29,19 @@ import { SshConnectionsFormComponent } from './forms/ssh-connections-form.compon
export
class
BackupCredentialsComponent
implements
OnInit
{
cards
:
{
name
:
string
;
tableConf
:
AppTableConfig
}[];
private
navigation
:
Navigation
;
protected
providers
:
CloudsyncProvider
[];
constructor
(
private
router
:
Router
,
private
storage
:
StorageService
,
private
cloudCredentialsService
:
CloudCredentialService
,
private
modalService
:
ModalService
,
private
slideInService
:
IxSlideInService
,
private
translate
:
TranslateService
,
)
{}
)
{
this
.
navigation
=
this
.
router
.
getCurrentNavigation
();
}
ngOnInit
():
void
{
this
.
modalService
.
refreshTable$
.
pipe
(
untilDestroyed
(
this
)).
subscribe
(()
=>
{
...
...
@@ -77,6 +82,14 @@ export class BackupCredentialsComponent implements OnInit {
this
.
modalService
.
openInSlideIn
(
CloudCredentialsFormComponent
,
row
.
id
);
},
dataSourceHelper
:
this
.
cloudCredentialsDataSourceHelper
.
bind
(
this
),
afterGetData
:
()
=>
{
const
state
=
this
.
navigation
.
extras
.
state
as
{
editCredential
:
string
;
id
:
string
};
if
(
state
&&
state
.
editCredential
)
{
if
(
state
.
editCredential
===
'
cloudcredentials
'
)
{
this
.
modalService
.
openInSlideIn
(
CloudCredentialsFormComponent
,
state
.
id
);
}
}
},
},
},
{
name
:
'
sshConnections
'
,
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts
View file @
c94e88f0
import
{
Component
}
from
'
@angular/core
'
;
import
{
FormGroup
,
Validators
}
from
'
@angular/forms
'
;
import
{
MatDialog
}
from
'
@angular/material/dialog
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
ActivatedRoute
,
NavigationExtras
,
Router
}
from
'
@angular/router
'
;
import
{
TreeNode
}
from
'
@circlon/angular-tree-component
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
...
...
@@ -804,7 +804,8 @@ export class CloudsyncFormComponent implements FormConfiguration {
buttonMsg
:
this
.
translate
.
instant
(
'
Fix Credential
'
),
}).
pipe
(
filter
(
Boolean
),
untilDestroyed
(
this
)).
subscribe
(()
=>
{
this
.
modalService
.
closeSlideIn
();
this
.
router
.
navigate
([
'
/
'
,
'
credentials
'
,
'
backup-credentials
'
]);
const
navigationExtras
:
NavigationExtras
=
{
state
:
{
editCredential
:
'
cloudcredentials
'
,
id
:
item
.
id
}
};
this
.
router
.
navigate
([
'
/
'
,
'
credentials
'
,
'
backup-credentials
'
],
navigationExtras
);
});
});
}
else
{
...
...
This diff is collapsed.
Click to expand it.
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