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

Commit 5601cb8

Browse files
authored
Merge pull request #180 from nviallatte/fix-konga-0.12.X
Fix GET targets AND Add possibility to select Hash_on for Upstreams for Kong 0.12.X
2 parents 58387e4 + d6123ce commit 5601cb8

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

assets/js/app/upstreams/add-upstream-modal.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ <h5 class="modal-title" id="modal-title">
5757

5858
</div>
5959
</div>
60+
<div class="form-group" ng-class="{'has-error' : errors.hash_on}">
61+
<label class="col-sm-4 control-label">Hash on
62+
<br><em>
63+
<small class="help-block">optional</small>
64+
</em></label>
65+
<div class="col-sm-7">
66+
<input ng-model="upstream.hash_on" class="form-control">
67+
<div class="text-danger" ng-if="errors.hash_on" data-ng-bind="errors.hash_on"></div>
68+
<p class="help-block">
69+
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).
70+
</p>
71+
</div>
72+
</div>
6073
<div class="form-group">
6174
<div class="col-sm-offset-4 col-sm-7">
6275
<button type="submit" class="btn btn-primary btn-block" ng-click="submit()">

assets/js/app/upstreams/edit-details.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@
6161
<code>slots</code> number of entries.
6262
</p>
6363

64+
</div>
65+
</div>
66+
<div class="form-group" ng-class="{'has-error' : errors.hash_on}">
67+
<label class="col-sm-3 control-label">Hash on
68+
<br><em>
69+
<small class="help-block">optional</small>
70+
</em></label>
71+
<div class="col-sm-8">
72+
<input ng-model="upstream.hash_on" class="form-control">
73+
<div class="text-danger" ng-if="errors.hash_on" data-ng-bind="errors.hash_on"></div>
74+
<p class="help-block">
75+
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).
76+
</p>
77+
6478
</div>
6579
</div>
6680
<div class="form-group">

assets/js/app/upstreams/targets/edit-upstream-targets-controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$log, $state,Upstream, MessageService, $uibModal, DataModel, ListConfig, $http, DialogService ) {
1515

1616

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

2020

0 commit comments

Comments
 (0)