From 2d57bc6c54dd15d19e360b9f067be5bec08aa5f5 Mon Sep 17 00:00:00 2001 From: George Cheng Date: Mon, 4 Mar 2019 20:28:06 +0800 Subject: [PATCH] Webportal: add pai-version attribute to (#2245) * Webportal: add pai-version attribute to * Use preprocess to apply window.PAI_VERSION * set version in layout.html --- src/webportal/src/app/layout/layout.component.ejs | 1 + src/webportal/src/app/plugin/plugin.component.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webportal/src/app/layout/layout.component.ejs b/src/webportal/src/app/layout/layout.component.ejs index 866173646a..cbd3f8e5ea 100644 --- a/src/webportal/src/app/layout/layout.component.ejs +++ b/src/webportal/src/app/layout/layout.component.ejs @@ -137,6 +137,7 @@
+ diff --git a/src/webportal/src/app/plugin/plugin.component.js b/src/webportal/src/app/plugin/plugin.component.js index 778ea45a80..dbb700097e 100644 --- a/src/webportal/src/app/plugin/plugin.component.js +++ b/src/webportal/src/app/plugin/plugin.component.js @@ -46,7 +46,8 @@ $(document).ready(function() { loadScript(plugin.uri, function() { const $plugin = $('') - .attr('pai-rest-server-uri', window.ENV.restServerUri); + .attr('pai-rest-server-uri', window.ENV.restServerUri) + .attr('pai-version', window.PAI_VERSION); if (cookies.get('token')) { $plugin.attr('pai-user', cookies.get('user')) .attr('pai-rest-server-token', cookies.get('token'));