Skip to content
Snippets Groups Projects
Commit 59d46938 authored by Alex Ellis's avatar Alex Ellis
Browse files

Tooltips


Signed-off-by: default avatarAlex Ellis <alexellis2@gmail.com>
parent 67165009
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ OpenFaaS (or Functions as a Service) is a framework for building serverless func
# Overview
We have provided several sample functions which are built-into the *Docker Stack* file we deploy during the test drive. You'll be up and running in a few minutes and invoking functions via the Web UI or `curl`. When you're ready to deploy your own function click "Create Function" in the UI or head over to the CLI tutorial:
We have provided several sample functions which are built-into the *Docker Stack* file we deploy during the test drive. You'll be up and running in a few minutes and invoking functions via the Web UI or `curl`. When you're ready to deploy your own function click "Deploy Function" in the UI or head over to the CLI tutorial:
* [Morning coffee with the OpenFaaS CLI](https://blog.alexellis.io/quickstart-openfaas-cli/)
......
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
\ No newline at end of file
......@@ -36,7 +36,7 @@
</md-toolbar>
<md-content layout-padding>
<md-button ng-click="newFunction()" ng-disabled="isFunctionBeingCreated" class="md-primary">Create New Function</md-button>
<md-button ng-click="newFunction()" ng-disabled="isFunctionBeingCreated" class="md-primary">Deploy New Function</md-button>
<md-list>
<md-list-item ng-switch class="md-3-line" ng-click="showFunction(function)" ng-repeat="function in functions | orderBy: '-invocationCount'" ng-class="function.name == selectedFunction.name ? 'selected' : false">
......@@ -99,7 +99,7 @@
</div>
<div layout-gt-sm="row" ng-show="function.envProcess">
<md-input-container class="md-block" flex-gt-sm>
<label>Watchdog process</label>
<label>Function process</label>
<input ng-model="function.envProcess" type="text" readonly="readonly">
</md-input-container>
</div>
......
<md-dialog aria-label="List dialog" layout="column" flex="70">
<md-toolbar>
<div class="md-toolbar-tools">
<h2>Deploy A New Function</h2>
<span flex></span>
<md-button class="md-icon-button" ng-click="closeDialog()">
<md-icon md-svg-src="img/icons/ic_close_24px.svg" aria-label="Close dialog"></md-icon>
</md-button>
</div>
</md-toolbar>
<md-dialog-content class="md-padding">
<label>Define a function:</label>
<label><i>Use this form to test a function or the <a ng-href="https://github.com/openfaas/faas-cli">faas-cli</a> for more options.</i></label>
</md-dialog-content>
<md-dialog-content class="md-padding">
<label>Define the function below:</label>
<form name="userForm">
<div layout-gt-xs="row">
<md-input-container class="md-block" flex-gt-sm>
<label>Image:</label>
<input name="dockerImage" ng-model="item.image" required md-maxlength="200" minlength="4">
<md-tooltip md-direction="bottom">Docker image name and tag to use for function i.e. functions/alpine:latest</md-tooltip>
<label>Docker image:</label>
<input name="dockerImage" ng-model="item.image" required md-maxlength="200" minlength="2">
</md-input-container>
</div>
<div layout-gt-xs="row">
<md-input-container class="md-block" flex-gt-sm>
<label>Service name:</label>
<input name="serviceName" ng-model="item.service" required md-maxlength="200" minlength="4">
<md-tooltip md-direction="bottom">Name of the function - must be a valid DNS entry</md-tooltip>
<label>Function name:</label>
<input name="serviceName" ng-model="item.service" required md-maxlength="200" minlength="2">
</md-input-container>
</div>
<div layout-gt-xs="row">
<md-input-container class="md-block" flex-gt-sm>
<label>fProcess:</label>
<input name="envProcess" ng-model="item.envProcess" required md-maxlength="200" minlength="1">
<md-tooltip md-direction="bottom">Process to run as your function i.e. 'env' or 'shasum'. Ignore if using OpenFaaS templates</md-tooltip>
<label>Function process (optional):</label>
<input name="envProcess" ng-model="item.envProcess" md-maxlength="200" minlength="0">
</md-input-container>
</div>
<div layout-gt-xs="row">
<md-input-container class="md-block" flex-gt-sm>
<label>Network:</label>
<input name="network" ng-model="item.network" required md-maxlength="200" minlength="4">
<md-tooltip md-direction="bottom">Docker Swarm network, not required for other providers. Default: func_functions</md-tooltip>
<label>Network (Swarm):</label>
<input name="network" ng-model="item.network" md-maxlength="200" minlength="0">
</md-input-container>
</div>
<div class="validation-error" layout-gt-xs="row" layout-align="start end">
......@@ -31,12 +49,13 @@
</div>
</form>
</md-dialog-content>
<md-dialog-actions>
<md-button ng-click="closeDialog()" class="md-secondary">
Close Dialog
</md-button>
<md-button ng-click="createFunc()" class="md-primary">
Create
Deploy
</md-button>
</md-dialog-actions>
</md-dialog>
......@@ -18,6 +18,6 @@ fi
echo Building functions/gateway:$eTAG
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
-t functions/gateway:$eTAG . -f $dockerfile
-t functions/gateway:$eTAG . -f $dockerfile --no-cache
......@@ -27,7 +27,7 @@ Here's how to package your function if you don't want to use the CLI or have exi
- [x] Use an existing or a new Docker image as base image `FROM`
- [x] Add the fwatchdog binary from the [Releases page](https://github.com/openfaas/faas/releases) via `curl` or `ADD https://`
- [x] Set an `fprocess` environmental variable with the function you want to run for each request
- [x] Set an `fprocess` (function process) environmental variable with the function you want to run for each request
- [x] Expose port 8080
- [x] Set the `CMD` to `fwatchdog`
......@@ -71,7 +71,7 @@ The watchdog can be configured through environmental variables. You must always
| Option | Usage |
|------------------------|--------------|
| `fprocess` | The process to invoke for each function call. This must be a UNIX binary and accept input via STDIN and output via STDOUT. |
| `fprocess` | The process to invoke for each function call (function process). This must be a UNIX binary and accept input via STDIN and output via STDOUT. |
| `cgi_headers` | HTTP headers from request are made available through environmental variables - `Http_X_Served_By` etc. See section: *Handling headers* for more detail. Enabled by default. |
| `marshal_requests` | Instead of re-directing the raw HTTP body into your fprocess, it will first be marshalled into JSON. Use this if you need to work with HTTP headers and do not want to use environmental variables via the `cgi_headers` flag. |
| `content_type` | Force a specific Content-Type response for all responses. |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment