From 26ffa632f15b67d0c9c9e30d475514352407ec6d Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Mon, 23 Feb 2015 17:34:28 +0100 Subject: [PATCH] make active repos dynamic again --- app/styles/app/components/icons.sass | 10 +- app/styles/app/layouts/dashboard.sass | 50 +++--- app/templates/dashboard/repositories.hbs | 214 ++++------------------- 3 files changed, 66 insertions(+), 208 deletions(-) diff --git a/app/styles/app/components/icons.sass b/app/styles/app/components/icons.sass index 5cddec53..37b98f8f 100644 --- a/app/styles/app/components/icons.sass +++ b/app/styles/app/components/icons.sass @@ -19,19 +19,19 @@ .icon-star background-image: inline-image('dashboard/star-off.svg') -.icon-error +.icon.errored background-image: inline-image('dashboard/status-errored.svg') -.icon-fail +.icon.failed background-image: inline-image('dashboard/status-failed.svg') -.icon-cancel +.icon.canceled background-image: inline-image('dashboard/status-cancelled.svg') -.icon-pass +.icon.passed background-image: inline-image('dashboard/status-passed.svg') -.icon-started +.icon.started background-image: inline-image('dashboard/status-pending.svg') .icon-lock diff --git a/app/styles/app/layouts/dashboard.sass b/app/styles/app/layouts/dashboard.sass index 8800b9c1..cad0f568 100644 --- a/app/styles/app/layouts/dashboard.sass +++ b/app/styles/app/layouts/dashboard.sass @@ -3,6 +3,17 @@ * @todo: split into components: filter, search */ +@mixin colorDbelements($color) + .db-status + background-color: $color + .db-repo + h2, h3, a + color: $color + .db-job + color: $color + a + color: $color + %br-4px border-radius: 4px @@ -52,6 +63,19 @@ $dropdown-border: #C3D9DB bottom: 0 margin: auto + &.started + @include colorDbelements($start-color) + &.failed + @include colorDbelements($fail-color) + &.errored + @include colorDbelements($error-color) + &.canceled + @include colorDbelements($cancel-color) + &.passed + @include colorDbelements($pass-color) + &.inactive + @include colorDbelements($cancel-color) + .db-repo padding-left: 3em transform: translateY(0.4em) @@ -73,7 +97,7 @@ $dropdown-border: #C3D9DB left: 0 height: 100% width: 2.5em - background-color: $db-gray + // background-color: $db-gray border-top-left-radius: 4px border-bottom-left-radius: 4px @@ -221,30 +245,6 @@ $dropdown-border: #C3D9DB opacity: .7 -@mixin colorDbelements($color) - .db-status - background-color: $color - .db-repo - h2, h3, a - color: $color - .db-job - color: $color - a - color: $color - -.db--started - @include colorDbelements($start-color) -.db--fail - @include colorDbelements($fail-color) -.db--error - @include colorDbelements($error-color) -.db--cancel - @include colorDbelements($cancel-color) -.db--pass - @include colorDbelements($pass-color) -.db--inactive - @include colorDbelements($cancel-color) - // .current-org-avatar // display : inline-block // height : 20px diff --git a/app/templates/dashboard/repositories.hbs b/app/templates/dashboard/repositories.hbs index 478c4b61..caf56bde 100644 --- a/app/templates/dashboard/repositories.hbs +++ b/app/templates/dashboard/repositories.hbs @@ -36,36 +36,10 @@ -{{!--
-
- {{#each repo in filteredRepositories}} -
-
-
-
-
-

{{repo.owner.login}}

-

{{#link-to "repo" repo.owner.login repo.name}}{{repo.name}}{{/link-to}}

-
{{format-duration repo.last_build.duration}}
-
{{format-time repo.last_build.finished_at}}
-

- {{#link-to "build" repo.owner.login repo.name repo.last_build.id}} - #{{repo.last_build.number}} {{repo.last_build.state}} - {{/link-to}} -

-
-
-
-
-
- {{/each}} -
-
--}} -
-
+ {{!--
@@ -87,166 +61,50 @@
  • Deactivate repository
  • Trigger a build
  • -
    +
    --}} + -
    -
    -
    - - -
    -
    -

    travis-pro

    -

    travis-rubies

    -
    -
    -

    9874 started

    -

    394348a

    -

    in queue

    -

    master

    -
    -
    - -
    - -
    -
    -
    -
    - - -
    -
    -

    travis-pro

    -

    travis-rubies

    -
    -
    -

    9874 started

    -

    394348a

    -

    in queue

    -

    master

    -
    -
    - -
    - -
    -
    - {{!--

    Want to keep an eye on certain projects? Star repositories below to add them in this section.

    -
    --}} +
    -
    -
    -
    - - + {{#each repo in filteredRepositories}} +
    + {{#if repo.private }} +
    + {{/if}} +
    + + +
    +
    +

    {{repo.owner.login}}

    +

    {{#link-to "repo" repo.owner.login repo.name}}{{repo.name}}{{/link-to}}

    +
    +
    +

    + {{#link-to "build" repo.owner.login repo.name repo.last_build.id}} + {{repo.last_build.number}} {{repo.last_build.state}} + {{/link-to}}

    +

    master

    +

    394348a

    +

    {{format-time repo.last_build.finished_at}}

    +
    +
    + +
    +
    -
    -

    travis-pro

    -

    travis-rubies

    -
    -
    -

    9874 started

    -

    master

    -

    394348a

    -

    in queue

    -
    -
    - -
    - -
    + {{/each}} -
    -
    -
    - - -
    -
    -

    travis-pro

    -

    travis-pro-api

    -
    -
    -

    9874 failed

    -

    master

    -

    394348a

    -

    25 min ago

    -
    -
    - -
    - -
    - -
    -
    -
    - - -
    -
    -

    travis-pro

    -

    travis-pro-hub

    -
    -
    -

    9874 errored

    -

    master

    -

    394348a

    -

    1 hour ago

    -
    -
    - -
    - -
    - -
    -
    - - -
    -
    -

    travis-pro

    -

    travis-gatekeeper

    -
    -
    -

    9874 cancelled

    -

    master

    -

    394348a

    -

    3 hours ago

    -
    -
    - -
    - -
    - -
    +{{!--
    @@ -269,7 +127,7 @@
  • Deactivate repository
  • Trigger a build
  • -
    +
    --}}