aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [40/50] [abbrv] git commit: Adding new UI files.
Date Wed, 15 Jan 2014 21:38:03 GMT
Adding new UI files.


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/2d0a58b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/2d0a58b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/2d0a58b5

Branch: refs/heads/mansu/AURORA-4187_scheduler_home_page-no-seed
Commit: 2d0a58b544f1eee99dde9668ee2b80af3c0627c6
Parents: e76d2ae
Author: Suman Karumuri <skarumuri@twitter.com>
Authored: Mon Dec 30 16:44:29 2013 -0800
Committer: Suman Karumuri <skarumuri@twitter.com>
Committed: Mon Jan 13 15:24:39 2014 -0800

----------------------------------------------------------------------
 .../aurora/scheduler/http/ui/css/app.css        |  9 +++++
 .../twitter/aurora/scheduler/http/ui/index.html | 38 ++++++++++++++++++
 .../twitter/aurora/scheduler/http/ui/js/app.js  |  4 ++
 .../aurora/scheduler/http/ui/js/controllers.js  | 42 ++++++++++++++++++++
 .../aurora/scheduler/http/ui/js/directives.js   |  8 ++++
 .../aurora/scheduler/http/ui/js/services.js     |  3 ++
 .../aurora/scheduler/http/ui/roleLink.html      |  1 +
 7 files changed, 105 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/css/app.css
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/css/app.css b/src/main/resources/com/twitter/aurora/scheduler/http/ui/css/app.css
new file mode 100644
index 0000000..9a2fdf1
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/css/app.css
@@ -0,0 +1,9 @@
+/* app css stylesheet */
+
+[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
+  display: none !important;
+}
+
+.pagination {
+  text-align: center;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html b/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
new file mode 100644
index 0000000..7125b00
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/index.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<html lang="en" ng-app="auroraUI">
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Aurora UI</title>
+  <link rel="stylesheet" href="css/app.css"/>
+</head>
+<body class='ng-cloak'>
+
+<div class='container'>
+  <div ng-controller='AuroraUI.JobSummaryController'>
+    <div class='page-header'>
+      <h2 class="text-center">{{title}}</h2>
+    </div>
+    <div>
+      <smart-table config="globalConfig" columns="columnCollection" rows="rowCollection"
+                   class='table table-striped table-hover table-bordered table-condensed'>
+      </smart-table>
+    </div>
+  </div>
+</div>
+
+<!-- Scripts -->
+<script src="lib/angular/angular.js"></script>
+<script src="js/app.js"></script>
+<script src="js/controllers.js"></script>
+<script src="js/directives.js"></script>
+
+<!-- Bootstrap -->
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
+<script src="//netdna.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
+<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
+
+<!--smart table-->
+<script src="lib/smart-table/Smart-Table.min.js"></script>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/app.js
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/app.js b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/app.js
new file mode 100644
index 0000000..db6ea99
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/app.js
@@ -0,0 +1,4 @@
+'use strict';
+
+// Declare app level module which depends on filters, and services
+var auroraUI = angular.module('auroraUI', ['auroraUI.controllers', 'smartTable.table']);

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
new file mode 100644
index 0000000..a268c9e
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/controllers.js
@@ -0,0 +1,42 @@
+'use strict';
+
+/* Controllers */
+
+angular.module('auroraUI.controllers', []).
+    controller('AuroraUI.JobSummaryController',
+    function ($scope) {
+      $scope.title = 'Scheduled Jobs Summary';
+
+      $scope.jobSummary = { 'jobSummaries': [
+        {
+          'role': "mesos",
+          'jobs': 10,
+          'cronJobs': 10
+        },
+        {
+          'role': 'ads',
+          'jobs': 101,
+          'cronJobs': 20
+        }
+      ]};
+
+      $scope.columnCollection = [
+        {label : 'Role', map: 'role', cellTemplateUrl: 'roleLink.html'},
+        {label : 'Jobs', map: 'jobs'},
+        {label : 'Cron Jobs', map: 'cronJobs'}
+      ];
+
+      $scope.rowCollection = $scope.jobSummary.jobSummaries;
+
+      $scope.globalConfig = {
+        isGlobalSearchActivated: true,
+        isPaginationEnabled: true,
+        itemsByPage: 25,
+        maxSize: 8,
+        selectionMode: 'single'
+      };
+
+      $scope.$on('selectionChange', function (event, args) {
+        console.log(args);
+      });
+    });

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
new file mode 100644
index 0000000..939ec08
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/directives.js
@@ -0,0 +1,8 @@
+'use strict';
+
+auroraUI.directive('roleLink', function () {
+  return {
+    restrict: 'C',
+    template: "<a ng-href='/{{formatedValue}}'>{{formatedValue}}</a>"
+  };
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/services.js
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/services.js b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/services.js
new file mode 100644
index 0000000..429d26d
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/js/services.js
@@ -0,0 +1,3 @@
+'use strict';
+
+

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2d0a58b5/src/main/resources/com/twitter/aurora/scheduler/http/ui/roleLink.html
----------------------------------------------------------------------
diff --git a/src/main/resources/com/twitter/aurora/scheduler/http/ui/roleLink.html b/src/main/resources/com/twitter/aurora/scheduler/http/ui/roleLink.html
new file mode 100644
index 0000000..fc25526
--- /dev/null
+++ b/src/main/resources/com/twitter/aurora/scheduler/http/ui/roleLink.html
@@ -0,0 +1 @@
+<div class="role-link"></div>
\ No newline at end of file


Mime
View raw message