Renders json endpoint + updates CSS to render the same between pipelines table and pipeline graph
This commit is contained in:
parent
fd972f9fd7
commit
2c835eec69
|
|
@ -1,5 +1,3 @@
|
||||||
/* eslint-disable no-new */
|
|
||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import flash from './flash';
|
import flash from './flash';
|
||||||
import axios from './lib/utils/axios_utils';
|
import axios from './lib/utils/axios_utils';
|
||||||
|
|
@ -62,7 +60,7 @@ export default class MiniPipelineGraph {
|
||||||
*/
|
*/
|
||||||
renderBuildsList(stageContainer, data) {
|
renderBuildsList(stageContainer, data) {
|
||||||
const dropdownContainer = stageContainer.parentElement.querySelector(
|
const dropdownContainer = stageContainer.parentElement.querySelector(
|
||||||
`${this.dropdownListSelector} .js-builds-dropdown-list`,
|
`${this.dropdownListSelector} .js-builds-dropdown-list ul`,
|
||||||
);
|
);
|
||||||
|
|
||||||
dropdownContainer.innerHTML = data;
|
dropdownContainer.innerHTML = data;
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@
|
||||||
axios
|
axios
|
||||||
.get(this.stage.dropdown_path)
|
.get(this.stage.dropdown_path)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
|
// TODO: REMOVE THIS ONCE WE HAVE BACKEND
|
||||||
this.dropdownContent = [
|
this.dropdownContent = [
|
||||||
{
|
{
|
||||||
id: 966,
|
id: 966,
|
||||||
|
|
|
||||||
|
|
@ -686,6 +686,8 @@ $stage-hover-bg: $gray-darker;
|
||||||
$ci-action-icon-size: 22px;
|
$ci-action-icon-size: 22px;
|
||||||
$pipeline-dropdown-line-height: 20px;
|
$pipeline-dropdown-line-height: 20px;
|
||||||
$pipeline-dropdown-status-icon-size: 18px;
|
$pipeline-dropdown-status-icon-size: 18px;
|
||||||
|
$ci-action-dropdown-button-size: 24px;
|
||||||
|
$ci-action-dropdown-svg-size: 12px;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CI variable lists
|
CI variable lists
|
||||||
|
|
|
||||||
|
|
@ -462,62 +462,62 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ci-job-dropdown-container {
|
||||||
|
// override dropdown.scss
|
||||||
|
.dropdown-menu li button {
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ci-action-icon-container {
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
top: 5px;
|
||||||
|
|
||||||
|
// Action Icons in big pipeline-graph nodes
|
||||||
|
&.ci-action-icon-wrapper {
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
background: $white-light;
|
||||||
|
border: 1px solid $border-color;
|
||||||
|
border-radius: 100%;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $stage-hover-bg;
|
||||||
|
border: 1px solid $dropdown-toggle-active-border-color;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: $gl-text-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: $gl-text-color-secondary;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.play {
|
||||||
|
svg {
|
||||||
|
left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.build {
|
.build {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 186px;
|
width: 186px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
|
||||||
.ci-job-dropdown-container {
|
|
||||||
// override dropdown.scss
|
|
||||||
.dropdown-menu li button {
|
|
||||||
padding: 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ensure .build-content has hover style when action-icon is hovered
|
// ensure .build-content has hover style when action-icon is hovered
|
||||||
.ci-job-dropdown-container:hover .build-content {
|
.ci-job-dropdown-container:hover .build-content {
|
||||||
@extend .build-content:hover;
|
@extend .build-content:hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ci-action-icon-container {
|
|
||||||
position: absolute;
|
|
||||||
right: 5px;
|
|
||||||
top: 5px;
|
|
||||||
|
|
||||||
// Action Icons in big pipeline-graph nodes
|
|
||||||
&.ci-action-icon-wrapper {
|
|
||||||
height: 30px;
|
|
||||||
width: 30px;
|
|
||||||
background: $white-light;
|
|
||||||
border: 1px solid $border-color;
|
|
||||||
border-radius: 100%;
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: $stage-hover-bg;
|
|
||||||
border: 1px solid $dropdown-toggle-active-border-color;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $gl-text-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $gl-text-color-secondary;
|
|
||||||
position: relative;
|
|
||||||
top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.play {
|
|
||||||
svg {
|
|
||||||
left: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ci-status-icon svg {
|
.ci-status-icon svg {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
|
@ -604,6 +604,55 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Icons inside dropdown
|
||||||
|
*/
|
||||||
|
.big-pipeline-graph-dropdown-menu,
|
||||||
|
.mini-pipeline-graph-dropdown-menu {
|
||||||
|
|
||||||
|
// override dropdown.scss
|
||||||
|
&.dropdown-menu li button {
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ci-action-icon-container {
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
top: 5px;
|
||||||
|
|
||||||
|
// Action Icons in big pipeline-graph nodes
|
||||||
|
&.ci-action-icon-wrapper {
|
||||||
|
height: $ci-action-dropdown-button-size;
|
||||||
|
width: $ci-action-dropdown-button-size;
|
||||||
|
|
||||||
|
background: $white-light;
|
||||||
|
border: 1px solid $border-color;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $stage-hover-bg;
|
||||||
|
border: 1px solid $dropdown-toggle-active-border-color;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: $gl-text-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: $ci-action-dropdown-svg-size;
|
||||||
|
height: $ci-action-dropdown-svg-size;
|
||||||
|
fill: $gl-text-color-secondary;
|
||||||
|
position: relative;
|
||||||
|
top: 0px;
|
||||||
|
vertical-align: initial;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Triggers the dropdown in the big pipeline graph
|
// Triggers the dropdown in the big pipeline graph
|
||||||
.dropdown-counter-badge {
|
.dropdown-counter-badge {
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
%ul.dropdown-menu.mini-pipeline-graph-dropdown-menu.js-builds-dropdown-container
|
%ul.dropdown-menu.mini-pipeline-graph-dropdown-menu.js-builds-dropdown-container
|
||||||
%li.js-builds-dropdown-list.scrollable-menu
|
%li.js-builds-dropdown-list.scrollable-menu
|
||||||
|
%ul
|
||||||
|
|
||||||
%li.js-builds-dropdown-loading.hidden
|
%li.js-builds-dropdown-loading.hidden
|
||||||
.text-center
|
.text-center
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue