From cc103ada941678b22dd7fec2492716f3fe87dc30 Mon Sep 17 00:00:00 2001 From: Ken Fukuyama Date: Sat, 16 Dec 2017 00:12:48 +0900 Subject: [PATCH] added repo link to func store. will open repo page on new window or tab Signed-off-by: Ken Fukuyama --- gateway/assets/img/icons/ic_link_black_24px.svg | 4 ++++ gateway/assets/index.html | 2 +- gateway/assets/script/funcstore.js | 6 +++++- gateway/assets/style/bootstrap.css | 8 ++++++++ gateway/assets/templates/funcstore.html | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 gateway/assets/img/icons/ic_link_black_24px.svg diff --git a/gateway/assets/img/icons/ic_link_black_24px.svg b/gateway/assets/img/icons/ic_link_black_24px.svg new file mode 100644 index 00000000..6d46cab6 --- /dev/null +++ b/gateway/assets/img/icons/ic_link_black_24px.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/gateway/assets/index.html b/gateway/assets/index.html index 5fe56ba6..0675996f 100644 --- a/gateway/assets/index.html +++ b/gateway/assets/index.html @@ -38,7 +38,7 @@ - +

Deploy New Function

diff --git a/gateway/assets/script/funcstore.js b/gateway/assets/script/funcstore.js index 0fd8aa88..c39ad783 100644 --- a/gateway/assets/script/funcstore.js +++ b/gateway/assets/script/funcstore.js @@ -17,7 +17,7 @@ funcStoreModule.component('funcStore', { selectedFunc: '<', onSelected: '&', }, - controller: ['FuncStoreService', '$mdDialog', function FuncStoreController(FuncStoreService, $mdDialog) { + controller: ['FuncStoreService', '$mdDialog', '$window', function FuncStoreController(FuncStoreService, $mdDialog, $window) { var self = this; this.storeUrl = 'https://raw.githubusercontent.com/openfaas/store/master/store.json'; @@ -70,6 +70,10 @@ funcStoreModule.component('funcStore', { ); } + this.openRepo = function (url) { + $window.open(url, '_blank'); + } + this.loadStore(); }] diff --git a/gateway/assets/style/bootstrap.css b/gateway/assets/style/bootstrap.css index 61bbddfc..8f9fc17c 100644 --- a/gateway/assets/style/bootstrap.css +++ b/gateway/assets/style/bootstrap.css @@ -67,3 +67,11 @@ span.md-avatar { background-color: #1398D6; color: white; } + +md-icon { + opacity: 0.6; +} + +md-icon.link { + fill: #303AA5; +} \ No newline at end of file diff --git a/gateway/assets/templates/funcstore.html b/gateway/assets/templates/funcstore.html index 2aceb3d3..4fa79f65 100644 --- a/gateway/assets/templates/funcstore.html +++ b/gateway/assets/templates/funcstore.html @@ -19,6 +19,7 @@

{{ func.title }}

{{ func.description }}

+