1. 11 Aug, 2016 28 commits
  2. 10 Aug, 2016 12 commits
    • Fatih Acet's avatar
      Merge branch 'fix-thumbs-award-loading-toggle' into 'master' · 928edde2
      Fatih Acet authored
      Fix awardable button mutuality loading spinners
      
      ## What does this MR do?
      Removes the showing and hiding of loading spinners when an awardable's opposite button is selected. 
      
      ## Are there points in the code the reviewer needs to double check?
      Shouldn't be
      
      ## Why was this MR needed?
      Makes the UI more consistent. Reduces confusion of why another button is showing the loading spinner when it was not clicked on.
      
      ## What are the relevant issue numbers?
      Closes #18380 
      
      ## Screenshots (if relevant)
      Before:
      ![loading](/uploads/d4c4e565fa58fbbf3db6ed8e28f9abb0/loading.gif)
      
      After:
      ![CcwRYZcUVm](/uploads/b93fd04853f43a6c70de3cefb20d08a1/CcwRYZcUVm.gif)
      
      ## Does this MR meet the acceptance criteria?
      
      - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
      - Tests
        - [x] All builds are passing
      - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
      - [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
      - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
      
      See merge request !5745
      928edde2
    • Fatih Acet's avatar
      Merge branch 'cs-remove-inline-js' into 'master' · 279c61f3
      Fatih Acet authored
      Remove two simple instances of inline JavaScript.
      
      Not very complicated, they're moved to the dispatcher.
      
      See merge request !5513
      279c61f3
    • Clement Ho's avatar
      e3292f1e
    • Yorick Peterse's avatar
      Merge branch 'explicit-arguments-on-diff_file_html_data' into 'master' · ad8390bc
      Yorick Peterse authored
      Avoid commit lookup on diff_helper
      
      See merge request !5756
      ad8390bc
    • Clement Ho's avatar
      Fix branches page dropdown sort initial state · 88877afd
      Clement Ho authored
      88877afd
    • Rémy Coutable's avatar
      Improve the performance of the GET /:sources/:id/{access_requests,members} API endpoints · 5010be77
      Rémy Coutable authored
      The performance was greatly improved by removing two N+1 queries issues
      for each endpoint.
      
      For comparison:
      
      1. `GET /projects/:id/members`
      
      With two N+1 queries issues (one was already fxed in the following
      snippet):
      
      ```
        ProjectMember Load (0.2ms)  SELECT "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS
      NULL  ORDER BY "members"."id" DESC  [["source_type", "Project"],
      ["source_id", 1], ["source_type", "Project"]]
        User Load (0.5ms)  SELECT "users".* FROM "users" WHERE "users"."id" IN
      (5, 22, 16, 13)  ORDER BY "users"."id" DESC
        ActiveRecord::SchemaMigration Load (0.2ms)  SELECT
      "schema_migrations".* FROM "schema_migrations"
        ProjectMember Load (0.3ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS
      NULL AND "members"."user_id" = $4  ORDER BY "members"."id" DESC LIMIT 1
      [["source_type", "Project"], ["source_id", 1], ["source_type",
      "Project"], ["user_id", 5]]
        ProjectMember Load (0.3ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS
      NULL AND "members"."user_id" = $4  ORDER BY "members"."id" DESC LIMIT 1
      [["source_type", "Project"], ["source_id", 1], ["source_type",
      "Project"], ["user_id", 22]]
        ProjectMember Load (0.3ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS
      NULL AND "members"."user_id" = $4  ORDER BY "members"."id" DESC LIMIT 1
      [["source_type", "Project"], ["source_id", 1], ["source_type",
      "Project"], ["user_id", 16]]
        ProjectMember Load (0.3ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS
      NULL AND "members"."user_id" = $4  ORDER BY "members"."id" DESC LIMIT 1
      [["source_type", "Project"], ["source_id", 1], ["source_type",
      "Project"], ["user_id", 13]]
      ```
      
      Without the N+1 queries issues:
      
      ```
        ProjectMember Load (0.3ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS
      NULL  ORDER BY "members"."id" DESC LIMIT 20 OFFSET 0  [["source_type",
      "Project"], ["source_id", 1], ["source_type", "Project"]]
        User Load (0.5ms)  SELECT "users".* FROM "users" WHERE "users"."id" IN
      (5, 22, 16, 13)  ORDER BY "users"."id" DESC
      ```
      
      2. `GET /projects/:id/access_requests`
      
      With two N+1 queries issues:
      
      ```
        ProjectMember Load (0.3ms)  SELECT "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS
      NOT NULL)  ORDER BY "members"."id" DESC  [["source_type", "Project"],
      ["source_id", 8], ["source_type", "Project"]]
        User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" =
      $1  ORDER BY "users"."id" DESC LIMIT 1  [["id", 24]]
        User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" =
      $1  ORDER BY "users"."id" DESC LIMIT 1  [["id", 23]]
        ActiveRecord::SchemaMigration Load (0.2ms)  SELECT
      "schema_migrations".* FROM "schema_migrations"
        ProjectMember Load (0.1ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS
      NOT NULL) AND "members"."user_id" = $4  ORDER BY "members"."id" DESC
      LIMIT 1  [["source_type", "Project"], ["source_id", 8], ["source_type",
      "Project"], ["user_id", 24]]
        ProjectMember Load (0.2ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS
      NOT NULL) AND "members"."user_id" = $4  ORDER BY "members"."id" DESC
      LIMIT 1  [["source_type", "Project"], ["source_id", 8], ["source_type",
      "Project"], ["user_id", 23]]
      ```
      
      Without the N+1 queries issues:
      
      ```
        ProjectMember Load (0.3ms)  SELECT  "members".* FROM "members" WHERE
      "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember')
      AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND
      "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS
      NOT NULL)  ORDER BY "members"."id" DESC LIMIT 20 OFFSET 0
      [["source_type", "Project"], ["source_id", 8], ["source_type",
      "Project"]]
        User Load (0.5ms)  SELECT "users".* FROM "users" WHERE "users"."id" IN
      (24, 23)  ORDER BY "users"."id" DESC
      ```
      Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
      5010be77
    • Rémy Coutable's avatar
    • Rémy Coutable's avatar
      New AccessRequests API endpoints for Group & Project · 29850364
      Rémy Coutable authored
      Also, mutualize AccessRequests and Members endpoints for Group &
      Project.
      New API documentation for the AccessRequests endpoints.
      Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
      29850364
    • Douwe Maan's avatar
      Merge branch 'decouple-secret-keys' into 'master' · b1aac038
      Douwe Maan authored
      Store OTP secret key in secrets.yml
      
      ## What does this MR do?
      
      Migrate the value of `.secret` to `config/secrets.yml` if present, so that `.secret` can be rotated without preventing all users with 2FA from logging in. (On a clean setup, generate different keys for each.)
      
      ## Are there points in the code the reviewer needs to double check?
      
      I'm not sure we actually need `.secret` at all after this, but it seems safer not to touch it.
      
      ## Why was this MR needed?
      
      We have some DB encryption keys in `config/secrets.yml`, and one in `.secret`. They should all be in the same place.
      
      ## What are the relevant issue numbers?
      
      #3963, which isn't closed until I make the relevant changes in Omnibus too.
      
      ## Does this MR meet the acceptance criteria?
      
      - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
      - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
      - ~~API support added~~
      - Tests
        - [x] Added for this feature/bug
        - [x] All builds are passing
      - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
      - [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
      - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
      
      See merge request !5274
      b1aac038
    • Robert Speicher's avatar
      Merge branch 'clean-up-project-destroy' into 'master' · 4ccba6bf
      Robert Speicher authored
      Clean up project destruction
      
      Instead of redirecting from the project service to the service and back to the model, put all destruction code in the service. Also removes a possible source of failure where run_after_commit may not destroy the project.
      
      See merge request !5695
      4ccba6bf
    • Douwe Maan's avatar
      Merge branch 'feature/svg-badge-template' into 'master' · ae63f152
      Douwe Maan authored
      Use badge image template instead of using separate images
      
      ## What does this MR do?
      
      Makes it possible to use template for badge instead of having multiple files.
      
      ## Are there points in the code the reviewer needs to double check?
      
      We also have a deprecated badge in `controllers/ci/projects_controller.rb`.  We decided to leave it until 9.0, so we still have images in `public/ci/` until 9.0.
      
      ## Why was this MR needed?
      
      We are going to implement build coverage badge, and we do not want to store 101 SVG images for each percentage value.
      
      ## What are the relevant issue numbers?
      
      #3714
      
      ## Screenshots (if relevant)
      
      ![new_build_badge](/uploads/f1d4ed5e34278eb01f48994b5b0579f1/new_build_badge.png)
      
      ## Does this MR meet the acceptance criteria?
      
      - [ ] ~~[CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ (refactoring)
      - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
      - [ ] ~~API support added~~
      - Tests
        - [x] Added for this feature/bug
        - [x] All builds are passing
      - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
      - [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
      - [ ] ~~[Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)~~ (refactoring)
      
      See merge request !5520
      ae63f152
    • Rémy Coutable's avatar
      Update CHANGELOG for 8.10.5 · 34d5426f
      Rémy Coutable authored
      Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
      34d5426f