74 Commits

Author SHA1 Message Date
Alex Ellis (OpenFaaS Ltd)
3f98c856e5 Remove Swarm references
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-12-16 10:01:21 +00:00
Alistair Hey
7b6cc60bd9 Fix Invocation count wrong for multiple namespace
Fixes https://github.com/openfaas/faas/issues/1413
Fixes https://github.com/openfaas/faas-netes/issues/707

This fixes the Gateway UI not updating the
invocation count automatically without a page reload.

Tested by deploying on a local cluster and making sure invocations go up
with and without namespace suffix

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2020-11-17 10:04:33 +00:00
Alex Ellis (OpenFaaS Ltd)
f612947df7 Remove deprecated Angular/material versions
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-10-14 15:33:51 +01:00
Alex Ellis (OpenFaaS Ltd)
f864d88bb3 Add maps for AngularJS
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-10-14 15:33:15 +01:00
Alex Ellis (OpenFaaS Ltd)
66c89c7b8a Upgrade Angular to 1.8.0
* Updates AngularJS to 1.8.0
* Updates the MaterialUI theme to 1.2.1
* Fixes: #1576

Tested by running the gateway locally, with NATS, Prometheus,
and a gateway port-forwarded from a local KinD cluster.

The UI rendered and the newer files were served. Functions
could be deployed and invoked from the store and CLI.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-10-14 15:31:16 +01:00
Alistair Hey
6880fdc524 Fix issue with Namespace suffix on Gateway UI
There was a case where a deployment with a single namespace on
faas-netes would show the namespace suffix for all functions.  we didn't
need to show this because the gateway will proxy to the default
namespace for fns without the namespace siffix.

This was tested on Swarm (no suffix), faas-netes (single namespace, no
suffix) and faas-netes, multi-ns, suffix shown.

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2020-03-05 15:38:17 +00:00
Alistair Hey
b4bed58b66 Fix padding on Fn Store Gateway UI
The padding was off on the Gateway UI for the function
Store popup.

