ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Review Request 21181: Ability to work on a view as "exploded" to support UI dev
Date Wed, 07 May 2014 23:19:48 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21181/
-----------------------------------------------------------

Review request for Ambari, Nate Cole and Sumit Mohanty.


Bugs: AMBARI-5702
    https://issues.apache.org/jira/browse/AMBARI-5702


Repository: ambari


Description
-------

After deploying view JAR, explode the view so that UI resources can be modified without requiring
re-deploy or ambari-server restart.

Developer should be able to make changes to UI code and click "refresh" in browser to pick
up the changes.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0


Diff: https://reviews.apache.org/r/21181/diff/


Testing
-------

Added new unit test.  All existing unit tests pass ...

Results :

Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9
...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:19.667s
[INFO] Finished at: Wed May 07 18:19:17 EDT 2014
[INFO] Final Memory: 36M/123M
[INFO] ------------------------------------------------------------------------

Manual test ...


1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean
install
2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar
to the views directory on the Ambari server : /var/lib/ambari-server/resources/views
3. Start the Ambari server : ambari-server start
4. Check to see that the hello world view has been exploded.  Under /var/lib/ambari-server/resources/views/work
you should see a new folder HELLO_WORLD{1.0.0}
5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/
6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1
7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1"
8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/.
 You should see 'Hello world!' in the browser.
9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html.
 Change 'Hello world!' to 'Hello TOM!'
10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/.
 You should see 'Hello TOM!'.


Thanks,

Tom Beerbower


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message