You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/06/12 05:36:11 UTC
Review Request 22495: Views: standardize way to obtain "icon" from view
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22495/
-----------------------------------------------------------
Review request for Ambari, Nate Cole and Sid Wagle.
Bugs: AMBARI-6095
https://issues.apache.org/jira/browse/AMBARI-6095
Repository: ambari
Description
-------
As part of view definition (or part of standard ui resource that can be loaded from a view), need a way to obtain the icon for the view.
1. <icon> for all sizes, but we recommend 32x32 (because we'll resize on display to 16x16, 32x32 and 48x48)
<icon>/this/is/the/icon/url/icon.png</icon>
2. <icon64> for big size 64x64. If not specified, the smaller <icon> will be used.
<icon64>/this/is/the/icon/url/icon64.png</icon64>
3. Available at definition and instance level. Asking an instance for it's icon should handle the logic (check if available on instance, if not, get use definition). If the icon is not specified by the view, Ambari Web should have a default icon for views to use and it.
<view>
<name></name>
<version></version>
<icon>/this/is/the/icon/url/icon.png</icon>
<icon64>/this/is/the/icon/url/icon64.png</icon64>
...
<instance>
<icon>/this/is/the/instance/icon/url/icon.png</icon>
...
</view>
4. The path is relative to the view resource. And this is the path it should be in the view package.
http://<server>:8080/views/WEATHER/1.0.0/US_WEST/this/is/the/icon/url/icon.png
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 70e95a2
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java 25318b5
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java 5351a74
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java f75278e
ambari-server/src/main/java/org/apache/ambari/server/view/configuration/InstanceConfig.java f37cd80
ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java a49c9dd
ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 282c170
ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql e14a174
ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bce052
ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 852ff9c
ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java 1618b64
ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java 7b3b013
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java b520e1e
ambari-server/src/test/java/org/apache/ambari/server/view/configuration/InstanceConfigTest.java 09fef94
ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java 2a1d8d2
Diff: https://reviews.apache.org/r/22495/diff/
Testing
-------
New unit tests added. All tests pass ...
Results :
Tests run: 1667, Failures: 0, Errors: 0, Skipped: 13
…
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30:33.812s
[INFO] Finished at: Wed Jun 11 20:49:12 EDT 2014
[INFO] Final Memory: 36M/123M
[INFO] ------------------------------------------------------------------------
Thanks,
Tom Beerbower
Re: Review Request 22495: Views: standardize way to obtain "icon" from view
Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22495/#review45464
-----------------------------------------------------------
Ship it!
Ship It!
- Sid Wagle
On June 12, 2014, 3:36 a.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22495/
> -----------------------------------------------------------
>
> (Updated June 12, 2014, 3:36 a.m.)
>
>
> Review request for Ambari, Nate Cole and Sid Wagle.
>
>
> Bugs: AMBARI-6095
> https://issues.apache.org/jira/browse/AMBARI-6095
>
>
> Repository: ambari
>
>
> Description
> -------
>
> As part of view definition (or part of standard ui resource that can be loaded from a view), need a way to obtain the icon for the view.
>
> 1. <icon> for all sizes, but we recommend 32x32 (because we'll resize on display to 16x16, 32x32 and 48x48)
>
> <icon>/this/is/the/icon/url/icon.png</icon>
>
> 2. <icon64> for big size 64x64. If not specified, the smaller <icon> will be used.
>
> <icon64>/this/is/the/icon/url/icon64.png</icon64>
>
> 3. Available at definition and instance level. Asking an instance for it's icon should handle the logic (check if available on instance, if not, get use definition). If the icon is not specified by the view, Ambari Web should have a default icon for views to use and it.
>
> <view>
> <name></name>
> <version></version>
> <icon>/this/is/the/icon/url/icon.png</icon>
> <icon64>/this/is/the/icon/url/icon64.png</icon64>
> ...
>
> <instance>
> <icon>/this/is/the/instance/icon/url/icon.png</icon>
> ...
>
> </view>
>
> 4. The path is relative to the view resource. And this is the path it should be in the view package.
>
> http://<server>:8080/views/WEATHER/1.0.0/US_WEST/this/is/the/icon/url/icon.png
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 70e95a2
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java 25318b5
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java 5351a74
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java f75278e
> ambari-server/src/main/java/org/apache/ambari/server/view/configuration/InstanceConfig.java f37cd80
> ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java a49c9dd
> ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 282c170
> ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql e14a174
> ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bce052
> ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 852ff9c
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java 1618b64
> ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java 7b3b013
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java b520e1e
> ambari-server/src/test/java/org/apache/ambari/server/view/configuration/InstanceConfigTest.java 09fef94
> ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java 2a1d8d2
>
> Diff: https://reviews.apache.org/r/22495/diff/
>
>
> Testing
> -------
>
> New unit tests added. All tests pass ...
>
> Results :
>
> Tests run: 1667, Failures: 0, Errors: 0, Skipped: 13
> …
>
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 30:33.812s
> [INFO] Finished at: Wed Jun 11 20:49:12 EDT 2014
> [INFO] Final Memory: 36M/123M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Tom Beerbower
>
>