Browse files

Adding src and pomfiles

  • Loading branch information...
1 parent 2359c94 commit ee128c275cd1627717fd9c4ba53514b100bf0f69 @florianleibert florianleibert committed Mar 13, 2013
Showing with 19,725 additions and 0 deletions.
  1. BIN lib/org/apache/mesos/mesos/0.12.0-SNAPSHOT_JDK1.7/mesos-0.12.0-SNAPSHOT_JDK1.7.jar
  2. +9 −0 lib/org/apache/mesos/mesos/0.12.0-SNAPSHOT_JDK1.7/mesos-0.12.0-SNAPSHOT_JDK1.7.pom
  3. +12 −0 lib/org/apache/mesos/mesos/maven-metadata-local.xml
  4. +483 −0 pom.xml
  5. +289 −0 src/main/java/com/airbnb/dropwizard/assets/AssetServlet.java
  6. +3 −0 src/main/resources/assets/.bowerrc
  7. +18 −0 src/main/resources/assets/.editorconfig
  8. +1 −0 src/main/resources/assets/.gitattributes
  9. +2 −0 src/main/resources/assets/.gitignore
  10. +22 −0 src/main/resources/assets/.jshintrc
  11. +2 −0 src/main/resources/assets/.npmignore
  12. +67 −0 src/main/resources/assets/Makefile
  13. +2 −0 src/main/resources/assets/README.md
  14. +40 −0 src/main/resources/assets/app.build.js
  15. +1 −0 src/main/resources/assets/app/.buildignore
  16. +553 −0 src/main/resources/assets/app/.htaccess
  17. +157 −0 src/main/resources/assets/app/404.html
  18. BIN src/main/resources/assets/app/favicon.ico
  19. BIN src/main/resources/assets/app/images/blurry-background.jpg
  20. BIN src/main/resources/assets/app/images/blurry-background2.jpg
  21. BIN src/main/resources/assets/app/images/blurry-background3.jpg
  22. BIN src/main/resources/assets/app/images/glyphicons-halflings-white.png
  23. BIN src/main/resources/assets/app/images/glyphicons-halflings.png
  24. BIN src/main/resources/assets/app/images/select2.png
  25. BIN src/main/resources/assets/app/images/select2x2.png
  26. BIN src/main/resources/assets/app/images/spinner.gif
  27. +71 −0 src/main/resources/assets/app/index.html
  28. +3 −0 src/main/resources/assets/app/robots.txt
  29. +16 −0 src/main/resources/assets/app/scripts/collections/application.js
  30. +89 −0 src/main/resources/assets/app/scripts/collections/details.js
  31. +321 −0 src/main/resources/assets/app/scripts/collections/job_graph.js
  32. +21 −0 src/main/resources/assets/app/scripts/collections/jobs.js
  33. +41 −0 src/main/resources/assets/app/scripts/collections/results.js
  34. +25 −0 src/main/resources/assets/app/scripts/collections/selections.js
  35. +66 −0 src/main/resources/assets/app/scripts/components/configured_rivets.js
  36. +108 −0 src/main/resources/assets/app/scripts/components/create_class.js
  37. +464 −0 src/main/resources/assets/app/scripts/components/date_node.js
  38. +5 −0 src/main/resources/assets/app/scripts/components/functor.js
  39. +155 −0 src/main/resources/assets/app/scripts/components/fuzzy_matcher.js
  40. +202 −0 src/main/resources/assets/app/scripts/components/fuzzy_select2.js
  41. +93 −0 src/main/resources/assets/app/scripts/components/mixable_view.js
  42. +190 −0 src/main/resources/assets/app/scripts/components/parent_view.js
  43. +86 −0 src/main/resources/assets/app/scripts/components/parser_utils.js
  44. +47 −0 src/main/resources/assets/app/scripts/components/pollable_collection.js
  45. +262 −0 src/main/resources/assets/app/scripts/components/prefix_trie.js
  46. +17 −0 src/main/resources/assets/app/scripts/components/presence_map.js
  47. +119 −0 src/main/resources/assets/app/scripts/components/run_counter.js
  48. +37 −0 src/main/resources/assets/app/scripts/components/tooltip_view.js
  49. +199 −0 src/main/resources/assets/app/scripts/components/validator.js
  50. +29 −0 src/main/resources/assets/app/scripts/components/validators/base_job.js
  51. +29 −0 src/main/resources/assets/app/scripts/components/validators/dependent_job.js
  52. +294 −0 src/main/resources/assets/app/scripts/csv.csv
  53. +9 −0 src/main/resources/assets/app/scripts/fonts.js
  54. +1 −0 src/main/resources/assets/app/scripts/jobs.json
  55. +226 −0 src/main/resources/assets/app/scripts/main.js
  56. +14 −0 src/main/resources/assets/app/scripts/models/application.js
  57. +244 −0 src/main/resources/assets/app/scripts/models/base_job.js
  58. +76 −0 src/main/resources/assets/app/scripts/models/dependent_job.js
  59. +27 −0 src/main/resources/assets/app/scripts/models/job.js
  60. +179 −0 src/main/resources/assets/app/scripts/models/scheduled_job.js
  61. +2,770 −0 src/main/resources/assets/app/scripts/parsers/iso8601.js
  62. +2,000 −0 src/main/resources/assets/app/scripts/require.js
  63. +87 −0 src/main/resources/assets/app/scripts/routers/application.js
  64. +114 −0 src/main/resources/assets/app/scripts/spec_runner.js
  65. +124 −0 src/main/resources/assets/app/scripts/specs/components/prefix_trie.js
  66. +77 −0 src/main/resources/assets/app/scripts/specs/models/jobs.js
  67. +1,065 −0 src/main/resources/assets/app/scripts/specs/parsers/iso8601.js
  68. +1 −0 src/main/resources/assets/app/scripts/specs/test_data.json
  69. +9 −0 src/main/resources/assets/app/scripts/styles.js
  70. +63 −0 src/main/resources/assets/app/scripts/styles/bootstrap.less
  71. 0 src/main/resources/assets/app/scripts/styles/buttons.less
  72. +131 −0 src/main/resources/assets/app/scripts/styles/chronos.less
  73. +162 −0 src/main/resources/assets/app/scripts/styles/chronos_select2.less
  74. +17 −0 src/main/resources/assets/app/scripts/styles/chronos_timepicker.less
  75. +908 −0 src/main/resources/assets/app/scripts/styles/core.less
  76. +144 −0 src/main/resources/assets/app/scripts/styles/forms.less
  77. +120 −0 src/main/resources/assets/app/scripts/styles/graph.less
  78. +29 −0 src/main/resources/assets/app/scripts/styles/lightbox.css
  79. +101 −0 src/main/resources/assets/app/scripts/styles/mixins.less
  80. +295 −0 src/main/resources/assets/app/scripts/styles/pickadate.classic.css
  81. +170 −0 src/main/resources/assets/app/scripts/styles/pikaday.css
  82. +403 −0 src/main/resources/assets/app/scripts/styles/select2.less
  83. +231 −0 src/main/resources/assets/app/scripts/styles/tests/mocha.css
  84. +231 −0 src/main/resources/assets/app/scripts/styles/tests/mocha.js
  85. +20 −0 src/main/resources/assets/app/scripts/styles/timeline.css
  86. +11 −0 src/main/resources/assets/app/scripts/styles/variables.less
  87. +29 −0 src/main/resources/assets/app/scripts/styles/vendor/backbone-lightbox/lightbox.css
  88. +34 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/accordion.less
  89. +79 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/alerts.less
  90. +63 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/bootstrap.less
  91. +24 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/breadcrumbs.less
  92. +229 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/button-groups.less
  93. +228 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/buttons.less
  94. +158 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/carousel.less
  95. +32 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/close.less
  96. +61 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/code.less
  97. +22 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/component-animations.less
  98. +237 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/dropdowns.less
  99. +690 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/forms.less
  100. +21 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/grid.less
  101. +25 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/hero-unit.less
  102. +84 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/labels-badges.less
  103. +16 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/layouts.less
  104. +55 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/media.less
  105. +702 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/mixins.less
  106. +95 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/modals.less
  107. +497 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/navbar.less
  108. +409 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/navs.less
  109. +43 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/pager.less
  110. +123 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/pagination.less
  111. +133 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/popovers.less
  112. +122 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/progress-bars.less
  113. +216 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/reset.less
  114. +28 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/responsive-1200px-min.less
  115. +193 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/responsive-767px-max.less
  116. +19 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/responsive-768px-979px.less
  117. +189 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/responsive-navbar.less
  118. +59 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/responsive-utilities.less
  119. +48 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/responsive.less
  120. +53 −0 src/main/resources/assets/app/scripts/styles/vendor/bootstrap/less/scaffolding.less
Sorry, we could not display the entire diff because too many files (554) changed.
View
BIN lib/org/apache/mesos/mesos/0.12.0-SNAPSHOT_JDK1.7/mesos-0.12.0-SNAPSHOT_JDK1.7.jar
Binary file not shown.
View
9 lib/org/apache/mesos/mesos/0.12.0-SNAPSHOT_JDK1.7/mesos-0.12.0-SNAPSHOT_JDK1.7.pom
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.mesos</groupId>
+ <artifactId>mesos</artifactId>
+ <version>0.12.0-SNAPSHOT_JDK1.7</version>
+ <description>POM was created from install:install-file</description>
+</project>
View
12 lib/org/apache/mesos/mesos/maven-metadata-local.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.apache.mesos</groupId>
+ <artifactId>mesos</artifactId>
+ <versioning>
+ <release>0.12.0-SNAPSHOT_JDK1.7</release>
+ <versions>
+ <version>0.12.0-SNAPSHOT_JDK1.7</version>
+ </versions>
+ <lastUpdated>20130313160957</lastUpdated>
+ </versioning>
+</metadata>
View
483 pom.xml
@@ -0,0 +1,483 @@
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>de.leibert</groupId>
+ <artifactId>chronos</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2012</inceptionYear>
+ <properties>
+ <scala.version>2.9.1</scala.version>
+ <encoding>UTF-8</encoding>
+ <assetsdir>${basedir}/src/main/resources/assets</assetsdir>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>scala-tools.org</id>
+ <name>Scala-Tools Maven2 Repository</name>
+ <url>http://scala-tools.org/repo-releases</url>
+ </repository>
+ <repository>
+ <id>twitter-repo</id>
+ <name>Twitter Maven2 Repository</name>
+ <url>http://maven.twttr.com/</url>
+ </repository>
+ <repository>
+ <id>sonatype-releases</id>
+ <name>Sonatype release repository</name>
+ <url>http://oss.sonatype.org/content/repositories/releases/</url>
+ </repository>
+ <repository>
+ <id>jboss-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
+ </repository>
+ <repository>
+ <id>libs-folder</id>
+ <url>file://${basedir}/lib</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repo1</id>
+ <name>Maven Central</name>
+ <url>http://repo1.maven.org/maven2</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>artifactory</id>
+ <name>Twitter Artifactory</name>
+ <url>http://artifactory.local.twitter.com/repo</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <dependencies>
+ <!-- Scala -->
+ <dependency>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-library</artifactId>
+ <version>${scala.version}</version>
+ </dependency>
+
+ <!-- Note: this is not yet available in a public maven repo. -->
+ <!-- If you use the installer, we'll replace this with a compiled version-->
+ <dependency>
+ <groupId>org.apache.mesos</groupId>
+ <artifactId>mesos</artifactId>
+ <version>0.12.0-SNAPSHOT_JDK1.7</version>
+ </dependency>
+
+ <!-- Everything else -->
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>12.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-servlet</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.joda</groupId>
+ <artifactId>joda-convert</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.yammer.dropwizard</groupId>
+ <artifactId>dropwizard-core</artifactId>
+ <version>0.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.yammer.dropwizard</groupId>
+ <artifactId>dropwizard-scala_2.9.1</artifactId>
+ <version>0.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.bazaarvoice.dropwizard</groupId>
+ <artifactId>dropwizard-configurable-assets-bundle</artifactId>
+ <version>0.1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.jgrapht</groupId>
+ <artifactId>jgrapht</artifactId>
+ <version>0.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter.common.zookeeper</groupId>
+ <artifactId>client</artifactId>
+ <version>0.0.18</version>
+ </dependency>
+ <!-- TODO(FL): Replace this with th -->
+ <dependency>
+ <groupId>com.twitter.common.zookeeper</groupId>
+ <artifactId>candidate</artifactId>
+ <version>0.23-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter.common.zookeeper</groupId>
+ <artifactId>group</artifactId>
+ <version>0.0.23</version>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter.common</groupId>
+ <artifactId>collections</artifactId>
+ <version>0.0.42</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-email</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-math3</artifactId>
+ <version>3.1.1</version>
+ </dependency>
+
+ <!-- Test scope -->
+ <dependency>
+ <groupId>org.scalastyle</groupId>
+ <artifactId>scalastyle-maven-plugin</artifactId>
+ <version>0.2.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.9.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.specs2</groupId>
+ <artifactId>specs2_2.9.1</artifactId>
+ <version>1.12.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.13</version>
+ <scope>test</scope>
+ </dependency>
+
+
+ <!-- Maven scope -->
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <targetPath>assets</targetPath>
+ <directory>src/main/resources/assets</directory>
+ <includes>
+ <include>build/</include>
+ </includes>
+ </resource>
+ </resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <version>3.0.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>scala-compile-first</id>
+ <phase>process-resources</phase>
+ <configuration>
+ <args>
+ <param>-unchecked</param>
+ <param>-deprecation</param>
+ <param>-encoding</param>
+ <param>utf8</param>
+ </args>
+ </configuration>
+ <goals>
+ <goal>add-source</goal>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>scala-test-compile</id>
+ <phase>process-test-resources</phase>
+ <configuration>
+ <args>
+ <param>-unchecked</param>
+ <param>-deprecation</param>
+ <param>-encoding</param>
+ <param>utf8</param>
+ </args>
+ </configuration>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jvmArgs>
+ <jvmArg>-Xmx2G</jvmArg>
+ </jvmArgs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.6</version>
+ <configuration>
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.13</version>
+ <configuration>
+ <argLine>-Xmx1024m</argLine>
+ <redirectTestOutputToFile>false</redirectTestOutputToFile>
+ <includes>
+ <include>**/Test*.java</include>
+ <include>**/*Test.java</include>
+ <include>**/*Spec.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <!-- TODO(FL): use this plugin to run a local version directly from maven <plugin>-->
+ <!--<groupId>org.codehaus.mojo</groupId>-->
+ <!--<artifactId>exec-maven-plugin</artifactId>-->
+ <!--<version>1.2.1</version>-->
+ <!--<configuration>-->
+ <!--<mainClass>${mainClass}</mainClass>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>build-classpath</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>build-classpath</goal>
+ </goals>
+ <configuration>
+ <outputFile>.classpath.txt</outputFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.scala-tools</groupId>
+ <artifactId>maven-scala-plugin</artifactId>
+ <version>2.15.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <scalaVersion>${scala.version}</scalaVersion>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.scalastyle</groupId>
+ <artifactId>scalastyle-maven-plugin</artifactId>
+ <version>0.2.0</version>
+ <configuration>
+ <verbose>false</verbose>
+ <failOnViolation>true</failOnViolation>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <failOnWarning>false</failOnWarning>
+ <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
+ <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
+ <configLocation>${basedir}/scalastyle_config.xml</configLocation>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>zinc</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <version>3.1.0</version>
+ <configuration>
+ <recompileMode>incremental</recompileMode>
+ <useZincServer>true</useZincServer>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ <profile>
+ <id>requirejs</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>com.github.mcheely</groupId>
+ <artifactId>requirejs-maven-plugin</artifactId>
+ <version>1.1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>optimize</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <!-- path to optimizer json config file -->
+ <configFile>
+ ${assetsdir}/app.build.js
+ </configFile>
+ <!-- optional path to optimizer executable -->
+ <optimizerFile>
+ ${assetsdir}/r.js
+ </optimizerFile>
+ <filterConfig>
+ false
+ </filterConfig>
+ <skip>
+ false
+ </skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.13</version>
+ </plugin>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <version>3.0.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
View
289 src/main/java/com/airbnb/dropwizard/assets/AssetServlet.java
@@ -0,0 +1,289 @@
+package com.airbnb.dropwizard.assets;
+
+import com.google.common.base.CharMatcher;
+import com.google.common.base.Preconditions;
+import com.google.common.cache.*;
+import com.google.common.hash.Hashing;
+import com.google.common.io.Files;
+import com.google.common.io.Resources;
+import com.google.common.net.HttpHeaders;
+import com.yammer.dropwizard.assets.ResourceURL;
+import org.eclipse.jetty.http.MimeTypes;
+import org.eclipse.jetty.io.Buffer;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Map;
+
+/**
+ * Servlet responsible for serving assets to the caller. This is basically completely stolen from
+ * {@link com.yammer.dropwizard.assets.AssetServlet} with the exception of allowing for override options.
+ *
+ * @see com.yammer.dropwizard.assets.AssetServlet
+ */
+public class AssetServlet extends HttpServlet {
+ private static final long serialVersionUID = 6393345594784987908L;
+ private static final String DEFAULT_MIME_TYPE = "text/html";
+ private static final String DEFAULT_INDEX_FILE = "index.html";
+
+ private final transient LoadingCache<String, Asset> cache;
+ private final transient MimeTypes mimeTypes;
+
+ /**
+ * Creates a new {@code AssetServlet} that serves static assets loaded from {@code resourceURL} (typically a file:
+ * or jar: URL). The assets are served at URIs rooted at {@code uriPath}. For example, given a {@code resourceURL}
+ * of {@code "file:/data/assets"} and a {@code uriPath} of {@code "/js"}, an {@code AssetServlet} would serve the
+ * contents of {@code /data/assets/example.js} in response to a request for {@code /js/example.js}. If a directory
+ * is requested and {@code indexFile} is defined, then {@code AssetServlet} will attempt to serve a file with that
+ * name in that directory. If a directory is requested and {@code indexFile} is null, it will serve a 404.
+ *
+ * @param resourcePath the base URL from which assets are loaded
+ * @param spec specification for the underlying cache
+ * @param uriPath the URI path fragment in which all requests are rooted
+ * @param indexFile the filename to use when directories are requested, or null to serve no indexes
+ * @param overrides the path overrides
+ * @see CacheBuilderSpec
+ */
+ public AssetServlet(String resourcePath, CacheBuilderSpec spec, String uriPath, String indexFile,
+ Iterable<Map.Entry<String, String>> overrides) {
+ AssetLoader loader = new AssetLoader(resourcePath, uriPath, indexFile, overrides);
+ this.cache = CacheBuilder.from(spec).weigher(new AssetSizeWeigher()).build(loader);
+ this.mimeTypes = new MimeTypes();
+ }
+
+ /**
+ * Creates a new {@code AssetServlet}. This is provided for backwards-compatibility; see
+ * {@link AssetServlet(URL, CacheBuilderSpec, String, String)} for details.
+ *
+ * @param resourcePath the base URL from which assets are loaded
+ * @param spec specification for the underlying cache
+ * @param uriPath the URI path fragment in which all requests are rooted
+ */
+ public AssetServlet(String resourcePath, CacheBuilderSpec spec, String uriPath,
+ Iterable<Map.Entry<String, String>> overrides) {
+ this(resourcePath, spec, uriPath, DEFAULT_INDEX_FILE, overrides);
+ }
+
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ try {
+ Asset asset = cache.getUnchecked(req.getRequestURI());
+ if (asset == null) {
+ resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+ return;
+ }
+
+ // Check the etag...
+ if (asset.getETag().equals(req.getHeader(HttpHeaders.IF_NONE_MATCH))) {
+ resp.sendError(HttpServletResponse.SC_NOT_MODIFIED);
+ return;
+ }
+
+ // Check the last modified time...
+ if (asset.getLastModifiedTime() <= req.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE)) {
+ resp.sendError(HttpServletResponse.SC_NOT_MODIFIED);
+ return;
+ }
+
+ resp.setDateHeader(HttpHeaders.LAST_MODIFIED, asset.getLastModifiedTime());
+ resp.setHeader(HttpHeaders.ETAG, asset.getETag());
+
+ Buffer mimeType = mimeTypes.getMimeByExtension(req.getRequestURI());
+ if (mimeType == null) {
+ resp.setContentType(DEFAULT_MIME_TYPE);
+ } else {
+ resp.setContentType(mimeType.toString());
+ }
+
+ ServletOutputStream output = resp.getOutputStream();
+ try {
+ output.write(asset.getResource());
+ } finally {
+ output.close();
+ }
+ } catch (RuntimeException ignored) {
+ resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+ }
+ }
+
+ private static class AssetLoader extends CacheLoader<String, Asset> {
+ private final String resourcePath;
+ private final String uriPath;
+ private final String indexFilename;
+ private final Iterable<Map.Entry<String, String>> overrides;
+
+ private AssetLoader(String resourcePath, String uriPath, String indexFilename, Iterable<Map.Entry<String, String>> overrides) {
+ final String trimmedPath = CharMatcher.is('/').trimFrom(resourcePath);
+ this.resourcePath = trimmedPath.isEmpty() ? trimmedPath : trimmedPath + "/";
+ final String trimmedUri = CharMatcher.is('/').trimTrailingFrom(uriPath);
+ this.uriPath = trimmedUri.length() == 0 ? "/" : trimmedUri;
+ this.indexFilename = indexFilename;
+ this.overrides = overrides;
+ }
+
+ @Override
+ public Asset load(String key) throws Exception {
+ Preconditions.checkArgument(key.startsWith(uriPath));
+
+ Asset asset = loadOverride(key);
+ if (asset != null) {
+ return asset;
+ }
+
+ final String requestedResourcePath = CharMatcher.is('/').trimFrom(key.substring(uriPath.length()));
+ final String absoluteRequestedResourcePath = CharMatcher.is('/').trimFrom(
+ this.resourcePath + requestedResourcePath);
+
+ URL requestedResourceURL = Resources.getResource(absoluteRequestedResourcePath);
+
+ if (ResourceURL.isDirectory(requestedResourceURL)) {
+ if (indexFilename != null) {
+ requestedResourceURL = Resources.getResource(absoluteRequestedResourcePath + '/' + indexFilename);
+ } else {
+ // directory requested but no index file defined
+ return null;
+ }
+ }
+
+ long lastModified = ResourceURL.getLastModified(requestedResourceURL);
+ if (lastModified < 1) {
+ // Something went wrong trying to get the last modified time: just use the current time
+ lastModified = System.currentTimeMillis();
+ }
+
+ // zero out the millis since the date we get back from If-Modified-Since will not have them
+ lastModified = (lastModified / 1000) * 1000;
+ return new StaticAsset(Resources.toByteArray(requestedResourceURL), lastModified);
+ }
+
+ private Asset loadOverride(String key) throws Exception {
+ // TODO: Support prefix matches only for directories
+ for (Map.Entry<String, String> override : overrides) {
+ File file = null;
+ if (override.getKey().equals(key)) {
+ // We have an exact match
+ file = new File(override.getValue());
+ } else if (key.startsWith(override.getKey())) {
+ // This resource is in a mapped subdirectory
+ file = new File(override.getValue(), key.substring(override.getKey().length()));
+ }
+
+ if (file == null || !file.exists()) {
+ continue;
+ }
+
+ if (file.isDirectory()) {
+ file = new File(file, indexFilename);
+ }
+
+ if (file.exists()) {
+ return new FileSystemAsset(file);
+ }
+ }
+
+ return null;
+ }
+ }
+
+ private static interface Asset {
+ byte[] getResource();
+ String getETag();
+ long getLastModifiedTime();
+ }
+
+ /** Weigh an asset according to the number of bytes it contains. */
+ private static final class AssetSizeWeigher implements Weigher<String, Asset> {
+ @Override
+ public int weigh(String key, Asset asset) {
+ return asset.getResource().length;
+ }
+ }
+
+ /**
+ * An asset implementation backed by the file-system. If the backing file changes on disk, then this asset
+ * will automatically reload its contents from disk.
+ */
+ private static class FileSystemAsset implements Asset {
+ private final File file;
+ private byte[] bytes;
+ private String eTag;
+ private long lastModifiedTime;
+
+ public FileSystemAsset(File file) {
+ this.file = file;
+ refresh();
+ }
+
+ @Override
+ public byte[] getResource() {
+ maybeRefresh();
+ return bytes;
+ }
+
+ @Override
+ public String getETag() {
+ maybeRefresh();
+ return eTag;
+ }
+
+ @Override
+ public long getLastModifiedTime() {
+ maybeRefresh();
+ return (lastModifiedTime / 1000) * 1000;
+ }
+
+ private synchronized void maybeRefresh() {
+ if (lastModifiedTime != file.lastModified()) {
+ refresh();
+ }
+ }
+
+ private synchronized void refresh() {
+ try {
+ byte[] newBytes = Files.toByteArray(file);
+ String newETag = Hashing.murmur3_128().hashBytes(newBytes).toString();
+
+ bytes = newBytes;
+ eTag = '"' + newETag + '"';
+ lastModifiedTime = file.lastModified();
+ } catch (IOException e) {
+ // Ignored, don't update anything
+ }
+ }
+ }
+
+ /**
+ * A static asset implementation. This implementation just encapsulates the raw bytes of an asset (presumably
+ * loaded from the classpath) and will never change.
+ */
+ private static class StaticAsset implements Asset {
+ private final byte[] resource;
+ private final String eTag;
+ private final long lastModifiedTime;
+
+ private StaticAsset(byte[] resource, long lastModifiedTime) {
+ this.resource = resource;
+ this.eTag = Hashing.murmur3_128().hashBytes(resource).toString();
+ this.lastModifiedTime = lastModifiedTime;
+ }
+
+ public byte[] getResource() {
+ return resource;
+ }
+
+ public String getETag() {
+ return eTag;
+ }
+
+ public long getLastModifiedTime() {
+ return lastModifiedTime;
+ }
+ }
+}
View
3 src/main/resources/assets/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "components"
+}
View
18 src/main/resources/assets/.editorconfig
@@ -0,0 +1,18 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 4
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
View
1 src/main/resources/assets/.gitattributes
@@ -0,0 +1 @@
+* text=auto
View
2 src/main/resources/assets/.gitignore
@@ -0,0 +1,2 @@
+temp
+dist
View
22 src/main/resources/assets/.jshintrc
@@ -0,0 +1,22 @@
+{
+ "node": true,
+ "browser": true,
+ "es5": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 4,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "regexp": true,
+ "undef": true,
+ "unused": true,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true
+}
View
2 src/main/resources/assets/.npmignore
@@ -0,0 +1,2 @@
+intermediate/
+publish/
View
67 src/main/resources/assets/Makefile
@@ -0,0 +1,67 @@
+.SUFFIXES: .js .css
+
+NPM=npm
+JS_VENDOR=app/scripts/vendor/tests
+CSS_VENDOR=app/scripts/styles/vendor/tests
+JS_MODULE=node_modules
+REQUIREJS=app/scripts/require.js
+PARSER_PATH=app/scripts/parsers
+LODASH_OPTIONS_PLUS=random template uniq times object omit range memoize flatten merge compact isNull isUndefined isNumber pluck
+LODASH_OPTIONS_SETTINGS='{interpolate : /{{([\s\S]+?)}}/g}'
+SPACE :=
+SPACE +=
+COMMA :=,
+LODASH_CMD := lodash backbone plus=$(subst $(SPACE),$(COMMA),$(LODASH_OPTIONS_PLUS)) settings=$(LODASH_OPTIONS_SETTINGS)
+
+$(REQUIREJS): $(JS_MODULE)/requirejs/require.js
+ $(NPM) install
+ mkdir -p app/scripts
+ cp -n $(JS_MODULE)/requirejs/require.js app/scripts/require.js
+
+TEST_JS = chai chai-jquery chai-backbone mocha
+TEST_CSS = mocha
+
+JS_SOURCE := $(foreach file,$(TEST_JS),$(JS_MODULE)/$(file)/$(file).js)
+CSS_SOURCE := $(foreach file,$(TEST_JS),$(JS_MODULE)/$(file)/$(file).js)
+JS_DEST := $(foreach file,$(TEST_JS),$(JS_VENDOR)/$(file).js)
+CSS_DEST := $(foreach file,$(TEST_CSS),$(CSS_VENDOR)/$(file).css)
+
+$(JS_VENDOR):
+ mkdir $(JS_VENDOR)
+
+$(CSS_VENDOR):
+ mkdir $(CSS_VENDOR)
+
+$(JS_VENDOR)/%.js: $(JS_VENDOR)
+ cp $(JS_MODULE)/$*/$*.js $@
+
+$(CSS_VENDOR)/%.css: $(CSS_VENDOR)
+ cp $(JS_MODULE)/$*/$*.css $@
+
+$(PARSER_PATH):
+ mkdir $(PARSER_PATH)
+
+grammars/%.pegjs: $(PARSER_PATH)
+ pegjs --cache $@ $(PARSER_PATH)/$*.js
+
+$(PARSER_PATH)/%.js: grammars/%.pegjs
+ ./grammars/amdify.bash $@
+
+peg-clean: $(PARSER_PATH)
+ rm $(PARSER_PATH)/*.js || true
+
+peg: $(PARSER_PATH)/iso8601.js
+
+test: $(JS_DEST) $(CSS_DEST)
+
+app: $(REQUIREJS) volo
+ volo add
+
+all: test app
+
+lodash:
+ ${LODASH_CMD}
+ mv lodash.custom.js app/scripts/vendor/lodash.js
+ rm lodash.custom.min.js
+
+.PHONY: $(REQUIREJS) test app all make_test_dirs peg peg-clean grammars/%.pegjs lodash
View
2 src/main/resources/assets/README.md
@@ -0,0 +1,2 @@
+# Chronos UI
+## The front-end companion to the back-end scheduler.
View
40 src/main/resources/assets/app.build.js
@@ -0,0 +1,40 @@
+({
+ appDir: "./app",
+ baseUrl: "scripts",
+ mainConfigFile: "./app/scripts/main.js",
+ dir: "./build",
+ pragmasOnSave: {
+ excludeTpl: true
+ },
+ excludeShallow: [
+ 'css-builder',
+ 'less-builder',
+ 'lessc-server'
+ ],
+ findNestedDependencies: true,
+ optimize: "closure",
+ closure: {
+ CompilerOptions: {},
+ CompilationLevel: 'SIMPLE_OPTIMIZATIONS',
+ loggingLevel: 'WARNING'
+ },
+ fileExclusionRegExp: /^\.|spec/,
+ modules: [
+ {
+ name: "main",
+ include: [
+ "jquery",
+ "styles"
+ ]
+ },
+ {
+ name: "styles",
+ include: [
+ "fonts"
+ ]
+ },
+ {
+ name: "fonts"
+ }
+ ]
+})
View
1 src/main/resources/assets/app/.buildignore
@@ -0,0 +1 @@
+*.coffee
View
553 src/main/resources/assets/app/.htaccess
@@ -0,0 +1,553 @@
+# Apache configuration file
+# httpd.apache.org/docs/2.2/mod/quickreference.html
+
+# Note .htaccess files are an overhead, this logic should be in your Apache
+# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
+
+# Techniques in here adapted from all over, including:
+# Kroc Camen: camendesign.com/.htaccess
+# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
+# Sample .htaccess file of CMS MODx: modxcms.com
+
+
+# ----------------------------------------------------------------------
+# Better website experience for IE users
+# ----------------------------------------------------------------------
+
+# Force the latest IE version, in various cases when it may fall back to IE7 mode
+# github.com/rails/rails/commit/123eb25#commitcomment-118920
+# Use ChromeFrame if it's installed for a better experience for the poor IE folk
+
+<IfModule mod_headers.c>
+ Header set X-UA-Compatible "IE=Edge,chrome=1"
+ # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
+ <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
+ Header unset X-UA-Compatible
+ </FilesMatch>
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Cross-domain AJAX requests
+# ----------------------------------------------------------------------
+
+# Serve cross-domain Ajax requests, disabled by default.
+# enable-cors.org
+# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
+
+# <IfModule mod_headers.c>
+# Header set Access-Control-Allow-Origin "*"
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# CORS-enabled images (@crossorigin)
+# ----------------------------------------------------------------------
+
+# Send CORS headers if browsers request them; enabled by default for images.
+# developer.mozilla.org/en/CORS_Enabled_Image
+# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
+# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
+# wiki.mozilla.org/Security/Reviews/crossoriginAttribute
+
+<IfModule mod_setenvif.c>
+ <IfModule mod_headers.c>
+ # mod_headers, y u no match by Content-Type?!
+ <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
+ SetEnvIf Origin ":" IS_CORS
+ Header set Access-Control-Allow-Origin "*" env=IS_CORS
+ </FilesMatch>
+ </IfModule>
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Webfont access
+# ----------------------------------------------------------------------
+
+# Allow access from all domains for webfonts.
+# Alternatively you could only whitelist your
+# subdomains like "subdomain.example.com".
+
+<IfModule mod_headers.c>
+ <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
+ Header set Access-Control-Allow-Origin "*"
+ </FilesMatch>
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Proper MIME type for all files
+# ----------------------------------------------------------------------
+
+# JavaScript
+# Normalize to standard type (it's sniffed in IE anyways)
+# tools.ietf.org/html/rfc4329#section-7.2
+AddType application/javascript js jsonp
+AddType application/json json
+
+# Audio
+AddType audio/ogg oga ogg
+AddType audio/mp4 m4a f4a f4b
+
+# Video
+AddType video/ogg ogv
+AddType video/mp4 mp4 m4v f4v f4p
+AddType video/webm webm
+AddType video/x-flv flv
+
+# SVG
+# Required for svg webfonts on iPad
+# twitter.com/FontSquirrel/status/14855840545
+AddType image/svg+xml svg svgz
+AddEncoding gzip svgz
+
+# Webfonts
+AddType application/vnd.ms-fontobject eot
+AddType application/x-font-ttf ttf ttc
+AddType font/opentype otf
+AddType application/x-font-woff woff
+
+# Assorted types
+AddType image/x-icon ico
+AddType image/webp webp
+AddType text/cache-manifest appcache manifest
+AddType text/x-component htc
+AddType application/xml rss atom xml rdf
+AddType application/x-chrome-extension crx
+AddType application/x-opera-extension oex
+AddType application/x-xpinstall xpi
+AddType application/octet-stream safariextz
+AddType application/x-web-app-manifest+json webapp
+AddType text/x-vcard vcf
+AddType application/x-shockwave-flash swf
+AddType text/vtt vtt
+
+
+# ----------------------------------------------------------------------
+# Allow concatenation from within specific js and css files
+# ----------------------------------------------------------------------
+
+# e.g. Inside of script.combined.js you could have
+# <!--#include file="libs/jquery-1.5.0.min.js" -->
+# <!--#include file="plugins/jquery.idletimer.js" -->
+# and they would be included into this single file.
+
+# This is not in use in the boilerplate as it stands. You may
+# choose to use this technique if you do not have a build process.
+
+#<FilesMatch "\.combined\.js$">
+# Options +Includes
+# AddOutputFilterByType INCLUDES application/javascript application/json
+# SetOutputFilter INCLUDES
+#</FilesMatch>
+
+#<FilesMatch "\.combined\.css$">
+# Options +Includes
+# AddOutputFilterByType INCLUDES text/css
+# SetOutputFilter INCLUDES
+#</FilesMatch>
+
+
+# ----------------------------------------------------------------------
+# Gzip compression
+# ----------------------------------------------------------------------
+
+<IfModule mod_deflate.c>
+
+ # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
+ <IfModule mod_setenvif.c>
+ <IfModule mod_headers.c>
+ SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
+ RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
+ </IfModule>
+ </IfModule>
+
+ # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
+ <IfModule filter_module>
+ FilterDeclare COMPRESS
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
+ FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
+ FilterChain COMPRESS
+ FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
+ </IfModule>
+
+ <IfModule !mod_filter.c>
+ # Legacy versions of Apache
+ AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
+ AddOutputFilterByType DEFLATE application/javascript
+ AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
+ AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
+ AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
+ </IfModule>
+
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Expires headers (for better cache control)
+# ----------------------------------------------------------------------
+
+# These are pretty far-future expires headers.
+# They assume you control versioning with filename-based cache busting
+# Additionally, consider that outdated proxies may miscache
+# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
+
+# If you don't use filenames to version, lower the CSS and JS to something like
+# "access plus 1 week".
+
+<IfModule mod_expires.c>
+ ExpiresActive on
+
+# Perhaps better to whitelist expires rules? Perhaps.
+ ExpiresDefault "access plus 1 month"
+
+# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
+
+# Your document html
+ ExpiresByType text/html "access plus 0 seconds"
+
+# Data
+ ExpiresByType text/xml "access plus 0 seconds"
+ ExpiresByType application/xml "access plus 0 seconds"
+ ExpiresByType application/json "access plus 0 seconds"
+
+# Feed
+ ExpiresByType application/rss+xml "access plus 1 hour"
+ ExpiresByType application/atom+xml "access plus 1 hour"
+
+# Favicon (cannot be renamed)
+ ExpiresByType image/x-icon "access plus 1 week"
+
+# Media: images, video, audio
+ ExpiresByType image/gif "access plus 1 month"
+ ExpiresByType image/png "access plus 1 month"
+ ExpiresByType image/jpeg "access plus 1 month"
+ ExpiresByType video/ogg "access plus 1 month"
+ ExpiresByType audio/ogg "access plus 1 month"
+ ExpiresByType video/mp4 "access plus 1 month"
+ ExpiresByType video/webm "access plus 1 month"
+
+# HTC files (css3pie)
+ ExpiresByType text/x-component "access plus 1 month"
+
+# Webfonts
+ ExpiresByType application/x-font-ttf "access plus 1 month"
+ ExpiresByType font/opentype "access plus 1 month"
+ ExpiresByType application/x-font-woff "access plus 1 month"
+ ExpiresByType image/svg+xml "access plus 1 month"
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
+
+# CSS and JavaScript
+ ExpiresByType text/css "access plus 1 year"
+ ExpiresByType application/javascript "access plus 1 year"
+
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Prevent mobile network providers from modifying your site
+# ----------------------------------------------------------------------
+
+# The following header prevents modification of your code over 3G on some
+# European providers.
+# This is the official 'bypass' suggested by O2 in the UK.
+
+# <IfModule mod_headers.c>
+# Header set Cache-Control "no-transform"
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# ETag removal
+# ----------------------------------------------------------------------
+
+# FileETag None is not enough for every server.
+<IfModule mod_headers.c>
+ Header unset ETag
+</IfModule>
+
+# Since we're sending far-future expires, we don't need ETags for
+# static content.
+# developer.yahoo.com/performance/rules.html#etags
+FileETag None
+
+
+# ----------------------------------------------------------------------
+# Stop screen flicker in IE on CSS rollovers
+# ----------------------------------------------------------------------
+
+# The following directives stop screen flicker in IE on CSS rollovers - in
+# combination with the "ExpiresByType" rules for images (see above).
+
+# BrowserMatch "MSIE" brokenvary=1
+# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
+# BrowserMatch "Opera" !brokenvary
+# SetEnvIf brokenvary 1 force-no-vary
+
+
+# ----------------------------------------------------------------------
+# Set Keep-Alive Header
+# ----------------------------------------------------------------------
+
+# Keep-Alive allows the server to send multiple requests through one
+# TCP-connection. Be aware of possible disadvantages of this setting. Turn on
+# if you serve a lot of static content.
+
+# <IfModule mod_headers.c>
+# Header set Connection Keep-Alive
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# Cookie setting from iframes
+# ----------------------------------------------------------------------
+
+# Allow cookies to be set from iframes (for IE only)
+# If needed, specify a path or regex in the Location directive.
+
+# <IfModule mod_headers.c>
+# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# Start rewrite engine
+# ----------------------------------------------------------------------
+
+# Turning on the rewrite engine is necessary for the following rules and
+# features. FollowSymLinks must be enabled for this to work.
+
+# Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN
+# If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where
+# 'foo' is your directory.
+
+# If your web host doesn't allow the FollowSymlinks option, you may need to
+# comment it out and use `Options +SymLinksOfOwnerMatch`, but be aware of the
+# performance impact: http://goo.gl/Mluzd
+
+<IfModule mod_rewrite.c>
+ Options +FollowSymlinks
+# Options +SymLinksIfOwnerMatch
+ Options +FollowSymlinks
+ RewriteEngine On
+# RewriteBase /
+</IfModule>
+
+
+# ----------------------------------------------------------------------
+# Suppress or force the "www." at the beginning of URLs
+# ----------------------------------------------------------------------
+
+# The same content should never be available under two different URLs -
+# especially not with and without "www." at the beginning, since this can cause
+# SEO problems (duplicate content). That's why you should choose one of the
+# alternatives and redirect the other one.
+
+# By default option 1 (no "www.") is activated.
+# no-www.org/faq.php?q=class_b
+
+# If you'd prefer to use option 2, just comment out all option 1 lines
+# and uncomment option 2.
+
+# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
+
+# ----------------------------------------------------------------------
+
+# Option 1:
+# Rewrite "www.example.com -> example.com".
+
+<IfModule mod_rewrite.c>
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+ RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
+</IfModule>
+
+# ----------------------------------------------------------------------
+
+# Option 2:
+# Rewrite "example.com -> www.example.com".
+# Be aware that the following rule might not be a good idea if you use "real"
+# subdomains for certain parts of your website.
+
+# <IfModule mod_rewrite.c>
+# RewriteCond %{HTTPS} !=on
+# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
+# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# Built-in filename-based cache busting
+# ----------------------------------------------------------------------
+
+# If you're not using the build script to manage your filename version revving,
+# you might want to consider enabling this, which will route requests for
+# /css/style.20110203.css to /css/style.css
+
+# To understand why this is important and a better idea than all.css?v1231,
+# read: github.com/h5bp/html5-boilerplate/wiki/cachebusting
+
+# <IfModule mod_rewrite.c>
+# RewriteCond %{REQUEST_FILENAME} !-f
+# RewriteCond %{REQUEST_FILENAME} !-d
+# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# Prevent SSL cert warnings
+# ----------------------------------------------------------------------
+
+# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
+# https://www.example.com when your cert only allows https://secure.example.com
+
+# <IfModule mod_rewrite.c>
+# RewriteCond %{SERVER_PORT} !^443
+# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
+# </IfModule>
+
+
+# ----------------------------------------------------------------------
+# Prevent 404 errors for non-existing redirected folders
+# ----------------------------------------------------------------------
+
+# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the
+# same name does not exist.
+# webmasterworld.com/apache/3808792.htm
+
+Options -MultiViews
+
+
+# ----------------------------------------------------------------------
+# Custom 404 page
+# ----------------------------------------------------------------------
+
+# You can add custom pages to handle 500 or 403 pretty easily, if you like.
+# If you are hosting your site in subdirectory, adjust this accordingly
+# e.g. ErrorDocument 404 /subdir/404.html
+ErrorDocument 404 /404.html
+
+
+# ----------------------------------------------------------------------
+# UTF-8 encoding
+# ----------------------------------------------------------------------
+
+# Use UTF-8 encoding for anything served text/plain or text/html
+AddDefaultCharset utf-8
+
+# Force UTF-8 for a number of file formats
+AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
+
+
+# ----------------------------------------------------------------------
+# A little more security
+# ----------------------------------------------------------------------
+
+# To avoid displaying the exact version number of Apache being used, add the
+# following to httpd.conf (it will not work in .htaccess):
+# ServerTokens Prod
+
+# "-Indexes" will have Apache block users from browsing folders without a
+# default document Usually you should leave this activated, because you
+# shouldn't allow everybody to surf through every folder on your server (which
+# includes rather private places like CMS system folders).
+<IfModule mod_autoindex.c>
+ Options -Indexes
+</IfModule>
+
+# Block access to "hidden" directories or files whose names begin with a
+# period. This includes directories used by version control systems such as
+# Subversion or Git.
+<IfModule mod_rewrite.c>
+ RewriteCond %{SCRIPT_FILENAME} -d [OR]
+ RewriteCond %{SCRIPT_FILENAME} -f
+ RewriteRule "(^|/)\." - [F]
+</IfModule>
+
+# Block access to backup and source files. These files may be left by some
+# text/html editors and pose a great security danger, when anyone can access
+# them.
+<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
+ Order allow,deny
+ Deny from all
+ Satisfy All
+</FilesMatch>
+
+# If your server is not already configured as such, the following directive
+# should be uncommented in order to set PHP's register_globals option to OFF.
+# This closes a major security hole that is abused by most XSS (cross-site
+# scripting) attacks. For more information: http://php.net/register_globals
+#
+# IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS:
+#
+# Your server does not allow PHP directives to be set via .htaccess. In that
+# case you must make this change in your php.ini file instead. If you are
+# using a commercial web host, contact the administrators for assistance in
+# doing this. Not all servers allow local php.ini files, and they should
+# include all PHP configurations (not just this one), or you will effectively
+# reset everything to PHP defaults. Consult www.php.net for more detailed
+# information about setting PHP directives.
+
+# php_flag register_globals Off
+
+# Rename session cookie to something else, than PHPSESSID
+# php_value session.name sid
+
+# Disable magic quotes (This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.)
+# php_flag magic_quotes_gpc Off
+
+# Do not show you are using PHP
+# Note: Move this line to php.ini since it won't work in .htaccess
+# php_flag expose_php Off
+
+# Level of log detail - log all errors
+# php_value error_reporting -1
+
+# Write errors to log file
+# php_flag log_errors On
+
+# Do not display errors in browser (production - Off, development - On)
+# php_flag display_errors Off
+
+# Do not display startup errors (production - Off, development - On)
+# php_flag display_startup_errors Off
+
+# Format errors in plain text
+# Note: Leave this setting 'On' for xdebug's var_dump() output
+# php_flag html_errors Off
+
+# Show multiple occurrence of error
+# php_flag ignore_repeated_errors Off
+
+# Show same errors from different sources
+# php_flag ignore_repeated_source Off
+
+# Size limit for error messages
+# php_value log_errors_max_len 1024
+
+# Don't precede error with string (doesn't accept empty string, use whitespace if you need)
+# php_value error_prepend_string " "
+
+# Don't prepend to error (doesn't accept empty string, use whitespace if you need)
+# php_value error_append_string " "
+
+# Increase cookie security
+<IfModule php5_module>
+ php_value session.cookie_httponly true
+</IfModule>
View
157 src/main/resources/assets/app/404.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Page Not Found :(</title>
+ <style>
+ ::-moz-selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ ::selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ html {
+ padding: 30px 10px;
+ font-size: 20px;
+ line-height: 1.4;
+ color: #737373;
+ background: #f0f0f0;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ }
+
+ html,
+ input {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ }
+
+ body {
+ max-width: 500px;
+ _width: 500px;
+ padding: 30px 20px 50px;
+ border: 1px solid #b3b3b3;
+ border-radius: 4px;
+ margin: 0 auto;
+ box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
+ background: #fcfcfc;
+ }
+
+ h1 {
+ margin: 0 10px;
+ font-size: 50px;
+ text-align: center;
+ }
+
+ h1 span {
+ color: #bbb;
+ }
+
+ h3 {
+ margin: 1.5em 0 0.5em;
+ }
+
+ p {
+ margin: 1em 0;
+ }
+
+ ul {
+ padding: 0 0 0 40px;
+ margin: 1em 0;
+ }
+
+ .container {
+ max-width: 380px;
+ _width: 380px;
+ margin: 0 auto;
+ }
+
+ /* google search */
+
+ #goog-fixurl ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ }
+
+ #goog-fixurl form {
+ margin: 0;
+ }
+
+ #goog-wm-qt,
+ #goog-wm-sb {
+ border: 1px solid #bbb;
+ font-size: 16px;
+ line-height: normal;
+ vertical-align: top;
+ color: #444;
+ border-radius: 2px;
+ }
+
+ #goog-wm-qt {
+ width: 220px;
+ height: 20px;
+ padding: 5px;
+ margin: 5px 10px 0 0;
+ box-shadow: inset 0 1px 1px #ccc;
+ }
+
+ #goog-wm-sb {
+ display: inline-block;
+ height: 32px;
+ padding: 0 10px;
+ margin: 5px 0 0;
+ white-space: nowrap;
+ cursor: pointer;
+ background-color: #f5f5f5;
+ background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ *overflow: visible;
+ *display: inline;
+ *zoom: 1;
+ }
+
+ #goog-wm-sb:hover,
+ #goog-wm-sb:focus {
+ border-color: #aaa;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ background-color: #f8f8f8;
+ }
+
+ #goog-wm-qt:hover,
+ #goog-wm-qt:focus {
+ border-color: #105cb6;
+ outline: 0;
+ color: #222;
+ }
+
+ input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <h1>Not found <span>:(</span></h1>
+ <p>Sorry, but the page you were trying to view does not exist.</p>
+ <p>It looks like this was the result of either:</p>
+ <ul>
+ <li>a mistyped address</li>
+ <li>an out-of-date link</li>
+ </ul>
+ <script>
+ var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
+ </script>
+ <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
+ </div>
+ </body>
+</html>
View
BIN src/main/resources/assets/app/favicon.ico
Binary file not shown.
View
BIN src/main/resources/assets/app/images/blurry-background.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/blurry-background2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/blurry-background3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/glyphicons-halflings-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/select2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/select2x2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/main/resources/assets/app/images/spinner.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
71 src/main/resources/assets/app/index.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
+ <head>
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
+ <title>Chronos</title>
+ <meta name="description" content=""/>
+ <meta name="viewport" content="width=device-width"/>
+ </head>
+
+ <body class="chronos">
+ <div class="chronos-wrapper blue">
+ <div class="app row-fluid">
+
+
+ <div class="span2 menu">
+ <a class="brand" href="/">
+ <h1 id="logo">Chronos</h1>
+ </a>
+
+ <div class="search-wrapper width">
+ <form id="search-form">
+ <i class="icon-search"></i>
+ <input type="text" class="span12" id="search-filter" placeholder="Search" />
+ </form>
+ </div>
+
+ <ul class="nav nav-list width stat-menu">
+ <li class="no-select total-jobs">
+ <div class="stat-count all-jobs-count">0</div>
+ <div class="stat-label">Total Jobs</div>
+ </li>
+
+ <li class="no-select total-jobs">
+ <div class="stat-count failed-jobs-count">0</div>
+ <div class="stat-label">Failed Jobs</div>
+ </li>
+ </ul>
+
+ <div>
+ <button class="btn width clear-btn pull-right view-graph">
+ <i class="icon-retweet"></i> Dependency Graph
+ </button>
+ <button class="btn width clear-btn pull-right new-job">✚ New Job</button>
+ </div>
+ </div>
+
+
+ <div class="span5 results">
+ <div class="row-fluid results-header no-select"></div>
+
+ <div class="row-fluid">
+ <ul class="joblist"></ul>
+ </div>
+ </div>
+
+ <div class="span5 right-pane"></div>
+
+ </div>
+ </div>
+
+ <!--[if lt IE 7]>
+ <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
+ <![endif]-->
+
+ <script data-main="scripts/main.js" src="scripts/require.js"></script>
+ </body>
+</html>
View
3 src/main/resources/assets/app/robots.txt
@@ -0,0 +1,3 @@
+# robotstxt.org/
+
+User-agent: *
View
16 src/main/resources/assets/app/scripts/collections/application.js
@@ -0,0 +1,16 @@
+/**
+ * Application Collection
+ *
+ */
+define([
+ 'backbone', 'models/application'
+ ], function(Backbone, ApplicationModel) {
+
+ var ApplicationCollection;
+
+ ApplicationCollection = Backbone.Collection.extend({
+ model: ApplicationModel
+ });
+
+ return ApplicationCollection;
+});
View
89 src/main/resources/assets/app/scripts/collections/details.js
@@ -0,0 +1,89 @@
+/**
+ * Details Collection
+ *
+ */
+define([
+ 'jquery',
+ 'backbone',
+ 'underscore',
+ 'collections/base_jobs',
+ 'components/functor'
+], function($,
+ Backbone,
+ _,
+ JobsCollection,
+ Functor) {
+
+ var DetailsCollection;
+
+ var slice = Array.prototype.slice;
+
+ DetailsCollection = JobsCollection.extend({
+
+ initialize: function() {
+ this.listenTo(this, {
+ add: this.serialize,
+ remove: this.serialize
+ });
+ },
+
+ deserialize: function(path) {
+ var modelNames = _.uniq(path.split('/')),
+ collection = this,
+ modelNamesMap,
+ models,
+ untrackedModels,
+ name;
+
+ modelNamesMap = _.object(modelNames,
+ _.times(modelNames.length, Functor(true)));
+
+ models = app.jobsCollection.filter(function(job) {
+ if (!!(name = job.get('name'))) { return !!modelNamesMap[name]; }
+ return false;
+ });
+
+ untrackedModels = _.filter(models, function(model) {
+ var name = model.get('name'),
+ other = collection.where({name: name});
+
+ return !(!name || !!other.length);
+ });
+
+ this.add(untrackedModels);
+ },
+
+ serialize: function(model, collection, options) {
+ var base = ['jobs'],
+ isFake = options && options.create,
+ names,
+ path;
+
+ if (isFake || model.isNew()) {
+ return false;
+ }
+
+ if (this.length) {
+ names = _.chain(this.where({persisted: true})).map(function(job) {
+ return job.get('name');
+ }).reject(function(name) {
+ return name === '-';
+ }).value();
+ path = base.concat(names).join('/');
+ } else {
+ path = '/'
+ }
+
+ console.log('details serialize', path);
+
+ // TODO: hack to fix jobs/:jobName////////////// infinite redirect
+ if (path.slice(-1) == '-') {
+ return false;
+ }
+
+ app.router.navigate(path, {trigger: true});
+ }
+ });
+
+ return DetailsCollection;
+})
View
321 src/main/resources/assets/app/scripts/collections/job_graph.js
@@ -0,0 +1,321 @@
+/**
+ * Job Graph Collection
+ *
+ */
+define([
+ 'jquery',
+ 'backbone',
+ 'underscore',
+ 'components/pollable_collection'
+], function($,
+ Backbone,
+ _,
+ Pollable) {
+
+ var Sync = Backbone.sync,
+ CSVModel,
+ JobNodeModel,
+ JobPathModel,
+ JobGraph,
+ csvKeys,
+ Sync;
+
+ csvKeys = {
+ node: ['type', 'name', 'lastRunStatus'],
+ link: ['type', 'source', 'target']
+ };
+
+ CSVModel = Backbone.Model.extend({
+ });
+
+ JobNodeModel = CSVModel.extend({
+ idAttribute: 'name',
+
+ lastRunWasFailure: function() {
+ return (this.get('lastRunStatus') === 'failure');
+ },
+
+ getLastRunDate: function() {
+ return this.get((this.lastRunWasFailure() ? 'lastError' : 'lastSuccess'));
+ },
+
+ getChildren: function() {
+ if (this.sources && this.targets) {
+ return this.sources.concat(this.targets);
+ } else {
+ return [];
+ }
+ },
+
+ getRelatedAsTree: function(seen) {
+ var n = this.toJSON(),
+ children = this.getChildren(),
+ unseenChildren;
+
+ seen || (seen = [this]);
+
+ unseenChildren = _.filter(children, function(child) {
+ return !_.any(seen, function(seenChild) {
+ return seenChild.get('name') === child.get('name');
+ });
+ });
+
+ n.children = _.map(unseenChildren, function(child) {
+ return child.getRelatedAsTree(children.concat(seen));
+ });
+
+ return n;
+ },
+
+ getRelated: function(seen) {
+ seen || (seen = []);
+ var children = this.getChildren(),
+ unseenChildren, nextGen;
+
+ unseenChildren = _.filter(children, function(child) {
+ return !_.any(seen, function(seenChild) {
+ return seenChild.get('name') === child.get('name');
+ });
+ });
+
+ nextGen = _.map(unseenChildren, function(c) {
+ return c.getRelated(children.concat(seen));
+ });
+
+ return _.flatten(children.concat(nextGen));
+ }
+ });
+
+ JobPathModel = CSVModel.extend({});
+
+ JobGraph = Backbone.Collection.extend(_.extend({}, Pollable, {
+ url: '/scheduler/graph/csv',
+ //url: '/stubs/graph.csv',
+
+ parse: function(response, options) {
+ var rows = _.compact(response.split('\n'));
+ return _.map(rows, function(_row) {
+ var row = _row.split(',');
+ return _.object(csvKeys[row[0]], row);
+ });
+ },
+
+ sync: function(method, model, options) {
+ return Sync.call(this, method, model, _.extend({}, options, {
+ dataType: 'text'
+ }));
+ },
+
+ model: function(attributes, options) {
+ var model = (attributes.type === 'link') ? JobPathModel : JobNodeModel;
+
+ return new model(attributes, options);
+ },
+
+ initialize: function(attrs, options) {
+ this.listenTo(this, {
+ add: this.buildGraph,
+ remove: this.buildGraph,
+ reset: this.buildGraph
+ });
+ },
+
+ buildGraph: function() {
+ var paths = this.where({type: 'link'}),
+ nodes = this.where({type: 'node'}),
+ nodeName,
+ sources,
+ targets;
+
+ _.each(nodes, function(node) {
+ nodeName = node.get('name');
+ sources = [];
+ targets = [];
+
+ _.each(paths, function(path) {
+ if (path.get('target') === nodeName) {
+ sources.push(this.get(path.get('source')));
+ } else if (path.get('source') === nodeName) {
+ targets.push(this.get(path.get('target')));
+ }
+ }, this);
+
+ _.extend(node, {
+ sources: sources,
+ targets: targets
+ });
+ }, this);
+ },
+
+ getPaths: function(scope) {
+ var target, source;
+ scope || (scope = {});
+
+ return _.chain(this.where({type: 'link'})).filter(function(path) {
+ if (scope.parents) {
+ target = path.get('target');
+ source = path.get('source');
+
+ return (scope.parents[target] || scope.parents[source]);
+ } else {
+ return _.isEmpty(scope);
+ }
+ }).value();
+ },
+
+ getNodes: function(scope) {
+ var name;
+ scope || (scope = {});
+
+ return _.chain(this.where({type: 'node'})).filter(function(node) {
+ if (!_.isEmpty(scope)) {
+ return scope[node.get('name')];
+ } else {
+ return true;
+ }
+ }).value();
+ },
+
+ getWithRelatedNodes: function(name) {
+ var node = this.get(name),
+ related2 = node.getRelated(),
+ relations;
+
+ relations = _.reduce(related2, function(memo, relNode) {
+ memo[relNode.get('name')] = true;
+ return memo;
+ }, {});
+
+ relations[name] = true;
+
+ return relations;
+ },
+
+ getPlainNodes: function(options) {
+