-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from Jumoo/wip/dashboard-flow
Wip/dashboard flow
- Loading branch information
Showing
9 changed files
with
127 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
uSync.Migrations/wwwroot/uSyncMigrations/components/migrationImport.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
uSync.Migrations/wwwroot/uSyncMigrations/migration.helpers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
function migrationHelpers(notificationsService) { | ||
|
||
return { | ||
copyResults : copyResults | ||
|
||
}; | ||
|
||
function copyResults(results) { | ||
|
||
if (results.length > 0) { | ||
var report = objectKeys(results[0]).toString() + '\n' | ||
} | ||
|
||
results.forEach(function (message) { | ||
var arr = objectToArray(message); | ||
report += arr.toString() + '\n'; | ||
}); | ||
|
||
navigator.clipboard.writeText(report); | ||
notificationsService.success('copied', 'report copied to clipboard'); | ||
|
||
} | ||
|
||
|
||
function objectKeys(obj) { | ||
|
||
var arr = []; | ||
for (let k in obj) { | ||
if (Object.prototype.hasOwnProperty.call(obj, k)) { | ||
if (!k.startsWith('$$')) { | ||
arr.push(k); | ||
} | ||
} | ||
} | ||
|
||
return arr; | ||
} | ||
|
||
function objectToArray(obj) { | ||
var arr = []; | ||
for (let p in obj) { | ||
if (Object.prototype.hasOwnProperty.call(obj, p)) { | ||
if (!p.startsWith('$$')) { | ||
arr.push(obj[p]); | ||
} | ||
} | ||
} | ||
|
||
return arr; | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
angular.module('umbraco').factory('usyncMigrationHelpers', migrationHelpers); | ||
|
||
})(); |