UI: in-line ready directive

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis 2018-03-04 07:41:41 +00:00
parent a8d91590ab
commit b9d705ebd4
2 changed files with 4 additions and 11 deletions

View File

@ -91,7 +91,10 @@
</div>
<div layout-gt-sm="row">
<ready-input></ready-input>
<md-input-container class="md-icon-float md-block">
<label>Status</label>
<input value="{{ function.ready ? 'Ready' : 'Not ready' }}" type="text" readonly="readonly">
</md-input-container>
<md-input-container class="md-icon-float md-block">
<label>Replicas</label>

View File

@ -4,16 +4,6 @@
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;