Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
bd6f7712
Unverified
Commit
bd6f7712
authored
3 years ago
by
Denys Butenko
Browse files
Options
Download
Email Patches
Plain Diff
NAS-112713: Replace T-marker with translate.instant
parent
2ef5f682
base
DOCS
DOCS-3538
NAS-010101
NAS-100796
NAS-105865
NAS-108939
NAS-110488
NAS-110533
NAS-110571
NAS-110777
NAS-110800
NAS-111872
NAS-111962-master
NAS-111989
NAS-112060
NAS-112189
NAS-112307
NAS-112334
NAS-112343
NAS-112371
NAS-112556
NAS-112556-akt
NAS-112767
NAS-112767-alt2
NAS-112767-mocks
NAS-112795
NAS-112921
NAS-112945
NAS-112995-22.12
NAS-113044
NAS-113053
NAS-113219
NAS-113238
NAS-113257
NAS-113292
NAS-113293-reproduction
NAS-113363-3
NAS-113370
NAS-113375
NAS-113377
NAS-113378
NAS-113464
NAS-113464-alt
NAS-113474
NAS-113486
NAS-113490
NAS-113511
NAS-113590
NAS-113598
NAS-113651
NAS-113671
NAS-113675
NAS-113679
NAS-113695
NAS-113701
NAS-113706
NAS-113708
NAS-113709
NAS-113723-22.02-RC.2
NAS-113733
NAS-113734
NAS-113738-22.02
NAS-113760
NAS-113790
NAS-113817
NAS-113821
NAS-113837
NAS-113860
NAS-113867
NAS-113876
NAS-113903
NAS-113903-2
NAS-113904-2
NAS-113953
NAS-114032
NAS-114045
NAS-114058
NAS-114084
NAS-114087
NAS-114088
NAS-114098
NAS-114171
NAS-114173
NAS-114179
NAS-114179-2
NAS-114204
NAS-114214
NAS-114215
NAS-114241
NAS-114338
NAS-114347
NAS-114389
NAS-114410
NAS-114413-2
NAS-114420
NAS-114428
NAS-114447
NAS-114448
NAS-114448-bluefin
NAS-114471
NAS-114546
NAS-114549
NAS-114554
NAS-114607
NAS-114622
NAS-114639
NAS-114659
NAS-114660
NAS-114751
NAS-114769
NAS-114806
NAS-114845
NAS-114846
NAS-114881
NAS-114915
NAS-114950
NAS-115146
NAS-115162
NAS-115254
NAS-115271
NAS-115339
NAS-115340
NAS-115357
NAS-115488
NAS-115546
NAS-115547
NAS-115593
NAS-115593-2
NAS-115593-3
NAS-115593-4
NAS-115593-5
NAS-115593-6
NAS-115593-7
NAS-115713-22-12
NAS-115759
NAS-115759-22.12
NAS-115887-22.02.1
NAS-115942-22.02
NAS-116151
NAS-116162
NAS-116334-1
NAS-116334-2
NAS-116393
NAS-116395
NAS-116397
NAS-116397-2
NAS-116397-3
NAS-116398
NAS-116405
NAS-116406
NAS-116410
NAS-116422
NAS-116450
NAS-116469
NAS-116609
NAS-116715
NAS-116715-mobile
NAS-116715-v2
NAS-116724
NAS-116915
NAS-116916
NAS-117017
NAS-117019
NAS-117028-22.12-BETA.2
NAS-117060
NAS-117098
NAS-117149-22.12
NAS-117216
NAS-117233
NAS-117239
NAS-117253
NAS-117278
NAS-117317
NAS-117323
NAS-117333
NAS-117401
NAS-117439
NAS-117475
NAS-117476
NAS-117481-test
NAS-117520
NAS-117573-v2
NAS-117594
NAS-117628
NAS-117688-bluefin
NAS-117700
NAS-117713-12
NAS-117714
NAS-117718
NAS-117734
NAS-117768
NAS-117813
NAS-117823
NAS-117841-2
NAS-117846
NAS-117959
NAS-118036
NAS-118044
NAS-118113
NAS-118165
NAS-118303
NAS-118454-22.12
NAS-118465
NAS-118505-22.12
NAS-118545
NAS-118548
NAS-119131
NAS-119140
NAS-119180-22.12.1
NAS-119431
NAS-119556-23.10
NAS-119615-22.12.1
NAS-119668
NAS-119695
NAS-119749-bluefin
NAS-119750-22.12.1
NAS-119806
NAS-119812
NAS-119886-22.12.1
NAS-119996
NAS-119996-bluefin
NAS-120045
NAS-120047
NAS-120057
NAS-120173-22.12.1
NAS-120181-22.12.1
NAS-120264-22.12.1
NAS-120274
NAS-120296-22.12.1
NAS-120326-22.12.1
NAS-120490_
NAS-120503
NAS-121006-22.12.2
NAS-121124
NAS-121128-22.12.2
NAS-121128-release-22.12.2
NAS-121136
NAS-121177
NAS-121218-22.12.3
NAS-121300
NAS-121316
NAS-121541
NAS-121542
NAS-121686
NAS-121721-22.12.3
NAS-121778
NAS-121827
NAS-121884-22.12.3
NAS-122267-22.12.4
NAS-122372
NAS-122601
NAS-122686
NAS-122706
NAS-122721
NAS-122751-23.10-BETA.1
NAS-122759
NAS-122781
NAS-122794-23.10
NAS-122855
NAS-122870-bluefin
NAS-122969
NAS-122993-22.12.4
NAS-123055-22.12.4
NAS-123278
NAS-123295
NAS-123437
NAS-123478-22.12.4
NAS-123484
NAS-123492
NAS-123526-22.12.4
NAS-123651
NAS-123651-23.10-BETA.1
NAS-123666
NAS-123723
NAS-123723-cobia
NAS-123762
NAS-123762-23.10
NAS-123778-23.10
NAS-123778-23.10-RC.1
NAS-123778-RC.1
NAS-123801
NAS-123810-23.10
NAS-123813-22.12.4
NAS-123836
NAS-123836-23.10-BETA.1
NAS-123836-24.04
NAS-123861
NAS-123911-23.10-BETA.1
NAS-123928-23.10
NAS-123931-22.12.4
NAS-123945
NAS-124044
NAS-124077
NAS-124131-23.10
NAS-124137
NAS-124183
NAS-124231
NAS-124232
NAS-124237-23.10
NAS-124325-23.10.0
NAS-124335
NAS-124354
NAS-124430
NAS-124454
NAS-124481-23.10.0
NAS-124481-23.10.1
NAS-124555-23.10.0
NAS-124555-23.10.1
NAS-124666
NAS-124707-23.10.0
NAS-124707-23.10.1
NAS-124716
NAS-124846-23.10.0
NAS-124846-23.10.1
NAS-124892
NAS-124895-23.10.1
NAS-124908
NAS-124951
NAS-124964
NAS-124999
NAS-125092
NAS-125213-23.10.1
NAS-125307
NAS-125532
NAS-125568
NAS-125607-validator
NAS-125616-23.10.2
NAS-125654
NAS-125703-23.10.2
NAS-125728
NAS-125931
NAS-126699
NAS-126774-24.04-RC.1
NAS-126774-dragonfish
NAS-126795
NAS-126795-test
NAS-126795-test2
NAS-127001
NAS-127002-24.04-RC.1
NAS-127022
NAS-127041-24.04-BETA.1
NAS-127049-24.04-RC.1
NAS-127297-24.04-RC.1
NAS-127297-24.10
NAS-127369
NAS-127551
NAS-127551-alt
NAS-127589-24.04.0
NAS-127593
NAS-127615-24.04.0
NAS-127660
NAS-127794
NAS-127829-24.10
NAS-127854-24.04.0
NAS-128030
NAS-128045
NAS-128071
NAS-128173
NAS-128209
NAS-128287
NAS-128289
TE-1553-dragonfish
TE-1628
auto-129
back
bugfix/NAS-117859-sidebar-menu-fix
bugfix/NAS-117941-error-when-removing-pools-and-visit-datasets
bugfix/NAS-118171-rsynk-task-local-path
bugfix/NAS-118260-boot-env-keep-table-row
bugfix/NAS-118282-search-input-fixes
bugfix/NAS-118404-dataset-icon-role-double-toooltip
bugfix/NAS-118414-warning-modal-icon
bugfix/NAS-118415-tree-select-undefined
bugfix/NAS-118454-acl-manager-after-dataset-creation-fix
bugfix/NAS-118470-multiselext-styles-are-broken
bugfix/NAS-118503-datasets-glitch-fix
bugfix/NAS-118504-redirect-to-correct-dataset-after-permissions-submit
bugfix/NAS-118510-redirect-url-fix-after-manual-change
bugfix/NAS-118530-advanced-settings-box-duplicates
bugfix/NAS-118541-progress-bar-oberflows
bugfix/NAS-118557-replication-task-forbid-custom-retention-policy-cases
bugfix/NAS-118600-smb-share-redirect
bugfix/NAS-118601-remove-mixed-for-zfs-datasets
cpu-pinning
dataset-tree-tooltips
developer/lyy
feature/NAS-117754-font-rendering
feature/NAS-117968-tooltips-to-status-icons-on-pools
feature/NAS-118058-improve-dashboard-icons-sync-pool-and-storage
feature/NAS-118147-html-refactoring
feature/NAS-118269-improve-ui
feature/NAS-118303
feature/NAS-118333-storage-dashboard-icons-update
feature/NAS-118334-screentype-enum
feature/NAS-118335-improve-spinners-look
feature/NAS-118349-datasets-long-names
feature/NAS-118360-handle-clipboard-api-not-available
feature/NAS-118412-pool-processing-modal
feature/NAS-118466-root-path-mnt
feature/NAS-118543-user-password-field
feauture/NAS-117474-datasets-table-header-sticky
l10n_master
llll
master
master-old
metrics-enable
patch-1
patch-235
q5sys-3838
rel-v0.0.1
release-test/22.02.3
release/22.02
release/22.02-RC.2
release/22.02-test
release/22.02.1
release/22.02.2
release/22.02.3
release/22.02.4
release/22.12
release/22.12-BETA.1
release/22.12-BETA.2
release/22.12-RC.1
release/22.12.1
release/22.12.2
release/22.12.3
release/22.12.4
release/23.10-BETA.1
release/23.10-RC.1
release/23.10.0
release/23.10.1
release/23.10.1.1
release/23.10.1.2
release/23.10.1.3
release/23.10.2
release/24.04-BETA.1
release/24.04-RC.1
release/24.04.0
renediepenbroek/master
revert-6783-NAS-116405
revert-7745-NAS-120274
stable/angelfish
stable/bluefin
stable/cobia
stable/dragonfish
t1356-scaleuitest
test-xxxyyy
testing-refine-branchout-process
testing-refine-branchout-process2
v0.0.2
TS-24.04-RC.1
TS-24.04-BETA.1
TS-23.10.2
TS-23.10.1.3
TS-23.10.1.2
TS-23.10.1.1
TS-23.10.1
TS-23.10.0.1
TS-23.10.0
TS-23.10-RC.1
TS-23.10-BETA.1
TS-22.12.4.2
TS-22.12.4.1
TS-22.12.4
TS-22.12.3.3
TS-22.12.3.2
TS-22.12.3.1
TS-22.12.3
TS-22.12.2
TS-22.12.1
TS-22.12.0
TS-22.12-RC.1
TS-22.12-BETA.2
TS-22.12-BETA.1
TS-22.12-ALPHA.1
TS-22.02.4
TS-22.02.3
TS-22.02.2.1
TS-22.02.2
TS-22.02.1
TS-22.02.0.1
TS-22.02.0
TS-22.2.0
TS-22.02.RELEASE.1
TS-22.02-RC.2
TS-12.12.3
DN110M-CS-v2.0
No related merge requests found
Changes
212
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
src/app/components/common/dialog/jobs-manager/jobs-manager.component.ts
+4
-5
...ents/common/dialog/jobs-manager/jobs-manager.component.ts
src/app/components/common/dialog/resilver-progress/resilver-progress.component.ts
+3
-4
...n/dialog/resilver-progress/resilver-progress.component.ts
src/app/components/common/topbar/topbar.component.ts
+15
-16
src/app/components/common/topbar/topbar.component.ts
src/app/pages/account/groups/group-list/group-list.component.ts
+1
-2
...p/pages/account/groups/group-list/group-list.component.ts
src/app/pages/account/users/user-list/user-list.component.ts
+4
-5
src/app/pages/account/users/user-list/user-list.component.ts
src/app/pages/applications/chart-releases/chart-releases.component.ts
+2
-3
...s/applications/chart-releases/chart-releases.component.ts
src/app/pages/applications/pod-logs/pod-logs.component.ts
+1
-2
src/app/pages/applications/pod-logs/pod-logs.component.ts
src/app/pages/applications/pod-shell/pod-shell.component.ts
+3
-2
src/app/pages/applications/pod-shell/pod-shell.component.ts
src/app/pages/common/confirm-dialog/confirm-dialog.component.ts
+2
-3
...p/pages/common/confirm-dialog/confirm-dialog.component.ts
src/app/pages/common/entity/entity-form/components/form-explorer/form-explorer.component.ts
+1
-2
...-form/components/form-explorer/form-explorer.component.ts
src/app/pages/common/entity/entity-form/components/form-scheduler/form-scheduler.component.ts
+11
-12
...orm/components/form-scheduler/form-scheduler.component.ts
src/app/pages/common/entity/entity-form/components/form-select/form-select.component.ts
+3
-4
...tity-form/components/form-select/form-select.component.ts
src/app/pages/common/entity/entity-form/components/form-upload/form-upload.component.ts
+3
-4
...tity-form/components/form-upload/form-upload.component.ts
src/app/pages/common/entity/entity-form/entity-form-embedded.component.ts
+1
-2
...mmon/entity/entity-form/entity-form-embedded.component.ts
src/app/pages/common/entity/entity-form/entity-form.component.ts
+4
-5
.../pages/common/entity/entity-form/entity-form.component.ts
src/app/pages/common/entity/entity-table/entity-table.component.ts
+18
-19
...ages/common/entity/entity-table/entity-table.component.ts
src/app/pages/common/entity/entity-wizard/entity-wizard.component.ts
+3
-4
...es/common/entity/entity-wizard/entity-wizard.component.ts
src/app/pages/common/password-dialog/password-dialog.component.ts
+2
-3
...pages/common/password-dialog/password-dialog.component.ts
src/app/pages/credentials/backup-credentials/backup-credentials.component.ts
+4
-5
...ntials/backup-credentials/backup-credentials.component.ts
src/app/pages/credentials/backup-credentials/forms/cloud-credentials-form.component.ts
+9
-7
...kup-credentials/forms/cloud-credentials-form.component.ts
with
94 additions
and
109 deletions
+94
-109
src/app/components/common/dialog/jobs-manager/jobs-manager.component.ts
View file @
bd6f7712
...
...
@@ -6,7 +6,6 @@ import {
}
from
'
@angular/core
'
;
import
{
MatDialog
,
MatDialogRef
}
from
'
@angular/material/dialog
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
untilDestroyed
,
UntilDestroy
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
filter
}
from
'
rxjs/operators
'
;
...
...
@@ -44,11 +43,11 @@ export class JobsManagerComponent implements OnInit {
emptyConfig
:
EmptyConfig
=
{
type
:
EmptyType
.
NoPageData
,
large
:
false
,
title
:
T
(
'
No jobs are available.
'
),
title
:
this
.
translate
.
instant
(
'
No jobs are available.
'
),
icon
:
'
assignment
'
,
message
:
T
(
'
Click the button below to see all jobs.
'
),
message
:
this
.
translate
.
instant
(
'
Click the button below to see all jobs.
'
),
button
:
{
label
:
T
(
'
History
'
),
label
:
this
.
translate
.
instant
(
'
History
'
),
action
:
this
.
goToJobs
.
bind
(
this
),
},
};
...
...
@@ -93,7 +92,7 @@ export class JobsManagerComponent implements OnInit {
this
.
dialogRef
.
close
();
let
title
=
job
.
description
?
job
.
description
:
job
.
method
;
if
(
job
.
state
===
JobState
.
Running
)
{
title
=
this
.
translate
.
instant
(
T
(
'
Updating
'
)
)
;
title
=
this
.
translate
.
instant
(
'
Updating
'
);
}
const
dialogRef
=
this
.
matDialog
.
open
(
EntityJobComponent
,
{
data
:
{
title
},
...
...
This diff is collapsed.
Click to expand it.
src/app/components/common/dialog/resilver-progress/resilver-progress.component.ts
View file @
bd6f7712
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
PoolScanFunction
}
from
'
app/enums/pool-scan-function.enum
'
;
...
...
@@ -20,9 +19,9 @@ export class ResilverProgressDialogComponent implements OnInit {
progressTotalPercent
=
0
;
state
:
PoolScanState
;
resilveringDetails
:
ResilverData
;
title
=
T
(
'
Resilvering Status
'
);
description
=
T
(
'
Resilvering pool:
'
);
statusLabel
=
T
(
'
Status:
'
);
title
=
this
.
translate
.
instant
(
'
Resilvering Status
'
);
description
=
this
.
translate
.
instant
(
'
Resilvering pool:
'
);
statusLabel
=
this
.
translate
.
instant
(
'
Status:
'
);
diskName
:
string
;
readonly
PoolScanState
=
PoolScanState
;
...
...
This diff is collapsed.
Click to expand it.
src/app/components/common/topbar/topbar.component.ts
View file @
bd6f7712
...
...
@@ -5,7 +5,6 @@ import { MediaObserver } from '@angular/flex-layout';
import
{
MatDialog
,
MatDialogRef
}
from
'
@angular/material/dialog
'
;
import
{
MatSidenav
}
from
'
@angular/material/sidenav
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
Observable
,
Subject
,
Subscription
}
from
'
rxjs
'
;
...
...
@@ -363,10 +362,10 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
if
(
!
isEulaAccepted
||
window
.
localStorage
.
getItem
(
'
upgrading_status
'
)
===
'
upgrading
'
)
{
this
.
ws
.
call
(
'
truenas.get_eula
'
).
pipe
(
untilDestroyed
(
this
)).
subscribe
((
eula
)
=>
{
this
.
dialogService
.
confirm
({
title
:
T
(
'
End User License Agreement - TrueNAS
'
),
title
:
this
.
translate
.
instant
(
'
End User License Agreement - TrueNAS
'
),
message
:
eula
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
I Agree
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
I Agree
'
),
hideCancel
:
true
,
}).
pipe
(
filter
(
Boolean
),
untilDestroyed
(
this
)).
subscribe
(()
=>
{
window
.
localStorage
.
removeItem
(
'
upgrading_status
'
);
...
...
@@ -451,7 +450,7 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
title
:
network_interfaces_helptext
.
pending_changes_title
,
message
:
network_interfaces_helptext
.
pending_changes_message
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Continue
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Continue
'
),
}).
pipe
(
filter
(
Boolean
),
untilDestroyed
(
this
)).
subscribe
(()
=>
{
this
.
router
.
navigate
([
'
/network
'
]);
});
...
...
@@ -558,12 +557,12 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
upgradePendingDialog
():
void
{
this
.
dialogService
.
confirm
({
title
:
T
(
'
Pending Upgrade
'
),
message
:
T
(
'
There is an upgrade waiting to finish.
'
),
title
:
this
.
translate
.
instant
(
'
Pending Upgrade
'
),
message
:
this
.
translate
.
instant
(
'
There is an upgrade waiting to finish.
'
),
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Continue
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Continue
'
),
}).
pipe
(
filter
(
Boolean
),
untilDestroyed
(
this
)).
subscribe
(()
=>
{
const
dialogRef
=
this
.
dialog
.
open
(
EntityJobComponent
,
{
data
:
{
title
:
T
(
'
Update
'
)
}
});
const
dialogRef
=
this
.
dialog
.
open
(
EntityJobComponent
,
{
data
:
{
title
:
this
.
translate
.
instant
(
'
Update
'
)
}
});
dialogRef
.
componentInstance
.
setCall
(
'
failover.upgrade_finish
'
);
dialogRef
.
componentInstance
.
disableProgressValue
(
true
);
dialogRef
.
componentInstance
.
submit
();
...
...
@@ -611,10 +610,10 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
:
helptext
.
updateRunning_dialog
.
message
+
helptext
.
updateRunning_dialog
.
message_pt2
;
this
.
dialogService
.
confirm
({
message
,
title
:
helptext
.
updateRunning_dialog
.
title
,
message
:
this
.
translate
.
instant
(
message
)
,
title
:
this
.
translate
.
instant
(
helptext
.
updateRunning_dialog
.
title
)
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Close
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Close
'
),
hideCancel
:
true
,
});
}
...
...
@@ -800,7 +799,7 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
openChangePasswordDialog
():
void
{
const
conf
:
DialogFormConfiguration
=
{
title
:
T
(
'
Change Password
'
),
title
:
this
.
translate
.
instant
(
'
Change Password
'
),
message
:
helptext
.
changePasswordDialog
.
pw_form_title_name
,
fieldConfig
:
[
{
...
...
@@ -828,7 +827,7 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
validation
:
[
matchOtherValidator
(
'
password
'
)],
},
],
saveButtonText
:
T
(
'
Save
'
),
saveButtonText
:
this
.
translate
.
instant
(
'
Save
'
),
custActions
:
[],
parent
:
this
,
customSubmit
:
(
entityDialog
:
EntityDialogComponent
)
=>
{
...
...
@@ -841,10 +840,10 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
delete
pwChange
.
curr_password
;
this
.
ws
.
call
(
'
user.update
'
,
[
1
,
pwChange
]).
pipe
(
untilDestroyed
(
this
)).
subscribe
(()
=>
{
this
.
loader
.
close
();
this
.
dialogService
.
info
(
T
(
'
Success
'
),
helptext
.
changePasswordDialog
.
pw_updated
,
'
300px
'
,
'
info
'
,
false
);
this
.
dialogService
.
info
(
this
.
translate
.
instant
(
'
Success
'
),
helptext
.
changePasswordDialog
.
pw_updated
,
'
300px
'
,
'
info
'
,
false
);
},
(
res
)
=>
{
this
.
loader
.
close
();
this
.
dialogService
.
info
(
T
(
'
Error
'
),
res
,
'
300px
'
,
'
warning
'
,
false
);
this
.
dialogService
.
info
(
this
.
translate
.
instant
(
'
Error
'
),
res
,
'
300px
'
,
'
warning
'
,
false
);
});
}
else
{
this
.
loader
.
close
();
...
...
@@ -852,7 +851,7 @@ export class TopbarComponent extends ViewControllerComponent implements OnInit,
}
},
(
res
)
=>
{
this
.
loader
.
close
();
this
.
dialogService
.
info
(
T
(
'
Error
'
),
res
,
'
300px
'
,
'
warning
'
,
false
);
this
.
dialogService
.
info
(
this
.
translate
.
instant
(
'
Error
'
),
res
,
'
300px
'
,
'
warning
'
,
false
);
});
},
};
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/account/groups/group-list/group-list.component.ts
View file @
bd6f7712
import
{
Component
}
from
'
@angular/core
'
;
import
{
MatCheckboxChange
}
from
'
@angular/material/checkbox
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
filter
}
from
'
rxjs/operators
'
;
...
...
@@ -51,7 +50,7 @@ export class GroupListComponent implements EntityTableConfig<Group> {
paging
:
true
,
sorting
:
{
columns
:
this
.
columns
},
deleteMsg
:
{
title
:
T
(
'
Group
'
),
title
:
this
.
translate
.
instant
(
'
Group
'
),
key_props
:
[
'
group
'
],
},
};
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/account/users/user-list/user-list.component.ts
View file @
bd6f7712
import
{
Component
}
from
'
@angular/core
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -197,10 +196,10 @@ export class UserListComponent implements EntityTableConfig<UserListRow> {
});
users
.
forEach
((
user
)
=>
{
user
.
details
=
[];
user
.
details
.
push
({
label
:
T
(
'
GID
'
),
value
:
user
.
group
[
'
bsdgrp_gid
'
]
},
{
label
:
T
(
'
Home Directory
'
),
value
:
user
.
home
},
{
label
:
T
(
'
Shell
'
),
value
:
user
.
shell
},
{
label
:
T
(
'
Email
'
),
value
:
user
.
email
});
user
.
details
.
push
({
label
:
this
.
translate
.
instant
(
'
GID
'
),
value
:
user
.
group
[
'
bsdgrp_gid
'
]
},
{
label
:
this
.
translate
.
instant
(
'
Home Directory
'
),
value
:
user
.
home
},
{
label
:
this
.
translate
.
instant
(
'
Shell
'
),
value
:
user
.
shell
},
{
label
:
this
.
translate
.
instant
(
'
Email
'
),
value
:
user
.
email
});
});
});
if
(
this
.
prefService
.
preferences
.
hide_builtin_users
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/applications/chart-releases/chart-releases.component.ts
View file @
bd6f7712
...
...
@@ -4,7 +4,6 @@ import {
import
{
MatDialog
}
from
'
@angular/material/dialog
'
;
import
{
MatDialogRef
}
from
'
@angular/material/dialog/dialog-ref
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -514,7 +513,7 @@ export class ChartReleasesComponent implements OnInit {
title
:
helptext
.
podConsole
.
nopod
.
title
,
message
:
helptext
.
podConsole
.
nopod
.
message
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Close
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Close
'
),
hideCancel
:
true
,
});
}
else
{
...
...
@@ -553,7 +552,7 @@ export class ChartReleasesComponent implements OnInit {
title
:
helptext
.
podConsole
.
nopod
.
title
,
message
:
helptext
.
podConsole
.
nopod
.
message
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Close
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Close
'
),
hideCancel
:
true
,
});
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/applications/pod-logs/pod-logs.component.ts
View file @
bd6f7712
...
...
@@ -4,7 +4,6 @@ import {
}
from
'
@angular/core
'
;
import
{
MatDialog
}
from
'
@angular/material/dialog
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -92,7 +91,7 @@ export class PodLogsComponent implements OnInit, OnDestroy {
title
:
helptext
.
podLogs
.
nopod
.
title
,
message
:
helptext
.
podLogs
.
nopod
.
message
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Close
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Close
'
),
hideCancel
:
true
,
});
}
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/applications/pod-shell/pod-shell.component.ts
View file @
bd6f7712
...
...
@@ -2,8 +2,8 @@ import {
Component
,
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
import
{
Observable
,
Subject
,
Subscriber
}
from
'
rxjs
'
;
import
helptext
from
'
app/helptext/shell/shell
'
;
...
...
@@ -33,6 +33,7 @@ export class PodShellComponent implements TerminalConfiguration {
private
ws
:
WebSocketService
,
private
dialogService
:
DialogService
,
private
aroute
:
ActivatedRoute
,
private
translate
:
TranslateService
,
)
{}
preInit
():
Observable
<
void
>
{
...
...
@@ -51,7 +52,7 @@ export class PodShellComponent implements TerminalConfiguration {
title
:
helptext
.
podConsole
.
nopod
.
title
,
message
:
helptext
.
podConsole
.
nopod
.
message
,
hideCheckBox
:
true
,
buttonMsg
:
T
(
'
Close
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Close
'
),
hideCancel
:
true
,
});
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/confirm-dialog/confirm-dialog.component.ts
View file @
bd6f7712
import
{
Component
,
Output
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
MatCheckboxChange
}
from
'
@angular/material/checkbox/checkbox
'
;
import
{
MatDialogRef
}
from
'
@angular/material/dialog
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
ApiMethod
}
from
'
app/interfaces/api-directory.interface
'
;
...
...
@@ -13,8 +12,8 @@ import { ApiMethod } from 'app/interfaces/api-directory.interface';
export
class
ConfirmDialogComponent
{
title
:
string
;
message
:
string
;
buttonMsg
:
string
=
T
(
'
Continue
'
);
cancelMsg
:
string
=
T
(
'
Cancel
'
);
buttonMsg
:
string
=
this
.
translate
.
instant
(
'
Continue
'
);
cancelMsg
:
string
=
this
.
translate
.
instant
(
'
Cancel
'
);
hideCheckBox
=
false
;
isSubmitEnabled
=
false
;
secondaryCheckBox
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-form/components/form-explorer/form-explorer.component.ts
View file @
bd6f7712
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
FormGroup
}
from
'
@angular/forms
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
TREE_ACTIONS
,
KEYS
,
IActionMapping
,
TreeNode
,
ITreeOptions
,
...
...
@@ -38,7 +37,7 @@ export class FormExplorerComponent implements Field, OnInit {
},
click
:
(
tree
,
node
,
$event
)
=>
{
if
(
node
.
isRoot
&&
!
this
.
rootSelectable
)
{
this
.
config
.
warnings
=
T
(
'
Root node is not a valid value
'
);
this
.
config
.
warnings
=
this
.
translate
.
instant
(
'
Root node is not a valid value
'
);
return
;
}
this
.
config
.
warnings
=
null
;
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-form/components/form-scheduler/form-scheduler.component.ts
View file @
bd6f7712
...
...
@@ -5,7 +5,6 @@ import {
}
from
'
@angular/core
'
;
import
{
FormGroup
,
FormControl
,
AbstractControl
}
from
'
@angular/forms
'
;
import
{
MatMonthView
}
from
'
@angular/material/datepicker
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
parser
from
'
cron-parser
'
;
...
...
@@ -199,33 +198,33 @@ export class FormSchedulerComponent implements Field, OnInit, AfterViewInit, Aft
}
customOption
:
CronPreset
=
{
label
:
T
(
'
Custom
'
),
label
:
this
.
translate
.
instant
(
'
Custom
'
),
value
:
this
.
crontab
,
description
:
T
(
'
Create custom schedule
'
),
description
:
this
.
translate
.
instant
(
'
Create custom schedule
'
),
};
selectedOption
:
CronPreset
;
presets
:
CronPreset
[]
=
[
{
label
:
T
(
'
Hourly
'
),
label
:
this
.
translate
.
instant
(
'
Hourly
'
),
value
:
'
0 * * * *
'
,
description
:
T
(
'
at the start of each hour
'
),
description
:
this
.
translate
.
instant
(
'
at the start of each hour
'
),
},
{
label
:
T
(
'
Daily
'
),
label
:
this
.
translate
.
instant
(
'
Daily
'
),
value
:
'
0 0 * * *
'
,
description
:
T
(
'
at 00:00 (12:00 AM)
'
),
description
:
this
.
translate
.
instant
(
'
at 00:00 (12:00 AM)
'
),
},
{
label
:
T
(
'
Weekly
'
),
label
:
this
.
translate
.
instant
(
'
Weekly
'
),
value
:
'
0 0 * * sun
'
,
description
:
T
(
'
on Sundays at 00:00 (12:00 AM)
'
),
description
:
this
.
translate
.
instant
(
'
on Sundays at 00:00 (12:00 AM)
'
),
},
{
label
:
T
(
'
Monthly
'
),
label
:
this
.
translate
.
instant
(
'
Monthly
'
),
value
:
'
0 0 1 * *
'
,
description
:
T
(
'
on the first day of the month at 00:00 (12:00 AM)
'
),
description
:
this
.
translate
.
instant
(
'
on the first day of the month at 00:00 (12:00 AM)
'
),
},
];
...
...
@@ -255,7 +254,7 @@ export class FormSchedulerComponent implements Field, OnInit, AfterViewInit, Aft
if
(
!
p
.
value
)
{
this
.
crontab
=
'
0 0 * * *
'
;
this
.
convertPreset
(
'
0 0 * * *
'
);
this
.
_preset
=
this
.
customOption
;
// { label:
T
('Custom'), value: this.crontab };
this
.
_preset
=
this
.
customOption
;
// { label:
this.translate.instant
('Custom'), value: this.crontab };
}
else
{
this
.
crontab
=
p
.
value
;
this
.
convertPreset
(
p
.
value
);
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-form/components/form-select/form-select.component.ts
View file @
bd6f7712
...
...
@@ -4,7 +4,6 @@ import {
import
{
AbstractControl
,
FormGroup
}
from
'
@angular/forms
'
;
import
{
MatFormField
}
from
'
@angular/material/form-field
'
;
import
{
MatSelect
,
MatSelectChange
}
from
'
@angular/material/select
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -136,17 +135,17 @@ export class FormSelectComponent implements Field, AfterViewInit, AfterViewCheck
if
(
!
this
.
shouldAlertOnOption
(
option
)
||
this
.
disableAlert
)
return
;
const
conf
:
DialogFormConfiguration
=
{
title
:
T
(
'
Alert
'
),
title
:
this
.
translate
.
instant
(
'
Alert
'
),
message
:
this
.
config
.
alert
.
message
,
hideCancel
:
true
,
fieldConfig
:
[
{
type
:
'
checkbox
'
,
name
:
'
disable_alert
'
,
placeholder
:
T
(
'
Don
\'
t show this message again
'
),
placeholder
:
this
.
translate
.
instant
(
'
Don
\'
t show this message again
'
),
},
],
saveButtonText
:
T
(
'
OK
'
),
saveButtonText
:
this
.
translate
.
instant
(
'
OK
'
),
customSubmit
:
(
entityDialog
:
EntityDialogComponent
)
=>
{
entityDialog
.
dialogRef
.
close
(
true
);
if
(
entityDialog
.
formValue
.
disable_alert
)
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-form/components/form-upload/form-upload.component.ts
View file @
bd6f7712
...
...
@@ -3,7 +3,6 @@ import {
}
from
'
@angular/common/http
'
;
import
{
Component
,
ViewChild
,
ElementRef
}
from
'
@angular/core
'
;
import
{
FormGroup
}
from
'
@angular/forms
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
Subscription
,
Observer
}
from
'
rxjs
'
;
...
...
@@ -72,15 +71,15 @@ export class FormUploadComponent {
if
(
event
.
statusText
===
'
OK
'
)
{
this
.
newMessage
(
location
+
'
/
'
+
fileBrowser
.
files
[
0
].
name
);
this
.
loader
.
close
();
this
.
dialog
.
info
(
T
(
'
File upload complete
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
this
.
dialog
.
info
(
this
.
translate
.
instant
(
'
File upload complete
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
}
}
},
(
error
)
=>
{
this
.
loader
.
close
();
this
.
dialog
.
errorReport
(
T
(
'
Error
'
),
error
.
statusText
,
error
.
message
);
this
.
dialog
.
errorReport
(
this
.
translate
.
instant
(
'
Error
'
),
error
.
statusText
,
error
.
message
);
});
}
else
{
this
.
dialog
.
info
(
T
(
'
Please make sure to select a file
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
this
.
dialog
.
info
(
this
.
translate
.
instant
(
'
Please make sure to select a file
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-form/entity-form-embedded.component.ts
View file @
bd6f7712
...
...
@@ -17,7 +17,6 @@ import {
FormBuilder
,
FormControl
,
FormGroup
,
NgForm
,
}
from
'
@angular/forms
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -94,7 +93,7 @@ export class EntityFormEmbeddedComponent implements OnInit, OnDestroy, AfterView
fieldSets
:
FieldSet
[];
fieldConfig
:
FieldConfig
[];
hasConf
=
true
;
saveSubmitText
:
string
=
T
(
'
Save
'
);
saveSubmitText
:
string
=
this
.
translate
.
instant
(
'
Save
'
);
saveSubmitStatus
=
''
;
actionButtonsAlign
=
'
center
'
;
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-form/entity-form.component.ts
View file @
bd6f7712
...
...
@@ -15,7 +15,6 @@ import {
FormBuilder
,
FormControl
,
FormGroup
,
FormArray
,
AbstractControl
,
}
from
'
@angular/forms
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -59,9 +58,9 @@ export class EntityFormComponent implements OnInit, OnDestroy, OnChanges, AfterV
wsfg
:
AbstractControl
;
wsResponseIdx
:
any
;
queryResponse
:
any
;
saveSubmitText
:
string
=
T
(
'
Save
'
);
saveSubmitText
:
string
=
this
.
translate
.
instant
(
'
Save
'
);
showPassword
=
false
;
successMessage
:
string
=
T
(
'
Settings saved.
'
);
successMessage
:
string
=
this
.
translate
.
instant
(
'
Settings saved.
'
);
loaderOpen
=
false
;
keepLoaderOpen
=
false
;
...
...
@@ -247,7 +246,7 @@ export class EntityFormComponent implements OnInit, OnDestroy, OnChanges, AfterV
}
}
else
{
if
(
this
.
conf
.
saveSubmitText
===
undefined
)
{
this
.
saveSubmitText
=
T
(
'
Save
'
);
this
.
saveSubmitText
=
this
.
translate
.
instant
(
'
Save
'
);
}
if
(
this
.
conf
.
addCall
)
{
this
.
submitFunction
=
this
.
addCall
;
...
...
@@ -446,7 +445,7 @@ export class EntityFormComponent implements OnInit, OnDestroy, OnChanges, AfterV
:
false
,
buttonMsg
:
this
.
conf
.
confirmSubmitDialog
.
hasOwnProperty
(
'
button
'
)
?
this
.
conf
.
confirmSubmitDialog
[
'
button
'
]
:
T
(
'
Ok
'
),
:
this
.
translate
.
instant
(
'
Ok
'
),
}).
pipe
(
filter
(
Boolean
),
untilDestroyed
(
this
)).
subscribe
(()
=>
{
this
.
doSubmit
(
event
);
});
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-table/entity-table.component.ts
View file @
bd6f7712
...
...
@@ -20,7 +20,6 @@ import { MatPaginator } from '@angular/material/paginator';
import
{
MatSort
}
from
'
@angular/material/sort
'
;
import
{
MatTableDataSource
}
from
'
@angular/material/table
'
;
import
{
NavigationStart
,
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -460,8 +459,8 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
break
;
case
EmptyType
.
NoSearchResults
:
title
=
T
(
'
No Search Results.
'
);
message
=
T
(
'
Your query didn
\'
t return any results. Please try again.
'
);
title
=
this
.
translate
.
instant
(
'
No Search Results.
'
);
message
=
this
.
translate
.
instant
(
'
Your query didn
\'
t return any results. Please try again.
'
);
if
(
this
.
conf
.
emptyTableConfigMessages
&&
this
.
conf
.
emptyTableConfigMessages
.
no_search_results
)
{
title
=
this
.
conf
.
emptyTableConfigMessages
.
no_search_results
.
title
;
message
=
this
.
conf
.
emptyTableConfigMessages
.
no_search_results
.
message
;
...
...
@@ -475,10 +474,10 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
break
;
case
EmptyType
.
Errors
:
title
=
T
(
'
Something went wrong
'
);
title
=
this
.
translate
.
instant
(
'
Something went wrong
'
);
if
(
error
)
{
message
=
T
(
'
The system returned the following error -
'
);
message
=
this
.
translate
.
instant
(
'
The system returned the following error -
'
);
}
if
(
this
.
conf
.
emptyTableConfigMessages
&&
this
.
conf
.
emptyTableConfigMessages
.
errors
)
{
...
...
@@ -514,7 +513,7 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
item
:
this
.
title
,
});
}
let
buttonText
=
T
(
'
Add
'
)
+
this
.
title
;
let
buttonText
=
this
.
translate
.
instant
(
'
Add
'
)
+
this
.
title
;
if
(
this
.
conf
.
emptyTableConfigMessages
&&
this
.
conf
.
emptyTableConfigMessages
.
buttonText
)
{
buttonText
=
this
.
conf
.
emptyTableConfigMessages
.
buttonText
;
}
...
...
@@ -547,7 +546,7 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
item
:
this
.
title
,
});
}
let
buttonText
=
T
(
'
Add
'
)
+
this
.
title
;
let
buttonText
=
this
.
translate
.
instant
(
'
Add
'
)
+
this
.
title
;
if
(
this
.
conf
.
emptyTableConfigMessages
&&
this
.
conf
.
emptyTableConfigMessages
.
buttonText
)
{
buttonText
=
this
.
conf
.
emptyTableConfigMessages
.
buttonText
;
}
...
...
@@ -805,13 +804,13 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
name
:
'
edit
'
,
id
:
'
edit
'
,
icon
:
'
edit
'
,
label
:
T
(
'
Edit
'
),
label
:
this
.
translate
.
instant
(
'
Edit
'
),
onClick
:
(
rowinner
:
any
)
=>
{
this
.
doEdit
(
rowinner
.
id
);
},
},
{
name
:
'
delete
'
,
id
:
'
delete
'
,
icon
:
'
delete
'
,
label
:
T
(
'
Delete
'
),
label
:
this
.
translate
.
instant
(
'
Delete
'
),
onClick
:
(
rowinner
:
any
)
=>
{
this
.
doDelete
(
rowinner
);
},
}]
as
EntityTableAction
[];
}
...
...
@@ -854,8 +853,8 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
}
// generate delete msg
getDeleteMessage
(
item
:
any
,
action
:
string
=
T
(
'
Delete
'
)):
string
{
let
deleteMsg
:
string
=
T
(
'
Delete the selected item?
'
);
getDeleteMessage
(
item
:
any
,
action
:
string
=
this
.
translate
.
instant
(
'
Delete
'
)):
string
{
let
deleteMsg
:
string
=
this
.
translate
.
instant
(
'
Delete the selected item?
'
);
if
(
this
.
conf
.
config
.
deleteMsg
)
{
deleteMsg
=
action
+
this
.
conf
.
config
.
deleteMsg
.
title
;
let
msg_content
=
'
<b>
'
+
item
[
this
.
conf
.
config
.
deleteMsg
.
key_props
[
0
]];
...
...
@@ -907,10 +906,10 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
});
}
else
{
this
.
dialogService
.
confirm
({
title
:
dialog
.
hasOwnProperty
(
'
title
'
)
?
dialog
[
'
title
'
]
:
T
(
'
Delete
'
),
title
:
dialog
.
hasOwnProperty
(
'
title
'
)
?
dialog
[
'
title
'
]
:
this
.
translate
.
instant
(
'
Delete
'
),
message
:
dialog
.
hasOwnProperty
(
'
message
'
)
?
dialog
[
'
message
'
]
+
deleteMsg
:
deleteMsg
,
hideCheckBox
:
dialog
.
hasOwnProperty
(
'
hideCheckbox
'
)
?
dialog
[
'
hideCheckbox
'
]
:
false
,
buttonMsg
:
dialog
.
hasOwnProperty
(
'
button
'
)
?
dialog
[
'
button
'
]
:
T
(
'
Delete
'
),
buttonMsg
:
dialog
.
hasOwnProperty
(
'
button
'
)
?
dialog
[
'
button
'
]
:
this
.
translate
.
instant
(
'
Delete
'
),
}).
pipe
(
untilDestroyed
(
this
)).
subscribe
((
res
)
=>
{
if
(
res
)
{
this
.
toDeleteRow
=
item
;
...
...
@@ -956,10 +955,10 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
return
this
.
dialogService
.
confirm
({
title
:
dialog
.
hasOwnProperty
(
'
title
'
)
?
dialog
[
'
title
'
]
:
T
(
'
Delete
'
),
title
:
dialog
.
hasOwnProperty
(
'
title
'
)
?
dialog
[
'
title
'
]
:
this
.
translate
.
instant
(
'
Delete
'
),
message
:
dialog
.
hasOwnProperty
(
'
message
'
)
?
dialog
[
'
message
'
]
+
deleteMsg
:
deleteMsg
,
hideCheckBox
:
dialog
.
hasOwnProperty
(
'
hideCheckbox
'
)
?
dialog
[
'
hideCheckbox
'
]
:
false
,
buttonMsg
:
dialog
.
hasOwnProperty
(
'
button
'
)
?
dialog
[
'
button
'
]
:
T
(
'
Delete
'
),
buttonMsg
:
dialog
.
hasOwnProperty
(
'
button
'
)
?
dialog
[
'
button
'
]
:
this
.
translate
.
instant
(
'
Delete
'
),
})
.
pipe
(
filter
(
Boolean
),
...
...
@@ -1020,7 +1019,7 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
title
:
'
Delete
'
,
message
:
multiDeleteMsg
,
hideCheckBox
:
false
,
buttonMsg
:
T
(
'
Delete
'
),
buttonMsg
:
this
.
translate
.
instant
(
'
Delete
'
),
}).
pipe
(
untilDestroyed
(
this
)).
subscribe
((
res
)
=>
{
if
(
!
res
)
{
return
;
...
...
@@ -1050,10 +1049,10 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
}
}
if
(
message
===
''
)
{
this
.
dialogService
.
info
(
T
(
'
Items deleted
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
this
.
dialogService
.
info
(
this
.
translate
.
instant
(
'
Items deleted
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
}
else
{
message
=
'
<ul>
'
+
message
+
'
</ul>
'
;
this
.
dialogService
.
errorReport
(
T
(
'
Items Delete Failed
'
),
message
);
this
.
dialogService
.
errorReport
(
this
.
translate
.
instant
(
'
Items Delete Failed
'
),
message
);
}
}
},
...
...
@@ -1169,7 +1168,7 @@ export class EntityTableComponent<Row = any> implements OnInit, AfterViewInit, A
}
runningStateButton
(
jobid
:
number
):
void
{
const
dialogRef
=
this
.
matDialog
.
open
(
EntityJobComponent
,
{
data
:
{
title
:
T
(
'
Task is running
'
)
}
});
const
dialogRef
=
this
.
matDialog
.
open
(
EntityJobComponent
,
{
data
:
{
title
:
this
.
translate
.
instant
(
'
Task is running
'
)
}
});
dialogRef
.
componentInstance
.
jobId
=
jobid
;
dialogRef
.
componentInstance
.
wsshow
();
dialogRef
.
componentInstance
.
success
.
pipe
(
untilDestroyed
(
this
)).
subscribe
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/entity/entity-wizard/entity-wizard.component.ts
View file @
bd6f7712
...
...
@@ -7,7 +7,6 @@ import {
}
from
'
@angular/forms
'
;
import
{
MatStep
,
MatStepper
}
from
'
@angular/material/stepper
'
;
import
{
Router
,
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -37,8 +36,8 @@ export class EntityWizardComponent implements OnInit {
summaryValue
:
any
;
summaryFieldConfigs
:
FieldConfig
[]
=
[];
saveSubmitText
:
string
=
T
(
'
Save
'
);
customNextText
=
T
(
'
Next
'
);
saveSubmitText
:
string
=
this
.
translate
.
instant
(
'
Save
'
);
customNextText
=
this
.
translate
.
instant
(
'
Next
'
);
get
formArray
():
AbstractControl
|
null
{
return
this
.
formGroup
.
get
(
'
formArray
'
);
}
constructor
(
...
...
@@ -189,7 +188,7 @@ export class EntityWizardComponent implements OnInit {
}
else
if
(
this
.
conf
.
route_success
)
{
this
.
router
.
navigate
(
new
Array
(
'
/
'
).
concat
(
this
.
conf
.
route_success
));
}
else
{
this
.
dialog
.
info
(
T
(
'
Settings saved
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
this
.
dialog
.
info
(
this
.
translate
.
instant
(
'
Settings saved
'
),
''
,
'
300px
'
,
'
info
'
,
true
);
}
},
(
res
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/password-dialog/password-dialog.component.ts
View file @
bd6f7712
import
{
Component
}
from
'
@angular/core
'
;
import
{
MatDialogRef
}
from
'
@angular/material/dialog
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
globalHelptext
from
'
app/helptext/global-helptext
'
;
...
...
@@ -17,8 +16,8 @@ export class PasswordDialogComponent {
title
:
string
=
globalHelptext
.
rootpw
.
dialog_title
;
message
:
string
;
placeholder
=
globalHelptext
.
rootpw
.
placeholder
;
buttonMsg
:
string
=
T
(
'
Continue
'
);
cancelMsg
:
string
=
T
(
'
Cancel
'
);
buttonMsg
:
string
=
this
.
translate
.
instant
(
'
Continue
'
);
cancelMsg
:
string
=
this
.
translate
.
instant
(
'
Cancel
'
);
hideCheckBox
=
false
;
method
:
string
;
data
:
string
;
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/credentials/backup-credentials/backup-credentials.component.ts
View file @
bd6f7712
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
KeychainCredentialType
}
from
'
app/enums/keychain-credential-type.enum
'
;
...
...
@@ -66,8 +65,8 @@ export class BackupCredentialsComponent implements OnInit {
deleteCall
:
'
cloudsync.credentials.delete
'
,
name
:
'
cloudCreds
'
,
columns
:
[
{
name
:
T
(
'
Name
'
),
prop
:
'
name
'
},
{
name
:
T
(
'
Provider
'
),
prop
:
'
provider
'
},
{
name
:
this
.
translate
.
instant
(
'
Name
'
),
prop
:
'
name
'
},
{
name
:
this
.
translate
.
instant
(
'
Provider
'
),
prop
:
'
provider
'
},
],
hideHeader
:
false
,
parent
:
this
,
...
...
@@ -88,7 +87,7 @@ export class BackupCredentialsComponent implements OnInit {
name
:
'
sshConnections
'
,
dataSourceHelper
:
this
.
sshConnectionsDataSourceHelper
,
columns
:
[
{
name
:
T
(
'
Name
'
),
prop
:
'
name
'
},
{
name
:
this
.
translate
.
instant
(
'
Name
'
),
prop
:
'
name
'
},
],
hideHeader
:
true
,
parent
:
this
,
...
...
@@ -109,7 +108,7 @@ export class BackupCredentialsComponent implements OnInit {
getActions
:
this
.
sshKeyPairActions
.
bind
(
this
),
dataSourceHelper
:
this
.
sshKeyPairsDataSourceHelper
,
columns
:
[
{
name
:
T
(
'
Name
'
),
prop
:
'
name
'
},
{
name
:
this
.
translate
.
instant
(
'
Name
'
),
prop
:
'
name
'
},
],
hideHeader
:
true
,
parent
:
this
,
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/credentials/backup-credentials/forms/cloud-credentials-form.component.ts
View file @
bd6f7712
import
{
Component
}
from
'
@angular/core
'
;
import
{
FormGroup
,
Validators
}
from
'
@angular/forms
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
marker
as
T
}
from
'
@biesbjerg/ngx-translate-extract-marker
'
;
import
{
UntilDestroy
,
untilDestroyed
}
from
'
@ngneat/until-destroy
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
*
as
_
from
'
lodash
'
;
import
{
take
}
from
'
rxjs/operators
'
;
import
{
KeychainCredentialType
}
from
'
app/enums/keychain-credential-type.enum
'
;
...
...
@@ -86,7 +86,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
type
:
'
button
'
,
name
:
'
oauth_signin_button
'
,
isHidden
:
true
,
customEventActionLabel
:
T
(
'
Log in to Provider
'
),
customEventActionLabel
:
this
.
translate
.
instant
(
'
Log in to Provider
'
),
value
:
''
,
customEventMethod
:
()
=>
{
this
.
logInToProvider
();
...
...
@@ -955,7 +955,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
{
type
:
'
checkbox
'
,
name
:
'
advanced-S3
'
,
placeholder
:
T
(
'
Advanced Settings
'
),
placeholder
:
this
.
translate
.
instant
(
'
Advanced Settings
'
),
isHidden
:
true
,
value
:
false
,
relation
:
[
...
...
@@ -1235,7 +1235,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
custActions
=
[
{
id
:
'
validCredential
'
,
name
:
T
(
'
Verify Credential
'
),
name
:
this
.
translate
.
instant
(
'
Verify Credential
'
),
buttonColor
:
'
default
'
,
function
:
()
=>
{
this
.
entityForm
.
loader
.
open
();
...
...
@@ -1269,7 +1269,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
},
},
{
id
:
'
customSave
'
,
name
:
T
(
'
Save
'
),
name
:
this
.
translate
.
instant
(
'
Save
'
),
buttonType
:
'
submit
'
,
buttonColor
:
'
primary
'
,
},
...
...
@@ -1284,6 +1284,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
protected
dialog
:
DialogService
,
protected
replicationService
:
ReplicationService
,
private
modalService
:
ModalService
,
protected
translate
:
TranslateService
,
)
{
this
.
modalService
.
getRow$
.
pipe
(
take
(
1
),
untilDestroyed
(
this
))
...
...
@@ -1437,7 +1438,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
(
res
)
=>
{
this
.
entityForm
.
loader
.
close
();
if
(
res
.
valid
)
{
this
.
dialog
.
info
(
T
(
'
Valid
'
),
T
(
'
The Credential is valid.
'
),
'
500px
'
,
'
info
'
);
this
.
dialog
.
info
(
this
.
translate
.
instant
(
'
Valid
'
),
this
.
translate
.
instant
(
'
The Credential is valid.
'
),
'
500px
'
,
'
info
'
);
}
else
{
this
.
dialog
.
errorReport
(
'
Error
'
,
res
.
excerpt
,
res
.
error
);
}
...
...
@@ -1453,6 +1454,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
window
.
open
(
this
.
oauthURL
+
'
?origin=
'
+
encodeURIComponent
(
window
.
location
.
toString
()),
'
_blank
'
,
'
width=640,height=480
'
);
const
controls
=
this
.
entityForm
.
formGroup
.
controls
;
const
dialogService
=
this
.
dialog
;
const
translate
=
this
.
translate
;
const
getOnedriveList
=
this
.
getOnedriveList
.
bind
(
this
);
const
method
=
(
message
:
OauthMessage
):
void
=>
doAuth
(
message
,
this
.
selectedProvider
);
...
...
@@ -1462,7 +1464,7 @@ export class CloudCredentialsFormComponent implements FormConfiguration {
function
doAuth
(
message
:
OauthMessage
,
selectedProvider
:
string
):
void
{
if
(
'
oauth_portal
'
in
message
.
data
)
{
if
(
message
.
data
.
error
)
{
dialogService
.
errorReport
(
T
(
'
Error
'
),
message
.
data
.
error
);
dialogService
.
errorReport
(
translate
.
instant
(
'
Error
'
),
message
.
data
.
error
);
}
else
{
for
(
const
prop
in
message
.
data
.
result
)
{
let
targetProp
=
prop
;
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
…
11
Next
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
Menu
Projects
Groups
Snippets
Help