From 26264ec04202dde0f4d7cd5ab39e46e9c0da0483 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 2 Feb 2016 14:24:52 +0100 Subject: [PATCH] KEYCLOAK-2420 Export client --- .../theme/base/admin/resources/js/controllers/clients.js | 4 ++++ .../theme/base/admin/resources/partials/client-list.html | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js index 6694c87161..7e7a4098ab 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js @@ -683,6 +683,10 @@ module.controller('ClientListCtrl', function($scope, realm, clients, Client, ser }); }); }; + + $scope.exportClient = function(client) { + saveAs(new Blob([angular.toJson(client, 4)], { type: 'application/json' }), client.clientId + '.json'); + } }); module.controller('ClientInstallationCtrl', function($scope, realm, client, serverInfo, ClientInstallation,$http, $routeParams) { diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-list.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-list.html index 9f0877641e..9bc8c95f30 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/client-list.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-list.html @@ -7,7 +7,7 @@ - - + @@ -43,6 +43,9 @@ +
+
@@ -29,7 +29,7 @@
{{:: 'client-id' | translate}} {{:: 'enabled' | translate}} {{:: 'base-url' | translate}}{{:: 'actions' | translate}}{{:: 'actions' | translate}}
+ +