Using functions.json instead of store-arch.json

Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
This commit is contained in:
Rishabh Gupta 2019-04-04 21:09:57 +05:30 committed by Alex Ellis
parent 832d174c37
commit 7b09992565
3 changed files with 7 additions and 5 deletions

View File

@ -43,7 +43,6 @@ RUN chown -R app:app ./
USER app
# Patch to ARM64 store
RUN sed -ie s/store.json/store-arm64.json/g /home/app/assets/script/funcstore.js
RUN sed -ie s/x86_64/arm64.json/g /home/app/assets/script/funcstore.js
CMD ["./gateway"]

View File

@ -55,7 +55,7 @@ ENV https_proxy ""
COPY --from=build /go/src/github.com/openfaas/faas/gateway/gateway .
COPY assets assets
RUN sed -ie s/store.json/store-armhf.json/g /home/app/assets/script/funcstore.js
RUN sed -ie s/x86_64/armhf/g /home/app/assets/script/funcstore.js
RUN chown -R app:app ./
USER app

View File

@ -20,7 +20,8 @@ funcStoreModule.component('funcStore', {
controller: ['FuncStoreService', '$mdDialog', '$window', function FuncStoreController(FuncStoreService, $mdDialog, $window) {
var self = this;
this.storeUrl = 'https://raw.githubusercontent.com/openfaas/store/master/store.json';
this.arch = "x86_64";
this.storeUrl = 'https://raw.githubusercontent.com/openfaas/store/master/functions.json';
this.selectedFunc = null;
this.functions = [];
this.message = '';
@ -47,7 +48,9 @@ funcStoreModule.component('funcStore', {
FuncStoreService.fetchStore(self.storeUrl)
.then(function (data) {
self.loading = false;
self.functions = data;
self.functions = data.functions
.filter(f => f.images.hasOwnProperty(self.arch))
.map(f => Object.assign(f, { "image": f["images"][self.arch] }));
})
.catch(function (err) {
console.error(err);