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

Commit

Permalink
Merge pull request #180 from nviallatte/fix-konga-0.12.X
Browse files Browse the repository at this point in the history
Fix GET targets AND Add possibility to select Hash_on for Upstreams for Kong 0.12.X
  • Loading branch information
pantsel authored Feb 28, 2018
2 parents 58387e4 + d6123ce commit 5601cb8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
13 changes: 13 additions & 0 deletions assets/js/app/upstreams/add-upstream-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ <h5 class="modal-title" id="modal-title">

</div>
</div>
<div class="form-group" ng-class="{'has-error' : errors.hash_on}">
<label class="col-sm-4 control-label">Hash on
<br><em>
<small class="help-block">optional</small>
</em></label>
<div class="col-sm-7">
<input ng-model="upstream.hash_on" class="form-control">
<div class="text-danger" ng-if="errors.hash_on" data-ng-bind="errors.hash_on"></div>
<p class="help-block">
What to use as hashing input: <code>none</code>, <code>consumer</code>, <code>ip</code>, or <code>header</code> (defaults to <code>none</code> resulting in a weighted-round-robin scheme).
</p>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-7">
<button type="submit" class="btn btn-primary btn-block" ng-click="submit()">
Expand Down
14 changes: 14 additions & 0 deletions assets/js/app/upstreams/edit-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@
<code>slots</code> number of entries.
</p>

</div>
</div>
<div class="form-group" ng-class="{'has-error' : errors.hash_on}">
<label class="col-sm-3 control-label">Hash on
<br><em>
<small class="help-block">optional</small>
</em></label>
<div class="col-sm-8">
<input ng-model="upstream.hash_on" class="form-control">
<div class="text-danger" ng-if="errors.hash_on" data-ng-bind="errors.hash_on"></div>
<p class="help-block">
What to use as hashing input: <code>none</code>, <code>consumer</code>, <code>ip</code>, or <code>header</code> (defaults to <code>none</code> resulting in a weighted-round-robin scheme).
</p>

</div>
</div>
<div class="form-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$log, $state,Upstream, MessageService, $uibModal, DataModel, ListConfig, $http, DialogService ) {


var Target = new DataModel('kong/upstreams/' + $stateParams.id + '/targets/active',true)
var Target = new DataModel('kong/upstreams/' + $stateParams.id + '/targets',true)
Target.setScope($scope, false, 'items', 'itemCount');


Expand Down

0 comments on commit 5601cb8

Please sign in to comment.