Open tjyang opened 5 years ago
@tjyang There is already some documentation about UI plugins in https://github.com/ManageIQ/guides/blob/master/ui/plugins.md , including a link about the manageiq plugin strucutre in general.
The short form is:
/var/www/miq/vmdb
Gemfile,bin/update
,(But please note that none of those steps are supported on our appliances, so you may run into issues during those steps, or may need to do the equivalent of those steps outside the appliance.)
((And likely, the first issue is that you will need a bit over a gigabyte of free space to rebuild assets on the appliance.))
I just fixed the link here: https://github.com/ManageIQ/guides/pull/336
Hi @martinpovolny and @himdel
Hope you guys can help me figure out how to add menu in hammer-1 appliance.
To modify the configuration, use a web browser to access the management page.
Hostname: hammer1t IPv4 Address: 192.168.1.235/255.255.255.0 IPv4 Gateway: 192.168.1.1 IPv6 Address: 2601:248:104:7159:20c:29ff:fe89:d23f/64 IPV6 Gateway: fe80::6238:e0ff:fe0a:f1 Primary DNS: 192.168.1.1 Secondary DNS: Search Order: test.lan MAC Address: 00:0c:29:89:d2:3f Timezone: America/Chicago Local Database Server: running (primary) ManageIQ Server: running ManageIQ Database: localhost Database/Region: vmdb_production / 0 External Auth: not configured ManageIQ Version: hammer-1
Press any key to continue.
* add it to the /var/www/miq/vmdb Gemfile,
[root@hammer1t vmdb]# git log -1 commit b725b5e9527462bdcdbe0a3fba5adbfdd44b988d Author: Satoe Imaishi simaishi@redhat.com Date: Thu Jan 10 16:09:08 2019 -0500
Release hammer-1
[root@hammer1t vmdb]# git diff Gemfile diff --git a/Gemfile b/Gemfile index 4c00d47..b45b8a8 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ source 'https://rubygems.org' #
+gem "miq_plugin_example", ">0", :require => 'miq_plugin_example', :git => "https://github.com/martinpovolny/miq_plugin_example.git", :tag => "master" gem "manageiq-gems-pending", ">0", :require => 'manageiq-gems-pending', :git => "https://github.com/ManageIQ/manageiq-gems-pending.git", :tag => "hammer-1"
gem "handsoap", "~>0.2.5", :require => false, :git => "https://github.com/ManageIQ/handsoap.git", :tag => "v0.2.5-5" [root@hammer1t vmdb]#
* run **bin/update**, it will rebuild assets(I think)
[root@hammer1t vmdb]# bin/update
WARNING in webpack performance recommendations: You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. For more info visit https://webpack.js.org/guides/code-splitting/ Done in 228.50s. [Webpacker] Compiled digests for all packs in /usr/local/lib/ruby/gems/2.4.0/bundler/gems/manageiq-ui-classic-a6c9b4165d5d/app/javascript/packs: {"runtime.js"=>"/packs/runtime-06564b9a89992a24e3c0.js", "runtime.js.map"=>"/packs/runtime-06564b9a89992a24e3c0.js.map", "vendor.js"=>"/packs/vendor-39ae0ba30c79fdd33c0a.js", "vendor.js.map"=>"/packs/vendor-39ae0ba30c79fdd33c0a.js.map", "shims.js"=>"/packs/shims-5adfd434991a6bd67167.js", "shims.js.map"=>"/packs/shims-5adfd434991a6bd67167.js.map", "miq_plugin_example/react-common.js"=>"/packs/miq_plugin_example/react-common-1c7b6bb27df5b1109095.js", "miq_plugin_example/react-common.js.map"=>"/packs/miq_plugin_example/react-common-1c7b6bb27df5b1109095.js.map", "miq_plugin_example/hallo-common.js"=>"/packs/miq_plugin_example/hallo-common-b077faa3a1dd451fafef.js", "miq_plugin_example/hallo-common.js.map"=>"/packs/miq_plugin_example/hallo-common-b077faa3a1dd451fafef.js.map", "miq_plugin_example/hallo_react.js"=>"/packs/miq_plugin_example/hallo_react-7b036192d7768d91a247.js", "miq_plugin_example/hallo_react.js.map"=>"/packs/miq_plugin_example/hallo_react-7b036192d7768d91a247.js.map", "miq_plugin_example/angular2-example.js"=>"/packs/miq_plugin_example/angular2-example-aa23d7b2e3a6e7d7d475.js", "miq_plugin_example/angular2-example.js.map"=>"/packs/miq_plugin_example/angular2-example-aa23d7b2e3a6e7d7d475.js.map", "manageiq-v2v/polyfills.js"=>"/packs/manageiq-v2v/polyfills-cb5f0f31c0fec9c092d5.js", "manageiq-v2v/polyfills.js.map"=>"/packs/manageiq-v2v/polyfills-cb5f0f31c0fec9c092d5.js.map", "manageiq-v2v/migration.js"=>"/packs/manageiq-v2v/migration-2537524b71367343b409.js", "manageiq-v2v/migration.js.map"=>"/packs/manageiq-v2v/migration-2537524b71367343b409.js.map", "manageiq-ui-classic/toolbar-actions-common.js"=>"/packs/manageiq-ui-classic/toolbar-actions-common-c68d2b12c88d17ac8799.js", "manageiq-ui-classic/toolbar-actions-common.js.map"=>"/packs/manageiq-ui-classic/toolbar-actions-common-c68d2b12c88d17ac8799.js.map", "manageiq-ui-classic/provisioning-actions-common.js"=>"/packs/manageiq-ui-classic/provisioning-actions-common-6dff6bbb59052d3d191b.js", "manageiq-ui-classic/provisioning-actions-common.js.map"=>"/packs/manageiq-ui-classic/provisioning-actions-common-6dff6bbb59052d3d191b.js.map", "manageiq-ui-classic/provider-dialogs-common.js"=>"/packs/manageiq-ui-classic/provider-dialogs-common-f74a92dd19d7d6c37735.js", "manageiq-ui-classic/provider-dialogs-common.js.map"=>"/packs/manageiq-ui-classic/provider-dialogs-common-f74a92dd19d7d6c37735.js.map", "manageiq-ui-classic/globals.js"=>"/packs/manageiq-ui-classic/globals-8f43cd42bc91d76e5844.js", "manageiq-ui-classic/globals.js.map"=>"/packs/manageiq-ui-classic/globals-8f43cd42bc91d76e5844.js.map", "manageiq-ui-classic/component-definitions-common.js"=>"/packs/manageiq-ui-classic/component-definitions-common-625343a2c23dbf590fd1.js", "manageiq-ui-classic/component-definitions-common.js.map"=>"/packs/manageiq-ui-classic/component-definitions-common-625343a2c23dbf590fd1.js.map", "manageiq-ui-classic/application-common.js"=>"/packs/manageiq-ui-classic/application-common-604bbf8d309874410608.js", "manageiq-ui-classic/application-common.js.map"=>"/packs/manageiq-ui-classic/application-common-604bbf8d309874410608.js.map", "manageiq-providers-nuage/component-definitions-common.js"=>"/packs/manageiq-providers-nuage/component-definitions-common-d5b1c54f509a478715b1.js", "manageiq-providers-nuage/component-definitions-common.js.map"=>"/packs/manageiq-providers-nuage/component-definitions-common-d5b1c54f509a478715b1.js.map", "manageiq-graphql/graphql-explorer.js"=>"/packs/manageiq-graphql/graphql-explorer-58b0c4fd1d136db4f380.js", "manageiq-graphql/graphql-explorer.js.map"=>"/packs/manageiq-graphql/graphql-explorer-58b0c4fd1d136db4f380.js.map", "runtime-06564b9a89992a24e3c0.js.gz"=>"/packs/runtime-06564b9a89992a24e3c0.js.gz", "miq_plugin_example/react-common-1c7b6bb27df5b1109095.js.gz"=>"/packs/miq_plugin_example/react-common-1c7b6bb27df5b1109095.js.gz", "miq_plugin_example/hallo-common-b077faa3a1dd451fafef.js.gz"=>"/packs/miq_plugin_example/hallo-common-b077faa3a1dd451fafef.js.gz", "miq_plugin_example/angular2-example-aa23d7b2e3a6e7d7d475.js.gz"=>"/packs/miq_plugin_example/angular2-example-aa23d7b2e3a6e7d7d475.js.gz", "manageiq-ui-classic/toolbar-actions-common-c68d2b12c88d17ac8799.js.gz"=>"/packs/manageiq-ui-classic/toolbar-actions-common-c68d2b12c88d17ac8799.js.gz", "manageiq-ui-classic/provisioning-actions-common-6dff6bbb59052d3d191b.js.gz"=>"/packs/manageiq-ui-classic/provisioning-actions-common-6dff6bbb59052d3d191b.js.gz", "manageiq-ui-classic/provider-dialogs-common-f74a92dd19d7d6c37735.js.gz"=>"/packs/manageiq-ui-classic/provider-dialogs-common-f74a92dd19d7d6c37735.js.gz", "manageiq-ui-classic/globals-8f43cd42bc91d76e5844.js.gz"=>"/packs/manageiq-ui-classic/globals-8f43cd42bc91d76e5844.js.gz", "manageiq-ui-classic/component-definitions-common-625343a2c23dbf590fd1.js.gz"=>"/packs/manageiq-ui-classic/component-definitions-common-625343a2c23dbf590fd1.js.gz", "manageiq-ui-classic/application-common-604bbf8d309874410608.js.gz"=>"/packs/manageiq-ui-classic/application-common-604bbf8d309874410608.js.gz", "manageiq-providers-nuage/component-definitions-common-d5b1c54f509a478715b1.js.gz"=>"/packs/manageiq-providers-nuage/component-definitions-common-d5b1c54f509a478715b1.js.gz", "manageiq-graphql/graphql-explorer-58b0c4fd1d136db4f380.js.gz"=>"/packs/manageiq-graphql/graphql-explorer-58b0c4fd1d136db4f380.js.gz", "shims-5adfd434991a6bd67167.js.gz"=>"/packs/shims-5adfd434991a6bd67167.js.gz", "manageiq-v2v/migration-2537524b71367343b409.js.gz"=>"/packs/manageiq-v2v/migration-2537524b71367343b409.js.gz", "vendor-39ae0ba30c79fdd33c0a.js.gz"=>"/packs/vendor-39ae0ba30c79fdd33c0a.js.gz"}
== Removing old logs and tempfiles == [root@hammer1t vmdb]#
* bundle install
[root@hammer1t vmdb]# bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Using rake 12.3.2 Using concurrent-ruby 1.1.4
Hi @martinpovolny and @himdel
Looks like above steps was able to activate "miq_plugin_example" menu. Can you comment on procedure above ?
Your steps look all right.
There's a small catch and that is if you use dev setup with the auto-reloading to debug your stuff, then the menus added throught a plugin disapper after the automatic reload. And you have to do a full reload to get it back. There's an issue for that here: https://github.com/ManageIQ/manageiq-ui-classic/issues/3316
Unfortunately that has not been fixed or implemented yet.
Hi @martinpovolny
Would you please provide steps to enable this plugin example for hammer-1 release ?
[root@miqregion01 vmdb]# vmdb;pwd;ls -l Gem*;ls -lrt | tail -2 /var/www/miq/vmdb -rw-r--r--. 1 root root 11313 Jan 19 13:02 Gemfile -rw-r--r--. 1 root root 25740 Jan 19 13:03 Gemfile.lock drwxr-xr-x. 6 root root 4096 Jan 31 18:10 config drwxr-xr-x. 9 root root 252 Jan 31 19:58 miq_plugin_example [root@miqregion01 vmdb]#