Commit Graph

99 Commits

Author SHA1 Message Date
syasonik a08d4cad90 Defend against dashboard errors, rework sequence 2019-04-24 18:23:04 +08:00
rpereira2 4a9002cee3 Inherit from BaseService
Change MetricsDashboard::Service to inherit from BaseService so that
it can reuse methods like initialize, success, error.
2019-04-24 18:23:03 +08:00
syasonik 3d302879f4 Add unit tests and fix broken endpoint 2019-04-24 18:23:03 +08:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Sarah Yasonik 193e660291 Resolve Environments#additional_metrics TypeError, ensure unix format 2019-04-09 09:54:17 +00:00
Francisco Javier López 8a134f4c65 Renamed terminal_specification to channel_specification
We're moving from using terminology related to terminals when
we refer to Websockets connections in Workhorse.
It's more appropiate a concept like channel.
2019-04-04 18:32:02 +00:00
syasonik ab1e1b55a8 Specify time window for additional metrics api
Adds support for start and end parameters in the #additional_metrics
endpoint of the EnvironmentsController. start and end are meant to be
unix timestamps, per the Prometheus API (as the consumer of this
endpoint will eventually be transitioned to a prometheus endpoint).
This functionality is behind the :metrics_time_window feature flag
for development.
2019-04-03 17:21:56 +08:00
Vladimir Shushlin 25c10abb80 Add name_without_type to environments.json
It's needed to show shorter names in environments "folders"
2019-02-26 19:13:09 +00:00
Shinya Maeda e8d9df83a6 Inroduce Internal API for searching environment names
Add changelog

Rename word to query

User hash for limit

Do not allow control limit

Rename pluck names and add more specs
2019-02-06 18:14:18 +09:00
syasonik db054bc166 Support flat response for envs index route
To support environment folders in the UI on the Environments List
page, the environments index route previously returned one environment
per folder, excluding those other than the latest deploy. However, the
environtments dropdown on the metrics dashboard requires that any
environment be selectable.

To accommodate both use cases, support an optional 'nested' parameter
in the index route to return either a flat, complete response or a
nested response based on the use case in question. The new default
response structure is the flat response.
2019-01-21 14:51:16 -06:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Yorick Peterse 45812f1cab
Fix Environment terminal specs for EE
In EE we redefine Environment#terminals, which makes it impossible to
use `allow_any_instance_of(Environment)` or
`expect_any_instance_of(Environment)`. Other approaches of stubbing
this class, such as by stubbing `new`, only result in spec failures.

To solve this issue, we add a simple `defined?(EE)` check in the tests
to change the thing that we are testing. This is rather obnoxious,
because it requires EE knowledge in CE, and can break if
`EE::Environment` is removed without updating CE. Unfortunately, it
appears to be the only solution we have apart from modifying these tests
in EE (which would cause merge conflicts).
2018-11-29 09:05:37 +01:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Tiago Botelho 55e2df6c80 Fixes backend specs 2018-07-02 13:02:06 +01:00
Tiago Botelho c9a7145a10 Remove GET empty from EnvironmentsController 2018-06-29 10:02:32 +02:00
Tiago Botelho dd467d6c75 Prevents project first environment from being fetched in every project view 2018-06-28 14:25:15 +02:00
Tiago Botelho 91463e5246 Specify environment actions to distinguish between metrics and every other environment related actions 2018-06-26 23:06:25 -05:00
Rémy Coutable 660439e968
Reduce CE/EE diff in spec/controllers/projects/environments_controller_spec.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-24 19:29:29 +02:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Filipa Lacerda 03976c8f62 Re-enable polling for environments 2017-07-06 14:31:24 +01:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Pawel Chojnacki 97c42df3b8 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch 2017-06-22 15:05:52 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Kamil Trzcinski 91a550f583 Disable environment list polling as it breaks deployboard 2017-06-21 14:10:37 +02:00
Pawel Chojnacki 64bb0d37d4 cleanup wip 2017-06-16 16:53:02 +02:00
Pawel Chojnacki dbb3c28088 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch
# Conflicts:
#	app/models/project_services/prometheus_service.rb
#	app/views/projects/services/_form.html.haml
2017-06-07 10:27:52 +02:00
Pawel Chojnacki 223d07b383 Environments#additional_metrics tests 2017-06-05 18:38:09 +02:00
Z.J. van de Weg 00b00f1ede Merge branch 'master' into zj-realtime-env-list 2017-06-01 10:31:33 +02:00
Lin Jen-Shin c94db0c290 Use - as the prefix so we don't conflict with namespaces
The decision was made around:
https://gitlab.com/gitlab-org/gitlab-ce/issues/26407#note_30624641
2017-05-26 23:06:20 +08:00
Lin Jen-Shin 70eb0c6a88 Merge remote-tracking branch 'upstream/master' into rename-builds-controller
* upstream/master: (307 commits)
  Address feedback
  Add small update for the i18n guide.
  update webpack to v2.6.1 patch release to fix "Can't find variable: Promise" error
  update webpack-bundle-analyzer past v2.4.1 to support NamedChunksPlugin
  name all webpack chunks to improve long term cacheability
  add NameAllModulesPlugin to cover shortcomings of NamedModulesPlugin
  upgrade to latest webpack version
  Only use DROP INDEX CONCURRENTLY on postgreql 9.2+
  Provide default for calculating label text color (!11681)
  Add failing test for #32728
  Bugfix: Always use the default language when generating emails.
  Remove unecessary commit pattern check
  Add regexp_for_value helper method
  Remove shared example and improve sub_group_issuables_spec.rb
  Remove 'should' from scenario in has_subgroup_title_spec.rb
  Cartfile git and binary methods cannot take a GitHub repo
  Fix terminals support for Kubernetes service
  Add review comments to compare_spec.rb
  Fix transient error clicking dropdown items in compare_spec.rb
  Use non-global jQuery reference within raven bundle
  ...
2017-05-26 18:25:32 +08:00
Z.J. van de Weg 7ec8969285 Merge branch 'master' into zj-realtime-env-list 2017-05-25 13:57:22 +02:00
Z.J. van de Weg 3be9820da6 Test etag caching router and incorporate review 2017-05-24 10:02:32 +02:00
Z.J. van de Weg 5c83d3aff2 Improve test wording 2017-05-23 10:59:50 +02:00
Zeger-Jan van de Weg 2792695cfa Make sorting difference clearer 2017-05-19 08:18:10 +02:00
Lin Jen-Shin 71777a4a18 Rename BuildsController to JobsController
Rename other URL generators

admin_builds_path -> admin_jobs_path

Fix tests and more renaming

Fix more tests

Also change build_id to job_id in the controller
2017-05-17 20:17:30 +08:00
Z.J. van de Weg 0385f9efc2 Sort environments folders when opening them
Fixes gitlab-org/gitlab-ce#30814
2017-05-17 13:45:11 +02:00
Fatih Acet 0151325dac Merge request widget redesign 2017-05-09 04:15:34 +00:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Grzegorz Bizon 802126179f Add controller specs for environment folder action 2017-03-27 11:53:43 +02:00
Kamil Trzciński 55f2a5debc Added Prometheus Service and Prometheus graphs 2017-03-07 16:57:42 +00:00
Grzegorz Bizon 2aeb45bdb5 Add support for environment scopes in controller 2017-02-09 11:11:12 +00:00
Grzegorz Bizon efa0502386 Enable grouping and pagination in environmnets API 2017-02-09 11:09:16 +00:00
Fatih Acet 3db5b7033b Add terminal UI and controller actions 2016-12-19 21:27:08 +00:00
Nick Thomas c3d972f4e8 Add terminals to the Kubernetes deployment service 2016-12-19 19:53:04 +00:00
Grzegorz Bizon 4388d90370 Add controller specs for environments index action 2016-11-16 11:58:06 +00:00
Z.J. van de Weg 76e9b68439 Incorporate feedback 2016-07-29 13:54:45 +02:00
Z.J. van de Weg be9aa7f194 Add an URL field to Environments
This MR adds a string (thus max 255 chars) field to the enviroments
table to expose it later in other features.
2016-07-29 13:54:45 +02:00