mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 06:43:23 +00:00
Add static front end + functions endpoint.
This commit is contained in:
21
gateway/assets/script/bootstrap.js
vendored
Normal file
21
gateway/assets/script/bootstrap.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict"
|
||||
var app = angular.module('faasGateway', ['ngMaterial']);
|
||||
app.controller("home", ['$scope', '$log', '$http', '$location', '$timeout', function($scope, $log, $http, $location, $timeout) {
|
||||
$scope.functions = [];
|
||||
$http.get("/system/functions").then(function(response) {
|
||||
$scope.functions = response.data;
|
||||
});
|
||||
|
||||
$scope.showFunction = function(fn) {
|
||||
$scope.selectedFunction = fn;
|
||||
};
|
||||
|
||||
// TODO: popup + form to create new Docker service.
|
||||
$scope.newFunction = function() {
|
||||
$scope.functions.push({
|
||||
name: "f" +($scope.functions.length+2),
|
||||
replicas: 0,
|
||||
invokedCount: 0
|
||||
});
|
||||
};
|
||||
}]);
|
Reference in New Issue
Block a user