From cd54f7e81bbedff94ea78092f44fb67bd8c2ac57 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 29 Sep 2020 06:09:45 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/boards/index.js | 11 +- .../shared/icons/intro_illustration.svg | 1 - app/assets/stylesheets/_page_specific_files.scss | 1 - .../stylesheets/page_bundles/cycle_analytics.scss | 355 +++++++++++++++++++++ app/assets/stylesheets/pages/cycle_analytics.scss | 353 -------------------- app/assets/stylesheets/pages/pipelines.scss | 166 +++++----- app/assets/stylesheets/themes/_dark.scss | 2 + .../projects/static_site_editor_controller.rb | 7 +- app/helpers/clusters_helper.rb | 8 - app/services/static_site_editor/config_service.rb | 64 +++- app/views/clusters/clusters/_buttons.html.haml | 6 - app/views/clusters/clusters/_cluster.html.haml | 19 -- app/views/clusters/clusters/index.html.haml | 26 +- app/views/projects/cycle_analytics/show.html.haml | 2 + .../projects/pipeline_schedules/index.html.haml | 2 +- app/views/shared/labels/_form.html.haml | 6 +- app/views/shared/labels/_nav.html.haml | 6 +- 17 files changed, 521 insertions(+), 514 deletions(-) delete mode 100644 app/assets/javascripts/pages/projects/pipeline_schedules/shared/icons/intro_illustration.svg create mode 100644 app/assets/stylesheets/page_bundles/cycle_analytics.scss delete mode 100644 app/assets/stylesheets/pages/cycle_analytics.scss delete mode 100644 app/views/clusters/clusters/_buttons.html.haml delete mode 100644 app/views/clusters/clusters/_cluster.html.haml (limited to 'app') diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js index df6792023ed..dd4d075a042 100644 --- a/app/assets/javascripts/boards/index.js +++ b/app/assets/javascripts/boards/index.js @@ -155,7 +155,13 @@ export default () => { } }, methods: { - ...mapActions(['setInitialBoardData', 'setFilters', 'fetchEpicsSwimlanes', 'resetIssues']), + ...mapActions([ + 'setInitialBoardData', + 'setFilters', + 'fetchEpicsSwimlanes', + 'resetIssues', + 'resetEpics', + ]), initialBoardLoad() { boardsStore .all() @@ -176,7 +182,8 @@ export default () => { performSearch() { this.setFilters(convertObjectPropsToCamelCase(urlParamsToObject(window.location.search))); if (gon.features.boardsWithSwimlanes && this.isShowingEpicsSwimlanes) { - this.fetchEpicsSwimlanes(false); + this.resetEpics(); + this.fetchEpicsSwimlanes({ withLists: false }); this.resetIssues(); } }, diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/icons/intro_illustration.svg b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/icons/intro_illustration.svg deleted file mode 100644 index 26d1ff97b3e..00000000000 --- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/icons/intro_illustration.svg +++ /dev/null @@ -1 +0,0 @@ -illustration \ No newline at end of file diff --git a/app/assets/stylesheets/_page_specific_files.scss b/app/assets/stylesheets/_page_specific_files.scss index 3380d93e3d7..e8899b0a430 100644 --- a/app/assets/stylesheets/_page_specific_files.scss +++ b/app/assets/stylesheets/_page_specific_files.scss @@ -6,7 +6,6 @@ @import './pages/ci_projects'; @import './pages/clusters'; @import './pages/commits'; -@import './pages/cycle_analytics'; @import './pages/deploy_keys'; @import './pages/detail_page'; @import './pages/dev_ops_report'; diff --git a/app/assets/stylesheets/page_bundles/cycle_analytics.scss b/app/assets/stylesheets/page_bundles/cycle_analytics.scss new file mode 100644 index 00000000000..3a5e2e4159d --- /dev/null +++ b/app/assets/stylesheets/page_bundles/cycle_analytics.scss @@ -0,0 +1,355 @@ +@import 'mixins_and_variables_and_functions'; + +#cycle-analytics, +.cycle-analytics { + margin: 24px auto 0; + position: relative; + + .landing { + margin-top: 0; + + .inner-content { + white-space: normal; + + h4, + p { + margin: 7px 0 0; + max-width: 480px; + padding: 0 $gl-padding; + + @include media-breakpoint-down(sm) { + margin: 0 auto; + } + } + } + + .svg-container svg { + width: 136px; + height: 136px; + } + } + + .col-headers { + ul { + @include clearfix; + margin: 0; + padding: 0; + } + + li { + display: inline-block; + float: left; + line-height: 50px; + width: 20%; + } + + .stage-header { + width: 20.5%; + } + + .median-header { + width: 19.5%; + } + + .event-header { + width: 45%; + } + + .total-time-header { + width: 15%; + } + } + + .card { + .content-block { + padding: 24px 0; + border-bottom: 0; + position: relative; + + @include media-breakpoint-down(xs) { + padding: 6px 0 24px; + } + } + + .column { + text-align: center; + + @include media-breakpoint-down(xs) { + padding: 15px 0; + } + + .header { + font-size: 30px; + line-height: 38px; + font-weight: $gl-font-weight-normal; + margin: 0; + } + + .text { + color: var(--gray-500, $gray-500); + margin: 0; + } + + &:last-child { + @include media-breakpoint-down(xs) { + text-align: center; + } + } + } + } + + .stage-panel-body { + display: flex; + flex-wrap: wrap; + } + + .stage-nav, + .stage-entries { + display: flex; + vertical-align: top; + font-size: $gl-font-size; + } + + .stage-nav { + width: 40%; + margin-bottom: 0; + + ul { + padding: 0; + margin: 0; + width: 100%; + } + + li { + @include clearfix; + list-style-type: none; + } + + .stage-nav-item { + line-height: 65px; + + &.active { + background: var(--blue-50, $blue-50); + border-color: var(--blue-300, $blue-300); + box-shadow: inset 4px 0 0 0 var(--blue-500, $blue-500); + } + + &:hover:not(.active) { + background-color: var(--gray-10, $gray-10); + box-shadow: inset 2px 0 0 0 var(--border-color, $border-color); + cursor: pointer; + } + + .stage-nav-item-cell.stage-name { + width: 44.5%; + } + + .stage-nav-item-cell.stage-median { + min-width: 43%; + } + + .stage-empty, + .not-available { + color: var(--gray-500, $gray-500); + } + } + } + + .stage-panel-container { + width: 100%; + overflow: auto; + } + + .stage-panel { + min-width: 968px; + + .card-header { + padding: 0; + background-color: transparent; + } + + .events-description { + line-height: 65px; + padding: 0 $gl-padding; + } + + .events-info { + color: var(--gray-500, $gray-500); + } + } + + .stage-events { + width: 60%; + min-height: 467px; + } + + .stage-event-list { + margin: 0; + padding: 0; + } + + .stage-event-item { + @include clearfix; + list-style-type: none; + padding: 0 0 $gl-padding; + margin: 0 $gl-padding $gl-padding; + border-bottom: 1px solid var(--gray-50, $gray-50); + + &:last-child { + border-bottom: 0; + margin-bottom: 0; + } + + .item-details, + .item-time { + float: left; + } + + .item-details { + width: 75%; + } + + .item-title { + margin: 0 0 2px; + + &.issue-title, + &.commit-title, + &.merge-request-title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; + display: block; + + a { + color: var(--gl-text-color, $gl-text-color); + } + } + } + + .item-time { + width: 25%; + text-align: right; + } + + .total-time { + font-size: $cycle-analytics-big-font; + color: var(--gl-text-color, $gl-text-color); + + span { + color: var(--gl-text-color, $gl-text-color); + font-size: $gl-font-size; + } + } + + .issue-date, + .build-date { + color: var(--gl-text-color, $gl-text-color); + } + + .mr-link, + .issue-link, + .commit-author-link, + .issue-author-link { + color: var(--gl-text-color, $gl-text-color); + } + + // Custom CSS for components + .item-conmmit-component { + .commit-icon { + svg { + display: inline-block; + width: 20px; + height: 20px; + vertical-align: bottom; + } + } + } + + .merge-request-branch { + a { + max-width: 180px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-block; + vertical-align: bottom; + } + } + } + + // Custom Styles for stage items + .item-build-component { + .item-title { + .icon-build-status { + float: left; + margin-right: 5px; + position: relative; + top: 2px; + } + + .item-build-name { + color: var(--gl-text-color, $gl-text-color); + } + + .pipeline-id { + color: var(--gl-text-color, $gl-text-color); + padding: 0 3px 0 0; + } + + .ref-name { + color: var(--gray-900, $gray-900); + display: inline-block; + max-width: 180px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + line-height: 1.3; + vertical-align: top; + } + + .commit-sha { + color: var(--blue-600, $blue-600); + line-height: 1.3; + vertical-align: top; + font-weight: $gl-font-weight-normal; + } + + .fa { + color: var(--gray-500, $gray-500); + font-size: $code-font-size; + } + } + } + + .empty-stage, + .no-access-stage { + text-align: center; + width: 75%; + margin: 0 auto; + padding-top: 130px; + color: var(--gray-500, $gray-500); + + h4 { + color: var(--gl-text-color, $gl-text-color); + } + } + + .empty-stage { + .icon-no-data { + height: 36px; + width: 78px; + display: inline-block; + margin-bottom: 20px; + } + } + + .no-access-stage { + .icon-lock { + height: 36px; + width: 78px; + display: inline-block; + margin-bottom: 20px; + } + } +} diff --git a/app/assets/stylesheets/pages/cycle_analytics.scss b/app/assets/stylesheets/pages/cycle_analytics.scss deleted file mode 100644 index c509bf121bc..00000000000 --- a/app/assets/stylesheets/pages/cycle_analytics.scss +++ /dev/null @@ -1,353 +0,0 @@ -#cycle-analytics, -.cycle-analytics { - margin: 24px auto 0; - position: relative; - - .landing { - margin-top: 0; - - .inner-content { - white-space: normal; - - h4, - p { - margin: 7px 0 0; - max-width: 480px; - padding: 0 $gl-padding; - - @include media-breakpoint-down(sm) { - margin: 0 auto; - } - } - } - - .svg-container svg { - width: 136px; - height: 136px; - } - } - - .col-headers { - ul { - @include clearfix; - margin: 0; - padding: 0; - } - - li { - display: inline-block; - float: left; - line-height: 50px; - width: 20%; - } - - .stage-header { - width: 20.5%; - } - - .median-header { - width: 19.5%; - } - - .event-header { - width: 45%; - } - - .total-time-header { - width: 15%; - } - } - - .card { - .content-block { - padding: 24px 0; - border-bottom: 0; - position: relative; - - @include media-breakpoint-down(xs) { - padding: 6px 0 24px; - } - } - - .column { - text-align: center; - - @include media-breakpoint-down(xs) { - padding: 15px 0; - } - - .header { - font-size: 30px; - line-height: 38px; - font-weight: $gl-font-weight-normal; - margin: 0; - } - - .text { - color: $layout-link-gray; - margin: 0; - } - - &:last-child { - @include media-breakpoint-down(xs) { - text-align: center; - } - } - } - } - - .stage-panel-body { - display: flex; - flex-wrap: wrap; - } - - .stage-nav, - .stage-entries { - display: flex; - vertical-align: top; - font-size: $gl-font-size; - } - - .stage-nav { - width: 40%; - margin-bottom: 0; - - ul { - padding: 0; - margin: 0; - width: 100%; - } - - li { - @include clearfix; - list-style-type: none; - } - - .stage-nav-item { - line-height: 65px; - - &.active { - background: $blue-50; - border-color: $blue-300; - box-shadow: inset 4px 0 0 0 $blue-500; - } - - &:hover:not(.active) { - background-color: $gray-lightest; - box-shadow: inset 2px 0 0 0 $border-color; - cursor: pointer; - } - - .stage-nav-item-cell.stage-name { - width: 44.5%; - } - - .stage-nav-item-cell.stage-median { - min-width: 43%; - } - - .stage-empty, - .not-available { - color: $gl-text-color-secondary; - } - } - } - - .stage-panel-container { - width: 100%; - overflow: auto; - } - - .stage-panel { - min-width: 968px; - - .card-header { - padding: 0; - background-color: transparent; - } - - .events-description { - line-height: 65px; - padding: 0 $gl-padding; - } - - .events-info { - color: $gl-text-color-secondary; - } - } - - .stage-events { - width: 60%; - min-height: 467px; - } - - .stage-event-list { - margin: 0; - padding: 0; - } - - .stage-event-item { - @include clearfix; - list-style-type: none; - padding: 0 0 $gl-padding; - margin: 0 $gl-padding $gl-padding; - border-bottom: 1px solid $gray-darker; - - &:last-child { - border-bottom: 0; - margin-bottom: 0; - } - - .item-details, - .item-time { - float: left; - } - - .item-details { - width: 75%; - } - - .item-title { - margin: 0 0 2px; - - &.issue-title, - &.commit-title, - &.merge-request-title { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - max-width: 100%; - display: block; - - a { - color: $gl-text-color; - } - } - } - - .item-time { - width: 25%; - text-align: right; - } - - .total-time { - font-size: $cycle-analytics-big-font; - color: $gl-text-color; - - span { - color: $gl-text-color; - font-size: $gl-font-size; - } - } - - .issue-date, - .build-date { - color: $gl-text-color; - } - - .mr-link, - .issue-link, - .commit-author-link, - .issue-author-link { - color: $gl-text-color; - } - - // Custom CSS for components - .item-conmmit-component { - .commit-icon { - svg { - display: inline-block; - width: 20px; - height: 20px; - vertical-align: bottom; - } - } - } - - .merge-request-branch { - a { - max-width: 180px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - display: inline-block; - vertical-align: bottom; - } - } - } - - // Custom Styles for stage items - .item-build-component { - .item-title { - .icon-build-status { - float: left; - margin-right: 5px; - position: relative; - top: 2px; - } - - .item-build-name { - color: $gl-text-color; - } - - .pipeline-id { - color: $gl-text-color; - padding: 0 3px 0 0; - } - - .ref-name { - color: $black; - display: inline-block; - max-width: 180px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - line-height: 1.3; - vertical-align: top; - } - - .commit-sha { - color: $blue-600; - line-height: 1.3; - vertical-align: top; - font-weight: $gl-font-weight-normal; - } - - .fa { - color: $gl-text-color-secondary; - font-size: $code-font-size; - } - } - } - - .empty-stage, - .no-access-stage { - text-align: center; - width: 75%; - margin: 0 auto; - padding-top: 130px; - color: $gl-text-color-secondary; - - h4 { - color: $gl-text-color; - } - } - - .empty-stage { - .icon-no-data { - height: 36px; - width: 78px; - display: inline-block; - margin-bottom: 20px; - } - } - - .no-access-stage { - .icon-lock { - height: 36px; - width: 78px; - display: inline-block; - margin-bottom: 20px; - } - } -} diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 10ab32d1e9a..4e2ac94f5b2 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -322,9 +322,11 @@ } } -.admin-builds-table { - .ci-table td:last-child { - min-width: 120px; +[data-page='admin:jobs:index'] { + .admin-builds-table { + td:last-child { + min-width: 120px; + } } } @@ -333,110 +335,108 @@ border-bottom: 0; } -.tab-pane { - &.builds .ci-table tr { - height: 71px; - } - - .ci-table { - thead th { - border-top: 0; +[data-page='projects:pipelines:show'] { + .tab-pane { + .ci-table { + thead th { + border-top: 0; + } } } -} -.build-failures { - .build-state { - padding: 20px 2px; + .build-failures { + .build-state { + padding: 20px 2px; - .build-name { - font-weight: $gl-font-weight-normal; - } + .build-name { + font-weight: $gl-font-weight-normal; + } - .stage { - color: $gl-text-color-secondary; - font-weight: $gl-font-weight-normal; - vertical-align: middle; + .stage { + color: $gl-text-color-secondary; + font-weight: $gl-font-weight-normal; + vertical-align: middle; + } } - } - .build-log { - border: 0; - line-height: initial; - } + .build-log { + border: 0; + line-height: initial; + } - .build-trace-row td { - border-top: 0; - border-bottom-width: 1px; - border-bottom-style: solid; - padding-top: 0; - } + .build-trace-row td { + border-top: 0; + border-bottom-width: 1px; + border-bottom-style: solid; + padding-top: 0; + } - .build-trace { - width: 100%; - text-align: left; - margin-top: $gl-padding; - } + .build-trace { + width: 100%; + text-align: left; + margin-top: $gl-padding; + } - .build-name { - width: 196px; + .build-name { + width: 196px; - a { - font-weight: $gl-font-weight-bold; - color: $gl-text-color; - text-decoration: none; + a { + font-weight: $gl-font-weight-bold; + color: $gl-text-color; + text-decoration: none; - &:focus, - &:hover { - text-decoration: underline; + &:focus, + &:hover { + text-decoration: underline; + } } } - } - - .build-actions { - width: 70px; - text-align: right; - } - .build-stage { - width: 140px; - } - - .ci-status-icon-failed { - padding: 10px 0 10px 12px; - width: 12px + 24px; // padding-left + svg width - } - - .build-icon svg { - width: 24px; - height: 24px; - vertical-align: middle; - } + .build-actions { + width: 70px; + text-align: right; + } - .build-state, - .build-trace-row { - > td:last-child { - padding-right: 0; + .build-stage { + width: 140px; } - } - @include media-breakpoint-down(sm) { - td:empty { - display: none; + .ci-status-icon-failed { + padding: 10px 0 10px 12px; + width: 12px + 24px; // padding-left + svg width } - .ci-table { - margin-top: 2 * $gl-padding; + .build-icon svg { + width: 24px; + height: 24px; + vertical-align: middle; } - .build-trace-container { - padding-top: $gl-padding; - padding-bottom: $gl-padding; + .build-state, + .build-trace-row { + > td:last-child { + padding-right: 0; + } } - .build-trace { - margin-bottom: 0; - margin-top: 0; + @include media-breakpoint-down(sm) { + td:empty { + display: none; + } + + .ci-table { + margin-top: 2 * $gl-padding; + } + + .build-trace-container { + padding-top: $gl-padding; + padding-bottom: $gl-padding; + } + + .build-trace { + margin-bottom: 0; + margin-top: 0; + } } } } diff --git a/app/assets/stylesheets/themes/_dark.scss b/app/assets/stylesheets/themes/_dark.scss index bfbcb8c13c6..cd607e9b247 100644 --- a/app/assets/stylesheets/themes/_dark.scss +++ b/app/assets/stylesheets/themes/_dark.scss @@ -163,6 +163,8 @@ body.gl-dark { --gl-text-color: #{$gray-900}; --border-color: #{$border-color}; + + --white: #{$white}; } $border-white-light: $gray-900; diff --git a/app/controllers/projects/static_site_editor_controller.rb b/app/controllers/projects/static_site_editor_controller.rb index e97a8db0b79..a6ed044f92e 100644 --- a/app/controllers/projects/static_site_editor_controller.rb +++ b/app/controllers/projects/static_site_editor_controller.rb @@ -27,7 +27,12 @@ class Projects::StaticSiteEditorController < Projects::ApplicationController if service_response.success? @data = service_response.payload else - respond_422 + # TODO: For now, if the service returns any error, the user is redirected + # to the root project page with the error message displayed as an alert. + # See https://gitlab.com/gitlab-org/gitlab/-/issues/213285#note_414808004 + # for discussion of plans to handle this via a page owned by the Static Site Editor. + flash[:alert] = service_response.message + redirect_to project_path(project) end end diff --git a/app/helpers/clusters_helper.rb b/app/helpers/clusters_helper.rb index caad215e996..884452fe32f 100644 --- a/app/helpers/clusters_helper.rb +++ b/app/helpers/clusters_helper.rb @@ -42,14 +42,6 @@ module ClustersHelper } end - # This method is depreciated and will be removed when associated HAML files are moved to JavaScript - def provider_icon(provider = nil) - img_data = js_clusters_list_data.dig(:img_tags, provider&.to_sym) || - js_clusters_list_data.dig(:img_tags, :default) - - image_tag img_data[:path], alt: img_data[:text], class: 'gl-h-full' - end - def render_gcp_signup_offer return if Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers? return unless show_gcp_signup_offer? diff --git a/app/services/static_site_editor/config_service.rb b/app/services/static_site_editor/config_service.rb index 987ee071976..3be56790f7b 100644 --- a/app/services/static_site_editor/config_service.rb +++ b/app/services/static_site_editor/config_service.rb @@ -4,18 +4,38 @@ module StaticSiteEditor class ConfigService < ::BaseContainerService ValidationError = Class.new(StandardError) - def execute + def initialize(container:, current_user: nil, params: {}) + super + @project = container + @repository = project.repository + @ref = params.fetch(:ref) + end + + def execute check_access! + file_config = load_file_config! + file_data = file_config.to_hash_with_defaults + generated_data = load_generated_config.data + + check_for_duplicate_keys!(generated_data, file_data) + data = merged_data(generated_data, file_data) + ServiceResponse.success(payload: data) rescue ValidationError => e ServiceResponse.error(message: e.message) + rescue => e + Gitlab::ErrorTracking.track_and_raise_exception(e) end private - attr_reader :project + attr_reader :project, :repository, :ref + + def static_site_editor_config_file + '.gitlab/static-site-editor.yml' + end def check_access! unless can?(current_user, :download_code, project) @@ -23,27 +43,43 @@ module StaticSiteEditor end end - def data - check_for_duplicate_keys! - generated_data.merge(file_data) + def load_file_config! + yaml = yaml_from_repo.presence || '{}' + file_config = Gitlab::StaticSiteEditor::Config::FileConfig.new(yaml) + + unless file_config.valid? + raise ValidationError, file_config.errors.first + end + + file_config + rescue Gitlab::StaticSiteEditor::Config::FileConfig::ConfigError => e + raise ValidationError, e.message end - def generated_data - @generated_data ||= Gitlab::StaticSiteEditor::Config::GeneratedConfig.new( + def load_generated_config + Gitlab::StaticSiteEditor::Config::GeneratedConfig.new( project.repository, - params.fetch(:ref), + ref, params.fetch(:path), params[:return_url] - ).data - end - - def file_data - @file_data ||= Gitlab::StaticSiteEditor::Config::FileConfig.new.data + ) end - def check_for_duplicate_keys! + def check_for_duplicate_keys!(generated_data, file_data) duplicate_keys = generated_data.keys & file_data.keys raise ValidationError.new("Duplicate key(s) '#{duplicate_keys}' found.") if duplicate_keys.present? end + + def merged_data(generated_data, file_data) + generated_data.merge(file_data) + end + + def yaml_from_repo + project.repository.blob_data_at(ref, static_site_editor_config_file) + rescue GRPC::NotFound + # Return nil in the case of a GRPC::NotFound exception, so the default config will be used. + # Allow any other unexpected exception will be tracked and re-raised. + nil + end end end diff --git a/app/views/clusters/clusters/_buttons.html.haml b/app/views/clusters/clusters/_buttons.html.haml deleted file mode 100644 index c81d1d5b05a..00000000000 --- a/app/views/clusters/clusters/_buttons.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -.nav-controls - - if clusterable.can_add_cluster? - = link_to s_('ClusterIntegration|Add Kubernetes cluster'), clusterable.new_path, class: 'btn btn-success js-add-cluster' - - else - %span.btn.btn-add-cluster.disabled.js-add-cluster - = s_("ClusterIntegration|Add Kubernetes cluster") diff --git a/app/views/clusters/clusters/_cluster.html.haml b/app/views/clusters/clusters/_cluster.html.haml deleted file mode 100644 index f11117ea5c4..00000000000 --- a/app/views/clusters/clusters/_cluster.html.haml +++ /dev/null @@ -1,19 +0,0 @@ -.card - .card-body.gl-responsive-table-row - .table-section.section-60 - .table-mobile-header{ role: "rowheader" }= s_("ClusterIntegration|Kubernetes cluster") - .table-mobile-content.gl-display-flex.gl-align-items-center.gl-justify-content-end.gl-justify-content-md-start - .gl-w-6.gl-h-6.gl-mr-3.gl-display-flex.gl-align-items-center= provider_icon(cluster.provider_type) - = cluster.item_link(clusterable, html_options: { data: { qa_selector: 'cluster', qa_cluster_name: cluster.name } }) - - if cluster.status_name == :creating - .spinner.ml-2.align-middle.has-tooltip{ title: s_("ClusterIntegration|Cluster being created") } - - unless cluster.enabled? - %span.badge.badge-danger Connection disabled - .table-section.section-25 - .table-mobile-header{ role: "rowheader" }= s_("ClusterIntegration|Environment scope") - .table-mobile-content= cluster.environment_scope - .table-section.section-15.text-right - .table-mobile-header{ role: "rowheader" } - .table-mobile-content - %span.badge.badge-light - = cluster.cluster_type_description diff --git a/app/views/clusters/clusters/index.html.haml b/app/views/clusters/clusters/index.html.haml index 01e94e124f9..803b3d1c156 100644 --- a/app/views/clusters/clusters/index.html.haml +++ b/app/views/clusters/clusters/index.html.haml @@ -10,23 +10,11 @@ .top-area.adjust .nav-text = s_('ClusterIntegration|Kubernetes clusters can be used to deploy applications and to provide Review Apps for this project') - = render 'clusters/clusters/buttons' + .nav-controls + - if clusterable.can_add_cluster? + = link_to s_('ClusterIntegration|Add Kubernetes cluster'), clusterable.new_path, class: 'btn gl-button btn-success js-add-cluster' + - else + %span.btn.gl-button.btn-success.js-add-cluster.disabled + = s_("ClusterIntegration|Add Kubernetes cluster") - - if Feature.enabled?(:clusters_list_redesign, default_enabled: true) - #js-clusters-list-app{ data: js_clusters_list_data(clusterable.index_path(format: :json)) } - - else - - if @has_ancestor_clusters - .bs-callout.bs-callout-info - = s_('ClusterIntegration|Clusters are utilized by selecting the nearest ancestor with a matching environment scope. For example, project clusters will override group clusters.') - %strong - = link_to _('More information'), help_page_path('user/group/clusters/index', anchor: 'cluster-precedence') - .clusters-table.js-clusters-list{ data: { testid: 'cluster_list_table' } } - .gl-responsive-table-row.table-row-header{ role: "row" } - .table-section.section-60{ role: "rowheader" } - = s_("ClusterIntegration|Kubernetes cluster") - .table-section.section-30{ role: "rowheader" } - = s_("ClusterIntegration|Environment scope") - .table-section.section-10{ role: "rowheader" } - - @clusters.each do |cluster| - = render "cluster", cluster: cluster.present(current_user: current_user) - = paginate @clusters, theme: "gitlab" + #js-clusters-list-app{ data: js_clusters_list_data(clusterable.index_path(format: :json)) } diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index d7e10efc3b1..ca689b0bad7 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,4 +1,6 @@ - page_title _("Value Stream Analytics") +- content_for :page_specific_javascripts do + = stylesheet_link_tag 'page_bundles/cycle_analytics' #cycle-analytics{ "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - if @cycle_analytics_no_data diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 0bcf8ae605a..91083cc0768 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -2,7 +2,7 @@ - page_title _("Pipeline Schedules") -#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules'), image_url: image_path('pages/projects/pipeline_schedules/shared/icons/intro_illustration.svg') } } +#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules'), image_url: image_path('illustrations/pipeline_schedule_callout.svg') } } .top-area - schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) } = render "tabs", schedule_path_proc: schedule_path_proc, all_schedules: @all_schedules, scope: @scope diff --git a/app/views/shared/labels/_form.html.haml b/app/views/shared/labels/_form.html.haml index 78ff225daad..2df6c3a6afd 100644 --- a/app/views/shared/labels/_form.html.haml +++ b/app/views/shared/labels/_form.html.haml @@ -28,7 +28,7 @@ = render_suggested_colors .form-actions - if @label.persisted? - = f.submit 'Save changes', class: 'btn btn-success js-save-button' + = f.submit 'Save changes', class: 'btn gl-button btn-success js-save-button' - else - = f.submit 'Create label', class: 'btn btn-success js-save-button qa-label-create-button' - = link_to 'Cancel', back_path, class: 'btn btn-cancel' + = f.submit 'Create label', class: 'btn gl-button btn-success js-save-button qa-label-create-button' + = link_to 'Cancel', back_path, class: 'btn gl-button btn-cancel' diff --git a/app/views/shared/labels/_nav.html.haml b/app/views/shared/labels/_nav.html.haml index d613ea466fa..cc43174dc19 100644 --- a/app/views/shared/labels/_nav.html.haml +++ b/app/views/shared/labels/_nav.html.haml @@ -15,10 +15,10 @@ .input-group = search_field_tag :search, params[:search], { placeholder: _('Filter'), id: 'label-search', class: 'form-control search-text-input input-short', spellcheck: false, autofocus: true } %span.input-group-append - %button.btn.btn-default{ type: "submit", "aria-label" => _('Submit search') } + %button.btn.gl-button.btn-default{ type: "submit", "aria-label" => _('Submit search') } = icon("search") = render 'shared/labels/sort_dropdown' - if labels_or_filters && can_admin_label && @project - = link_to _('New label'), new_project_label_path(@project), class: "btn btn-success qa-label-create-new" + = link_to _('New label'), new_project_label_path(@project), class: "btn gl-button btn-success qa-label-create-new" - if labels_or_filters && can_admin_label && @group - = link_to _('New label'), new_group_label_path(@group), class: "btn btn-success qa-label-create-new" + = link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-success qa-label-create-new" -- cgit v1.2.3