Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help on changing support_website and support_website_text string #1400

Closed
tjyang opened this issue Mar 14, 2018 · 8 comments
Closed

Need help on changing support_website and support_website_text string #1400

tjyang opened this issue Mar 14, 2018 · 8 comments
Labels

Comments

@tjyang
Copy link

tjyang commented Mar 14, 2018

Description of problem:
I am able to change the logo to my custom image by following skin-simple readme

But I want o customize both support_website and support_website_text string also.

How reproducible:

Steps to Reproduce:

  1. skin.js
    From peeking at https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/appliance-info.service.spec.js
    I came up with following skin.js
[root@miqr2wk01 skin-test]# pwd
/opt/manageiq/manageiq-ui-service/skin-moto
[root@miqr2wk01 skin-test]#

[root@miqr2wk01 skin-moto]# more skin.js
(function() {
  'use strict';

  var text = {
    app: {
      name: 'Test ManageIQ Service UI', // app name
    },
    login: {
      brand: 'Test  VM Self-Service Catalog ', // login screen
    },
    applianceInfoData: { 
     product_info: {
      'support_website': 'http://test.com/issues', // Using
      'support_website_text': 'Test  ManageIQ Support'
     },
    },
  };
  angular.module('app.skin', [])
    .constant('Text', text)
    .config(configure);

  /** @ngInject */
  function configure(routerHelperProvider, exceptionHandlerProvider) {
    exceptionHandlerProvider.configure('[SUI] '); // error prefix
    routerHelperProvider.configure({docTitle: 'Lenovo ManageIQ Service UI: '}); // page title
  }
})();


2. rebuild

``
cd /opt/manageiq/manageiq-ui-service;yarn build

<snipped>
Child extract-text-webpack-plugin ../node_modules/extract-text-webpack-plugin/dist ../node_modules/css-loader/index.js?importLoaders=1&sourceMap=true!../node_modules/sass-loader/lib/loader.js??ref--5-3!assets/sass/styles.sass:
     66 assets
      [14] ../node_modules/css-loader?importLoaders=1&sourceMap=true!../node_modules/sass-loader/lib/loader.js?{"data":"$img-base-path: '/ui/service/'","sourceMap":true,"includePaths":["/opt/manageiq/manageiq-ui-service/client/assets/sass","/opt/manageiq/manageiq-ui-service/node_modules/bootstrap-sass/assets/stylesheets","/opt/manageiq/manageiq-ui-service/node_modules/patternfly/dist/sass/patternfly","/opt/manageiq/manageiq-ui-service/node_modules/font-awesome/scss","/opt/manageiq/manageiq-ui-service/node_modules/@manageiq/font-fabulous/assets/stylesheets"]}!./assets/sass/styles.sass 1.9 MB {0} [built]
            factory:125ms building:5899ms = 6024ms
        + 81 hidden modules
Done in 124.65s.
[root@miqr2wk01 manageiq-ui-service]#

  1. login to /ui/sevice again to check the Site(square) icon

Actual results:

image

Expected results:
MangeIQ.org text got changed to "Test ManageIQ Support"

Additional info:

@AllenBW AllenBW added the bug label Mar 14, 2018
@tjyang
Copy link
Author

tjyang commented Mar 15, 2018

@AllenBW

  • I change the text in appliance-info.service.spec.js
[root@miqr2wk01 manageiq-ui-service]# git diff ./client/app/core/appliance-info.service.spec.js
diff --git a/client/app/core/appliance-info.service.spec.js b/client/app/core/appliance-info.service.spec.js
index f42601c..02dd902 100644
--- a/client/app/core/appliance-info.service.spec.js
+++ b/client/app/core/appliance-info.service.spec.js
@@ -3,8 +3,8 @@ describe('Appliance Info Service', () => {
   const applianceInfoData = {
     'product_info': {
       'copyright': 'Copyright (c) 2017 ManageIQ. Sponsored by Red Hat Inc.',
-      'support_website': 'http://www.manageiq.org',
-      'support_website_text': 'ManageIQ.org'
+      'support_website': 'http://mytest.com/issues',
+      'support_website_text': 'My MIQ Support'
     },
     'identity': {
       'name': 'Administrator',
[root@miqr2wk01 manageiq-ui-service]#

  • The do "cd /opt/manageiq/manageiq-ui-service;yarn build"
  • The text in About icon still not changed.

@AllenBW
Copy link
Member

AllenBW commented Mar 15, 2018

anything .spec.js is a test file, sadly won't change anything 😭

I believe the setting you are looking for is in the ops-ui under Configuration

if yah scroll to the bottom yah should see something that looks like this:
screen shot 2018-03-15 at 4 45 39 pm

@tjyang
Copy link
Author

tjyang commented Mar 15, 2018

@AllenBW

I located the "Custom Support URL"
and make changes to it but it doesn't reflect to /ui/serivce GUI.
Do I need to restart evm or httpd ?

Also this doesn't make sense to me, since ui-classic and ui-service resides in different paths.

@AllenBW
Copy link
Member

AllenBW commented Mar 16, 2018

Yep! SUI runs off the api served by the default server, which provides the support url and description (we get this info when yah log into the sui). It isn't a skinable part. Ok ok so I directed you to the wrong custom support url.. ACTUALLY you to:

root region server -> help tab and you'll see something like this:
screen shot 2018-03-16 at 7 43 55 am

lemme know if that works for yah @tjyang

@AllenBW AllenBW added question and removed bug labels Mar 16, 2018
@tjyang
Copy link
Author

tjyang commented Mar 16, 2018

@AllenBW, I think this is a bug, IMHO.

To rule out complexity of multi appliances in same region, I did the test on another gapri-2 with all-in-one roles on same appliance called wk04.
All the settings to set support URL won't past on to ui/service node.js program.

@AllenBW
Copy link
Member

AllenBW commented Mar 16, 2018

@tjyang sui displays what it is provided, this is a bug for elsewhere, but before submitting I would clear your browser session storage and maybe restart the server...

ss of the source info...
screen shot 2018-03-16 at 11 03 40 am

@tjyang
Copy link
Author

tjyang commented Mar 16, 2018

@AllenBW

This is what did from a fresh downloaded Gapri-2 vmware image and also browse it from different computer.

image

  • Service-UI result

image

@AllenBW
Copy link
Member

AllenBW commented Mar 16, 2018

@tjyang again, not an SUI issue as it correctly displays what it is supplied.. would recommend submitting an issue against https://github.com/ManageIQ/manageiq-api

gonna close this for now, but please feel free to reference it in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants