Created
February 11, 2015 21:19
-
-
Save stuartf/b4586a44a178f1d4fe62 to your computer and use it in GitHub Desktop.
Export/Import OAE Skin
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
var _ = require('underscore'); | |
// get the existing skin from /api/ui/skin/variables and change the wrapping object to module.exports | |
// this could be done cleaner in code but isn't worth the time right now | |
var skin = require('./saved.skin.json').results; | |
var ported = {}; | |
_.each(_.flatten(_.pluck(_.flatten(_.pluck(skin, 'subsections')), 'variables')), function(obj) { | |
if (obj.value !== undefined) { | |
ported['oae-ui/skin/variables/' + obj.name] = obj.value; | |
} | |
}); | |
// paste the output in the browser console and replace the TENANTALIAS | |
console.log('$.ajax({url:"https://" + document.URL.split('/')[2] + "/api/config/TENANTALIAS", method: "POST", data: ' + JSON.stringify(ported) + '});'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment