You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/10/05 12:37:05 UTC

[2/5] ambari git commit: AMBARI-18313. Capacity Scheduler View: Xml diff view tool to show changes made and queue capacity chart (Akhil PB via pallavkul)

http://git-wip-us.apache.org/repos/asf/ambari/blob/62dc775e/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/xmldiffViewer.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/xmldiffViewer.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/xmldiffViewer.hbs
new file mode 100644
index 0000000..94cc8e0
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/xmldiffViewer.hbs
@@ -0,0 +1,41 @@
+{{!
+* 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 id="xmldiffViewerDialog" class="modal fade xmldiff-viewer" role="dialog">
+  <div class="modal-dialog">
+    <div class="modal-content">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" {{action "closeDiffViewer"}}>&times;</button>
+        <h4 class="modal-title">
+          {{#if diffConfig}}
+            XML Diff Tool
+          {{else}}
+            Capacity Scheduler XML
+          {{/if}}
+        </h4>
+      </div>
+      <div class="modal-body">
+        <div id="xmldiffOutput"></div>
+        <textarea id="capshedViewXml" class="viewxml-textarea" rows="19" cols="172" readonly="readonly"></textarea>
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal" {{action "closeDiffViewer"}}>Close</button>
+      </div>
+    </div>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/62dc775e/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
index 911856f..582ef3e 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/bower.json
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/bower.json
@@ -12,8 +12,10 @@
     "font-awesome": "~4.1",
     "bootstrap3-typeahead": "~3.0.3",
     "perfect-scrollbar": "~0.5.8",
-    "file-saver": "*",
-    "Blob": "*"
+    "file-saver": "https://github.com/eligrey/FileSaver.js.git#eb8d76f845ef6ad1e39a840c29bb852098c6a401",
+    "Blob": "https://github.com/eligrey/Blob.js.git#079824b6c118fbcd0b99c561d57ad192d2c6619b",
+    "d3": "~3.5.17",
+    "jsdifflib": "https://github.com/cemerick/jsdifflib.git#ce74529f9d51943db440dbd7c15d515597cda2e1"
   },
   "overrides": {
     "jquery": {
@@ -41,6 +43,13 @@
     },
     "Blob": {
       "main": "Blob.js"
+    },
+    "jsdifflib": {
+      "main": [
+        "difflib.js",
+        "diffview.js",
+        "diffview.css"
+      ]
     }
   }
 }