File tree Expand file tree Collapse file tree 7 files changed +48
-11
lines changed
samples/UmbracoV9/App_Plugins/Relewise.Dashboard
src/Integrations.Umbraco/App_Plugins/Relewise.Dashboard Expand file tree Collapse file tree 7 files changed +48
-11
lines changed Original file line number Diff line number Diff line change 1818 } ) ;
1919 }
2020
21+ vm . exportContentPermanentlyDelete = function ( ) {
22+ const confirmed = confirm ( "Are you sure, you want to perform an full export and remove deleted content items?" ) ;
23+ if ( ! confirmed ) {
24+ return ;
25+ }
26+
27+ vm . exportLoading = true ;
28+ vm . errorMessage = "" ;
29+ vm . success = "" ;
30+ relewiseDashboardResources . exportContentWithDelete ( ) . then ( ( ) => {
31+ vm . exportLoading = false ;
32+ vm . success = "Content was successfully exported to Relewise" ;
33+ vm . errorMessage = "" ;
34+ } , ( ) => {
35+ vm . exportLoading = false ;
36+ vm . success = "" ;
37+ vm . errorMessage = "Unexpected error while exporting data happened" ;
38+ } ) ;
39+ }
40+
2141 function init ( ) {
2242 relewiseDashboardResources . getConfiguration ( ) . then ( ( response ) => {
2343 if ( response . status === 200 ) {
Original file line number Diff line number Diff line change 22 < h2 > Relewise</ h2 >
33 < umb-box >
44 < umb-box-content >
5-
65 < p >
76 Welcome to the Relewise dashboard - Here you can perform export functions get all your content exported into Relewise.< br />
87 It's also possible to see the settings for Relewise directly here.
98 </ p >
10- < div >
9+ < div class =" button-box " >
1110 < button class ="btn btn-primary " ng-click ="vm.exportContent() " ng-disabled ="vm.exportLoading ">
12- Full content export
11+ Export content
12+ </ button >
13+
14+ < button class ="btn btn-danger " ng-click ="vm.exportContentPermanentlyDelete() " ng-disabled ="vm.exportLoading ">
15+ Export content and remove old data
1316 </ button >
1417 </ div >
1518 < div class ="error mt-10 " ng-if ="vm.errorMessage "> {{vm.errorMessage}}</ div >
Original file line number Diff line number Diff line change 55 exportContent : function ( ) {
66 return $http . post ( "/umbraco/backoffice/Relewise/DashboardApi/ContentExport" ) ;
77 } ,
8+ exportContentWithDelete : function ( ) {
9+ return $http . post ( "/umbraco/backoffice/Relewise/DashboardApi/ContentExport?permanentlyDelete=true" ) ;
10+ } ,
811 getConfiguration : function ( ) {
912 return $http . get ( "/umbraco/backoffice/Relewise/DashboardApi/Configuration" ) ;
1013 }
Original file line number Diff line number Diff line change 2929.pl-20 {
3030 padding-left : 20px ;
3131}
32+
33+ .button-box {
34+ display : flex;
35+ justify-content : space-between;
36+ }
Original file line number Diff line number Diff line change 1919 }
2020
2121 vm . exportContentPermanentlyDelete = function ( ) {
22+ const confirmed = confirm ( "Are you sure, you want to perform an full export and remove deleted content items?" ) ;
23+ if ( ! confirmed ) {
24+ return ;
25+ }
26+
2227 vm . exportLoading = true ;
2328 vm . errorMessage = "" ;
2429 vm . success = "" ;
Original file line number Diff line number Diff line change 22 < h2 > Relewise</ h2 >
33 < umb-box >
44 < umb-box-content >
5-
65 < p >
76 Welcome to the Relewise dashboard - Here you can perform export functions get all your content exported into Relewise.< br />
87 It's also possible to see the settings for Relewise directly here.
98 </ p >
10- < div >
9+ < div class =" button-box " >
1110 < button class ="btn btn-primary " ng-click ="vm.exportContent() " ng-disabled ="vm.exportLoading ">
1211 Export content
1312 </ button >
1413
15- < span class ="pl-20 ">
16- < button class ="btn btn-danger " ng-click ="vm.exportContentPermanentlyDelete() " ng-disabled ="vm.exportLoading ">
17- Export content and remove old data
18- </ button >
19- </ span >
20-
14+ < button class ="btn btn-danger " ng-click ="vm.exportContentPermanentlyDelete() " ng-disabled ="vm.exportLoading ">
15+ Export content and remove old data
16+ </ button >
2117 </ div >
2218 < div class ="error mt-10 " ng-if ="vm.errorMessage "> {{vm.errorMessage}}</ div >
2319 < div class ="export-success mt-10 " ng-if ="vm.success "> {{vm.success}}</ div >
Original file line number Diff line number Diff line change 2929.pl-20 {
3030 padding-left : 20px ;
3131}
32+
33+ .button-box {
34+ display : flex;
35+ justify-content : space-between;
36+ }
You can’t perform that action at this time.
0 commit comments