You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/10/18 03:03:39 UTC
svn commit: r1399501 [1/3] - in /incubator/ambari/branches/AMBARI-666: ./
ambari-web/ ambari-web/app/ ambari-web/app/assets/font/
ambari-web/app/assets/licenses/ ambari-web/app/controllers/main/
ambari-web/app/models/ ambari-web/app/styles/ ambari-web/...
Author: yusaku
Date: Thu Oct 18 01:03:38 2012
New Revision: 1399501
URL: http://svn.apache.org/viewvc?rev=1399501&view=rev
Log:
AMBARI-872. Hookup Nagios alerts section in Ambari UI to backend server (Srimanth Gunturi via yusaku)
Added:
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.eot (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.svg
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.ttf (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.woff (with props)
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/bootstrap-datepicker.js
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/datepicker.css
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/font-awesome-ie7.css
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/font-awesome.css
Modified:
incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/licenses/NOTICE.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/controllers/main/dashboard.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/data_adapter.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/alert.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/models/service.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/dashboard.hbs
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hbase.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/hdfs.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/dashboard/service/mapreduce.js
incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee
incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/bootstrap.css
Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1399501&r1=1399500&r2=1399501&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Thu Oct 18 01:03:38 2012
@@ -12,6 +12,9 @@ AMBARI-666 branch (unreleased changes)
NEW FEATURES
+ AMBARI-872. Hookup Nagios alerts section in Ambari UI to backend
+ server. (Srimanth Gunturi via yusaku)
+
AMBARI-871. Integrate basic set of rest APIs with ambari-web
installer wizardi. (Jaimin Jetly via yusaku)
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js?rev=1399501&r1=1399500&r2=1399501&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/app.js Thu Oct 18 01:03:38 2012
@@ -24,9 +24,51 @@ module.exports = Em.Application.create({
store: DS.Store.create({
revision: 4,
- adapter: DS.FixtureAdapter.create()
- // comment out the line above and uncomment the line below for backend integration
- // adapter: require('data_adapter')
+ adapter: require('data_adapter')
+ // adapter: DS.FixtureAdapter.create()
})
-
});
+
+/**
+ * Ambari overrides the default date transformer.
+ * This is done because of the non-standard data
+ * sent. For example Nagios sends date as "12345678".
+ * The problem is that it is a String and is represented
+ * only in seconds whereas Javascript's Date needs
+ * milliseconds representation.
+ */
+DS.attr.transforms.date = {
+ from: function (serialized) {
+ var type = typeof serialized;
+ if (type === "string") {
+ serialized = parseInt(serialized);
+ type = typeof serialized;
+ }
+ if (type === "number") {
+ // The number could be seconds or milliseconds.
+ // If seconds, then multiplying with 1000 should still
+ // keep it below the current time.
+ if (serialized * 1000 < new Date().getTime()) {
+ serialized = serialized * 1000;
+ }
+ return new Date(serialized);
+ } else if (serialized === null || serialized === undefined) {
+ // if the value is not present in the data,
+ // return undefined, not null.
+ return serialized;
+ } else {
+ return null;
+ }
+ },
+ to: function (deserialized) {
+ if (deserialized instanceof Date) {
+ return deserialized.getTime();
+ } else if (date === undefined) {
+ return undefined;
+ } else {
+ return null;
+ }
+ }
+}
+
+
Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.eot
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.eot?rev=1399501&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/font/fontawesome-webfont.eot
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream