`, and ``.
-@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
-@font-family-base: @font-family-sans-serif;
-
-@font-size-base: 15px;
-@font-size-large: ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small: ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1: floor((@font-size-base * 2.6)); // ~36px
-@font-size-h2: floor((@font-size-base * 2.15)); // ~30px
-@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px
-@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px
-@font-size-h5: @font-size-base;
-@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base: 1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family: @font-family-base;
-@headings-font-weight: 400;
-@headings-line-height: 1.1;
-@headings-color: inherit;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path: "../fonts/";
-//** File name for all font files.
-@icon-font-name: "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id: "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical: 10px;
-@padding-base-horizontal: 15px;
-
-@padding-large-vertical: 18px;
-@padding-large-horizontal: 27px;
-
-@padding-small-vertical: 6px;
-@padding-small-horizontal: 9px;
-
-@padding-xs-vertical: 1px;
-@padding-xs-horizontal: 5px;
-
-@line-height-large: 1.3333333; // extra decimals for Win 8.1 Chrome
-@line-height-small: 1.5;
-
-@border-radius-base: 4px;
-@border-radius-large: 6px;
-@border-radius-small: 3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color: #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg: @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base: 4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large: 5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ` `s.
-@table-cell-padding: 8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding: 5px;
-
-//** Default background color used for all tables.
-@table-bg: transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent: #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover: @gray-lighter;
-@table-bg-active: @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color: @gray-lighter;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight: normal;
-
-@btn-default-color: #fff;
-@btn-default-bg: @gray;
-@btn-default-border: @btn-default-bg;
-
-@btn-primary-color: @btn-default-color;
-@btn-primary-bg: @brand-primary;
-@btn-primary-border: @btn-primary-bg;
-
-@btn-success-color: @btn-default-color;
-@btn-success-bg: @brand-success;
-@btn-success-border: @btn-success-bg;
-
-@btn-info-color: @btn-default-color;
-@btn-info-bg: @brand-info;
-@btn-info-border: @btn-info-bg;
-
-@btn-warning-color: @btn-default-color;
-@btn-warning-bg: @brand-warning;
-@btn-warning-border: @btn-warning-bg;
-
-@btn-danger-color: @btn-default-color;
-@btn-danger-bg: @brand-danger;
-@btn-danger-border: @btn-danger-bg;
-
-@btn-link-disabled-color: @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** ` ` background color
-@input-bg: #fff;
-//** ` ` background color
-@input-bg-disabled: @gray-lighter;
-
-//** Text color for ` `s
-@input-color: @text-color;
-//** ` ` border color
-@input-border: #dce4ec;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-// This has no effect on ``s in some browsers, due to the limited stylability of ``s in CSS.
-@input-border-radius: @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large: @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small: @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus: @brand-primary;
-
-//** Placeholder text color
-@input-color-placeholder: #acb6c0;
-
-//** Default `.form-control` height
-@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 4);
-//** Large `.form-control` height
-@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 4);
-//** Small `.form-control` height
-@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 4);
-
-//** `.form-group` margin
-@form-group-margin-bottom: 15px;
-
-@legend-color: @text-color;
-@legend-border-color: transparent;
-
-//** Background color for textual input addons
-@input-group-addon-bg: @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled: not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg: #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border: rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border: #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg: #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color: @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color: #fff;
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg: @component-active-bg;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color: #fff;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg: @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color: @gray-light;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color: @gray-light;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color: #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar: 1000;
-@zindex-dropdown: 1000;
-@zindex-popover: 1060;
-@zindex-tooltip: 1070;
-@zindex-navbar-fixed: 1030;
-@zindex-modal-background: 1040;
-@zindex-modal: 1050;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs: 480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min: @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone: @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm: 768px;
-@screen-sm-min: @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet: @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md: 992px;
-@screen-md-min: @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop: @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg: 1200px;
-@screen-lg-min: @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop: @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max: (@screen-sm-min - 1);
-@screen-sm-max: (@screen-md-min - 1);
-@screen-md-max: (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns: 12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width: 30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint: @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet: (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm: @container-tablet;
-
-// Medium screen / desktop
-@container-desktop: (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md: @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop: (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg: @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height: 60px;
-@navbar-margin-bottom: @line-height-computed;
-@navbar-border-radius: @border-radius-base;
-@navbar-padding-horizontal: floor((@grid-gutter-width / 2));
-@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height: 340px;
-
-@navbar-default-color: #777;
-@navbar-default-bg: @brand-primary;
-@navbar-default-border: transparent;
-
-// Navbar links
-@navbar-default-link-color: #fff;
-@navbar-default-link-hover-color: @brand-success;
-@navbar-default-link-hover-bg: transparent;
-@navbar-default-link-active-color: #fff;
-@navbar-default-link-active-bg: darken(@navbar-default-bg, 10%);
-@navbar-default-link-disabled-color: #ccc;
-@navbar-default-link-disabled-bg: transparent;
-
-// Navbar brand label
-@navbar-default-brand-color: @navbar-default-link-color;
-@navbar-default-brand-hover-color: @navbar-default-link-hover-color;
-@navbar-default-brand-hover-bg: transparent;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg: darken(@navbar-default-bg, 10%);
-@navbar-default-toggle-icon-bar-bg: #fff;
-@navbar-default-toggle-border-color: darken(@navbar-default-bg, 10%);
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color: #fff;
-@navbar-inverse-bg: @brand-success;
-@navbar-inverse-border: transparent;
-
-// Inverted navbar links
-@navbar-inverse-link-color: #fff;
-@navbar-inverse-link-hover-color: @brand-primary;
-@navbar-inverse-link-hover-bg: transparent;
-@navbar-inverse-link-active-color: #fff;
-@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 5%);
-@navbar-inverse-link-disabled-color: #ccc;
-@navbar-inverse-link-disabled-bg: transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color: @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color: @navbar-inverse-link-hover-color;
-@navbar-inverse-brand-hover-bg: transparent;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg: darken(@navbar-inverse-bg, 10%);
-@navbar-inverse-toggle-icon-bar-bg: #fff;
-@navbar-inverse-toggle-border-color: darken(@navbar-inverse-bg, 10%);
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding: 10px 15px;
-@nav-link-hover-bg: @gray-lighter;
-
-@nav-disabled-link-color: @gray-light;
-@nav-disabled-link-hover-color: @gray-light;
-
-//== Tabs
-@nav-tabs-border-color: @gray-lighter;
-
-@nav-tabs-link-hover-border-color: @gray-lighter;
-
-@nav-tabs-active-link-hover-bg: @body-bg;
-@nav-tabs-active-link-hover-color: @brand-primary;
-@nav-tabs-active-link-hover-border-color: @gray-lighter;
-
-@nav-tabs-justified-link-border-color: @gray-lighter;
-@nav-tabs-justified-active-link-border-color: @body-bg;
-
-//== Pills
-@nav-pills-border-radius: @border-radius-base;
-@nav-pills-active-link-hover-bg: @component-active-bg;
-@nav-pills-active-link-hover-color: @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color: #fff;
-@pagination-bg: @brand-success;
-@pagination-border: transparent;
-
-@pagination-hover-color: #fff;
-@pagination-hover-bg: darken(@brand-success, 15%);
-@pagination-hover-border: transparent;
-
-@pagination-active-color: #fff;
-@pagination-active-bg: darken(@brand-success, 15%);
-@pagination-active-border: transparent;
-
-@pagination-disabled-color: @gray-lighter;
-@pagination-disabled-bg: lighten(@brand-success, 15%);
-@pagination-disabled-border: transparent;
-
-
-//== Pager
-//
-//##
-
-@pager-bg: @pagination-bg;
-@pager-border: @pagination-border;
-@pager-border-radius: 15px;
-
-@pager-hover-bg: @pagination-hover-bg;
-
-@pager-active-bg: @pagination-active-bg;
-@pager-active-color: @pagination-active-color;
-
-@pager-disabled-color: #fff;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding: 30px;
-@jumbotron-color: inherit;
-@jumbotron-bg: @gray-lighter;
-@jumbotron-heading-color: inherit;
-@jumbotron-font-size: ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text: #fff;
-@state-success-bg: @brand-success;
-@state-success-border: @brand-success;
-
-@state-info-text: #fff;
-@state-info-bg: @brand-info;
-@state-info-border: @brand-info;
-
-@state-warning-text: #fff;
-@state-warning-bg: @brand-warning;
-@state-warning-border: @brand-warning;
-
-@state-danger-text: #fff;
-@state-danger-bg: @brand-danger;
-@state-danger-border: @brand-danger;
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width: 200px;
-//** Tooltip text color
-@tooltip-color: #fff;
-//** Tooltip background color
-@tooltip-bg: #000;
-@tooltip-opacity: .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width: 5px;
-//** Tooltip arrow color
-@tooltip-arrow-color: @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg: #fff;
-//** Popover maximum width
-@popover-max-width: 276px;
-//** Popover border color
-@popover-border-color: rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color: #ccc;
-
-//** Popover title background color
-@popover-title-bg: darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width: 10px;
-//** Popover arrow color
-@popover-arrow-color: @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width: (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color: fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg: @btn-default-bg;
-//** Primary label background color
-@label-primary-bg: @brand-primary;
-//** Success label background color
-@label-success-bg: @brand-success;
-//** Info label background color
-@label-info-bg: @brand-info;
-//** Warning label background color
-@label-warning-bg: @brand-warning;
-//** Danger label background color
-@label-danger-bg: @brand-danger;
-
-//** Default label text color
-@label-color: #fff;
-//** Default text color of a linked label
-@label-link-hover-color: #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding: 20px;
-
-//** Padding applied to the modal title
-@modal-title-padding: 15px;
-//** Modal title line-height
-@modal-title-line-height: @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg: #fff;
-//** Modal content border color
-@modal-content-border-color: rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color: #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg: #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity: .5;
-//** Modal header border color
-@modal-header-border-color: #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color: @modal-header-border-color;
-
-@modal-lg: 900px;
-@modal-md: 600px;
-@modal-sm: 300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding: 15px;
-@alert-border-radius: @border-radius-base;
-@alert-link-font-weight: bold;
-
-@alert-success-bg: @state-success-bg;
-@alert-success-text: @state-success-text;
-@alert-success-border: @state-success-border;
-
-@alert-info-bg: @state-info-bg;
-@alert-info-text: @state-info-text;
-@alert-info-border: @state-info-border;
-
-@alert-warning-bg: @state-warning-bg;
-@alert-warning-text: @state-warning-text;
-@alert-warning-border: @state-warning-border;
-
-@alert-danger-bg: @state-danger-bg;
-@alert-danger-text: @state-danger-text;
-@alert-danger-border: @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg: @gray-lighter;
-//** Progress bar text color
-@progress-bar-color: #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius: @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg: @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg: @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg: @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg: @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg: @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg: #fff;
-//** `.list-group-item` border color
-@list-group-border: @gray-lighter;
-//** List group border radius
-@list-group-border-radius: @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg: @gray-lighter;
-//** Text color of active list items
-@list-group-active-color: @component-active-color;
-//** Background color of active list items
-@list-group-active-bg: @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border: @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color: lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color: @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg: @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color: #555;
-@list-group-link-hover-color: @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg: #fff;
-@panel-body-padding: 15px;
-@panel-heading-padding: 10px 15px;
-@panel-footer-padding: @panel-heading-padding;
-@panel-border-radius: @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border: @gray-lighter;
-@panel-footer-bg: @gray-lighter;
-
-@panel-default-text: @text-color;
-@panel-default-border: @gray-lighter;
-@panel-default-heading-bg: @gray-lighter;
-
-@panel-primary-text: #fff;
-@panel-primary-border: @brand-primary;
-@panel-primary-heading-bg: @brand-primary;
-
-@panel-success-text: @state-success-text;
-@panel-success-border: @state-success-border;
-@panel-success-heading-bg: @state-success-bg;
-
-@panel-info-text: @state-info-text;
-@panel-info-border: @state-info-border;
-@panel-info-heading-bg: @state-info-bg;
-
-@panel-warning-text: @state-warning-text;
-@panel-warning-border: @state-warning-border;
-@panel-warning-heading-bg: @state-warning-bg;
-
-@panel-danger-text: @state-danger-text;
-@panel-danger-border: @state-danger-border;
-@panel-danger-heading-bg: @state-danger-bg;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding: 4px;
-//** Thumbnail background color
-@thumbnail-bg: @body-bg;
-//** Thumbnail border color
-@thumbnail-border: @gray-lighter;
-//** Thumbnail border radius
-@thumbnail-border-radius: @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color: @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding: 9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg: @gray-lighter;
-@well-border: transparent;
-
-
-//== Badges
-//
-//##
-
-@badge-color: #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color: #fff;
-@badge-bg: @brand-primary;
-
-//** Badge text color in active nav link
-@badge-active-color: @brand-primary;
-//** Badge background color in active nav link
-@badge-active-bg: #fff;
-
-@badge-font-weight: bold;
-@badge-line-height: 1;
-@badge-border-radius: 10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical: 8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg: @gray-lighter;
-//** Breadcrumb text color
-@breadcrumb-color: #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color: @gray;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator: "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color: #fff;
-@carousel-control-width: 15%;
-@carousel-control-opacity: .5;
-@carousel-control-font-size: 20px;
-
-@carousel-indicator-active-bg: #fff;
-@carousel-indicator-border-color: #fff;
-
-@carousel-caption-color: #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight: bold;
-@close-color: #000;
-@close-text-shadow: none;
-
-
-//== Code
-//
-//##
-
-@code-color: #c7254e;
-@code-bg: #f9f2f4;
-
-@kbd-color: #fff;
-@kbd-bg: #333;
-
-@pre-bg: @gray-lighter;
-@pre-color: @gray-dark;
-@pre-border-color: #ccc;
-@pre-scrollable-max-height: 340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted: @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color: @gray-light;
-//** Headings small color
-@headings-small-color: @gray-light;
-//** Blockquote small color
-@blockquote-small-color: @gray-light;
-//** Blockquote font size
-@blockquote-font-size: (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color: @gray-lighter;
-//** Page header border color
-@page-header-border-color: transparent;
-//** Width of horizontal description list titles
-@dl-horizontal-offset: @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border: @gray-lighter;
diff --git a/static/css/sources/common/variables.less b/static/css/sources/common/variables.less
deleted file mode 100644
index 9d6b776..0000000
--- a/static/css/sources/common/variables.less
+++ /dev/null
@@ -1 +0,0 @@
-@font-size-base: 14px;
diff --git a/static/css/sources/components/builds.less b/static/css/sources/components/builds.less
deleted file mode 100644
index 77ba637..0000000
--- a/static/css/sources/components/builds.less
+++ /dev/null
@@ -1,375 +0,0 @@
-.build-view {
- &_info {
- }
- &_terminal {
- margin-top: 20px;
- }
-}
-
-@animation-duration: 1.5s;
-
-.builds {
- &_item {
- &:hover {
- .builds {
- &_buttons {
- opacity: 1;
- }
- }
- }
- }
-
- &_inner {
- background: @well-bg;
- padding: 15px;
- }
-
- &_header {
- .make-xs-column(9);
- }
-
- &_controls {
- .make-xs-column(3);
- .text-right;
- }
-
- &_buttons {
- transition: opacity 0.2s ease;
- opacity: 0;
- }
-
- &_progress {
- .progress {
- height: 18px;
- margin-bottom: 0;
- }
- }
-
- &_status {
- float: left;
- margin-right: 8px;
- }
-
- &_info {
- display: inline-block;
- margin-right: 10px;
- }
-
- &__timeline {
- position: relative;
-
- .builds {
- &_inner {
- border-left: 6px solid darken(@well-bg, 10%);
- }
-
- &_header {
- margin-bottom: 6px;
- font-size: 18px;
- }
-
- &_progress {
- padding: 3px 0;
- }
-
- &_item {
- margin: 4px 0;
- position: relative;
-
- &:after {
- content: '';
- position: absolute;
- border-radius: 50%;
- background: @well-bg;
- left: 0;
- z-index: 1;
- }
-
- &:before {
- content: '';
- position: absolute;
- border: 11px solid transparent;
- top: 25px;
- }
-
- &__in-progress {
- &:after {
- background: @brand-info;
-
- -webkit-animation: pulsate @animation-duration ease-out;
- -webkit-animation-iteration-count: infinite;
- -moz-animation: pulsate @animation-duration ease-out;
- -moz-animation-iteration-count: infinite;
- -o-animation: pulsate @animation-duration ease-out;
- -o-animation-iteration-count: infinite;
- animation: pulsate @animation-duration ease-out;
- animation-iteration-count: infinite;
- }
- }
-
- &__done {
- &:after {
- background: @link-color;
- }
- }
-
- &__error {
- &:after {
- background: @brand-danger;
- }
- }
-
- &__queued {
- &:after {
- background: @brand-primary;
- }
- }
- }
- }
-
- &:after {
- content: '';
- position: absolute;
- top: 0;
- bottom: 0;
- width: 2px;
- margin-left: -1px;
- background: darken(@well-bg, 10%);
- }
-
- &-large {
- .builds {
- &_item {
- padding-left: 40px;
-
- &:after {
- width: 24px;
- height: 24px;
- top: 25px;
- }
-
- &:before {
- left: 20px;
- border-right-color: darken(@well-bg, 10%);
- top: 25px;
- }
- }
- }
-
- &:after {
- left: 12px;
- }
- }
-
- &-small {
- .builds {
- &_item {
- padding-left: 30px;
-
- &:after {
- top: 16px;
- height: 16px;
- width: 16px;
- }
-
- &:before {
- left: 10px;
- border-right-color: darken(@well-bg, 10%);
- top: 13px;
- }
-
- &__current {
- &:before {
- left: 10px;
- border-right-color: @component-active-bg;
- top: 13px;
- }
-
- .builds {
- &_inner {
- border-left: 6px solid @component-active-bg;
- }
- }
-
- }
- }
-
- &_header {
- font-size: 14px;
- .make-xs-column(7);
- margin-bottom: 0;
- }
-
- &_controls {
- .make-xs-column(5);
- font-size: 12px;
- }
-
- &_progress {
- padding: 1px 0;
- }
- }
-
- &:after {
- left: 8px;
- }
- }
- }
-}
-
-@media (min-width: @screen-sm-min) {
- .builds {
- &__timeline {
- &-large {
- .builds {
- &_item {
- padding-left: 0;
- display: inline-block;
- vertical-align: top;
- width: 50%;
- margin: 10px 0;
-
- &:after {
- left: auto;
- }
-
- &:before {
- left: auto;
- border-right-color: transparent;
- }
- }
-
- &_inner {
- border-left: 0;
- }
- }
-
- &:after {
- left: 50%;
- }
- }
-
- &-left {
- .builds {
- &_item {
- &:nth-child(odd) {
- padding-right: 30px;
-
- .builds {
- &_inner {
- border-right: 6px solid darken(@well-bg, 10%);
- }
- }
-
- &:after {
- right: -12px;
- }
-
- &:before {
- right: 10px;
- border-left-color: darken(@well-bg, 10%);
- }
- }
-
- &:nth-child(even) {
- padding-left: 30px;
- top: 50px;
-
- .builds {
- &_inner {
- border-left: 6px solid darken(@well-bg, 10%);
- }
- }
-
- &:after {
- left: -12px;
- }
-
- &:before {
- left: 10px;
- border-right-color: darken(@well-bg, 10%);
- }
- }
- }
- }
- }
-
- &-right {
- .builds {
- &_item {
- &:first-child {
- margin-left: 50%;
- }
-
- &:nth-child(even) {
- padding-right: 30px;
- top: -50px;
-
- .builds {
- &_inner {
- border-right: 6px solid darken(@well-bg, 10%);
- }
- }
-
- &:after {
- right: -12px;
- }
-
- &:before {
- right: 10px;
- border-left-color: darken(@well-bg, 10%);
- }
- }
-
- &:nth-child(odd) {
- padding-left: 30px;
-
- .builds {
- &_inner {
- border-left: 6px solid darken(@well-bg, 10%);
- }
- }
-
- &:after {
- left: -12px;
- }
-
- &:before {
- left: 10px;
- border-right-color: darken(@well-bg, 10%);
- }
- }
- }
- }
- }
- }
- }
-}
-
-.pulsate-frames() {
- .transform(@scaleX, @scaleY) {
- -webkit-transform: scale3d(@scaleX, @scaleY, 1);
- -moz-transform: scale3d(@scaleX, @scaleY, 1);
- -ms-transform: scale3d(@scaleX, @scaleY, 1);
- -o-transform: scale3d(@scaleX, @scaleY, 1);
- transform: scale3d(@scaleX, @scaleY, 1);
- }
-
- 0% {
- .transform(1, 1);
- }
-
- 50% {
- .transform(0.75, 0.75);
- }
-
- 100% {
- .transform(1, 1);
- }
-}
-
-@-webkit-keyframes pulsate {.pulsate-frames}
-@-moz-keyframes pulsate {.pulsate-frames}
-@-ms-keyframes pulsate {.pulsate-frames}
-@-o-keyframes pulsate {.pulsate-frames}
-@keyframes pulsate {.pulsate-frames}
diff --git a/static/css/sources/components/layout.less b/static/css/sources/components/layout.less
deleted file mode 100644
index 9337f27..0000000
--- a/static/css/sources/components/layout.less
+++ /dev/null
@@ -1,18 +0,0 @@
-body {
- font-family: 'Open Sans', sans-serif;
- padding-top: @navbar-height;
- min-width: 320px;
-}
-
-.page-wrapper {
- padding: 20px 0;
-}
-
-.page-header {
- margin-top: 0;
- border-bottom-color: #d7d7d7;
-
- .small {
- font-size: @font-size-base;
- }
-}
\ No newline at end of file
diff --git a/static/css/sources/components/projects.less b/static/css/sources/components/projects.less
deleted file mode 100644
index b258b5c..0000000
--- a/static/css/sources/components/projects.less
+++ /dev/null
@@ -1,65 +0,0 @@
-.projects-selector {
- position: relative;
- width: 300px;
- color: white;
- cursor: pointer;
-
- &_preview {
- color: rgba(255, 255, 255, 0.5);
- padding: 5px 25px 5px 5px;
- &_text {
- padding-left: 10px;
- }
- }
-
- &_input {
- width: 80%;
- padding-bottom: 3px;
- padding-left: 10px;
- border: none;
- border-bottom: 1px solid rgba(255, 255, 255, 0.5);
- background: transparent;
- outline: none;
- }
-
- &_items {
- position: absolute;
- width: 100%;
- padding: 0;
- padding-top: 15px;
- left: 0;
- background: @brand-primary;
- list-style: none;
- }
-
- &_item {
- .clearfix();
-
- padding: 10px 10px;
-
- &_link {
- float: left;
- width: 90%;
- color: white;
- text-decoration: none;
- &:hover {
- color: white;
- text-decoration: none;
- }
- }
- &_run {
- float: right;
- width: 10%;
- color: rgba(255, 255, 255, 0.5);
- text-align: right;
- &:hover {
- color: white;
- text-decoration: none;
- }
- }
-
- &:hover {
- background: lighten(@brand-primary, 10%);
- }
- }
-}
diff --git a/static/css/sources/components/terminal.less b/static/css/sources/components/terminal.less
deleted file mode 100644
index f653e43..0000000
--- a/static/css/sources/components/terminal.less
+++ /dev/null
@@ -1,63 +0,0 @@
-.terminal {
- box-sizing: border-box;
- position: relative;
-
- &_header {
-
- }
-
- &_code {
- display: table;
- width: 100%;
- padding: 10px 0;
- color: #f1f1f1;
- font-family: monospace;
- font-size: 12px;
- line-height: 18px;
- white-space: pre-wrap;
- word-wrap: break-word;
- background-color: #2a2a2a;
- counter-reset: line-numbering;
- }
-
- &_footer {
-
- }
-}
-
-.code-line {
- display: table-row;
-
- &_counter {
- display: table-cell;
- width: 1px;
- vertical-align: top;
- text-align: right;
- cursor: pointer;
- text-decoration: none;
- color: darken(@gray-lighter, 15%);
- padding: 0 10px;
- border-right: 1px solid rgba(255, 255, 255, 0.1);
- white-space: nowrap;
-
- &:before {
- content: counter(line-numbering);
- counter-increment: line-numbering;
- }
-
- &:hover {
- text-decoration: none;
- color: @gray-lighter;
- }
- }
-
- &_body {
- display: table-cell;
- vertical-align: top;
- padding: 0 10px;
- }
-
- &:hover {
- background-color: #444;
- }
-}
diff --git a/static/images/preloader.gif b/static/images/preloader.gif
deleted file mode 100644
index a531cf9..0000000
Binary files a/static/images/preloader.gif and /dev/null differ
diff --git a/static/js/app.build.js b/static/js/app.build.js
deleted file mode 100644
index 8e161c9..0000000
--- a/static/js/app.build.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// client build for production replaces this file, this file exists only
-// for jade include - file must exists even if include is conditional
\ No newline at end of file
diff --git a/static/js/app/actions/build.js b/static/js/app/actions/build.js
deleted file mode 100644
index be64877..0000000
--- a/static/js/app/actions/build.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-define(['reflux'], function(Reflux) {
- var Actions = Reflux.createActions([
- 'cancel',
- 'readTerminalOutput',
- 'readAll',
- 'read'
- ]);
-
- return Actions;
-});
diff --git a/static/js/app/actions/buildLog.js b/static/js/app/actions/buildLog.js
deleted file mode 100644
index 26d4142..0000000
--- a/static/js/app/actions/buildLog.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-define(['reflux'], function(Reflux) {
- var Actions = Reflux.createActions([
- 'getTail',
- 'getLines'
- ]);
-
- return Actions;
-});
diff --git a/static/js/app/actions/project.js b/static/js/app/actions/project.js
deleted file mode 100644
index 46e5d2e..0000000
--- a/static/js/app/actions/project.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-define(['reflux'], function(Reflux) {
- var Actions = Reflux.createActions([
- 'run',
- 'readAll',
- 'read'
- ]);
-
- return Actions;
-});
diff --git a/static/js/app/app.js b/static/js/app/app.js
deleted file mode 100644
index 779a2d6..0000000
--- a/static/js/app/app.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'react-router',
- 'templates/app/components/app/index',
- 'app/components/index',
- 'app/actions/project', 'app/actions/build'
-], function(
- React,
- Router,
- template,
- Components,
- ProjectActions, BuildActions
-) {
- var Route = React.createFactory(Router.Route),
- DefaultRoute = React.createFactory(Router.DefaultRoute);
-
- var routes = (
- Route({handler: Components.App},
- Route({name: 'dashboard', path: '/', handler: Components.Dashboard}),
- Route({
- name: 'project',
- path: 'projects/:name',
- handler: Components.Project.View
- }),
- Route({name: 'build', path: 'builds/:id', handler: Components.Build.View}),
- Route({
- name: 'buildLog',
- path: 'builds/:buildId/log',
- handler: Components.BuildLog
- })
- )
- );
-
- Router.run(routes, Router.HistoryLocation, function(Handler) {
- React.render(
- React.createElement(Handler),
- document.getElementById('content')
- );
- });
-});
diff --git a/static/js/app/components/app/index.jade b/static/js/app/components/app/index.jade
deleted file mode 100644
index ca9511a..0000000
--- a/static/js/app/components/app/index.jade
+++ /dev/null
@@ -1,6 +0,0 @@
-div
- Header()
-
- .container-fluid
- .page-wrapper
- RouteHandler()
diff --git a/static/js/app/components/app/index.js b/static/js/app/components/app/index.js
deleted file mode 100644
index 69dff16..0000000
--- a/static/js/app/components/app/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'react-router',
- 'app/actions/project',
- 'app/components/header/index',
- 'templates/app/components/app/index'
-], function(React, Router, ProjectActions, Header, template) {
- template = template.locals({
- Link: Router.Link,
- Header: Header,
- RouteHandler: Router.RouteHandler
- });
-
- var Component = React.createClass({
- componentWillMount: function() {
- ProjectActions.readAll();
- },
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/buildLog/index.jade b/static/js/app/components/buildLog/index.jade
deleted file mode 100644
index 9d34db4..0000000
--- a/static/js/app/components/buildLog/index.jade
+++ /dev/null
@@ -1,30 +0,0 @@
-
-- var buildId = this.props.params.buildId;
-- var total = this.state.data.total;
-- var output = this.state.data.output;
-
-div
- | build:
- span= buildId
-
-div
- | lines in total:
- span= total
-
-div
- | from:
- input(type="text", value=this.state.from, onChange=this.onFromChange)
-
-br
-.terminal(style="width: 900px; float: left;")
- .terminal_code(ref="code")!= output
-
-div.terminal-virtual-scroll(
- style="width: 15px; height: 320px; overflow: scroll; float: clear;",
- onScroll=this.onVirtualScroll
-)
- - var height = total * 15;
- div(style="height: #{height}px;")
-div
- | virtual scroll top:
- span= this.state.virtualScrollTop
diff --git a/static/js/app/components/buildLog/index.js b/static/js/app/components/buildLog/index.js
deleted file mode 100644
index 5364483..0000000
--- a/static/js/app/components/buildLog/index.js
+++ /dev/null
@@ -1,78 +0,0 @@
-'use strict';
-
-define([
- 'react', 'reflux', 'app/actions/buildLog', 'app/stores/buildLog',
- 'ansi_up', 'underscore', 'templates/app/components/buildLog/index',
- 'jquery'
-], function(
- React, Reflux, BuildLogActions, buildLogStore,
- ansiUp, _, template,
- $
-) {
- var chunkSize = 40;
-
- return React.createClass({
- mixins: [
- Reflux.connectFilter(buildLogStore, 'data', function(data) {
- data.output = _(data.lines).pluck('text').join(' ');
- data.output = data.output.replace(
- /(.*)\n/gi,
- '$1 '
- );
-
- data.output = ansiUp.ansi_to_html(data.output);
- return data;
- })
- ],
- statics: {
- willTransitionTo: function(transition, params, query) {
- BuildLogActions.getTail({buildId: params.buildId, length: chunkSize});
- }
- },
- onFromChange: function(event) {
- var from = Number(event.target.value);
- this.setState({from: from});
-
- BuildLogActions.getLines({
- buildId: this.props.params.buildId,
- from: from,
- to: from + chunkSize - 1
- });
- },
- onVirtualScroll: function(event) {
- this.virtualScrollTop = $(event.target).scrollTop();
-
- this.setState({virtualScrollTop: this.virtualScrollTop});
-
- var isDown = this.virtualScrollTop > this.lastVirtualScrollTop;
- var inc = isDown ? 15 : -15;
-
- var scrollTop = $('.terminal_code').scrollTop(),
- viewHeight = $('.terminal_code').height(),
- contentHeight = $('.terminal_code div:first').height();
-
- if (
- (isDown && scrollTop + viewHeight + inc < contentHeight) ||
- (!isDown && scrollTop + inc > 0)
- ) {
- $('.terminal_code').scrollTop(scrollTop + inc);
- } else {
- var lines = this.state.data.lines,
- line = lines[isDown ? lines.length - 1 : 0],
- from = isDown ? line.number : line.number - chunkSize;
-
- from = from < 0 ? 1 : from;
- console.log('>>> end = ', line, from);
-
- BuildLogActions.getLines({
- buildId: this.props.params.buildId,
- from: from,
- to: from + chunkSize - 1
- });
- }
-
- this.lastVirtualScrollTop = this.virtualScrollTop;
- },
- render: template
- });
-});
diff --git a/static/js/app/components/buildSidebar/index.jade b/static/js/app/components/buildSidebar/index.jade
deleted file mode 100644
index 0fa5115..0000000
--- a/static/js/app/components/buildSidebar/index.jade
+++ /dev/null
@@ -1,20 +0,0 @@
-.builds.builds__timeline.builds__timeline-small
- each item in this.state.items
- - var buildItemClasses = ['builds_item__' + item.status];
- - if (item.id === this.props.currentBuild.id) buildItemClasses.push('builds_item__current');
- .builds_item(key=item.id, class=buildItemClasses)
- .builds_inner
- .row
- .builds_header
- Link(to="build", params={id: item.id})
- span build #
- span= item.number
-
- .builds_controls
- if item.status === 'in-progress'
- .builds_progress
- if item.project.avgBuildDuration
- Progress(build=item)
-
- if !item.endDate
- DateTime(value=item.endDate)
diff --git a/static/js/app/components/buildSidebar/index.js b/static/js/app/components/buildSidebar/index.js
deleted file mode 100644
index b271ecf..0000000
--- a/static/js/app/components/buildSidebar/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'react', 'react-router',
- 'app/stores/builds', 'reflux',
- 'templates/app/components/buildSidebar/index', 'app/components/common/index',
-], function(
- _,
- React, Router,
- buildsStore, Reflux,
- template, CommonComponents
-) {
- template = template.locals(_({
- Link: Router.Link
- }).extend(CommonComponents));
-
- return React.createClass({
- mixins: [
- Reflux.connectFilter(buildsStore, 'items', function(items) {
- var projectName = this.props.projectName;
- if (projectName) {
- return _(items).filter(function(item) {
- return item.project && item.project.name === projectName;
- });
- } else {
- return items;
- }
- })
- ],
- render: template
- });
-});
diff --git a/static/js/app/components/builds/index.js b/static/js/app/components/builds/index.js
deleted file mode 100644
index 92f91eb..0000000
--- a/static/js/app/components/builds/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-define([
- 'app/components/builds/item',
- 'app/components/builds/list',
- 'app/components/builds/view'
-], function(Item, List, View) {
- return {
- Item: Item,
- List: List,
- View: View
- };
-});
diff --git a/static/js/app/components/builds/item.jade b/static/js/app/components/builds/item.jade
deleted file mode 100644
index 16f2f4a..0000000
--- a/static/js/app/components/builds/item.jade
+++ /dev/null
@@ -1,92 +0,0 @@
-mixin statusText(build)
- if build.status === 'in-progress'
- span in progress
-
- if build.status === 'queued'
- span queued
-
- if build.status === 'done'
- span done
-
- if build.status === 'error'
- span error
-
-- var build = this.props.build;
-
-.builds_item(class="builds_item__#{build.status}")
- .builds_inner
- .row
- .builds_header
- if build.project
- span
- Scm(scm=build.project.scm.type)
- |
- Link(to="project", params={name: build.project.name})
- span= build.project.name
- |
- if build.number
- span(style={fontSize: '15px', color: '#a6a6a6'}) build
- |
- if build.status !== 'queued'
- Link(to="build", params={id: build.id})
- span #
- span= build.number
- else
- span #
- span= build.number
-
- if build.waitReason
- span (
- span= build.waitReason
- span , waiting)
-
- if build.status === 'in-progress' && build.currentStep
- span (
- span= build.currentStep
- span )
-
- .builds_controls
- if build.completed
- .builds_buttons
- a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onRebuildProject(build.project.name))
- i.fa.fa-fw.fa-repeat(title="Rebuild")
- |
- | Build again
-
- if build.status === 'in-progress'
- .builds_progress
- if build.project.avgBuildDuration
- Progress(build=build)
-
- if build.status === 'queued'
- .builds_buttons
- a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onCancelBuild(build.id))
- i.fa.fa-fw.fa-times(title="Cancel build")
- |
- | Cancel build
-
- .builds_content
- if build.endDate
- span.builds_info
- i.fa.fa-fw.fa-clock-o
- | finished
- DateTime(value=build.endDate)
- |
- Duration(value=(build.endDate - build.startDate), withSuffix=true)
- else
- if build.startDate
- span.builds_info
- i.fa.fa-fw.fa-clock-o
- | started
- DateTime(value=build.startDate)
- else
- span.builds_info
- i.fa.fa-fw.fa-clock-o
- | queued
- DateTime(value=build.createDate)
- |
- if build.scm
- span.builds_info
- i.fa.fa-fw.fa-comment-o
- |
- span= utils.prune(build.scm.rev.comment, 40)
\ No newline at end of file
diff --git a/static/js/app/components/builds/item.js b/static/js/app/components/builds/item.js
deleted file mode 100644
index d10440f..0000000
--- a/static/js/app/components/builds/item.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-
-define([
- 'react', 'react-router', 'app/actions/project',
- 'app/actions/build', 'templates/app/components/builds/item',
- 'app/components/terminal/terminal', 'app/components/common/index',
- 'app/utils'
-], function(
- React, Router, ProjectActions,
- BuildActions, template,
- TerminalComponent, CommonComponents,
- utils
-) {
- template = template.locals({
- DateTime: CommonComponents.DateTime,
- Duration: CommonComponents.Duration,
- Progress: CommonComponents.Progress,
- Scm: CommonComponents.Scm,
- Terminal: TerminalComponent,
- Link: Router.Link,
- utils: utils
- });
-
- var Component = React.createClass({
- getInitialState: function() {
- return {
- showTerminal: false
- };
- },
- onRebuildProject: function(projectName) {
- ProjectActions.run(projectName)
- },
- onCancelBuild: function(buildId) {
- BuildActions.cancel(buildId);
- },
- onShowTerminal: function(build) {
- this.setState({showTerminal: !this.state.showTerminal});
- BuildActions.readTerminalOutput(this.props.build);
- },
- onBuildSelect: function(buildId) {
- console.log('on build select');
- },
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/builds/list.jade b/static/js/app/components/builds/list.jade
deleted file mode 100644
index db68abf..0000000
--- a/static/js/app/components/builds/list.jade
+++ /dev/null
@@ -1,15 +0,0 @@
-- var itemsCount = this.state.items.length;
-
-if itemsCount
- .builds.builds__timeline.builds__timeline-large(class="builds__timeline-#{itemsCount % 2 ? 'left' : 'right'}")
- each build, index in this.state.items
- Item(build=build, key=build.id)
-else
- p Build history is empty
-
-if itemsCount && itemsCount % 20 === 0
- .text-center
- a.btn.btn-sm.btn-default(href="javascript:void(0);", onClick=this.onShowMoreBuilds(this.props.projectName))
- i.fa.fa-fw.fa-plus(title="Show more builds")
- |
- | Show more builds
diff --git a/static/js/app/components/builds/list.js b/static/js/app/components/builds/list.js
deleted file mode 100644
index 361528d..0000000
--- a/static/js/app/components/builds/list.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'reflux',
- 'underscore',
- './item',
- 'app/actions/build',
- 'app/stores/builds',
- 'templates/app/components/builds/list'
-], function(React, Reflux, _, Item, BuildActions, buildsStore, template) {
- template = template.locals({
- Item: Item
- });
-
- var Component = React.createClass({
- mixins: [
- Reflux.connectFilter(buildsStore, 'items', function(items) {
- var projectName = this.props.projectName;
- if (projectName) {
- return _(items).filter(function(item) {
- return item.project && item.project.name === projectName;
- });
- } else {
- return items;
- }
- })
- ],
- onShowMoreBuilds: function(projectName) {
- BuildActions.readAll({
- projectName: projectName,
- limit: this.state.items.length + 20
- });
- },
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/builds/view.jade b/static/js/app/components/builds/view.jade
deleted file mode 100644
index 0318348..0000000
--- a/static/js/app/components/builds/view.jade
+++ /dev/null
@@ -1,138 +0,0 @@
-mixin statusBadge(build)
- if build.status === 'in-progress'
- span.label.label-info in progress
-
- if build.status === 'queued'
- span.label.label-default queued
-
- if build.status === 'done'
- span.label.label.sm.label-success done
-
- if build.status === 'error'
- span.label.label-danger error
-
-.row
- if this.state.build
- .col-sm-3.hidden-xs
- BuildSidebar(projectName=this.state.build.project.name, currentBuild=this.state.build)
-
- .col-sm-9
- h1.page-header
- .pull-right(style={fontSize: '22px'})
- mixin statusBadge(this.state.build)
- span Build #
- span= this.state.build.number
-
- .small.text-muted
- | Initiated by
- - var initiator = this.state.build.initiator;
- if initiator.type === 'build'
- Link(to="project", params={name: initiator.project.name})
- span= initiator.project.name
- |
- | during the
- |
- Link(to="build", params={id: initiator.id})
- span build #
- span= initiator.number
- else
- span= initiator.type
-
- //- hr
-
- .build-view_info
- if this.state.build.error
- if this.state.build.error.message
- .text-center.alert.alert-danger
- | Error:
- div= this.state.build.error.message
- if this.state.build.error.stderr
- pre= this.state.build.error.stderr
-
- .row
- .col-md-12
- p
- Scm(scm=this.state.build.project.scm.type)
- |
- | Project
- Link(to="project", params={name: this.state.build.project.name})
- span= this.state.build.project.name
- .row
- .col-md-12
- p
- i.fa.fa-fw.fa-clock-o
- span
- if this.state.build.startDate
- span Started
- DateTime(value=this.state.build.startDate)
- else
- span Queued
- DateTime(value=this.state.build.createDate)
-
- if this.state.build.endDate
- - var durationTitle = _(this.state.build.stepTimings).map(function(stepTiming) {
- - return stepTiming.name + ': ' + (stepTiming.duration / 1000).toFixed(1) + ' sec';
- - }).join('\n');
- | , finished
- |
- DateTime(value=this.state.build.endDate)
- |
- Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true, title=durationTitle)
-
- mixin rev(rev, prefix)
- - prefix = prefix || '';
- span(title= 'Revision: ' + rev.id + ' by ' + rev.author)= prefix + rev.comment
-
- - var scm = this.state.build.scm;
- - var rev = scm && scm.rev;
- - var changes = scm && scm.changes;
- .row
- .col-md-12
- p
- i.fa.fa-fw.fa-code-fork
- if changes
- if changes.length
- | Scm changes:
- else
- | No scm changes, current revision is
- |
- | "
- mixin rev(rev)
- | " by
- |
- = rev.author
- else
- | -
-
- if changes && changes.length
- each change, index in changes
- - var number = index + 1;
- .row(key= 'scm-change-' + number)
- .col-md-offset-4.col-md-8
- p
- mixin rev(change, String(number) + '. ')
-
- h2
- i.fa.fa-fw.fa-terminal
- |
- | Console output
- .build-view_terminal
- if this.state.showConsole
- Terminal(build=this.state.build.id, showPreloader=true)
-
- if this.state.build.completed
- if this.state.build.error
- .text-center.alert.alert-danger
- | Build ended with error
- Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true)
- else
- .text-center.alert.alert-success
- | Build successfully completed
- Duration(value=(this.state.build.endDate - this.state.build.startDate), withSuffix=true)
- else
- .well.text-center
- button.btn.btn-primary(onClick=this.toggleConsole)
- i.fa.fa-fw.fa-refresh
- |
- | Show full console output
-
diff --git a/static/js/app/components/builds/view.js b/static/js/app/components/builds/view.js
deleted file mode 100644
index 0531024..0000000
--- a/static/js/app/components/builds/view.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'react-router',
- 'reflux',
- 'app/actions/build',
- 'app/stores/build',
- 'app/components/terminal/terminal',
- 'app/components/buildSidebar/index',
- 'templates/app/components/builds/view',
- 'app/components/common/index'
-], function(
- React, Router, Reflux, BuildActions, buildStore, TerminalComponent,
- BuildSidebar, template, CommonComponents
-) {
- template = template.locals({
- DateTime: CommonComponents.DateTime,
- Duration: CommonComponents.Duration,
- Scm: CommonComponents.Scm,
- Terminal: TerminalComponent,
- Link: Router.Link,
- BuildSidebar: BuildSidebar
- });
-
- var Component = React.createClass({
- mixins: [Reflux.ListenerMixin],
- statics: {
- willTransitionTo: function(transition, params, query) {
- BuildActions.read(Number(params.id));
- }
- },
- componentDidMount: function() {
- this.listenTo(buildStore, this.updateBuild);
- },
- componentWillReceiveProps: function(nextProps) {
- // reset console status when go from build page to another build
- // page (did mount and mount not called in this case)
- if (Number(nextProps.params.id) !== this.state.build.id) {
- this.setState({showConsole: this.getInitialState().showConsole});
- }
- },
- updateBuild: function(build) {
- if (build) {
- BuildActions.readAll({projectName: build.project.name});
- }
- this.setState({build: build});
- },
- render: template,
- getInitialState: function() {
- return {
- build: null,
- showConsole: false
- };
- },
- toggleConsole: function() {
- var consoleState = !this.state.showConsole;
- if (consoleState) {
- BuildActions.readTerminalOutput(this.state.build);
- }
- this.setState({showConsole: consoleState});
- }
- });
-
- return Component;
-});
diff --git a/static/js/app/components/common/dateTime/index.js b/static/js/app/components/common/dateTime/index.js
deleted file mode 100644
index 9f8fe3d..0000000
--- a/static/js/app/components/common/dateTime/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'templates/app/components/common/dateTime/template',
- 'moment'
-], function(React, template, moment) {
- template = template.locals({
- moment: moment
- });
-
- var Component = React.createClass({
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/common/dateTime/template.jade b/static/js/app/components/common/dateTime/template.jade
deleted file mode 100644
index b5728df..0000000
--- a/static/js/app/components/common/dateTime/template.jade
+++ /dev/null
@@ -1,2 +0,0 @@
-- var date = moment(this.props.value);
-span(title= date.format('YYYY-MM-DD HH:mm:ss'))= date.fromNow()
diff --git a/static/js/app/components/common/duration/index.jade b/static/js/app/components/common/duration/index.jade
deleted file mode 100644
index 33d58ec..0000000
--- a/static/js/app/components/common/duration/index.jade
+++ /dev/null
@@ -1,7 +0,0 @@
-- var sec = this.props.value / 1000;
-- sec = sec >= 1 ? Math.round(sec) : Number(sec.toFixed(2));
-- var min = sec >= 60 ? Math.round(sec / 60) : 0;
-- var suffix = this.props.withSuffix ? 'in ' : '';
-- var ending = min === 1 ? '' : 's';
-- var title = this.props.title || sec + ' second' + ending;
-span(title= title)= suffix + (min ? min + ' minunte' : sec + ' second') + ending
diff --git a/static/js/app/components/common/duration/index.js b/static/js/app/components/common/duration/index.js
deleted file mode 100644
index 8487594..0000000
--- a/static/js/app/components/common/duration/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-define([
- 'react', 'templates/app/components/common/duration/index', 'moment'
-], function(React, template, moment) {
- template = template.locals({
- moment: moment
- });
-
- var Component = React.createClass({
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/common/index.js b/static/js/app/components/common/index.js
deleted file mode 100644
index 0903ec0..0000000
--- a/static/js/app/components/common/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-define([
- './dateTime/index',
- './scm/index',
- './duration/index',
- './progress/index'
-], function(DateTime, Scm, Duration, Progress) {
- return {
- DateTime: DateTime,
- Scm: Scm,
- Duration: Duration,
- Progress: Progress
- };
-});
diff --git a/static/js/app/components/common/progress/index.jade b/static/js/app/components/common/progress/index.jade
deleted file mode 100644
index cb7e1dc..0000000
--- a/static/js/app/components/common/progress/index.jade
+++ /dev/null
@@ -1,2 +0,0 @@
-.progress
- .progress-bar.progress-bar-success.progress-bar-striped.active(style={width: this.state.percent + '%'})
diff --git a/static/js/app/components/common/progress/index.js b/static/js/app/components/common/progress/index.js
deleted file mode 100644
index eeaaf2e..0000000
--- a/static/js/app/components/common/progress/index.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'react',
- 'templates/app/components/common/progress/index'
-], function(_, React, template) {
- return React.createClass({
- render: template,
- _computePercent: function() {
- var build = this.props.build;
- return Math.round((Date.now() - build.startDate) /
- build.project.avgBuildDuration * 100);
- },
- componentDidMount: function() {
- var self = this;
- var updateCallback = function() {
- if (self.props.build.status === 'in-progress') {
- if (self.isMounted()) {
- self.setState({percent: self._computePercent()});
- _.delay(updateCallback, 100);
- }
- }
- };
-
- updateCallback();
- },
- getInitialState: function() {
- return {
- percent: this._computePercent()
- }
- }
- });
-});
diff --git a/static/js/app/components/common/scm/index.jade b/static/js/app/components/common/scm/index.jade
deleted file mode 100644
index bd9f309..0000000
--- a/static/js/app/components/common/scm/index.jade
+++ /dev/null
@@ -1,5 +0,0 @@
-if this.props.scm
- if this.props.scm === 'mercurial'
- i.fa.fa-fw.fa-bitbucket
- else
- i.fa.fa-fw.fa-github
diff --git a/static/js/app/components/common/scm/index.js b/static/js/app/components/common/scm/index.js
deleted file mode 100644
index f61f9d0..0000000
--- a/static/js/app/components/common/scm/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-define([
- 'react', 'templates/app/components/common/scm/index'
-], function(React, template) {
- return React.createClass({
- render: template
- });
-});
-
diff --git a/static/js/app/components/dashboard/index.jade b/static/js/app/components/dashboard/index.jade
deleted file mode 100644
index cfefea7..0000000
--- a/static/js/app/components/dashboard/index.jade
+++ /dev/null
@@ -1,4 +0,0 @@
-div
- h1.page-header Builds history
-
- BuildsList()
diff --git a/static/js/app/components/dashboard/index.js b/static/js/app/components/dashboard/index.js
deleted file mode 100644
index a447e3b..0000000
--- a/static/js/app/components/dashboard/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'react-router',
- 'app/actions/project',
- 'app/actions/build',
- 'app/components/builds/list',
- 'templates/app/components/dashboard/index'
-], function(React, Router, ProjectActions, BuildActions, BuildsList, template) {
- template = template.locals({
- Link: Router.Link,
- BuildsList: BuildsList
- });
-
- var Component = React.createClass({
- componentWillMount: function() {
- ProjectActions.readAll();
- BuildActions.readAll();
- },
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/header/index.jade b/static/js/app/components/header/index.jade
deleted file mode 100644
index 0b058fb..0000000
--- a/static/js/app/components/header/index.jade
+++ /dev/null
@@ -1,9 +0,0 @@
-.navbar.navbar-default.navbar-fixed-top
- .container-fluid
- .navbar-header
- Link.navbar-brand(to="dashboard")
- span NCI
-
- .collapse.navbar-collapse
- .navbar-form.navbar-left(style={paddingTop: "11px"})
- ProjectsSelector()
diff --git a/static/js/app/components/header/index.js b/static/js/app/components/header/index.js
deleted file mode 100644
index 526032e..0000000
--- a/static/js/app/components/header/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'react-router',
- 'app/components/projects/selector/index',
- 'templates/app/components/header/index',
- 'bootstrap/collapse'
-], function(React, Router, ProjectsSelector, template) {
- template = template.locals({
- Link: Router.Link,
- ProjectsSelector: ProjectsSelector
- });
-
- var Component = React.createClass({
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/index.js b/static/js/app/components/index.js
deleted file mode 100644
index 26e9d52..0000000
--- a/static/js/app/components/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-define([
- 'app/components/projects/index', 'app/components/builds/index',
- 'app/components/app/index', 'app/components/header/index',
- 'app/components/dashboard/index', 'app/components/buildLog/index'
-], function(
- ProjectsComponents, BuildsComponents,
- App, Header,
- Dashboard, BuildLogComponent
-) {
- return {
- App: App,
- Header: Header,
- Project: ProjectsComponents,
- Build: BuildsComponents,
- Dashboard: Dashboard,
- BuildLog: BuildLogComponent
- };
-});
diff --git a/static/js/app/components/projects/index.js b/static/js/app/components/projects/index.js
deleted file mode 100644
index e2d9799..0000000
--- a/static/js/app/components/projects/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-define([
- 'app/components/projects/selector/index',
- 'app/components/projects/view/index'
-], function(Selector, View) {
- return {
- Selector: Selector,
- View: View
- };
-});
diff --git a/static/js/app/components/projects/selector/index.jade b/static/js/app/components/projects/selector/index.jade
deleted file mode 100644
index b067ecb..0000000
--- a/static/js/app/components/projects/selector/index.jade
+++ /dev/null
@@ -1,24 +0,0 @@
-.projects-selector(href="javascript:void(0);")
- if !this.state.showSearch
- span.projects-selector_preview(onClick=this.onSearchProject)
- i.fa.fa-fw.fa-bars
- span.projects-selector_preview_text Select a project...
- else
- input.projects-selector_input(
- type="text",
- value=this.state.searchQuery,
- onChange=this.onSearchChange,
- ref=this.onInputMount,
- onBlur=this.onBlurSearch
- )
- ul.projects-selector_items
- each project in this.state.projects
- li.projects-selector_item(key=project.name)
- Link.projects-selector_item_link(to="project", params={name: project.name}, onMouseDown=this.onSelectProject(project.name))
- Scm(scm=project.scm.type)
- span
- span= project.name
- a.projects-selector_item_run(href="javascript:void(0);", onMouseDown=this.onRunProject(project.name))
- i.fa.fa-fw.fa-play
-
-
diff --git a/static/js/app/components/projects/selector/index.js b/static/js/app/components/projects/selector/index.js
deleted file mode 100644
index 2fd2a2b..0000000
--- a/static/js/app/components/projects/selector/index.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-define([
- 'react', 'react-router', 'reflux', 'app/actions/project',
- 'app/stores/projects',
- 'app/components/common/scm/index',
- 'templates/app/components/projects/selector/index'
-], function(React, Router, Reflux, ProjectActions, projectsStore, Scm,
- template
-) {
- template = template.locals({
- Link: Router.Link,
- Scm: Scm
- });
-
- return React.createClass({
- mixins: [Reflux.ListenerMixin, Router.Navigation],
- componentDidMount: function() {
- this.listenTo(projectsStore, this.updateItems);
- },
- getInitialState: function() {
- return {
- showSearch: false
- };
- },
- onRunProject: function(projectName) {
- ProjectActions.run(projectName)
- this.setState({showSearch: false});
- },
- onSelectProject: function(name) {
- this.transitionTo('project', {name: name});
- },
- updateItems: function(projects) {
- this.setState({projects: projects});
- },
- onSearchProject: function() {
- this.setState({showSearch: true});
- },
- onInputMount: function(component) {
- var node = React.findDOMNode(component);
- if (node) {
- node.focus();
- }
- },
- onBlurSearch: function() {
- this.setState({showSearch: false});
- },
- onSearchChange: function(event) {
- var query = event.target.value;
- this.setState({searchQuery: query});
- ProjectActions.readAll({nameQuery: query});
- },
- render: template,
- });
-});
diff --git a/static/js/app/components/projects/view/index.jade b/static/js/app/components/projects/view/index.jade
deleted file mode 100644
index 64d0989..0000000
--- a/static/js/app/components/projects/view/index.jade
+++ /dev/null
@@ -1,56 +0,0 @@
-div
- h1.page-header.clearfix
- .pull-right
- button.btn.btn-sm.btn-primary.dropdown-toggle(
- data-toggle="dropdown",
- aria-expanded="false",
- disabled="true"
- )
- | target revision:
- span= this.state.project.scm ? this.state.project.scm.rev : ''
- |
- if this.state.project.name
- button.btn.btn-sm.btn-success(onClick=this.onBuildProject)
- i.fa.fa-fw.fa-play
- |
- span Build
- div
- Scm(scm=this.state.project.scm ? this.state.project.scm.type : '')
- span= this.state.project.name
-
- div.text-muted
- - var lastDoneBuild = this.state.project.lastDoneBuild;
- p Last successfully built:
- if lastDoneBuild
- DateTime(value=lastDoneBuild.endDate)
- |
- | (build #
- span= lastDoneBuild.number
- | )
- else
- | -
-
- p Current successfully streak:
- if lastDoneBuild
- span= this.state.project.doneBuildsStreak.buildsCount
- else
- | -
-
- p Last build duration:
- if lastDoneBuild
- Duration(value=(lastDoneBuild.endDate - lastDoneBuild.startDate))
- else
- | -
-
- p Average build duration:
- if this.state.project.avgBuildDuration
- Duration(value=this.state.project.avgBuildDuration)
- else
- | -
-
- h2
- i.fa.fa-fw.fa-history
- span
- span Build history
-
- Builds(projectName=this.props.params.name)
diff --git a/static/js/app/components/projects/view/index.js b/static/js/app/components/projects/view/index.js
deleted file mode 100644
index 6f4d2d7..0000000
--- a/static/js/app/components/projects/view/index.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-define([
- 'react', 'reflux',
- 'app/actions/project',
- 'app/actions/build',
- 'app/stores/project',
- 'app/components/builds/list',
- 'app/components/common/scm/index',
- 'templates/app/components/projects/view/index',
- 'app/components/common/index',
- 'bootstrap/dropdown'
-], function(React, Reflux, ProjectActions, BuildActions,
- projectStore, Builds, Scm, template, CommonComponents
-) {
- template = template.locals({
- Builds: Builds,
- Scm: Scm,
- DateTime: CommonComponents.DateTime,
- Duration: CommonComponents.Duration
- });
-
- return React.createClass({
- mixins: [
- Reflux.connectFilter(projectStore, 'project', function(project) {
- if (project.name === this.props.params.name) {
- return project;
- } else {
- if (this.state) {
- return this.state.project;
- } else {
- return projectStore.getInitialState();
- }
- }
- })
- ],
- statics: {
- willTransitionTo: function(transition, params, query) {
- ProjectActions.read({name: params.name});
- BuildActions.readAll({projectName: params.name});
- }
- },
- onBuildProject: function() {
- if (this.state.project.name) {
- console.log(this.state.project.name);
- ProjectActions.run(this.state.project.name);
- }
- },
- render: template
- });
-});
diff --git a/static/js/app/components/terminal/index.js b/static/js/app/components/terminal/index.js
deleted file mode 100644
index c8f9765..0000000
--- a/static/js/app/components/terminal/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-define([
- 'app/components/terminal/terminal',
-], function(Console) {
- return {
- Console: Console
- };
-});
diff --git a/static/js/app/components/terminal/terminal.jade b/static/js/app/components/terminal/terminal.jade
deleted file mode 100644
index 35cbd36..0000000
--- a/static/js/app/components/terminal/terminal.jade
+++ /dev/null
@@ -1,3 +0,0 @@
-.terminal
- pre.terminal_code
- .terminal_footer
diff --git a/static/js/app/components/terminal/terminal.js b/static/js/app/components/terminal/terminal.js
deleted file mode 100644
index cbb414a..0000000
--- a/static/js/app/components/terminal/terminal.js
+++ /dev/null
@@ -1,133 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'react',
- 'reflux',
- 'app/stores/terminal',
- 'app/stores/build',
- 'ansi_up',
- 'templates/app/components/terminal/terminal'
-], function(
- _,
- React,
- Reflux,
- terminalStore,
- buildStore,
- ansiUp,
- template
-) {
- var Component = React.createClass({
- mixins: [Reflux.ListenerMixin],
-
- shouldScrollBottom: true,
- data: [],
- linesCount: 0,
-
- componentDidMount: function() {
- this.listenTo(terminalStore, this.updateItems);
- var node = document.getElementsByClassName('terminal')[0];
- this.initialScrollPosition = node.getBoundingClientRect().top;
- if (this.props.showPreloader) {
- this.getTerminal().insertAdjacentHTML('afterend',
- ' '
- );
-
- this.listenTo(buildStore, function(build) {
- if (build.completed) {
- this.removePreloader();
- }
- });
- }
-
- window.onscroll = this.onScroll;
- },
- removePreloader: function() {
- var preloader = document.getElementsByClassName(
- 'terminal_preloader'
- )[0];
- if (preloader) {
- preloader.parentNode.removeChild(preloader);
- }
- },
- componentWillUnmount: function() {
- window.onscroll = null;
- },
- prepareRow: function(row) {
- return ansiUp.ansi_to_html(row.replace('\r', ''));
- },
- prepareOutput: function(output) {
- var self = this;
- return output.map(function(row) {
- return self.prepareRow(row);
- });
- },
- getTerminal: function() {
- return document.getElementsByClassName('terminal')[0];
- },
- getBody: function() {
- return document.getElementsByTagName('body')[0];
- },
- onScroll: function() {
- var node = this.getTerminal(),
- body = this.getBody();
-
- this.shouldScrollBottom = window.innerHeight + body.scrollTop >=
- node.offsetHeight + this.initialScrollPosition;
- },
- ensureScrollPosition: function() {
- if (this.shouldScrollBottom) {
- var node = this.getTerminal(),
- body = this.getBody();
-
- body.scrollTop = this.initialScrollPosition + node.offsetHeight;
- }
- },
- makeCodeLineContent: function(line) {
- return '' + ' ' +
- '' + this.prepareRow(line) + '
';
- },
- makeCodeLine: function(line, index) {
- return '' +
- this.makeCodeLineContent(line) + '
';
- },
- renderBuffer: _.throttle(function() {
- var data = this.data,
- currentLinesCount = data.length,
- terminal = document.getElementsByClassName('terminal_code')[0],
- rows = terminal.childNodes;
-
- if (rows.length) {
- // replace our last node
- var index = this.linesCount - 1;
- rows[index].innerHTML = this.makeCodeLineContent(data[index]);
- }
-
- var self = this;
- terminal.insertAdjacentHTML('beforeend',
- _(data.slice(this.linesCount)).map(function(line, index) {
- return self.makeCodeLine(line, self.linesCount + index);
- }).join('')
- );
-
- this.linesCount = currentLinesCount;
- this.ensureScrollPosition();
- }, 100),
- updateItems: function(build) {
- // listen just our console update
- if (build.buildId === this.props.build) {
- this.data = build.data;
- this.renderBuffer();
- }
- if (this.props.showPreloader && build.buildCompleted) {
- this.removePreloader();
- }
- },
- shouldComponentUpdate: function() {
- return false;
- },
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/terminal/test/index.jade b/static/js/app/components/terminal/test/index.jade
deleted file mode 100644
index 09b3d3d..0000000
--- a/static/js/app/components/terminal/test/index.jade
+++ /dev/null
@@ -1,3 +0,0 @@
-p 123
-
-Terminal(lines=this.state.lines)
diff --git a/static/js/app/components/terminal/test/index.js b/static/js/app/components/terminal/test/index.js
deleted file mode 100644
index 5511fbb..0000000
--- a/static/js/app/components/terminal/test/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-define([
- 'react',
- '../terminal',
- 'templates/app/components/terminal/test/index'
-], function(React, TerminalComponent, template) {
- template = template.locals({
- Terminal: TerminalComponent
- });
- return React.createClass({
- getInitialState: function() {
- return {
- lines: [1, 2, 3]
- };
- },
- render: template
- });
-});
diff --git a/static/js/app/connect.js b/static/js/app/connect.js
deleted file mode 100644
index 264901c..0000000
--- a/static/js/app/connect.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-define([
- 'socketio', 'dataio'
-], function(socketio, dataio) {
- // Do it because we use connect in console store
- return dataio(socketio.connect());
-});
diff --git a/static/js/app/resources.js b/static/js/app/resources.js
deleted file mode 100644
index 4b4db09..0000000
--- a/static/js/app/resources.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-define(['app/connect'], function(connect) {
- var projects = connect.resource('projects');
- var builds = connect.resource('builds');
-
- return {
- projects: projects,
- builds: builds
- }
-});
diff --git a/static/js/app/stores/build.js b/static/js/app/stores/build.js
deleted file mode 100644
index a04b602..0000000
--- a/static/js/app/stores/build.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'reflux', 'app/actions/build', 'app/resources'
-], function(_, Reflux, BuildActions, resources) {
- var resource = resources.builds;
-
- var Store = Reflux.createStore({
- listenables: BuildActions,
- build: null,
-
- onChange: function(data, action) {
- if (this.build && (data.buildId === this.build.id)) {
- _(this.build).extend(data.changes);
- this.trigger(this.build);
- }
- },
-
- init: function() {
- resource.subscribe('change', this.onChange);
- },
-
- onRead: function(id) {
- var self = this;
- resource.sync('read', {id: id}, function(err, build) {
- if (err) throw err;
- self.build = build;
- self.trigger(self.build);
- });
- }
- });
-
- return Store;
-});
diff --git a/static/js/app/stores/buildLog.js b/static/js/app/stores/buildLog.js
deleted file mode 100644
index 0d54489..0000000
--- a/static/js/app/stores/buildLog.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict';
-
-define([
- 'reflux', 'app/actions/buildLog', 'app/resources'
-], function(
- Reflux, BuildLogActions, resources
-) {
- var resource = resources.builds;
-
- var Store = Reflux.createStore({
- listenables: BuildLogActions,
- data: {
- lines: [],
- total: 0
- },
-
- getInitialState: function() {
- return this.data;
- },
-
- onGetTail: function(params) {
- var self = this;
- console.time('>>> getBuildLogTail');
- resource.sync('getBuildLogTail', params, function(err, data) {
- if (err) throw err;
- console.timeEnd('>>> getBuildLogTail');
- self.data = data;
- self.trigger(self.data);
- });
- },
-
- onGetLines: function(params) {
- var self = this;
- console.time('>>> getBuildLogLines');
- resource.sync('getBuildLogLines', params, function(err, data) {
- if (err) throw err;
- console.timeEnd('>>> getBuildLogLines');
- console.log('>>> isLast log lines = ', data.isLast);
- self.data.lines = data.lines;
- self.trigger(self.data);
- });
- }
- });
-
- return Store;
-});
diff --git a/static/js/app/stores/builds.js b/static/js/app/stores/builds.js
deleted file mode 100644
index f765ca5..0000000
--- a/static/js/app/stores/builds.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'reflux', 'app/actions/build', 'app/resources'
-], function(_, Reflux, BuildActions, resources) {
- var resource = resources.builds;
-
- var Store = Reflux.createStore({
- listenables: BuildActions,
- builds: [],
-
- getInitialState: function() {
- return this.builds;
- },
-
- onChanged: function(data) {
- var oldBuild = _(this.builds).findWhere({id: data.buildId});
- if (oldBuild) {
- _(oldBuild).extend(data.changes);
- } else {
- this.builds.unshift(
- _({id: data.buildId}).extend(data.changes)
- );
- }
-
- this.trigger(this.builds);
- },
-
- onCancelled: function(data) {
- // WORKAROUND: client that trigger `onCancel` gets one `onCancelled`
- // call other clients get 2 calls (second with empty data)
- if (!data) {
- return;
- }
- var index = _(this.builds).findIndex({id: data.buildId});
- if (index !== -1) {
- this.builds.splice(index, 1);
- }
-
- this.trigger(this.builds);
- },
-
- init: function() {
- resource.subscribe('change', this.onChanged);
- resource.subscribe('cancel', this.onCancelled);
- },
-
- onReadAll: function(params) {
- var self = this;
- resource.sync('readAll', params, function(err, builds) {
- if (err) throw err;
- self.builds = builds;
- self.trigger(self.builds);
- });
- },
-
- onCancel: function(buildId) {
- resource.sync('cancel', {buildId: buildId}, function(err) {
- if (err) throw err;
- });
- }
- });
-
- return Store;
-});
diff --git a/static/js/app/stores/project.js b/static/js/app/stores/project.js
deleted file mode 100644
index aff25cf..0000000
--- a/static/js/app/stores/project.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'reflux', 'app/actions/project', 'app/resources'
-], function(_, Reflux, ProjectActions, resources) {
- var resource = resources.projects;
-
- var Store = Reflux.createStore({
- listenables: ProjectActions,
- project: {},
-
- getInitialState: function() {
- return this.project;
- },
-
- onChange: function(data, action) {
- this.trigger(data.project);
- },
-
- init: function() {
- resource.subscribe('change', this.onChange);
- },
-
- onRead: function(params) {
- var self = this;
- resource.sync('read', params, function(err, project) {
- if (err) throw err;
- self.project = project;
- self.trigger(self.project);
- });
- }
- });
-
- return Store;
-});
diff --git a/static/js/app/stores/projects.js b/static/js/app/stores/projects.js
deleted file mode 100644
index 00bded5..0000000
--- a/static/js/app/stores/projects.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict';
-
-define([
- 'reflux', 'app/actions/project', 'app/resources'
-], function(Reflux, ProjectActions, resources) {
- var resource = resources.projects;
-
- var Store = Reflux.createStore({
- listenables: ProjectActions,
- onRun: function(projectName) {
- resource.sync('run', {projectName: projectName}, function(err) {
- if (err) throw err;
- });
- },
- onReadAll: function(params) {
- var self = this;
- resource.sync('readAll', params, function(err, projects) {
- if (err) throw err;
- self.trigger(projects);
- });
- }
- });
-
- return Store;
-});
diff --git a/static/js/app/stores/terminal.js b/static/js/app/stores/terminal.js
deleted file mode 100644
index 7082b0a..0000000
--- a/static/js/app/stores/terminal.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict';
-
-define([
- 'underscore', 'reflux', 'app/actions/build', 'app/connect'
-], function(
- _, Reflux, BuildActions, connect
-) {
- var Store = Reflux.createStore({
- listenables: BuildActions,
-
- init: function() {
- // the only purpose of this hash to reconnect all the time
- // except first, see notes at using
- this.connectedResourcesHash = {};
- },
-
- onReadTerminalOutput: function(build) {
- var self = this,
- output = [],
- resourceName = 'build' + build.id;
-
- var connectToBuildDataResource = function() {
- // reconnect for get data below (at subscribe), coz
- // data emitted only once during connect
- if (self.connectedResourcesHash[resourceName]) {
- connect.resource(resourceName).reconnect();
- } else {
- self.connectedResourcesHash[resourceName] = 1;
- }
-
- connect.resource(resourceName).subscribe('data', function(data) {
- var lastLine = _(self.lines).last();
- if (lastLine && (_(data.lines).first().number === lastLine.number)) {
- self.lines = _(self.lines).initial();
- }
- self.lines = self.lines.concat(data.lines);
- self.trigger({
- buildId: build.id,
- buildCompleted: build.completed,
- name: 'Console for build #' + build.id,
- data: _(self.lines).pluck('text')
- });
- });
- };
-
- this.lines = [];
- this.currentLine = '';
-
- // create data resource for completed build
- if (build.completed) {
- connect.resource('projects').sync(
- 'createBuildDataResource',
- {buildId: build.id},
- function(err) {
- if (err) throw err;
- connectToBuildDataResource();
- }
- );
- } else {
- connectToBuildDataResource();
- }
- }
- });
-
- return Store;
-});
diff --git a/static/js/app/utils.js b/static/js/app/utils.js
deleted file mode 100644
index 03288cb..0000000
--- a/static/js/app/utils.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-define(['underscore', 'shared/utils'], function(_, sharedUtils) {
- var utils = {};
-
- _(utils).extend(sharedUtils);
-
- return utils;
-});
diff --git a/static/js/dataio.js b/static/js/dataio.js
deleted file mode 100644
index 8986cf3..0000000
--- a/static/js/dataio.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-define(['_dataio'], function(dataio) {
- return function(socket) {
- var connect = dataio(socket);
-
- /*
- * Extend Resource
- */
- var resource = connect.resource('__someResource__'),
- resourcePrototype = Object.getPrototypeOf(resource);
-
- resourcePrototype.disconnect = function() {
- this.socket.disconnect();
- this.socket.removeAllListeners();
- };
-
- resourcePrototype.connect = function() {
- this.socket.connect();
- };
-
- resourcePrototype.reconnect = function() {
- this.disconnect();
- this.connect();
- };
-
- return connect;
- };
-});
\ No newline at end of file
diff --git a/static/js/requirejs/buid.js b/static/js/requirejs/buid.js
deleted file mode 100644
index 1ed63b6..0000000
--- a/static/js/requirejs/buid.js
+++ /dev/null
@@ -1,17 +0,0 @@
-
-({
- mainConfigFile: 'development.js',
- baseUrl: '../',
- paths: {
- socketio: (
- '../../node_modules/socket.io/node_modules/' +
- 'socket.io-client/socket.io'
- ),
- _dataio: '../../node_modules/data.io/data.io',
- },
- name: 'app/app',
- preserveLicenseComments: false,
- optimize: 'uglify2',
- useStrict: true,
- out: '../../js/app.build.js'
-});
diff --git a/static/js/requirejs/development.js b/static/js/requirejs/development.js
deleted file mode 100644
index 900973d..0000000
--- a/static/js/requirejs/development.js
+++ /dev/null
@@ -1,21 +0,0 @@
-
-require.config({
- baseUrl: '/js',
- paths: {
- socketio: '/socket.io/socket.io',
- _dataio: '/data.io',
- underscore: 'libs/underscore/underscore',
- react: 'libs/react/react-with-addons',
- 'react-router': 'libs/react-router/build/umd/ReactRouter',
- reflux: 'libs/reflux/dist/reflux',
- jquery: 'libs/jquery/jquery',
- ansi_up: 'libs/ansi_up/ansi_up',
- moment: 'libs/moment/moment',
- 'bootstrap/collapse': 'libs/bootstrap/js/collapse',
- 'bootstrap/dropdown': 'libs/bootstrap/js/dropdown'
- },
- shim: {
- 'bootstrap/collapse': ['jquery'],
- 'bootstrap/dropdown': ['jquery']
- }
-});
diff --git a/static/js/requirejs/production.js b/static/js/requirejs/production.js
deleted file mode 100644
index 7261299..0000000
--- a/static/js/requirejs/production.js
+++ /dev/null
@@ -1,3 +0,0 @@
-
-require.config({
-});
diff --git a/static/js/shared/utils.js b/static/js/shared/utils.js
deleted file mode 100644
index 7313d7f..0000000
--- a/static/js/shared/utils.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-(function(root, factory) {
-
- if (typeof module !== 'undefined' && module.exports) {
- // CommonJS
- module.exports = factory();
- } else if (typeof define === 'function' && define.amd) {
- // AMD
- define(function() {
- return factory();
- });
- }
-
-}(this, function() {
-
- var utils = {};
-
- utils.prune = function(str, length) {
- var result = '',
- words = str.split(' ');
-
- do {
- result += words.shift() + ' ';
- } while (words.length && result.length < length);
-
- return result.replace(/ $/, words.length ? '...' : '');
- };
-
- return utils;
-
-}));
diff --git a/views/index.jade b/views/index.jade
deleted file mode 100644
index aee9400..0000000
--- a/views/index.jade
+++ /dev/null
@@ -1,27 +0,0 @@
-doctype html
-html
- head
- title nci
-
- link(href="/css/index.css", rel="stylesheet", type="text/css")
-
- if env === 'development'
- script(type="text/javascript", src="/js/libs/requirejs/require.js")
- else
- script
- include ../static/js/libs/almond/almond.js
-
- if env === 'development'
- script
- include ../static/js/requirejs/development.js
- else
- script
- include ../static/js/requirejs/production.js
- script
- include ../static/js/app.build.js
-
- script(type="text/javascript").
- require(['app/app']);
-
- body
- #content