YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)
This commit is contained in:
parent
0a5f652071
commit
266784b849
13
.gitignore
vendored
13
.gitignore
vendored
@ -26,6 +26,19 @@ hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads
|
||||
hadoop-common-project/hadoop-common/src/test/resources/contract-test-options.xml
|
||||
hadoop-tools/hadoop-openstack/src/test/resources/contract-test-options.xml
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/tla/yarnregistry.toolbox
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/dist
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tmp
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/node
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/node_modules
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower_components
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.sass-cache
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/connect.lock
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/coverage/*
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/libpeerconnection.log
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webappnpm-debug.log
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapptestem.log
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/dist
|
||||
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tmp
|
||||
yarnregistry.pdf
|
||||
hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml
|
||||
hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml
|
||||
|
@ -15,6 +15,7 @@ Requirements:
|
||||
* Internet connection for first build (to fetch all Maven and Hadoop dependencies)
|
||||
* python (for releasedocs)
|
||||
* bats (for shell code testing)
|
||||
* Node.js / bower / Ember-cli (for YARN UI v2 building)
|
||||
|
||||
----------------------------------------------------------------------------------
|
||||
The easiest way to get an environment with all the appropriate tools is by means
|
||||
@ -119,7 +120,7 @@ Maven build goals:
|
||||
* Run clover : mvn test -Pclover [-DcloverLicenseLocation=${user.name}/.clover.license]
|
||||
* Run Rat : mvn apache-rat:check
|
||||
* Build javadocs : mvn javadoc:javadoc
|
||||
* Build distribution : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs]
|
||||
* Build distribution : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs][-Pyarn-ui]
|
||||
* Change Hadoop version : mvn versions:set -DnewVersion=NEWVERSION
|
||||
|
||||
Build options:
|
||||
@ -129,6 +130,7 @@ Maven build goals:
|
||||
* Use -Psrc to create a project source TAR.GZ
|
||||
* Use -Dtar to create a TAR with the distribution (using -Pdist)
|
||||
* Use -Preleasedocs to include the changelog and release docs (requires Internet connectivity)
|
||||
* Use -Pyarn-ui to build YARN UI v2. (Requires Internet connectivity, and it is for dev use only)
|
||||
|
||||
Snappy build options:
|
||||
|
||||
|
80
LICENSE.txt
80
LICENSE.txt
@ -2314,3 +2314,83 @@ jamon-runtime 2.3.1
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the MPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
For Apache Hadoop YARN Web UI component: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/
|
||||
---------------------------------------------------------------------
|
||||
The Apache Hadoop YARN Web UI component bundles the following files under the MIT License:
|
||||
|
||||
- ember v2.2.0 (http://emberjs.com/) - Copyright (c) 2014 Yehuda Katz, Tom Dale and Ember.js contributors
|
||||
- ember-data v2.1.0 (https://github.com/emberjs/data) - Copyright (C) 2011-2014 Tilde, Inc. and contributors, Portions Copyright (C) 2011 LivingSocial Inc.
|
||||
- ember-resolver v2.0.3 (https://github.com/ember-cli/ember-resolver) - Copyright (c) 2013 Stefan Penner and Ember App Kit Contributors
|
||||
- bootstrap v3.3.6 (http://getbootstrap.com) - Copyright (c) 2011-2014 Twitter, Inc
|
||||
- jquery v2.1.4 (http://jquery.org) - Copyright 2005, 2014 jQuery Foundation and other contributors
|
||||
- jquery-ui v1.11.4 (http://jqueryui.com/) - Copyright 2014 jQuery Foundation and other contributors
|
||||
- datatables v1.10.8 (https://datatables.net/)
|
||||
- moment v2.10.6 (http://momentjs.com/) - Copyright (c) 2011-2015 Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
- em-helpers v0.5.8 (https://github.com/sreenaths/em-helpers)
|
||||
- ember-cli-app-version v0.5.8 (https://github.com/EmberSherpa/ember-cli-app-version) - Authored by Taras Mankovski <tarasm@gmail.com>
|
||||
- ember-cli-babel v5.1.6 (https://github.com/babel/ember-cli-babel) - Authored by Stefan Penner <stefan.penner@gmail.com>
|
||||
- ember-cli-content-security-policy v0.4.0 (https://github.com/rwjblue/ember-cli-content-security-policy)
|
||||
- ember-cli-dependency-checker v1.2.0 (https://github.com/quaertym/ember-cli-dependency-checker) - Authored by Emre Unal
|
||||
- ember-cli-htmlbars v1.0.2 (https://github.com/ember-cli/ember-cli-htmlbars) - Authored by Robert Jackson <me@rwjblue.com>
|
||||
- ember-cli-htmlbars-inline-precompile v0.3.1 (https://github.com/pangratz/ember-cli-htmlbars-inline-precompile) - Authored by Clemens Müller <cmueller.418@gmail.com>
|
||||
- ember-cli-ic-ajax v0.2.1 (https://github.com/rwjblue/ember-cli-ic-ajax) - Authored by Robert Jackson <me@rwjblue.com>
|
||||
- ember-cli-inject-live-reload v1.4.0 (https://github.com/rwjblue/ember-cli-inject-live-reload) - Authored by Robert Jackson <me@rwjblue.com>
|
||||
- ember-cli-qunit v1.2.1 (https://github.com/ember-cli/ember-cli-qunit) - Authored by Robert Jackson <me@rwjblue.com>
|
||||
- ember-cli-release v0.2.8 (https://github.com/lytics/ember-cli-release) - Authored by Robert Jackson <me@rwjblue.com>
|
||||
- ember-cli-sri v1.2.1 (https://github.com/jonathanKingston/ember-cli-sri) - Authored by Jonathan Kingston
|
||||
- ember-cli-uglify v1.2.0 (github.com/ember-cli/ember-cli-uglify) - Authored by Robert Jackson <me@rwjblue.com>
|
||||
- ember-d3 v0.1.0 (https://github.com/brzpegasus/ember-d3) - Authored by Estelle DeBlois
|
||||
- select2 v4.0.0 (https://select2.github.io/)
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and assocated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
----
|
||||
The Apache Hadoop YARN Web UI component bundles the following files under the BSD License:
|
||||
|
||||
(3-clause BSD license)
|
||||
- D3 v3.5.6 (http://d3js.org/) - Copyright (c) 2010-2014, Michael Bostock
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
144
dev-support/create-release.sh
Executable file
144
dev-support/create-release.sh
Executable file
@ -0,0 +1,144 @@
|
||||
#!/bin/bash
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# Function to probe the exit code of the script commands,
|
||||
# and stop in the case of failure with an contextual error
|
||||
# message.
|
||||
run() {
|
||||
echo "\$ ${@}"
|
||||
"${@}"
|
||||
exitCode=$?
|
||||
if [[ $exitCode != 0 ]]; then
|
||||
echo
|
||||
echo "Failed! running ${@} in `pwd`"
|
||||
echo
|
||||
exit $exitCode
|
||||
fi
|
||||
}
|
||||
|
||||
doMD5() {
|
||||
MD5CMD="md5sum"
|
||||
which $MD5CMD
|
||||
if [[ $? != 0 ]]; then
|
||||
MD5CMD="md5"
|
||||
fi
|
||||
run $MD5CMD ${1} > ${1}.md5
|
||||
}
|
||||
|
||||
# If provided, the created release artifacts will be tagged with it
|
||||
# (use RC#, i.e: RC0). Do not use a label to create the final release
|
||||
# artifact.
|
||||
RC_LABEL=$1
|
||||
|
||||
# Extract Hadoop version from POM
|
||||
HADOOP_VERSION=`cat pom.xml | grep "<version>" | head -1 | sed 's|^ *<version>||' | sed 's|</version>.*$||'`
|
||||
|
||||
# Setup git
|
||||
GIT=${GIT:-git}
|
||||
|
||||
echo
|
||||
echo "*****************************************************************"
|
||||
echo
|
||||
echo "Hadoop version to create release artifacts: ${HADOOP_VERSION}"
|
||||
echo
|
||||
echo "Release Candidate Label: ${RC_LABEL}"
|
||||
echo
|
||||
echo "*****************************************************************"
|
||||
echo
|
||||
|
||||
if [[ ! -z ${RC_LABEL} ]]; then
|
||||
RC_LABEL="-${RC_LABEL}"
|
||||
fi
|
||||
|
||||
# Get Maven command
|
||||
if [ -z "$MAVEN_HOME" ]; then
|
||||
MVN=mvn
|
||||
else
|
||||
MVN=$MAVEN_HOME/bin/mvn
|
||||
fi
|
||||
|
||||
ARTIFACTS_DIR="target/artifacts"
|
||||
|
||||
# git clean to clear any remnants from previous build
|
||||
run ${GIT} clean -xdf
|
||||
|
||||
# mvn clean for sanity
|
||||
run ${MVN} clean
|
||||
|
||||
# Create staging dir for release artifacts
|
||||
run mkdir -p ${ARTIFACTS_DIR}
|
||||
|
||||
# Create RAT report
|
||||
run ${MVN} apache-rat:check
|
||||
|
||||
# Create SRC and BIN tarballs for release,
|
||||
# Using 'install’ goal instead of 'package' so artifacts are available
|
||||
# in the Maven local cache for the site generation
|
||||
run ${MVN} install -Pdist,src,native,yarn-ui -DskipTests -Dtar
|
||||
|
||||
# Create site for release
|
||||
run ${MVN} site site:stage -Pdist -Psrc
|
||||
run mkdir -p target/staging/hadoop-project/hadoop-project-dist/hadoop-yarn
|
||||
run mkdir -p target/staging/hadoop-project/hadoop-project-dist/hadoop-mapreduce
|
||||
run cp ./hadoop-common-project/hadoop-common/src/main/docs/releasenotes.html target/staging/hadoop-project/hadoop-project-dist/hadoop-common/
|
||||
run cp ./hadoop-common-project/hadoop-common/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-common/
|
||||
run cp ./hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-hdfs/
|
||||
run cp ./hadoop-yarn-project/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-yarn/
|
||||
run cp ./hadoop-mapreduce-project/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-mapreduce/
|
||||
run mv target/staging/hadoop-project target/r${HADOOP_VERSION}/
|
||||
run cd target/
|
||||
run tar czf hadoop-site-${HADOOP_VERSION}.tar.gz r${HADOOP_VERSION}/*
|
||||
run cd ..
|
||||
|
||||
# Stage RAT report
|
||||
find . -name rat.txt | xargs -I% cat % > ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-rat.txt
|
||||
|
||||
# Stage CHANGES.txt files
|
||||
run cp ./hadoop-common-project/hadoop-common/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-COMMON-${HADOOP_VERSION}${RC_LABEL}.txt
|
||||
run cp ./hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-HDFS-${HADOOP_VERSION}${RC_LABEL}.txt
|
||||
run cp ./hadoop-mapreduce-project/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-MAPREDUCE-${HADOOP_VERSION}${RC_LABEL}.txt
|
||||
run cp ./hadoop-yarn-project/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-YARN-${HADOOP_VERSION}${RC_LABEL}.txt
|
||||
|
||||
# Prepare and stage BIN tarball
|
||||
run cd hadoop-dist/target/
|
||||
run tar -xzf hadoop-${HADOOP_VERSION}.tar.gz
|
||||
run cp -r ../../target/r${HADOOP_VERSION}/* hadoop-${HADOOP_VERSION}/share/doc/hadoop/
|
||||
run tar -czf hadoop-${HADOOP_VERSION}.tar.gz hadoop-${HADOOP_VERSION}
|
||||
run cd ../..
|
||||
run mv hadoop-dist/target/hadoop-${HADOOP_VERSION}.tar.gz ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz
|
||||
|
||||
# Stage SRC tarball
|
||||
run mv hadoop-dist/target/hadoop-${HADOOP_VERSION}-src.tar.gz ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-src.tar.gz
|
||||
|
||||
# Stage SITE tarball
|
||||
run mv target/hadoop-site-${HADOOP_VERSION}.tar.gz ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-site.tar.gz
|
||||
|
||||
# MD5 SRC and BIN tarballs
|
||||
doMD5 ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz
|
||||
doMD5 ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-src.tar.gz
|
||||
|
||||
run cd ${ARTIFACTS_DIR}
|
||||
ARTIFACTS_DIR=`pwd`
|
||||
echo
|
||||
echo "Congratulations, you have successfully built the release"
|
||||
echo "artifacts for Apache Hadoop ${HADOOP_VERSION}${RC_LABEL}"
|
||||
echo
|
||||
echo "The artifacts for this run are available at ${ARTIFACTS_DIR}:"
|
||||
run ls -1 ${ARTIFACTS_DIR}
|
||||
echo
|
||||
echo "Remember to sign them before staging them on the open"
|
||||
echo
|
@ -132,6 +132,11 @@ RUN pip install python-dateutil
|
||||
###
|
||||
ENV MAVEN_OPTS -Xms256m -Xmx512m
|
||||
|
||||
###
|
||||
# Install node js tools for web UI frameowkr
|
||||
###
|
||||
RUN apt-get -y install nodejs && ln -s /usr/bin/nodejs /usr/bin/node && apt-get -y install npm && npm install -g bower
|
||||
|
||||
###
|
||||
# Everything past this point is either not needed for testing or breaks Yetus.
|
||||
# So tell Yetus not to read the rest of the file:
|
||||
|
@ -0,0 +1,43 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
Hadoop: YARN-UI V2
|
||||
=================
|
||||
*This is a WIP project, nobody should use it in production.*
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
You will need the following things properly installed on your computer.
|
||||
|
||||
* Install Node.js with NPM: https://nodejs.org/download/
|
||||
* After Node.js installed, install bower: `npm install -g bower`.
|
||||
* Install Ember-cli: `npm install -g ember-cli`
|
||||
|
||||
BUILD
|
||||
----
|
||||
* Please refer to BUILDING.txt in the top directory and pass -Pyarn-ui to build UI-related code
|
||||
* Execute `mvn test -Pyarn-ui` to run unit tests
|
||||
|
||||
Try it
|
||||
------
|
||||
|
||||
* Packaging and deploying Hadoop in this branch
|
||||
* In `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js`, change `timelineWebUrl` and `rmWebUrl` to your YARN RM/Timeline server web address.
|
||||
* If you are running YARN RM in your localhost, you should update `localBaseUrl` to `localhost:1337/`, install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`.
|
||||
* Run `ember serve` under `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/`
|
||||
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"directory": "bower_components",
|
||||
"analytics": false
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# EditorConfig helps developers define and maintain consistent
|
||||
# coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.hbs]
|
||||
insert_final_newline = false
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.css]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.html]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{diff,md}]
|
||||
trim_trailing_whitespace = false
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
/**
|
||||
Ember CLI sends analytics information by default. The data is completely
|
||||
anonymous, but there are times when you might want to disable this behavior.
|
||||
|
||||
Setting `disableAnalytics` to true will prevent any data from being sent.
|
||||
*/
|
||||
"disableAnalytics": false,
|
||||
"liveReload": true,
|
||||
"watcher": "polling"
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/bower_components
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage/*
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
testem.log
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
"predef": [
|
||||
"document",
|
||||
"window",
|
||||
"-Promise"
|
||||
],
|
||||
"browser": true,
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"debug": false,
|
||||
"devel": true,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": false,
|
||||
"immed": false,
|
||||
"laxbreak": false,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": false,
|
||||
"nonew": false,
|
||||
"nomen": false,
|
||||
"onevar": false,
|
||||
"plusplus": false,
|
||||
"regexp": false,
|
||||
"undef": true,
|
||||
"sub": true,
|
||||
"strict": false,
|
||||
"white": false,
|
||||
"eqnull": true,
|
||||
"esnext": true,
|
||||
"unused": true
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.12"
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
before_install:
|
||||
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
|
||||
- "npm config set spin false"
|
||||
- "npm install -g npm@^2"
|
||||
|
||||
install:
|
||||
- npm install -g bower
|
||||
- npm install
|
||||
- bower install
|
||||
|
||||
script:
|
||||
- npm test
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"ignore_dirs": ["tmp"]
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
# Yarn-ui
|
||||
*This is a WIP project, nobody should use it in production.*
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You will need the following things properly installed on your computer.
|
||||
|
||||
* Install Node.js with NPM: https://nodejs.org/download/
|
||||
* After Node.js installed, install bower: `npm install -g bower`.
|
||||
* Install Ember-cli: `npm install -g ember-cli`
|
||||
|
||||
## Installation
|
||||
|
||||
* Goto root directory of yarn-ui project: `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui`
|
||||
* `npm install && bower install`, it will take a while to finish.
|
||||
|
||||
## Try it
|
||||
|
||||
* Packaging and deploying Hadoop in this branch (You can use latest trunk after YARN-4417 committed to trunk)
|
||||
* Modify `app/adapters/yarn-app.js`, change `host` to your YARN RM web address
|
||||
* If you running YARN RM in your localhost, you should install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`. And the `host` of `app/adapters/yarn-app.js` should start with `localhost:1337`.
|
||||
* Run `ember server`
|
||||
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
||||
|
@ -1,20 +0,0 @@
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster', // common const
|
||||
pathForType(modelName) {
|
||||
return ''; // move to some common place, return path by modelname.
|
||||
},
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -1,20 +0,0 @@
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster/metrics', // common const
|
||||
pathForType(modelName) {
|
||||
return ''; // move to some common place, return path by modelname.
|
||||
},
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -1,26 +0,0 @@
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster', // common const
|
||||
pathForType(modelName) {
|
||||
return 'apps'; // move to some common place, return path by modelname.
|
||||
},
|
||||
/*
|
||||
urlForQuery(query, modelName) {
|
||||
var url = this._buildURL();
|
||||
return url + '/apps/' + query.appId + "/appattempts";
|
||||
},
|
||||
*/
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -1,20 +0,0 @@
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster', // common const
|
||||
pathForType(modelName) {
|
||||
return 'scheduler'; // move to some common place, return path by modelname.
|
||||
},
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -1,20 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
import Resolver from 'ember/resolver';
|
||||
import loadInitializers from 'ember/load-initializers';
|
||||
import config from './config/environment';
|
||||
import Sorter from 'yarn-ui/utils/sorter';
|
||||
|
||||
var App;
|
||||
|
||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||
|
||||
App = Ember.Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver: Resolver
|
||||
});
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
Sorter.initDataTableSorter();
|
||||
|
||||
export default App;
|
@ -1,4 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,21 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
didInsertElement: function() {
|
||||
$(".js-example-basic-single").select2(
|
||||
{
|
||||
width: '100%',
|
||||
placeholder: "Select a queue"
|
||||
});
|
||||
var elementId = this.get("element-id");
|
||||
var prefix = this.get("prefix");
|
||||
|
||||
var element = d3.select("#" + elementId);
|
||||
|
||||
if (element) {
|
||||
this.get("model").forEach(function(o) {
|
||||
element.append("option").attr("value", o.get("name")).text(prefix + o.get("name"));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,272 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
import ChartUtilsMixin from 'yarn-ui/mixins/charts-utils';
|
||||
|
||||
export default Ember.Component.extend(ChartUtilsMixin, {
|
||||
queues: {
|
||||
data: undefined,
|
||||
foldedQueues: {},
|
||||
selectedQueueCircle: undefined,
|
||||
maxDepth: -1,
|
||||
},
|
||||
|
||||
queueColors: d3.scale.category20().range(),
|
||||
|
||||
renderQueue: function(now, depth, sequence) {
|
||||
if (depth > this.queues.maxDepth) {
|
||||
this.queues.maxDepth = depth;
|
||||
}
|
||||
|
||||
var cx = 20 + depth * 30;
|
||||
var cy = 20 + sequence * 30;
|
||||
var name = now.get("name");
|
||||
|
||||
var g = this.queues.dataGroup.append("g")
|
||||
.attr("id", "queue-" + name + "-g");
|
||||
|
||||
var folded = this.queues.foldedQueues[name];
|
||||
var isParentQueue = false;
|
||||
|
||||
// render its children
|
||||
var children = [];
|
||||
var childrenNames = now.get("children");
|
||||
if (childrenNames) {
|
||||
childrenNames.forEach(function(name) {
|
||||
isParentQueue = true;
|
||||
var child = this.queues.data[name];
|
||||
if (child) {
|
||||
children.push(child);
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
if (folded) {
|
||||
children = [];
|
||||
}
|
||||
var linefunction = d3.svg.line()
|
||||
.interpolate("basis")
|
||||
.x(function(d) {
|
||||
return d.x;
|
||||
})
|
||||
.y(function(d) {
|
||||
return d.y;
|
||||
});
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
sequence = sequence + 1;
|
||||
// Get center of children queue
|
||||
var cc = this.renderQueue(children[i],
|
||||
depth + 1, sequence);
|
||||
g.append("path")
|
||||
.attr("class", "queue")
|
||||
.attr("d", linefunction([{
|
||||
x: cx,
|
||||
y: cy
|
||||
}, {
|
||||
x: cc.x - 20,
|
||||
y: cc.y
|
||||
}, cc]));
|
||||
}
|
||||
|
||||
var circle = g.append("circle")
|
||||
.attr("cx", cx)
|
||||
.attr("cy", cy)
|
||||
.attr("class", "queue");
|
||||
|
||||
circle.on('mouseover', function() {
|
||||
circle.style("fill", this.queueColors[1]);
|
||||
}.bind(this));
|
||||
circle.on('mouseout', function() {
|
||||
if (circle != this.queues.selectedQueueCircle) {
|
||||
circle.style("fill", this.queueColors[0]);
|
||||
}
|
||||
}.bind(this));
|
||||
circle.on('click', function() {
|
||||
circle.style("fill", this.queueColors[2]);
|
||||
var pre = this.queues.selectedQueueCircle;
|
||||
this.queues.selectedQueueCircle = circle;
|
||||
if (pre) {
|
||||
pre.on('mouseout')();
|
||||
}
|
||||
this.renderCharts(name);
|
||||
}.bind(this));
|
||||
circle.on('dblclick', function() {
|
||||
if (!isParentQueue) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.queues.foldedQueues[name]) {
|
||||
delete this.queues.foldedQueues[name];
|
||||
} else {
|
||||
this.queues.foldedQueues[name] = now;
|
||||
}
|
||||
this.renderQueues();
|
||||
}.bind(this));
|
||||
|
||||
var text = name;
|
||||
if (folded) {
|
||||
text = name + " (+)";
|
||||
}
|
||||
|
||||
// print queue's name
|
||||
g.append("text")
|
||||
.attr("x", cx + 30)
|
||||
.attr("y", cy + 5)
|
||||
.text(text)
|
||||
.attr("class", "queue");
|
||||
|
||||
return {
|
||||
x: cx,
|
||||
y: cy
|
||||
};
|
||||
},
|
||||
|
||||
renderQueues: function() {
|
||||
if (this.queues.dataGroup) {
|
||||
this.queues.dataGroup.remove();
|
||||
}
|
||||
// render queues
|
||||
this.queues.dataGroup = this.canvas.svg.append("g")
|
||||
.attr("id", "queues-g");
|
||||
var rootQueue = undefined;
|
||||
|
||||
if (this.queues.data) {
|
||||
this.renderQueue(this.queues.data['root'], 0, 0);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
draw: function() {
|
||||
this.queues.data = {};
|
||||
this.get("model")
|
||||
.forEach(function(o) {
|
||||
this.queues.data[o.id] = o;
|
||||
}.bind(this));
|
||||
|
||||
// get w/h of the svg
|
||||
var bbox = d3.select("#main-container")
|
||||
.node()
|
||||
.getBoundingClientRect();
|
||||
this.canvas.w = bbox.width;
|
||||
this.canvas.h = Math.max(Object.keys(this.queues.data)
|
||||
.length * 35, 1500);
|
||||
|
||||
this.canvas.svg = d3.select("#main-container")
|
||||
.append("svg")
|
||||
.attr("width", this.canvas.w)
|
||||
.attr("height", this.canvas.h)
|
||||
.attr("id", "main-svg");
|
||||
|
||||
this.renderBackground();
|
||||
|
||||
this.renderQueues();
|
||||
this.renderCharts("root");
|
||||
},
|
||||
|
||||
didInsertElement: function() {
|
||||
this.draw();
|
||||
},
|
||||
|
||||
/*
|
||||
* data = [{label="xx", value=},{...}]
|
||||
*/
|
||||
renderTable: function(data, title, layout) {
|
||||
d3.select("#main-svg")
|
||||
.append('table')
|
||||
.selectAll('tr')
|
||||
.data(data)
|
||||
.enter()
|
||||
.append('tr')
|
||||
.selectAll('td')
|
||||
.data(function(d) {
|
||||
return d;
|
||||
})
|
||||
.enter()
|
||||
.append('td')
|
||||
.text(function(d) {
|
||||
return d;
|
||||
});
|
||||
},
|
||||
|
||||
renderQueueCapacities: function(queue, layout) {
|
||||
// Render bar chart
|
||||
this.renderBarChart(this.charts.g, [{
|
||||
label: "Cap",
|
||||
value: queue.get("capacity")
|
||||
}, {
|
||||
label: "MaxCap",
|
||||
value: queue.get("maxCapacity")
|
||||
}, {
|
||||
label: "UsedCap",
|
||||
value: queue.get("usedCapacity")
|
||||
}], "Queue Capacities", layout, 60);
|
||||
},
|
||||
|
||||
renderChildrenCapacities: function(queue, layout) {
|
||||
var data = [];
|
||||
var children = queue.get("children");
|
||||
if (children) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var child = this.queues.data[children[i]];
|
||||
data.push({
|
||||
label: child.get("name"),
|
||||
value: child.get("capacity")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.renderDonutChart(this.charts.g, data, "Children Capacities", layout, true);
|
||||
},
|
||||
|
||||
renderChildrenUsedCapacities: function(queue, layout) {
|
||||
var data = [];
|
||||
var children = queue.get("children");
|
||||
if (children) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var child = this.queues.data[children[i]];
|
||||
data.push({
|
||||
label: child.get("name"),
|
||||
value: child.get("usedCapacity")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.renderDonutChart(this.charts.g, data, "Children Used Capacities", layout, true);
|
||||
},
|
||||
|
||||
renderLeafQueueUsedCapacities: function(layout) {
|
||||
var leafQueueUsedCaps = [];
|
||||
for (var queueName in this.queues.data) {
|
||||
var q = this.queues.data[queueName];
|
||||
if ((!q.get("children")) || q.get("children")
|
||||
.length == 0) {
|
||||
// it's a leafqueue
|
||||
leafQueueUsedCaps.push({
|
||||
label: q.get("name"),
|
||||
value: q.get("usedCapacity")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.renderDonutChart(this.charts.g, leafQueueUsedCaps, "LeafQueues Used Capacities",
|
||||
layout, true);
|
||||
},
|
||||
|
||||
renderCharts: function(queueName) {
|
||||
this.charts.leftBannerLen = this.queues.maxDepth * 30 + 100;
|
||||
this.initCharts();
|
||||
|
||||
var queue = this.queues.data[queueName];
|
||||
var idx = 0;
|
||||
|
||||
if (queue.get("name") == "root") {
|
||||
this.renderLeafQueueUsedCapacities(this.getLayout(idx++));
|
||||
}
|
||||
if (queue.get("name") != "root") {
|
||||
this.renderQueueCapacities(queue, this.getLayout(idx++));
|
||||
}
|
||||
if (queue.get("children") && queue.get("children")
|
||||
.length > 0) {
|
||||
this.renderChildrenCapacities(queue, this.getLayout(idx++));
|
||||
this.renderChildrenUsedCapacities(queue, this.getLayout(idx++));
|
||||
}
|
||||
},
|
||||
});
|
@ -1,5 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
loading: true,
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
needReload: true,
|
||||
selectedQueue: undefined,
|
||||
});
|
@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>YarnUi</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for 'head'}}
|
||||
|
||||
<link rel="stylesheet" href="assets/vendor.css">
|
||||
<link rel="stylesheet" href="assets/yarn-ui.css">
|
||||
|
||||
{{content-for 'head-footer'}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for 'body'}}
|
||||
|
||||
<script src="assets/vendor.js"></script>
|
||||
<script src="assets/yarn-ui.js"></script>
|
||||
|
||||
{{content-for 'body-footer'}}
|
||||
</body>
|
||||
</html>
|
@ -1,13 +0,0 @@
|
||||
import DS from 'ember-data';
|
||||
|
||||
export default DS.Model.extend({
|
||||
startedOn: DS.attr('string'),
|
||||
state: DS.attr('string'),
|
||||
haState: DS.attr('string'),
|
||||
rmStateStoreName: DS.attr('string'),
|
||||
resourceManagerVersion: DS.attr('string'),
|
||||
resourceManagerBuildVersion: DS.attr('string'),
|
||||
hadoopVersion: DS.attr('string'),
|
||||
hadoopBuildVersion: DS.attr('string'),
|
||||
hadoopVersionBuiltOn: DS.attr('string')
|
||||
});
|
@ -1,8 +0,0 @@
|
||||
import DS from 'ember-data';
|
||||
|
||||
export default DS.Model.extend({
|
||||
name: DS.attr('string'),
|
||||
queueName: DS.attr('string'),
|
||||
usedMemoryMB: DS.attr('number'),
|
||||
usedVCore: DS.attr('number')
|
||||
})
|
@ -1,11 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model() {
|
||||
return this.store.findAll('ClusterMetric');
|
||||
},
|
||||
|
||||
afterModel() {
|
||||
this.controllerFor("ClusterOverview").set("loading", false);
|
||||
}
|
||||
});
|
@ -1,21 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model(param) {
|
||||
return Ember.RSVP.hash({
|
||||
attempt: this.store.findRecord('yarnAppAttempt', param.app_attempt_id),
|
||||
|
||||
rmContainers: this.store.query('yarnContainer',
|
||||
{
|
||||
app_attempt_id: param.app_attempt_id,
|
||||
is_rm: true
|
||||
}),
|
||||
|
||||
tsContainers: this.store.query('yarnContainer',
|
||||
{
|
||||
app_attempt_id: param.app_attempt_id,
|
||||
is_rm: false
|
||||
}),
|
||||
});
|
||||
}
|
||||
});
|
@ -1,10 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model(param) {
|
||||
return Ember.RSVP.hash({
|
||||
app: this.store.find('yarnApp', param.app_id),
|
||||
attempts: this.store.query('yarnAppAttempt', { appId: param.app_id})
|
||||
});
|
||||
}
|
||||
});
|
@ -1,8 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model() {
|
||||
var apps = this.store.findAll('yarnApp');
|
||||
return apps;
|
||||
}
|
||||
});
|
@ -1,20 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model(param) {
|
||||
return Ember.RSVP.hash({
|
||||
selected : param.queue_name,
|
||||
queues: this.store.findAll('yarnQueue'),
|
||||
selectedQueue : undefined,
|
||||
apps: undefined, // apps of selected queue
|
||||
});
|
||||
},
|
||||
|
||||
afterModel(model) {
|
||||
model.selectedQueue = this.store.peekRecord('yarnQueue', model.selected);
|
||||
model.apps = this.store.findAll('yarnApp');
|
||||
model.apps.forEach(function(o) {
|
||||
console.log(o);
|
||||
})
|
||||
}
|
||||
});
|
@ -1,5 +0,0 @@
|
||||
export default Ember.Route.extend({
|
||||
beforeModel() {
|
||||
this.transitionTo('yarnQueues.root');
|
||||
}
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model() {
|
||||
return this.store.findAll('yarnQueue');
|
||||
},
|
||||
});
|
@ -1,28 +0,0 @@
|
||||
<table id="app-attempt-table" class="table table-striped table-bordered" cellspacing="0" width="100%" height="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Application Attempt Id</td>
|
||||
<td>{{attempt.id}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Start Time</td>
|
||||
<td>{{attempt.startTime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AM Container Id</td>
|
||||
<td>{{attempt.containerId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AM Node Web UI</td>
|
||||
<td><a href={{attempt.nodeHttpAddress}}>{{attempt.nodeHttpAddress}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AM Node Id</td>
|
||||
<td>{{attempt.nodeId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Log</td>
|
||||
<td><a href={{attempt.logsLink}}>link</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -1,18 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<select class="js-example-basic-single" width="100%" id="queue-name-selector">
|
||||
{{item-selector element-id="queue-name-selector" prefix="Queue : " model=model}}
|
||||
</select>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
||||
<!-- queue selector -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 container-fluid" id="tree-selector-container">
|
||||
{{tree-selector model=model parentId="tree-selector-container" selected=selected}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{outlet}}
|
@ -1,12 +0,0 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
{{app-attempt-table attempt=model.attempt}}
|
||||
</div>
|
||||
|
||||
<!-- containers table -->
|
||||
<div class="row">
|
||||
{{timeline-view parent-id="containers-timeline-div" my-id="timeline-view" height="400" rmModel=model.rmContainers tsModel=model.tsContainers label="shortAppAttemptId" attemptModel=false}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{outlet}}
|
@ -1,3 +0,0 @@
|
||||
{{app-table table-id="apps-table" arr=model}}
|
||||
{{simple-table table-id="apps-table" bFilter=true colsOrder="0,desc" colTypes="natural elapsed-time" colTargets="0 7"}}
|
||||
{{outlet}}
|
207
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml
Normal file
207
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml
Normal file
@ -0,0 +1,207 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>hadoop-yarn</artifactId>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-yarn-ui</artifactId>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<name>Apache Hadoop YARN UI</name>
|
||||
<packaging>${packaging.type}</packaging>
|
||||
|
||||
<properties>
|
||||
<packaging.type>jar</packaging.type>
|
||||
<webappDir>src/main/webapp</webappDir>
|
||||
<node.executable>node</node.executable>
|
||||
<nodeVersion>v0.12.2</nodeVersion>
|
||||
<npmVersion>2.10.0</npmVersion>
|
||||
<skipTests>false</skipTests>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Apache RAT -->
|
||||
<plugin>
|
||||
<groupId>org.apache.rat</groupId>
|
||||
<artifactId>apache-rat-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>src/main/webapp/node_modules/**/*</exclude>
|
||||
<exclude>src/main/webapp/bower_components/**/*</exclude>
|
||||
<exclude>src/main/webapp/jsconfig.json</exclude>
|
||||
<exclude>src/main/webapp/bower.json</exclude>
|
||||
<exclude>src/main/webapp/package.json</exclude>
|
||||
<exclude>src/main/webapp/testem.json</exclude>
|
||||
<exclude>src/main/webapp/public/assets/images/**/*</exclude>
|
||||
<exclude>src/main/webapp/public/robots.txt</exclude>
|
||||
<exclude>public/crossdomain.xml</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<configuration>
|
||||
<followSymLinks>false</followSymLinks>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp/bower_components</directory>
|
||||
</fileset>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp/node_modules</directory>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>yarn-ui</id>
|
||||
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
|
||||
<properties>
|
||||
<packaging.type>war</packaging.type>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Bower install & grunt build-->
|
||||
<plugin>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<id>npm install</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>${webappDir}</workingDirectory>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>install</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<id>bower install</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>${webappDir}</workingDirectory>
|
||||
<executable>bower</executable>
|
||||
<arguments>
|
||||
<argument>--allow-root</argument>
|
||||
<argument>install</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<id>bower --allow-root install</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>${webappDir}</workingDirectory>
|
||||
<executable>bower</executable>
|
||||
<arguments>
|
||||
<argument>--allow-root</argument>
|
||||
<argument>install</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>ember build</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>${webappDir}</workingDirectory>
|
||||
<executable>ember</executable>
|
||||
<arguments>
|
||||
<argument>build</argument>
|
||||
<argument>-prod</argument>
|
||||
<argument>--output-path</argument>
|
||||
<argument>${basedir}/target/dist</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>ember test</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skipTests}</skip>
|
||||
<workingDirectory>${webappDir}</workingDirectory>
|
||||
<executable>ember</executable>
|
||||
<arguments>
|
||||
<argument>test</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>cleanup tmp</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>${webappDir}</workingDirectory>
|
||||
<executable>rm</executable>
|
||||
<arguments>
|
||||
<argument>-rf</argument>
|
||||
<argument>tmp</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Package into war -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
|
||||
<warSourceDirectory>${basedir}/target/dist</warSourceDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
@ -1,3 +0,0 @@
|
||||
# http://www.robotstxt.org
|
||||
User-agent: *
|
||||
Disallow:
|
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
-->
|
||||
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
||||
|
||||
<web-app>
|
||||
<display-name>YARN UI</display-name>
|
||||
</web-app>
|
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster', // common const
|
||||
pathForType(modelName) {
|
||||
return ''; // move to some common place, return path by modelname.
|
||||
},
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster/metrics', // common const
|
||||
pathForType(modelName) {
|
||||
return ''; // move to some common place, return path by modelname.
|
||||
},
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Converter from 'yarn-ui/utils/converter';
|
||||
import Config from 'yarn-ui/config';
|
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster', // common const
|
||||
pathForType(modelName) {
|
||||
return 'apps'; // move to some common place, return path by modelname.
|
||||
},
|
||||
/*
|
||||
urlForQuery(query, modelName) {
|
||||
var url = this._buildURL();
|
||||
return url + '/apps/' + query.appId + "/appattempts";
|
||||
},
|
||||
*/
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Converter from 'yarn-ui/utils/converter';
|
||||
import Config from 'yarn-ui/config';
|
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Config from 'yarn-ui/config';
|
||||
|
||||
export default DS.JSONAPIAdapter.extend({
|
||||
headers: {
|
||||
Accept: 'application/json'
|
||||
},
|
||||
host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
|
||||
namespace: 'ws/v1/cluster', // common const
|
||||
pathForType(modelName) {
|
||||
return 'scheduler'; // move to some common place, return path by modelname.
|
||||
},
|
||||
ajax(url, method, hash) {
|
||||
hash = hash || {};
|
||||
hash.crossDomain = true;
|
||||
hash.xhrFields = {withCredentials: true};
|
||||
hash.targetServer = "RM";
|
||||
return this._super(url, method, hash);
|
||||
}
|
||||
});
|
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
import Resolver from 'ember/resolver';
|
||||
import loadInitializers from 'ember/load-initializers';
|
||||
import config from './config/environment';
|
||||
import Sorter from 'yarn-ui/utils/sorter';
|
||||
|
||||
var App;
|
||||
|
||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||
|
||||
App = Ember.Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver: Resolver
|
||||
});
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
Sorter.initDataTableSorter();
|
||||
|
||||
export default App;
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
import BaseChartComponent from 'yarn-ui/components/base-chart-component';
|
||||
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
import BaseChartComponent from 'yarn-ui/components/base-chart-component';
|
||||
|
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
didInsertElement: function() {
|
||||
$(".js-example-basic-single").select2(
|
||||
{
|
||||
width: '100%',
|
||||
placeholder: "Select a queue"
|
||||
});
|
||||
var elementId = this.get("element-id");
|
||||
var prefix = this.get("prefix");
|
||||
|
||||
var element = d3.select("#" + elementId);
|
||||
|
||||
if (element) {
|
||||
this.get("model").forEach(function(o) {
|
||||
element.append("option").attr("value", o.get("name")).text(prefix + o.get("name"));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
@ -0,0 +1,290 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
import ChartUtilsMixin from 'yarn-ui/mixins/charts-utils';
|
||||
|
||||
export default Ember.Component.extend(ChartUtilsMixin, {
|
||||
queues: {
|
||||
data: undefined,
|
||||
foldedQueues: {},
|
||||
selectedQueueCircle: undefined,
|
||||
maxDepth: -1,
|
||||
},
|
||||
|
||||
queueColors: d3.scale.category20().range(),
|
||||
|
||||
renderQueue: function (now, depth, sequence) {
|
||||
if (depth > this.queues.maxDepth) {
|
||||
this.queues.maxDepth = depth;
|
||||
}
|
||||
|
||||
var cx = 20 + depth * 30;
|
||||
var cy = 20 + sequence * 30;
|
||||
var name = now.get("name");
|
||||
|
||||
var g = this.queues.dataGroup.append("g")
|
||||
.attr("id", "queue-" + name + "-g");
|
||||
|
||||
var folded = this.queues.foldedQueues[name];
|
||||
var isParentQueue = false;
|
||||
|
||||
// render its children
|
||||
var children = [];
|
||||
var childrenNames = now.get("children");
|
||||
if (childrenNames) {
|
||||
childrenNames.forEach(function (name) {
|
||||
isParentQueue = true;
|
||||
var child = this.queues.data[name];
|
||||
if (child) {
|
||||
children.push(child);
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
if (folded) {
|
||||
children = [];
|
||||
}
|
||||
var linefunction = d3.svg.line()
|
||||
.interpolate("basis")
|
||||
.x(function (d) {
|
||||
return d.x;
|
||||
})
|
||||
.y(function (d) {
|
||||
return d.y;
|
||||
});
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
sequence = sequence + 1;
|
||||
// Get center of children queue
|
||||
var cc = this.renderQueue(children[i],
|
||||
depth + 1, sequence);
|
||||
g.append("path")
|
||||
.attr("class", "queue")
|
||||
.attr("d", linefunction([{
|
||||
x: cx,
|
||||
y: cy
|
||||
}, {
|
||||
x: cc.x - 20,
|
||||
y: cc.y
|
||||
}, cc]));
|
||||
}
|
||||
|
||||
var circle = g.append("circle")
|
||||
.attr("cx", cx)
|
||||
.attr("cy", cy)
|
||||
.attr("class", "queue");
|
||||
|
||||
circle.on('mouseover', function () {
|
||||
circle.style("fill", this.queueColors[1]);
|
||||
}.bind(this));
|
||||
circle.on('mouseout', function () {
|
||||
if (circle != this.queues.selectedQueueCircle) {
|
||||
circle.style("fill", this.queueColors[0]);
|
||||
}
|
||||
}.bind(this));
|
||||
circle.on('click', function () {
|
||||
circle.style("fill", this.queueColors[2]);
|
||||
var pre = this.queues.selectedQueueCircle;
|
||||
this.queues.selectedQueueCircle = circle;
|
||||
if (pre) {
|
||||
pre.on('mouseout')();
|
||||
}
|
||||
this.renderCharts(name);
|
||||
}.bind(this));
|
||||
circle.on('dblclick', function () {
|
||||
if (!isParentQueue) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.queues.foldedQueues[name]) {
|
||||
delete this.queues.foldedQueues[name];
|
||||
} else {
|
||||
this.queues.foldedQueues[name] = now;
|
||||
}
|
||||
this.renderQueues();
|
||||
}.bind(this));
|
||||
|
||||
var text = name;
|
||||
if (folded) {
|
||||
text = name + " (+)";
|
||||
}
|
||||
|
||||
// print queue's name
|
||||
g.append("text")
|
||||
.attr("x", cx + 30)
|
||||
.attr("y", cy + 5)
|
||||
.text(text)
|
||||
.attr("class", "queue");
|
||||
|
||||
return {
|
||||
x: cx,
|
||||
y: cy
|
||||
};
|
||||
},
|
||||
|
||||
renderQueues: function () {
|
||||
if (this.queues.dataGroup) {
|
||||
this.queues.dataGroup.remove();
|
||||
}
|
||||
// render queues
|
||||
this.queues.dataGroup = this.canvas.svg.append("g")
|
||||
.attr("id", "queues-g");
|
||||
var rootQueue = undefined;
|
||||
|
||||
if (this.queues.data) {
|
||||
this.renderQueue(this.queues.data['root'], 0, 0);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
draw: function () {
|
||||
this.queues.data = {};
|
||||
this.get("model")
|
||||
.forEach(function (o) {
|
||||
this.queues.data[o.id] = o;
|
||||
}.bind(this));
|
||||
|
||||
// get w/h of the svg
|
||||
var bbox = d3.select("#main-container")
|
||||
.node()
|
||||
.getBoundingClientRect();
|
||||
this.canvas.w = bbox.width;
|
||||
this.canvas.h = Math.max(Object.keys(this.queues.data)
|
||||
.length * 35, 1500);
|
||||
|
||||
this.canvas.svg = d3.select("#main-container")
|
||||
.append("svg")
|
||||
.attr("width", this.canvas.w)
|
||||
.attr("height", this.canvas.h)
|
||||
.attr("id", "main-svg");
|
||||
|
||||
this.renderBackground();
|
||||
|
||||
this.renderQueues();
|
||||
this.renderCharts("root");
|
||||
},
|
||||
|
||||
didInsertElement: function () {
|
||||
this.draw();
|
||||
},
|
||||
|
||||
/*
|
||||
* data = [{label="xx", value=},{...}]
|
||||
*/
|
||||
renderTable: function (data, title, layout) {
|
||||
d3.select("#main-svg")
|
||||
.append('table')
|
||||
.selectAll('tr')
|
||||
.data(data)
|
||||
.enter()
|
||||
.append('tr')
|
||||
.selectAll('td')
|
||||
.data(function (d) {
|
||||
return d;
|
||||
})
|
||||
.enter()
|
||||
.append('td')
|
||||
.text(function (d) {
|
||||
return d;
|
||||
});
|
||||
},
|
||||
|
||||
renderQueueCapacities: function (queue, layout) {
|
||||
// Render bar chart
|
||||
this.renderBarChart(this.charts.g, [{
|
||||
label: "Cap",
|
||||
value: queue.get("capacity")
|
||||
}, {
|
||||
label: "MaxCap",
|
||||
value: queue.get("maxCapacity")
|
||||
}, {
|
||||
label: "UsedCap",
|
||||
value: queue.get("usedCapacity")
|
||||
}], "Queue Capacities", layout, 60);
|
||||
},
|
||||
|
||||
renderChildrenCapacities: function (queue, layout) {
|
||||
var data = [];
|
||||
var children = queue.get("children");
|
||||
if (children) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var child = this.queues.data[children[i]];
|
||||
data.push({
|
||||
label: child.get("name"),
|
||||
value: child.get("capacity")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.renderDonutChart(this.charts.g, data, "Children Capacities", layout, true);
|
||||
},
|
||||
|
||||
renderChildrenUsedCapacities: function (queue, layout) {
|
||||
var data = [];
|
||||
var children = queue.get("children");
|
||||
if (children) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var child = this.queues.data[children[i]];
|
||||
data.push({
|
||||
label: child.get("name"),
|
||||
value: child.get("usedCapacity")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.renderDonutChart(this.charts.g, data, "Children Used Capacities", layout, true);
|
||||
},
|
||||
|
||||
renderLeafQueueUsedCapacities: function (layout) {
|
||||
var leafQueueUsedCaps = [];
|
||||
for (var queueName in this.queues.data) {
|
||||
var q = this.queues.data[queueName];
|
||||
if ((!q.get("children")) || q.get("children")
|
||||
.length == 0) {
|
||||
// it's a leafqueue
|
||||
leafQueueUsedCaps.push({
|
||||
label: q.get("name"),
|
||||
value: q.get("usedCapacity")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.renderDonutChart(this.charts.g, leafQueueUsedCaps, "LeafQueues Used Capacities",
|
||||
layout, true);
|
||||
},
|
||||
|
||||
renderCharts: function (queueName) {
|
||||
this.charts.leftBannerLen = this.queues.maxDepth * 30 + 100;
|
||||
this.initCharts();
|
||||
|
||||
var queue = this.queues.data[queueName];
|
||||
var idx = 0;
|
||||
|
||||
if (queue.get("name") == "root") {
|
||||
this.renderLeafQueueUsedCapacities(this.getLayout(idx++));
|
||||
}
|
||||
if (queue.get("name") != "root") {
|
||||
this.renderQueueCapacities(queue, this.getLayout(idx++));
|
||||
}
|
||||
if (queue.get("children") && queue.get("children")
|
||||
.length > 0) {
|
||||
this.renderChildrenCapacities(queue, this.getLayout(idx++));
|
||||
this.renderChildrenUsedCapacities(queue, this.getLayout(idx++));
|
||||
}
|
||||
},
|
||||
});
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
import Converter from 'yarn-ui/utils/converter';
|
||||
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
loading: true,
|
||||
});
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
});
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
needReload: true,
|
||||
selectedQueue: undefined,
|
||||
});
|
@ -0,0 +1,43 @@
|
||||
<!--
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>YarnUi</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for 'head'}}
|
||||
|
||||
<link rel="stylesheet" href="assets/vendor.css">
|
||||
<link rel="stylesheet" href="assets/yarn-ui.css">
|
||||
|
||||
{{content-for 'head-footer'}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for 'body'}}
|
||||
|
||||
<script src="assets/vendor.js"></script>
|
||||
<script src="assets/yarn-ui.js"></script>
|
||||
|
||||
{{content-for 'body-footer'}}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
|
||||
export default DS.Model.extend({
|
||||
startedOn: DS.attr('string'),
|
||||
state: DS.attr('string'),
|
||||
haState: DS.attr('string'),
|
||||
rmStateStoreName: DS.attr('string'),
|
||||
resourceManagerVersion: DS.attr('string'),
|
||||
resourceManagerBuildVersion: DS.attr('string'),
|
||||
hadoopVersion: DS.attr('string'),
|
||||
hadoopBuildVersion: DS.attr('string'),
|
||||
hadoopVersionBuiltOn: DS.attr('string')
|
||||
});
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
|
||||
export default DS.Model.extend({
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Converter from 'yarn-ui/utils/converter';
|
||||
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Converter from 'yarn-ui/utils/converter';
|
||||
import DS from 'ember-data';
|
||||
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
import Converter from 'yarn-ui/utils/converter';
|
||||
|
@ -1,3 +1,21 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
|
||||
export default DS.Model.extend({
|
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import DS from 'ember-data';
|
||||
|
||||
export default DS.Model.extend({
|
||||
name: DS.attr('string'),
|
||||
queueName: DS.attr('string'),
|
||||
usedMemoryMB: DS.attr('number'),
|
||||
usedVCore: DS.attr('number')
|
||||
})
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user