Thomas Vachuska | ba4b5ec | 2018-06-28 13:48:29 -0700 | [diff] [blame] | 1 | NODE_VERSION = 'v8.11.1' |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 2 | |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 3 | COMPILE_DEPS = [ |
| 4 | '//lib:CORE_DEPS', |
Ray Milkey | 446f446 | 2017-08-17 15:36:01 -0700 | [diff] [blame] | 5 | '//lib:JACKSON', |
| 6 | '//lib:KRYO', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 7 | '//lib:javax.ws.rs-api', |
| 8 | '//lib:servlet-api', |
| 9 | '//lib:jetty-websocket', |
| 10 | '//lib:jetty-util', |
| 11 | '//lib:jersey-media-multipart', |
Simon Hunt | 10973dd | 2016-08-01 15:50:35 -0700 | [diff] [blame] | 12 | '//lib:org.apache.karaf.shell.console', |
| 13 | '//cli:onos-cli', |
Ray Milkey | 2a74983 | 2016-08-02 15:22:20 -0700 | [diff] [blame] | 14 | '//lib:jersey-server', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 15 | '//incubator/api:onos-incubator-api', |
| 16 | '//incubator/net:onos-incubator-net', |
| 17 | '//utils/rest:onlab-rest', |
| 18 | '//core/store/serializers:onos-core-serializers', |
Ray Milkey | 446f446 | 2017-08-17 15:36:01 -0700 | [diff] [blame] | 19 | ':onos-tools-gui', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 20 | ] |
| 21 | |
| 22 | TEST_DEPS = [ |
| 23 | '//lib:TEST', |
Ray Milkey | 0c2a28f | 2016-04-28 10:17:19 -0700 | [diff] [blame] | 24 | '//core/api:onos-api-tests', |
Simon Hunt | f257a96 | 2017-08-25 18:58:47 -0700 | [diff] [blame] | 25 | '//drivers/default:onos-drivers-default', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 26 | ] |
| 27 | |
Brian O'Connor | 79b7067 | 2016-10-20 13:44:52 -0700 | [diff] [blame] | 28 | RESOURCES = { |
| 29 | 'WEB-INF/classes/index.html': 'src/main/webapp/index.html', |
| 30 | 'WEB-INF/classes/login.html': 'src/main/webapp/login.html', |
| 31 | 'WEB-INF/classes/error.html': 'src/main/webapp/error.html', |
| 32 | 'WEB-INF/classes/not-ready.html': 'src/main/webapp/not-ready.html', |
| 33 | 'WEB-INF/classes/onos.js': 'src/main/webapp/onos.js', |
| 34 | 'WEB-INF/classes/nav.html': 'src/main/webapp/nav.html', |
| 35 | 'WEB-INF/classes/app/view': 'src/main/webapp/app/view', |
| 36 | 'WEB-INF/classes/raw': 'src/main/webapp/raw', |
| 37 | } |
Brian O'Connor | e5817c9 | 2016-04-06 15:41:48 -0700 | [diff] [blame] | 38 | |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 39 | include_defs('//bucklets/node.bucklet') |
| 40 | sh_src='onos-gui-build' |
| 41 | |
Thomas Vachuska | ba4b5ec | 2018-06-28 13:48:29 -0700 | [diff] [blame] | 42 | fetch_node(version = NODE_VERSION) |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 43 | |
| 44 | export_file ( |
| 45 | name = 'onos-tools-gui-exe', |
| 46 | src = sh_src, |
| 47 | visibility = [ 'PUBLIC' ], |
| 48 | ) |
| 49 | |
| 50 | genrule( |
| 51 | name = 'onos-tools-gui', |
Steven Burrows | ad01820 | 2017-11-02 14:43:45 +0000 | [diff] [blame] | 52 | srcs = glob(['src/main/webapp/*.js', 'src/main/webapp/app/**/*.js'], excludes = ['src/main/webapp/dist/*.js']), |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 53 | bash = '$(location :onos-tools-gui-exe) ' |
Thomas Vachuska | ba4b5ec | 2018-06-28 13:48:29 -0700 | [diff] [blame] | 54 | + '$(location :node-release-' + NODE_VERSION + ') ' |
| 55 | + '$(location :node-bin-' + NODE_VERSION + ') > $OUT', |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 56 | out = 'onos-tools-gui.log', |
| 57 | visibility = [ 'PUBLIC' ], |
| 58 | ) |
| 59 | |
Brian O'Connor | e4da59d | 2016-04-08 00:32:18 -0700 | [diff] [blame] | 60 | osgi_jar_with_tests ( |
| 61 | name = 'onos-gui', |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 62 | deps = COMPILE_DEPS, |
Brian O'Connor | e4da59d | 2016-04-08 00:32:18 -0700 | [diff] [blame] | 63 | test_deps = TEST_DEPS, |
Brian O'Connor | 79b7067 | 2016-10-20 13:44:52 -0700 | [diff] [blame] | 64 | include_resources = RESOURCES, |
Brian O'Connor | e5817c9 | 2016-04-06 15:41:48 -0700 | [diff] [blame] | 65 | web_context = '/onos/ui', |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 66 | do_javadocs = False, |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 67 | ) |