mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
Automatically select 'Download' for store functions
This minor fix selects the 'Download' radio button by default if the function has a label with `com.openfaas.ui.ext`. Closes #827 Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
This commit is contained in:
parent
b3a71b456a
commit
b73e14be92
@ -158,8 +158,8 @@
|
|||||||
<md-input-container class="md-block" flex-gt-sm>
|
<md-input-container class="md-block" flex-gt-sm>
|
||||||
<md-radio-group ng-model="invocation.contentType" layout="row" layout-align="start center">
|
<md-radio-group ng-model="invocation.contentType" layout="row" layout-align="start center">
|
||||||
<md-radio-button value="text" class="md-primary"> Text </md-radio-button>
|
<md-radio-button value="text" class="md-primary"> Text </md-radio-button>
|
||||||
<md-radio-button value="json"> JSON </md-radio-button>
|
<md-radio-button value="json" class="md-primary"> JSON </md-radio-button>
|
||||||
<md-radio-button value="binary"> Download </md-radio-button>
|
<md-radio-button value="binary" class="md-primary"> Download </md-radio-button>
|
||||||
</md-radio-group>
|
</md-radio-group>
|
||||||
</md-input-container>
|
</md-input-container>
|
||||||
</div>
|
</div>
|
||||||
|
6
gateway/assets/script/bootstrap.js
vendored
6
gateway/assets/script/bootstrap.js
vendored
@ -225,7 +225,11 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$interval', '$f
|
|||||||
$scope.invocationResponse = "";
|
$scope.invocationResponse = "";
|
||||||
$scope.invocationStatus = "";
|
$scope.invocationStatus = "";
|
||||||
$scope.invocationInProgress = false;
|
$scope.invocationInProgress = false;
|
||||||
$scope.invocation.contentType = "text";
|
if (fn.labels && fn.labels['com.openfaas.ui.ext']) {
|
||||||
|
$scope.invocation.contentType = "binary";
|
||||||
|
} else {
|
||||||
|
$scope.invocation.contentType = "text";
|
||||||
|
}
|
||||||
$scope.invocation.roundTripDuration = "";
|
$scope.invocation.roundTripDuration = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user