Welcome to mirror list, hosted at ThFree Co, Russian Federation.

environment_actions.js.es6 « components « environments « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 81468f4d3bc04575149a103ed7889cda0766478d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*= require vue */
/* global Vue */

(() => {
  window.gl = window.gl || {};
  window.gl.environmentsList = window.gl.environmentsList || {};

  gl.environmentsList.ActionsComponent = Vue.component('actions-component', {
    props: {
      actions: {
        type: Array,
        required: false,
        default: () => [],
      },

      playIconSvg: {
        type: String,
        required: false,
      },
    },

    template: `
      <div class="inline">
        <div class="dropdown">
          <a class="dropdown-new btn btn-default" data-toggle="dropdown">
            <span class="js-dropdown-play-icon-container" v-html="playIconSvg"></span>
            <i class="fa fa-caret-down"></i>
          </a>

          <ul class="dropdown-menu dropdown-menu-align-right">
            <li v-for="action in actions">
              <a :href="action.play_path"
                data-method="post"
                rel="nofollow"
                class="js-manual-action-link">

                <span class="js-action-play-icon-container" v-html="playIconSvg"></span>

                <span>
                  {{action.name}}
                </span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    `,
  });
})();