{"id":14988251,"url":"https://github.com/apache/brooklyn-ui","last_synced_at":"2025-04-09T14:09:42.267Z","repository":{"id":38418881,"uuid":"47246082","full_name":"apache/brooklyn-ui","owner":"apache","description":"Apache Brooklyn UI","archived":false,"fork":false,"pushed_at":"2025-02-13T00:12:47.000Z","size":12721,"stargazers_count":16,"open_issues_count":18,"forks_count":42,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T13:07:26.042Z","etag":null,"topics":["brooklyn","cloud","java"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-02T08:00:06.000Z","updated_at":"2025-03-29T20:23:09.000Z","dependencies_parsed_at":"2024-02-09T18:04:55.932Z","dependency_job_id":"e6827cf0-f808-4935-826c-1f11cd685881","html_url":"https://github.com/apache/brooklyn-ui","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fbrooklyn-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fbrooklyn-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fbrooklyn-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fbrooklyn-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/brooklyn-ui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166488,"owners_count":20894713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brooklyn","cloud","java"],"created_at":"2024-09-24T14:16:21.768Z","updated_at":"2025-04-09T14:09:42.233Z","avatar_url":"https://github.com/apache.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [![**Brooklyn**](https://brooklyn.apache.org/style/img/apache-brooklyn-logo-244px-wide.png)](http://brooklyn.apache.org/)\n\n### Apache Brooklyn UI Sub-Project\n\nThis repo contains the JavaScript UI for Apache Brooklyn plus server-side code to enable module lookup and discovery.\n\nEssential contents:\n\n* `modularity-server`:  Java OSGi modules to facilitate registering and discovering available modules\n* `ui-modules`: Individual Angular JS modules -- each can be run as a standalone Node app,\n  or built as OSGi bundle including the WAR to be served collectively by an OSGi server\n  (each using the modularity server-side endpoints to find available modules and allow navigation between them,\n  and the  `home` module providing a convenient entry point)\n* `features`: Build an OSGi feature\n\n\n### Building the project\n\nTwo methods are available to build this project: within a docker container or directly with maven.\n\n#### Using docker\n\nThe project comes with a `Dockerfile` that contains everything you need to build this project.\nFirst, build the docker image:\n\n```bash\ndocker build -t brooklyn:ui .\n```\n\nThen run the build:\n\n```bash\ndocker run -i --rm --name brooklyn-ui -v ${HOME}/.m2:/root/.m2 -v ${PWD}:/usr/build -w /usr/build brooklyn:ui mvn clean install\n```\n\n### Using maven\n\nYou will need the following binaries installed first:\n* `java`\n* `maven` (please note, you will need version 3.5.2 or later)\n* `git`\n* `bzip2`\n* `libpng`. This has different package names based on the distribution:\n  * `libpng-devel` for CentOS\n  * `libpng-dev` for Debian/Ubuntu (also requires `libpng12`)\n  * `libpng` for MacOS\n\n_Optional, if the `libpng` cannot be found when building (package names may vary; often these are not required):_\n* `libpng` (or `libpng-devel` on CentOS, `libpng-dev` on Debian/Ubuntu, `libpng12` sometimes)\n* _`automake (opt)`_    \n* _`autoconf`_\n* _`libtool`_\n* _`dpkg`_\n* _`pkgconfig`_\n* _`nasm`_\n* _`gcc`_\n* _`build-essential`_\n* `bzip2`\n* _`pngquant`_\n* _`libfontconfig1-dev`_\n\nWith this, simply run:\n\n```bash\nmvn clean install\n```\n\n\n## Dev\n\nInstructions for developing UI modules is included in subdirectories, but in short all you need to do once things are configured\nis to run `make` in the relevant module directory, with a Brooklyn REST server on 8081.\n\n\n## Documentation\n\nFor developers, the following links may be useful:\n\n* [Overview and architecture of the project](docs/overview.md)\n* [Building individual module / Dev environment](ui-modules/README.md)\n* [Skinning the UI with custom themes](docs/skinning.md)\n* [Customizing and embedding the UI](docs/customizations.md)\n\n\n## Troubleshooting\n\n### Build Failure (Cached Dependencies)\n\nThe first time `mvn clean install` or `yarn run build` is run, it will cache dependencies in `node_modules`.\nIf a dependency is subsequently upgraded, this could cause an incompatibility. For example, it can cause\na test failure such as:\n\n    20 06 2018 17:28:41.143:ERROR [karma]: { Error: spawn ENOTDIR\n        at ChildProcess.spawn (internal/child_process.js:357:11)\n        at spawn (child_process.js:528:9)\n        at spawnWithoutOutput (/Users/aledsage/repos/apache/brooklyn/brooklyn-ui/ui-modules/utils/node_modules/karma/lib/launchers/process.js:141:24)\n\nThe fix is to delete the auto-generated `node_modules` directories:\n\n```bash\ncd /path/to/brooklyn_ui\nfind ./ -type d -name \"node_modules\" -exec rm -rf {} \\+\n```\n\n### Errors with libpng\n\nOn many systems the `imagemin` dependency of JS shows errors during install, often due to `libpng` missing\nor the `jpeg` compilation failing (note this one can be a non-fatal error at the time, but the build will then fail).\n\nConsult the list above of dependencies to install, and make sure you wipe the `node_modules` dirs.\n\nIf libpng still seems to be missing and you are using an M1 Mac then the following lines may help.\n\n```bash\narch -x86_64 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\narch -x86_64 /usr/local/bin/brew install libpng\n```\n\nThis installs th x86 version of brew and uses that to install the x86 version of the libpng library.  This won't affect your arm64 brew or anything installed using it.\n\nIf it still fails, try installing `nvm` (curl-to-bash) then `nvm ls-remote` and `nvm install v12.9.0` (or other latest).\nThen retry the `mvn` build; even though `mvn` uses a different version of `node` and `yarn`, simply installing the latest\nnode version sometimes sorts out errors.\n\n\n### Docker Build Failure (Dependencies for Wrong Architecture)\n\nWhen the build is run locally, it will download executables such as `phantomjs`, for the\nlocal architecture. If the build is subsequently run in a Docker container, mounting the\nlocal repo directory, it may be incompatible. An example error is:\n\n```\n[INFO] 25 06 2018 15:26:48.224:ERROR [launcher]: PhantomJS stdout:\n[INFO] 25 06 2018 15:26:48.224:ERROR [launcher]: PhantomJS stderr: /usr/build/ui-modules/utils/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: 1: /usr/build/ui-modules/utils/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: Syntax error: Unterminated quoted string\n```\n\nYou can check the file type by running:\n\n```bash\nfile ./ui-modules/utils/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs\n\n./ui-modules/ui-utils/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: Mach-O 64-bit executable x86_64\n```\n\nThe fix is to delete the auto-generated `node_modules` directories:\n\n```bash\ncd /path/to/brooklyn_ui\nfind ./ -type d -name \"node_modules\" -exec rm -rf {} \\+\n```\n\n### Test Failure (PhantomJS)\n\nDevelopers have experienced occasional test failures like:\n\n```\n[INFO] 26 06 2018 09:33:31.658:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/\n[INFO] 26 06 2018 09:33:31.662:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency\n[INFO] 26 06 2018 09:33:31.707:INFO [launcher]: Starting browser PhantomJS\n[INFO] 26 06 2018 09:33:41.858:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket 9qL2Zvu8cceP9O7ZAAAA with id 75060365\n[INFO] 26 06 2018 09:33:52.659:WARN [PhantomJS 2.1.1 (Linux 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.\n[INFO] PhantomJS 2.1.1 (Linux 0.0.0) ERROR\n[INFO]   Disconnected, because no message in 10000 ms.\n[INFO]\n[INFO]\n[ERROR] npm ERR! Test failed.  See above for more details.\n...\n[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm test) on project brooklyn-ui-utils: Failed to run task: 'npm test' failed. (error code 1) -\u003e [Help 1]\n[ERROR]\n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR]\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n[ERROR]\n[ERROR] After correcting the problems, you can resume the build with the command\n[ERROR]   mvn \u003cgoals\u003e -rf :brooklyn-ui-utils\n```\n\nThis appears to be a non-deterministic environment issue. The workaround is to run the test again,\nresuming the build from the failed module. For example:\n\n```bash\nmvn clean install -rf :brooklyn-ui-utils\n```\n\n\n### Docker Build Failure on OS X (no such file)\n\nDevelopers have experienced build failures on OS X like:\n\n```\n[ERROR] npm ERR! path /usr/build/ui-modules/app-inspector/node_modules/d3-dsv/bin/json2dsv\n[ERROR] npm ERR! code ENOENT\n[ERROR] npm ERR! errno -2\n[ERROR] npm ERR! syscall chmod\n[ERROR] npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/build/ui-modules/app-inspector/node_modules/d3-dsv/bin/json2dsv'\n[ERROR] npm ERR! enoent This is related to npm not being able to find a file.\n[ERROR] npm ERR! enoent\n[ERROR]\n[ERROR] npm ERR! A complete log of this run can be found in:\n[ERROR] npm ERR!     /root/.npm/_logs/2018-07-09T17_46_07_187Z-debug.log\n```\n\nThis is Docker bug: https://github.com/docker/for-mac/issues/2296.\n\nTry to run the build again from the failed module (but this will not always work). For example:\n\n```bash\npushd ui-modules/app-inspector\nfind ./ -type d -name \"node_modules\" -exec rm -rf {} \\+\npopd\nmvn clean install -rf :brooklyn-ui-app-inspector\n```\n\nAlternatively, run Docker on a Linux VM (e.g. see instructions at\nhttps://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce).\n\n```bash\n###\n # Install Docker\n ##\nsudo yum install -y yum-utils \\\n  device-mapper-persistent-data \\\n  lvm2\nsudo yum-config-manager \\\n    --add-repo \\\n    https://download.docker.com/linux/centos/docker-ce.repo\n\nsudo yum install docker-ce\n\n# Or if you hit https://github.com/docker/for-linux/issues/20#issuecomment-312760808\n#sudo yum install --setopt=obsoletes=0 \\\n#    docker-ce-17.03.2.ce-1.el7.centos.x86_64 \\\n#    docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch\n\nsudo systemctl start docker\n\n###\n # Download the Brooklyn UI code\n ##\nsudo yum install -y git-core\ngit clone https://github.com/apache/brooklyn-ui.git\ncd brooklyn-ui/\n\n###\n # Build.\n ##\ndocker build -t brooklyn:ui .\ndocker run -i --rm --name brooklyn-ui -v ${HOME}/.m2:/root/.m2 -v ${PWD}:/usr/build -w /usr/build brooklyn:ui mvn clean install\n```\n\n### Dockerfile Development\n\nThe Dockerfile should work for you. The notes below are for if you are trying to tweak the\nDockerfile. The dependencies (e.g. `make`) are to allow yarn to build particular modules\nfrom source. Without this, it gives an error like:\n\n```\n[ERROR]   ⚠ The `/usr/build/ui-modules/home/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly\n[ERROR]   ⚠ mozjpeg pre-build test failed\n[ERROR]   ℹ compiling from source\n[ERROR]   ✖ Error: autoreconf -fiv \u0026\u0026 ./configure --disable-shared --prefix=\"/usr/build/ui-modules/home/node_modules/mozjpeg/vendor\" --bindir=\"/usr/build/ui-modules/home/node_modules/mozjpeg/vendor\" --libdir=\"/usr/build/ui-modules/home/node_modules/mozjpeg/vendor\" \u0026\u0026 make --jobs=4 \u0026\u0026 make install --jobs=4\n[ERROR] Command failed: make --jobs=4\n[ERROR] /bin/sh: 1: make: not found\n```\n\n\u003c!--\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fbrooklyn-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fbrooklyn-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fbrooklyn-ui/lists"}