Modifying uitab archetype to allow it to co-exist/overlay the ui archetype.
Change-Id: I5fd8408aaaf461e29e757389d4acbd94647cd1c5
Showing
6 changed files
with
15 additions
and
4 deletions
... | @@ -11,7 +11,7 @@ type=${1:-bundle} | ... | @@ -11,7 +11,7 @@ type=${1:-bundle} |
11 | [ $type = app ] && archetype=bundle || archetype=$type | 11 | [ $type = app ] && archetype=bundle || archetype=$type |
12 | 12 | ||
13 | if [ "$1" = "-?" -o "$1" = "-h" -o "$1" = "--help" ]; then | 13 | if [ "$1" = "-?" -o "$1" = "-h" -o "$1" = "--help" ]; then |
14 | - echo "usage: $(basename $0) {app|bundle|ui|cli|api} groupId artifactId version package mvn-options" | 14 | + echo "usage: $(basename $0) {app|bundle|ui|uitab|cli|api} groupId artifactId version package mvn-options" |
15 | echo " All arguments are optional" | 15 | echo " All arguments are optional" |
16 | exit 1 | 16 | exit 1 |
17 | fi | 17 | fi | ... | ... |
... | @@ -37,7 +37,7 @@ import java.util.List; | ... | @@ -37,7 +37,7 @@ import java.util.List; |
37 | * Skeletal ONOS UI Table-View application component. | 37 | * Skeletal ONOS UI Table-View application component. |
38 | */ | 38 | */ |
39 | @Component(immediate = true) | 39 | @Component(immediate = true) |
40 | -public class AppUiComponent { | 40 | +public class AppUiTableComponent { |
41 | 41 | ||
42 | private final Logger log = LoggerFactory.getLogger(getClass()); | 42 | private final Logger log = LoggerFactory.getLogger(getClass()); |
43 | 43 | ||
... | @@ -52,12 +52,13 @@ public class AppUiComponent { | ... | @@ -52,12 +52,13 @@ public class AppUiComponent { |
52 | // Factory for UI message handlers | 52 | // Factory for UI message handlers |
53 | private final UiMessageHandlerFactory messageHandlerFactory = | 53 | private final UiMessageHandlerFactory messageHandlerFactory = |
54 | () -> ImmutableList.of( | 54 | () -> ImmutableList.of( |
55 | - new AppUiMessageHandler() | 55 | + new AppUiTableMessageHandler() |
56 | ); | 56 | ); |
57 | 57 | ||
58 | // Application UI extension | 58 | // Application UI extension |
59 | protected UiExtension extension = | 59 | protected UiExtension extension = |
60 | new UiExtension.Builder(getClass().getClassLoader(), uiViews) | 60 | new UiExtension.Builder(getClass().getClassLoader(), uiViews) |
61 | + .resourcePath("sampleTable") | ||
61 | .messageHandlerFactory(messageHandlerFactory) | 62 | .messageHandlerFactory(messageHandlerFactory) |
62 | .build(); | 63 | .build(); |
63 | 64 | ... | ... |
... | @@ -35,7 +35,7 @@ import java.util.List; | ... | @@ -35,7 +35,7 @@ import java.util.List; |
35 | /** | 35 | /** |
36 | * Skeletal ONOS UI Table-View message handler. | 36 | * Skeletal ONOS UI Table-View message handler. |
37 | */ | 37 | */ |
38 | -public class AppUiMessageHandler extends UiMessageHandler { | 38 | +public class AppUiTableMessageHandler extends UiMessageHandler { |
39 | 39 | ||
40 | private static final String SAMPLE_TABLE_DATA_REQ = "sampleTableDataRequest"; | 40 | private static final String SAMPLE_TABLE_DATA_REQ = "sampleTableDataRequest"; |
41 | private static final String SAMPLE_TABLE_DATA_RESP = "sampleTableDataResponse"; | 41 | private static final String SAMPLE_TABLE_DATA_RESP = "sampleTableDataResponse"; | ... | ... |
... | @@ -42,8 +42,18 @@ | ... | @@ -42,8 +42,18 @@ |
42 | <step name="Reinstall-App-With-UI" requires="^,~Verify-CLI" | 42 | <step name="Reinstall-App-With-UI" requires="^,~Verify-CLI" |
43 | exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/> | 43 | exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/> |
44 | <step name="Verify-UI" requires="^" | 44 | <step name="Verify-UI" requires="^" |
45 | + exec="onos-check-views $ou{OCI} id=sample"/> | ||
46 | + | ||
47 | + <step name="Create-App-UI-Table-Overlay" requires="Reinstall-App-With-UI" | ||
48 | + exec="onos-create-app uitab org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/> | ||
49 | + <step name="Build-App-With-UI-Table" requires="^" | ||
50 | + exec="mvn clean install"/> | ||
51 | + <step name="Reinstall-App-With-UI-Table" requires="^,~Verify-UI" | ||
52 | + exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/> | ||
53 | + <step name="Verify-UI-Table" requires="^" | ||
45 | exec="onos-check-views ${OCI} id=sample"/> | 54 | exec="onos-check-views ${OCI} id=sample"/> |
46 | 55 | ||
56 | + | ||
47 | <step name="Uninstall-App" requires="^" | 57 | <step name="Uninstall-App" requires="^" |
48 | exec="onos-app ${OCI} uninstall org.foo.app"/> | 58 | exec="onos-app ${OCI} uninstall org.foo.app"/> |
49 | </group> | 59 | </group> | ... | ... |
-
Please register or login to post a comment