mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 09:16:48 +00:00
UI: fix ng-model complaint
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
ccfb8f7be4
commit
a8d91590ab
@ -89,11 +89,9 @@
|
||||
</md-button>
|
||||
|
||||
</div>
|
||||
|
||||
<div layout-gt-sm="row">
|
||||
<md-input-container class="md-icon-float md-block">
|
||||
<label>Status</label>
|
||||
<input ng-model="isReady(function)" type="text" readonly="readonly">
|
||||
</md-input-container>
|
||||
<ready-input></ready-input>
|
||||
|
||||
<md-input-container class="md-icon-float md-block">
|
||||
<label>Replicas</label>
|
||||
|
17
gateway/assets/script/bootstrap.js
vendored
17
gateway/assets/script/bootstrap.js
vendored
@ -4,6 +4,16 @@
|
||||
|
||||
var app = angular.module('faasGateway', ['ngMaterial', 'faasGateway.funcStore']);
|
||||
|
||||
app.directive("readyInput", function() {
|
||||
return {
|
||||
"restrict": "E",
|
||||
"template": '<md-input-container class="md-icon-float md-block">'+
|
||||
' <label>Status</label>' +
|
||||
' <input value="{{ function.ready ? \'Ready\' : \'Querying\' }}" type="text" readonly="readonly">' +
|
||||
'</md-input-container>'
|
||||
};
|
||||
});
|
||||
|
||||
app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$mdDialog', '$mdToast', '$mdSidenav',
|
||||
function($scope, $log, $http, $location, $timeout, $mdDialog, $mdToast, $mdSidenav) {
|
||||
var newFuncTabIdx = 0;
|
||||
@ -32,14 +42,11 @@ app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', '$md
|
||||
};
|
||||
|
||||
$scope.isReady = function(selectedFunction) {
|
||||
if(selectedFunction.ready != undefined && selectedFunction.ready) {
|
||||
return "Ready";
|
||||
}
|
||||
return "Querying..";
|
||||
return (selectedFunction.ready != undefined && selectedFunction.ready == true);
|
||||
}
|
||||
|
||||
$scope.invocation.request = "";
|
||||
|
||||
$scope.isFunctionReady = "Querying";
|
||||
$scope.fetchFunctionsDelay = 3500;
|
||||
$scope.queryFunctionDelay = 2500;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user