ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [1/4] AMBARI-6519. View: Capacity Scheduler view. (jaimin)
Date Mon, 21 Jul 2014 20:48:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e40b18a59 -> bb0116c3c


http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
new file mode 100644
index 0000000..a4f8099
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
@@ -0,0 +1,85 @@
+{{!
+* 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.
+}}
+
+<div class="col-md-4">
+  {{!-- BUTTONS --}}
+  <div class="row">
+      {{#if isWaitingPath}}
+        <div class="add-queue col-md-12">
+          {{path-input queues=content action="addQ" activeFlag=isWaitingPath}}
+        </div>
+      {{else}}
+        <div {{bind-attr class=":add-queue needRefresh:col-md-5:col-md-6 :col-sm-6" }}
>
+          <button {{action askPath}} {{bind-attr class=":btn :btn-default :btn-block hasNewQueue:disabled"}}
><i class="fa fa-plus"></i> Add queue</button>
+        </div>
+        <div  {{bind-attr class=":add-queue needRefresh:col-md-7:col-md-6 :col-sm-6" }}
>
+          <div class="btn-group btn-group-justified btn-group-save">
+            <div class="btn-group">
+            {{#if needRestart}}
+              <button {{action saveConfig 'restart'}} {{bind-attr class=":btn :btn-save
:btn-success canNotSave:disabled"}} ><i class="fa fa-fw fa fa-cogs"></i> Save
and restart</button>
+              {{else}}
+              {{#if needRefresh}}
+              <button {{action saveConfig 'refresh'}} {{bind-attr class=":btn :btn-save
:btn-success canNotSave:disabled"}} ><i class="fa fa-fw fa-refresh"></i> Save
and refresh</button>
+              {{else}}
+              <button {{action saveConfig}} {{bind-attr class=":btn :btn-save :btn-success
canNotSave:disabled"}} ><i class="fa fa-save"></i> Save</button>
+              {{/if}}
+            {{/if}}
+            </div>
+            <div class="btn-group">
+                <button type="button" {{bind-attr class=":btn :btn-success canNotSave:disabled
:dropdown-toggle"}} data-toggle="dropdown">
+                  <span class="caret"></span>
+                </button>
+                <ul class="dropdown-menu pull-right" role="menu">
+                  <li><a href="#" {{action saveConfig 'restart'}}><i class="fa
fa-fw fa fa-cogs"></i> Save and restart ResourceManager</a></li>
+                  <li><a href="#" {{action saveConfig 'refresh'}}><i class="fa
fa-fw fa-refresh"></i> Save and refresh Queues</a></li>
+                  <li><a href="#" {{action saveConfig}}><i class="fa fa-fw
fa-save"></i> Save only</a></li>
+                </ul>
+            </div>
+          </div>
+        </div>
+      {{/if}}
+  </div>
+  {{!-- QUEUE LIST --}}
+  <div class="list-group queue-list">
+    {{recurce-queues depth=0}}
+  </div>
+  {{!-- SHEDULER --}}
+  <div class="hidden-sm hidden-xs">
+    {{partial "schedulerPanel"}}
+  </div>
+  {{!-- ALERT --}}
+  {{#if alertMessage}}
+  <div class="alert alert-danger">
+    <button {{action 'clearAlert'}}type="button" class="close" aria-hidden="true">&times;</button>
+    <strong> {{alertMessage.status}} </strong> {{alertMessage.message}}
+    <br>
+    {{#link-to 'trace' class="alert-link"}}Trace{{/link-to}}
+  </div>
+  {{/if}}
+</div>
+
+{{!-- QUEUE --}}
+<div class="col-md-8">
+  {{outlet}}
+</div>
+
+{{!-- SHEDULER --}}
+<div class="col-md-12 hidden-lg hidden-md">
+  {{partial "schedulerPanel"}}
+</div>
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues/index.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues/index.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues/index.hbs
new file mode 100644
index 0000000..1c468b5
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues/index.hbs
@@ -0,0 +1,20 @@
+{{!
+* 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.
+}}
+
+
+<div class="alert alert-info">Click on a queue to the left for details.</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
new file mode 100644
index 0000000..d121211
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
@@ -0,0 +1,59 @@
+{{!
+* 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.
+}}
+
+<div class="panel panel-default panel-capacity">
+  <div class="panel-heading">
+    <div class="panel-title">
+      Scheduler
+      <a href="#" {{action 'toggleEditScheduler'}} class="text-right"> 
+        {{#if isEditScheduler}}
+          <small><i class="fa fa-edit"> Hide edit</i> </small>
+        {{else}}
+          <small><i class="fa fa-edit"> Show edit</i> </small>
+        {{/if}}
+      </a>
+    </div>
+  </div>
+  <div class="panel-body">
+    <form class="form-horizontal" role="form">
+      <div class="form-group">
+        <label class="col-xs-6 col-lg-6 col-md-7 col-sm-6 control-label">Maximum apps</label>
+        <div class="col-xs-6 col-lg-6 col-md-5 col-sm-6">
+        {{#if isEditScheduler}}
+          {{int-input value=scheduler.maximum_applications class="input-sm"}}
+        {{else}}
+          <p class="form-control-static">{{scheduler.maximum_applications}}</p>
+        {{/if}}
+        </div>
+      </div>
+      <div class="form-group">
+        <label class="col-xs-6 col-lg-6 col-md-7 col-sm-6 control-label">Minimum AM
resourse</label>
+        <div class="col-xs-6 col-lg-6 col-md-5 col-sm-6">
+        {{#if isEditScheduler}}
+          <div class="input-group">
+            {{int-input value=scheduler.maximum_am_resource_percent class="input-sm" maxVal=100}}
+            <span class="input-group-addon">%</span>
+          </div>
+        {{else}}
+          <p class="form-control-static">{{scheduler.maximum_am_resource_percent}}
%</p>
+        {{/if}}
+        </div>
+      </div>
+    </form>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/trace.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/trace.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/trace.hbs
new file mode 100644
index 0000000..77e9258
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/trace.hbs
@@ -0,0 +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.
+}}
+
+<pre>
+  {{trace}}
+</pre>

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/bower.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/bower.json b/contrib/views/capacity-scheduler/src/main/resources/ui/bower.json
new file mode 100644
index 0000000..18bef15
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/bower.json
@@ -0,0 +1,32 @@
+{
+  "name": "capacity-scheduler-web",
+  "version": "0.0.1",
+  "main": "public/app.js",
+  "dependencies": {
+    "ember": "1.6.0-beta.1",
+    "ember-data": "1.0.0-beta.8",
+    "jquery": "1.9.0",
+    "bootstrap": "3.1.x",
+    "moment": "~2.5.1",
+    "ember-i18n": "~1.6.0",
+    "font-awesome": "~4.1",
+    "bootstrap3-typeahead": "~3.0.3"
+  },
+  "overrides": {
+    "jquery": {
+      "main": "jquery.js"
+    },
+    "ember-uploader": {
+      "main": "dist/ember-uploader.js"
+    },
+    "cldr": {
+      "main": "plurals.js"
+    },
+    "ember-i18n": {
+      "scripts": []
+    },
+    "font-awesome": {
+      "main": "css/font-awesome.css"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee b/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
new file mode 100644
index 0000000..7bd9fa5
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
@@ -0,0 +1,72 @@
+#  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.
+
+
+exports.config = 
+
+  files: 
+    
+    javascripts: 
+      defaultExtension: 'js'
+      joinTo: 
+        'javascripts/app.js': /^app/
+        'javascripts/vendor.js': /^bower_components|vendor/
+      order:
+        before: [
+          'bower_components/jquery/jquery.js',
+          'bower_components/handlebars/handlebars.js',
+          'bower_components/ember/ember.js',
+          'bower_components/ember-data/ember-data.js'
+          'bower_components/ember-i18n/lib/i18n.js'
+          ]
+
+    stylesheets:
+      defaultExtension: 'css'
+      joinTo:
+        'stylesheets/app.css': /^app/
+        'stylesheets/vendor.css': /^bower_components|vendor/
+      order:
+        before: [
+          'bower_components/bootstrap/dist/css/bootstrap.css',
+          'bower_components/bootstrap/dist/css/bootstrap-theme.css',
+          'bower_components/font-awesome/font-awesome.css'
+        ]
+
+    templates:
+      precompile: true
+      root: 'templates'
+      defaultExtension: 'hbs'
+      joinTo: 'javascripts/app.js' : /^app/
+      paths:
+        jquery: 'bower_components/jquery/jquery.js'
+        handlebars: 'bower_components/handlebars/handlebars.js'
+        ember: 'bower_components/ember/ember.js'
+
+  modules:
+    addSourceURLs: true
+
+  paths:
+    public: '/usr/lib/ambari-server/web/views-debug/CAPACITY-SCHEDULER/0.1.0/CS_1/'
+
+  overrides:
+    production:
+        paths:
+          public: 'public'
+
+  server:
+    port: 3333
+    base: '/'
+    run: no

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/collection.js.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/collection.js.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/collection.js.hbs
new file mode 100644
index 0000000..04a95a9
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/collection.js.hbs
@@ -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.
+ */
+
+var App = require('app');
+
+App.{{#camelize}}{{pluralName}}{{/camelize}}Controller = Em.ArrayController.extend({
+    content: [] 
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/generator.json
new file mode 100644
index 0000000..42d3588
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/collection/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "collection.js.hbs",
+      "to": "app/controllers/{{pluralName}}.js"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/component.js.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/component.js.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/component.js.hbs
new file mode 100644
index 0000000..c4f2d6f
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/component.js.hbs
@@ -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.
+ */
+
+var App = require('app');
+
+App.{{#camelize}}{{name}}{{/camelize}}Component = Em.Component.extend({
+    
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/generator.json
new file mode 100644
index 0000000..231b7c7
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/component/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "component.js.hbs",
+      "to": "app/components/{{name}}.js"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/controller.js.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/controller.js.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/controller.js.hbs
new file mode 100644
index 0000000..66c11bb
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/controller.js.hbs
@@ -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.
+ */
+
+var App = require('app');
+
+App.{{#camelize}}{{name}}{{/camelize}}Controller = Em.ObjectController.extend({
+    content: null
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/generator.json
new file mode 100644
index 0000000..9da94c8
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/controller/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "controller.js.hbs",
+      "to": "app/controllers/{{name}}.js"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/generator.json
new file mode 100644
index 0000000..e771584
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "model.js.hbs",
+      "to": "app/models/{{name}}.js"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/model.js.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/model.js.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/model.js.hbs
new file mode 100644
index 0000000..d5f5ece
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/model/model.js.hbs
@@ -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.
+ */
+
+var App = require('app');
+
+App.{{#camelize}}{{name}}{{/camelize}} = DS.Model.extend({
+    
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/generator.json
new file mode 100644
index 0000000..8c573b3
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "route.js.hbs",
+      "to": "app/routes/{{name}}.js"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/route.js.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/route.js.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/route.js.hbs
new file mode 100644
index 0000000..5d45dc5
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/route/route.js.hbs
@@ -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.
+ */
+
+var App = require('app');
+
+App.{{#camelize}}{{name}}{{/camelize}}Route = Em.Route.extend({
+    setupController: function (controller) {
+
+    }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/generator.json
new file mode 100644
index 0000000..579243d
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "template.hbs.hbs",
+      "to": "app/templates/{{name}}.hbs"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/template.hbs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/template.hbs.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/template.hbs.hbs
new file mode 100644
index 0000000..0efb5b2
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/template/template.hbs.hbs
@@ -0,0 +1,18 @@
+{{!
+   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.
+}}
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/generator.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/generator.json
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/generator.json
new file mode 100644
index 0000000..79b2da7
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/generator.json
@@ -0,0 +1,9 @@
+{
+  "files": [
+    {
+      "from": "view.js.hbs",
+      "to": "app/views/{{name}}.js"
+    }
+  ],
+  "dependencies": []
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/view.js.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/view.js.hbs
b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/view.js.hbs
new file mode 100644
index 0000000..7e35717
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/generators/view/view.js.hbs
@@ -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.
+ */
+
+var App = require('app');
+
+App.{{#camelize}}{{name}}{{/camelize}}View = Em.View.extend({
+    templateName: '{{name}}'
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/package.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/package.json b/contrib/views/capacity-scheduler/src/main/resources/ui/package.json
new file mode 100644
index 0000000..11737d4
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/package.json
@@ -0,0 +1,37 @@
+{
+  "name": "CapacityScheduler",
+  "description": "Package description",
+  "version": "0.0.1",
+  "homepage": "",
+  "repository": {
+    "type": "git",
+    "url": ""
+  },
+  "engines": {
+    "node": "~0.6.10 || 0.8 || 0.9"
+  },
+  "scripts": {
+    "start": "brunch watch --server",
+    "preinstall": "chmod +x node/npm/bin/node-gyp-bin/node-gyp",
+    "postinstall" : "bash node/with_new_path.sh node node_modules/.bin/bower --allow-root
install"
+  },
+  "dependencies": {
+    "javascript-brunch": "^1.7.1",
+    "css-brunch": "^1.7.0",
+    "uglify-js-brunch": "^1.7.7",
+    "clean-css-brunch": "^1.7.1",
+    "bower": "^1.2.8",
+    "brunch": "^1.7.13",
+    "scaffolt": "^0.4.3",
+    "ember-precompiler-brunch": "^1.5.1",
+    "less-brunch": "^1.7.2"
+  },
+  "devDependencies": {},
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/ui/test/spec.coffee
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/test/spec.coffee b/contrib/views/capacity-scheduler/src/main/resources/ui/test/spec.coffee
new file mode 100644
index 0000000..ecf0374
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/test/spec.coffee
@@ -0,0 +1,17 @@
+# 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.
+
+# Write your [mocha](http://visionmedia.github.com/mocha/) specs here.

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/capacity-scheduler/src/main/resources/view.xml
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/view.xml b/contrib/views/capacity-scheduler/src/main/resources/view.xml
new file mode 100644
index 0000000..1c2efea
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/view.xml
@@ -0,0 +1,49 @@
+<!--
+   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.
+-->
+<view>
+    <name>CAPACITY-SCHEDULER</name>
+    <label>Capacity Scheduler</label>
+    <version>0.1.0</version>
+
+    <parameter>
+        <name>ambari.server.url</name>
+        <description>Target Ambari URL</description>
+        <required>true</required>
+    </parameter>
+
+    <parameter>
+        <name>ambari.server.username</name>
+        <description>Target Ambari username</description>
+        <required>true</required>
+    </parameter>
+
+    <parameter>
+        <name>ambari.server.password</name>
+        <description>Target Ambari password</description>
+        <required>true</required>
+        <!-- <hidden>true</hidden> -->
+    </parameter>
+
+    <instance>
+        <name>Scheduler</name>
+    </instance>
+
+    <resource>
+        <name>scheduler</name>
+        <service-class>org.apache.ambari.view.capacityscheduler.CapacitySchedulerService</service-class>
+    </resource>
+</view>

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb0116c3/contrib/views/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/pom.xml b/contrib/views/pom.xml
index ac3b3c0..363ff0e 100644
--- a/contrib/views/pom.xml
+++ b/contrib/views/pom.xml
@@ -26,6 +26,7 @@
     <module>files</module>
     <module>pig</module>
     <module>slider</module>
+    <module>capacity-scheduler</module>
   </modules>
   <build>
     <pluginManagement>


Mime
View raw message