I have removed the 0padding css class from this element and left
it on the elements that require it

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2020-03-05 15:38:17 +00:00
Alistair Hey
59b7839236 Change how and when we fetch and parse namespace info
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2019-12-19 10:32:46 +00:00
Alistair Hey
04fead5eab Hide the namespace selector when on swarm or <2 K8s ns
We now hide the new namespace dropdown selector when
there is only 1 namespace, or when we are on swarm
This is also hidden in the function create page and
the function detail page

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2019-12-15 17:06:20 +00:00
Alistair Hey
2f683ba236 Add Namespace indicator on Function page part of #1379
This is a precursor to adding a dropdown for namespaces
selection (#1379)

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2019-11-25 13:58:33 +00:00
Alistair Hey
7e1af57921 Allow users to create functions in a non-default NS from ui
This allows a uswer to select a non-standard (not openfaas-fn)
namespace from the UI to deploy a function into.

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2019-11-25 11:11:48 +00:00
Alistair Hey
dd0608d36c Add Namespace Dropdown to Gateway UI
This PR adds a namespace dropdown for the openfaas
namespaces. If a user has non-default namespaces
installed then a user can select that namespace,
view functions in that namespace, invoke them from
the UI and delete them from that namespace.

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
2019-11-25 11:11:48 +00:00
Alex Ellis (OpenFaaS Ltd)
d322f109a8 Fix logo location
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-09-20 08:30:22 +01:00
Alex Ellis (OpenFaaS Ltd)
64b18d414e Update to SVG logo in UI
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-09-18 20:27:29 +01:00
Burton Rheutan
a6c9e3bb30 Remove extra customize button
The customize button was redundant to the custom tab
This could lead to confusion with the user experience,
so the additional button has been removed.

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2019-06-17 10:20:22 +01:00
Burton Rheutan
a987d2147b Add additional fields to the UI
Adding additional inputs for Environment variables, Secrets,
Labels, and annotations so that more advanced functions can
be deployed through the UI.

This also allows more advanced functions to be provided via
the store. Allowing modification to secret values, and
environment variables which will allow functions like a
Slack Bot function to be deployed through the store adn
configured with an environment variable

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2019-06-16 14:58:20 +01:00
Rishabh Gupta
7b09992565 Using functions.json instead of store-arch.json
Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
2019-04-14 16:51:22 +01:00
Burton Rheutan
988c855163 Gateway UI - validate manual input
This change validates manual input to the gateway UI when deploying
new functions. This is to prevent poor user experience when attempting
to deploy a function manually from the UI.

The validation check on the function name is the same pattern that
is used in the CLI to ensure that when the deploy button is pressed,
the function will not fail validation.

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2019-01-19 11:00:59 +00:00
Lucas Roesler
334288b130 Undo early return in updateData callback
**What**
- Revert to original if-block structure to reduce the size of the diff

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-12-19 21:10:41 +00:00
Lucas Roesler
cb367096ae Refresh function image during ui update loop
**What**
- Update the function image value during the `refreshData`

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-12-19 21:10:41 +00:00
Burton Rheutan
a51d42c983 Download vendor cdn files for gateway
This change set downloads the CDN resources for the gateway
and bundles them with the other static resources for the UI.

This is needed for situations where a user does not have access
to the CDN either because of firewall rules or network policy.

The files and versions remain the same, only now loaded locally
with directory paths matching the CDN paths.

Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-12-05 20:20:15 +00:00
qinpengfei
70a5e343c5 code formatter
Signed-off-by: qinpengfei <qinpengfei@jd.com>
2018-10-19 21:24:15 +01:00
Ken Fukuyama
b73e14be92 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>
2018-08-24 08:54:27 +01:00
Ken Fukuyama
db465b82a4 Added function url field and copy action to the UI
This change adds a function URL field to the UI and a 'copy to
clipboard' button next to it. If the browser does not support the copy
command, the copy icon will be hidden.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-07-16 11:12:38 +01:00
Rillian Grant
829262e493 Add message for when JavaScript is disabled
- Added padding to the "You need JavaScript page"
 - Added padding to the "You need JavaScript page" - Added info about the CLI tthe "You need JavaScript" page
 - Added a message for people who don't have JavaScript enabled

Signed-off-by: Rillian Grant <rillian.grant@hotmail.com>
2018-04-26 12:48:22 +01:00
ovation22
3c7e222ab2 Add blankslate to gateway UI
Adds a more informative screen when a function is not selected
or when there are no functions to select from.

Provides a button to deploy a new function
and more information on how to deploy using
faas-cli.

Signed-off-by: ovation22 <john@1north.com>
2018-04-25 17:55:33 +01:00
Ken Fukuyama
8f249792fe On funcstore error, change to manual tab
Fixed the UI so that when an error occurs, the tab automatically changes
to the manual tab in order to show the errors.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-04-10 14:06:51 -07:00
Ken Fukuyama
4877a60aee Changed the download functionality to cover IE.
Since IE doesn't work well with `.click()` (because of access denied) we
can take advantage of the `navigator.msSaveOrOpenBlob`.
https://stackoverflow.com/questions/46232980/click-giving-access-denied-in-ie11/46233123#46233123

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-03-23 16:43:38 +00:00
Ivana Yovcheva
c633fbb96d Fix mouse click error on IE11
MouseEvent initialization was failing on IE11.
Add a separate case for IE11 that fixes the issue.

Signed-off-by: Ivana Yovcheva <iyovcheva@vmware.com>
2018-03-23 16:43:38 +00:00
Ivana Yovcheva
0f126ce241 Fix crypto breaking error for IE11
window.crypto is throwing an error on IE11
which required a modification to use window.msCrypto
instead in case of running on IE11

Signed-off-by: Ivana Yovcheva <iyovcheva@vmware.com>
2018-03-23 16:43:38 +00:00
David Muckle
5824d865c6 Add a title to the index.html for the gateway
This will replace the gateway URL showing up as the title.

Signed-off-by: David Muckle <dvdmuckle@dvdmuckle.xyz>
2018-03-23 16:38:19 +00:00
Ken Fukuyama
7d860bff41 fixed unexpected behavior where the selected function properties don't get
updated after adding/deleting a different function.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-03-08 22:30:45 +01:00
Ken Fukuyama
02642ffb3f Edited unnecessary fields and $scopes.
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-03-08 22:30:45 +01:00
Alex Ellis
b9d705ebd4 UI: in-line ready directive
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-03-08 22:30:45 +01:00
Alex Ellis
a8d91590ab UI: fix ng-model complaint
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-03-08 22:30:45 +01:00
Alex Ellis
ccfb8f7be4 Make UI block until function reports readiness
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-03-08 22:30:45 +01:00
Ken Fukuyama
4cc51adffb added missing return statement
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-03-03 17:41:56 +00:00
Ken Fukuyama
d96674468c fixed another missing closing tag.
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-03-03 17:41:56 +00:00
Ken Fukuyama
a6a657295f fixed ES6 syntax accidentally used in JavaScript.
fixed markup closing typo.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-03-03 17:41:56 +00:00
Ken Fukuyama
365e348865 upgraded angularjs from 1.5.5 to 1.6.9
The $https service deprecated the `success` method, so changed `success`
to `then`.

This will fix #528

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-02-25 12:07:41 +00:00
Ken Fukuyama
ead18a3059 Fixed UI to use relative paths for ajax requests in order to work with kube proxy.
This fixes issue #519.

Signed-off-by: Ken Fukuyama <fukuyama@supersoftware.co.jp>
2018-02-25 11:55:54 +00:00
Ken Fukuyama
cc103ada94 added repo link to func store. will open repo page on new window or tab
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2017-12-16 16:04:59 +00:00
Alex Ellis
3502c67d88 Allow valid UI label values
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-12-13 14:29:56 +00:00
Alex Ellis
e6eec64c0d UI: allow binary download
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-12-13 06:17:51 -08:00
Alex Ellis
5c8bb37bfb Experimental UI download
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-12-13 06:17:51 -08:00
Alex Ellis
ca34fd0ed1 Adds env-vars to store
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-12-12 06:51:04 -08:00
Ken Fukuyama
aba3a8ca2d * Added function store feature to the "Deploy New Function"
* This feature fetches function catalogs from openfaas/store and makes
  one-click deploy easy
  * You can switch between "From Store" or "Manually" by tabs

* Added icon to "Deploy New Function" button
* Added function search feature to the main UI

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>

reverted fixed tabs

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2017-11-30 09:55:52 +01:00
Alex Ellis
59d46938fe Tooltips
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-22 19:32:32 +00:00
Javier Revillas
86c83f0dcd Fix JSON serialization relying on response content
Signed-off-by: Javier Revillas <jrevillas@massivedynamic.io>
2017-11-20 10:32:42 +00:00
Alex Ellis
9783f96f7b Enable client response time in the UI
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-18 09:20:02 +00:00