</div>
</div>
-
</div><!-- left column -->
<div class="col-md-6"><!-- right column -->
</div>
</div>
- <div class="row new-entry">
- <div class="col-md-12">
- <label>
- [% l('Experimental: Migrate Workstation Settings to Server') %]
- </label>
- <p>[% | l %]Settings may be migrated to the server using the first
-option below as many times as needed for testing and verification. Once
-local settings are deleted via the second option, the migration will be
-marked as complete and no more migration attempts may occur.[% END %]
- </p>
- <ol>
- <li class="pad-vert">
- <button class="btn btn-default" ng-click="migrateServerSettings()">
- [% l('Migrate and Keep Local Settings (for testing)') %]
- </button>
- </li>
- <li>
- <button class="btn btn-warning"
- ng-click="migrateServerSettings(true)">
- [% l('Migrate and Delete Local Settings') %]
- </button>
- </li>
- </ol>
- </div>
- </div>
-
-
</div><!-- col -->
</div><!-- row -->
[% |l %]
Preference values are stored as JSON strings.
Click on a preference to view the stored value.
-Click on the delete (X) button to remove a preference value.
+Click on the delete (X) button to remove a preference's value.
[% END %]
</div>
</div>
</div>
+
<div class="row">
<div class="col-md-4">
<a href='' ng-click="setContext('local')">[% l('Local Prefs') %]</a>
</li>
<li ng-class="{active : context == 'remote'}">
- <a href='' ng-click="setContext('remote')">[% l('Hatch Prefs') %]</a>
- </li>
- <li ng-class="{active : context == 'server'}">
- <a href='' ng-click="setContext('server')">[% l('Server Prefs') %]</a>
+ <a href='' ng-click="setContext('remote')">[% l('Remote Prefs') %]</a>
</li>
</ul>
<div class="tab-content">
}])
.controller('StoredPrefsCtrl',
- ['$scope','$q','egCore','egConfirmDialog','egProgressDialog','$timeout',
-function($scope , $q , egCore , egConfirmDialog , egProgressDialog , $timeout) {
+ ['$scope','$q','egCore','egConfirmDialog',
+function($scope , $q , egCore , egConfirmDialog) {
console.log('StoredPrefsCtrl');
$scope.setContext = function(ctx) {
// fetch the keys
function refreshKeys() {
- $scope.keys = {local : [], remote : [], server: []};
+ $scope.keys = {local : [], remote : []};
if (egCore.hatch.hatchAvailable) {
egCore.hatch.getRemoteKeys().then(
// local calls are non-async
$scope.keys.local = egCore.hatch.getLocalKeys();
-
- egCore.hatch.getServerKeys().then(function(keys) {
- $scope.keys.server = keys;
- });
}
refreshKeys();
if ($scope.context == 'local') {
$scope.currentKeyContent = egCore.hatch.getLocalItem(key);
- } else if ($scope.context === 'server') {
- egCore.hatch.getServerItem(key)
- .then(function(content) {
- $scope.currentKeyContent = content
- });
} else {
egCore.hatch.getRemoteItem(key)
.then(function(content) {
if ($scope.context == 'local') {
egCore.hatch.removeLocalItem(key);
refreshKeys();
- } else if ($scope.context == 'server') {
- egCore.hatch.removeServerItem(key)
- .then(function() { refreshKeys() });
} else {
egCore.hatch.removeItem(key)
.then(function() { refreshKeys() });