Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 53f0f13

Browse files
committed
Removed Konga syncing logic
1 parent d0d94bc commit 53f0f13

File tree

4 files changed

+31
-11
lines changed

4 files changed

+31
-11
lines changed

assets/js/app/consumers/consumer-model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'DataModel','DataService','$q','$log',
1010
function(DataModel,DataService,$q,$log) {
1111

12-
var model = new DataModel('consumers');
12+
var model = new DataModel('api/consumers');
1313

1414

1515
model.load = function load(parameters, fromCache) {

assets/js/app/core/services/KongPluginsService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
},
272272
'consumer_id' : {
273273
displayName : "Apply to",
274-
type: 'search',
274+
type: 'text',
275275
value: null,
276276
help: 'The CONSUMER ID that this plugin configuration will target. ' +
277277
'This value can only be used if authentication has been enabled ' +

assets/js/app/plugins/add-plugin-controller.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@
8484
if($scope.api) request_data.api_id = $scope.api.id
8585

8686
// If a consumer is defined, add consumer_id to request data
87-
if($scope.data.consumer instanceof Object) {
88-
request_data.consumer_id = $scope.data.consumer.id
87+
//if($scope.data.consumer instanceof Object) {
88+
// request_data.consumer_id = $scope.data.consumer.id
89+
//}
90+
91+
if($scope.data.consumer_id) {
92+
request_data.consumer_id = $scope.data.consumer_id
8993
}
9094

9195
// Apply monkey patches to request data if needed

assets/js/app/plugins/modals/add-plugin-modal.html

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,35 @@ <h5 class="modal-title" id="modal-title">
1818

1919
<form class="form-horizontal">
2020

21+
<!--<div data-ng-if="!data.no_consumer" class="form-group">-->
22+
<!--<label class="col-sm-4 control-label"><strong>consumer</strong></label>-->
23+
<!--<div class="col-sm-7">-->
24+
<!--<input-->
25+
<!--type="text"-->
26+
<!--ng-model="data.consumer"-->
27+
<!--placeholder="search consumer..."-->
28+
<!--uib-typeahead="item as item.username for item in getConsumer($viewValue)"-->
29+
<!--typeahead-template-url="js/app/plugins/modals/custom-template.html"-->
30+
<!--class="form-control"-->
31+
<!--typeahead-wait-ms="200"-->
32+
<!--typeahead-show-hint="true"-->
33+
<!--typeahead-min-length="0">-->
34+
<!--<p class="help-block">-->
35+
<!--The CONSUMER ID that this plugin configuration will target.-->
36+
<!--This value can only be used if authentication has been enabled-->
37+
<!--so that the system can identify the user making the request.-->
38+
<!--If left blank, the plugin will be applied to all consumers.-->
39+
<!--</p>-->
40+
<!--</div>-->
41+
<!--</div>-->
2142
<div data-ng-if="!data.no_consumer" class="form-group">
2243
<label class="col-sm-4 control-label"><strong>consumer</strong></label>
2344
<div class="col-sm-7">
2445
<input
2546
type="text"
26-
ng-model="data.consumer"
27-
placeholder="search consumer..."
28-
uib-typeahead="item as item.username for item in getConsumer($viewValue)"
29-
typeahead-template-url="js/app/plugins/modals/custom-template.html"
47+
ng-model="data.consumer_id"
3048
class="form-control"
31-
typeahead-wait-ms="200"
32-
typeahead-show-hint="true"
33-
typeahead-min-length="0">
49+
>
3450
<p class="help-block">
3551
The CONSUMER ID that this plugin configuration will target.
3652
This value can only be used if authentication has been enabled

0 commit comments

Comments
 (0)