From bc95708fe005cd36a49946db22e35ae82da4584b Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 29 Sep 2016 10:03:58 +0200 Subject: [wip] gitlab-builds --- .../gitlab_build_status/gitlab_build_status.coffee | 11 ++++ .../gitlab_build_status/gitlab_build_status.html | 15 +++++ .../gitlab_build_status/gitlab_build_status.scss | 56 ++++++++++++++++++ .../gitlab_merge_requests.coffee | 9 --- .../gitlab_merge_requests.html | 18 ------ .../gitlab_merge_requests.scss | 67 ---------------------- 6 files changed, 82 insertions(+), 94 deletions(-) create mode 100644 widgets/gitlab_build_status/gitlab_build_status.coffee create mode 100644 widgets/gitlab_build_status/gitlab_build_status.html create mode 100644 widgets/gitlab_build_status/gitlab_build_status.scss delete mode 100644 widgets/gitlab_merge_requests/gitlab_merge_requests.coffee delete mode 100644 widgets/gitlab_merge_requests/gitlab_merge_requests.html delete mode 100644 widgets/gitlab_merge_requests/gitlab_merge_requests.scss (limited to 'widgets') diff --git a/widgets/gitlab_build_status/gitlab_build_status.coffee b/widgets/gitlab_build_status/gitlab_build_status.coffee new file mode 100644 index 0000000..e501aed --- /dev/null +++ b/widgets/gitlab_build_status/gitlab_build_status.coffee @@ -0,0 +1,11 @@ +class Dashing.GitlabBuildStatus extends Dashing.Widget + + onData: (data) -> + if data.failed + $(@node).find('div.gitlab-build-failed').show() + $(@node).find('div.gitlab-build-succeeded').hide() + $(@node).css("background-color", "red") + else + $(@node).find('div.gitlab-build-failed').hide() + $(@node).find('div.gitlab-build-succeeded').show() + $(@node).css("background-color", "#50BA5B") diff --git a/widgets/gitlab_build_status/gitlab_build_status.html b/widgets/gitlab_build_status/gitlab_build_status.html new file mode 100644 index 0000000..b71d8a6 --- /dev/null +++ b/widgets/gitlab_build_status/gitlab_build_status.html @@ -0,0 +1,15 @@ +
+

FAILED

+ +
+ +
+

All Gitlab builds are successful

+
+ +

diff --git a/widgets/gitlab_build_status/gitlab_build_status.scss b/widgets/gitlab_build_status/gitlab_build_status.scss new file mode 100644 index 0000000..46e867d --- /dev/null +++ b/widgets/gitlab_build_status/gitlab_build_status.scss @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------- +// Sass declarations +// ---------------------------------------------------------------------------- +$background-color: #ec663c; +$title-color: rgba(255, 255, 255, 0.7); +$label-color: rgba(255, 255, 255, 0.7); +$value-color: #fff; + +// ---------------------------------------------------------------------------- +// Widget-text styles +// ---------------------------------------------------------------------------- +.widget-gitlab-build-status { + + background-color: $background-color; + + .title { + color: $title-color; + } + .updated-at { + color: rgba(255, 255, 255, 0.7); + } + + ol, ul { + margin: 0 15px; + text-align: left; + color: $label-color; + } + + li { + margin-bottom: 5px; + font-size: 20px; + } + + .label { + color: $label-color; + } + + .value { + margin-left: 12px; + font-weight: 600; + color: $value-color; + } + + .updated-at { + color: rgba(0, 0, 0, 0.3); + } + + .build-failed { + display: none; + } + + .fa { + font-size: 10em; + color: $label-color; + } +} diff --git a/widgets/gitlab_merge_requests/gitlab_merge_requests.coffee b/widgets/gitlab_merge_requests/gitlab_merge_requests.coffee deleted file mode 100644 index e68c3f6..0000000 --- a/widgets/gitlab_merge_requests/gitlab_merge_requests.coffee +++ /dev/null @@ -1,9 +0,0 @@ -class Dashing.GitlabMergeRequests extends Dashing.Widget - - ready: -> - # This is fired when the widget is done being rendered - - onData: (data) -> - # Handle incoming data - # You can access the html node of this widget with `@node` - # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. \ No newline at end of file diff --git a/widgets/gitlab_merge_requests/gitlab_merge_requests.html b/widgets/gitlab_merge_requests/gitlab_merge_requests.html deleted file mode 100644 index 396da97..0000000 --- a/widgets/gitlab_merge_requests/gitlab_merge_requests.html +++ /dev/null @@ -1,18 +0,0 @@ -

GitLab

-

- - - -

diff --git a/widgets/gitlab_merge_requests/gitlab_merge_requests.scss b/widgets/gitlab_merge_requests/gitlab_merge_requests.scss deleted file mode 100644 index d3c51f5..0000000 --- a/widgets/gitlab_merge_requests/gitlab_merge_requests.scss +++ /dev/null @@ -1,67 +0,0 @@ -// ---------------------------------------------------------------------------- -// Sass declarations -// ---------------------------------------------------------------------------- -$background-color: teal; - -$heading-color: rgba(255, 255, 255, 0.7); -$merge-title-color: rgba(255, 255, 255, 1.0); -$merge-info-color: rgba(255, 255, 255, 1.0); - -// ---------------------------------------------------------------------------- -// Widget-gitlab-merge-requests styles -// ---------------------------------------------------------------------------- -.widget-gitlab-merge-requests { - - background-color: $background-color; - vertical-align: top !important; - - .header { - margin-bottom: 0; - font-size: xx-large; - color: $heading-color; - } - - .sub-header { - color: $heading-color; - font-size: large; - margin-bottom: 1vh; - } - - .merge { - margin-bottom: 2vh; - } - - .merge-title { - font-size: medium; - font-weight: bold; - color: $merge-title-color; - } - - .merge-info { - font-size: small; - font-style: italic; - color: $merge-info-color; - } - - .merge-info div { - float:left; - } - - .list { - list-style: none; - } - - .updated-at { - color: rgba(0, 0, 0, 0.3); - } - - ol, ul { - margin: 0 15px; - text-align: left; - } - - ol { - list-style-position: inside; - } - -} -- cgit v1.2.3