Commit Graph

554 Commits

Author SHA1 Message Date
GitLab Bot 6cd5b7dbfa Add latest changes from gitlab-org/gitlab@master 2019-09-19 11:50:12 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot d2798d607e Add latest changes from gitlab-org/gitlab@master 2019-09-16 12:06:26 +00:00
Martin Hanzel bd20aeb64c Add helpers to wait for axios requests
Add two methods to the axios_utils Jest mock:

- `waitFor(url)`, which returns a Promise that resolves when the
  next request to `url` finishes.
- `waitForAll()`, which returns a Promise that resolves when all
  pending requests finish.
2019-09-05 12:56:17 +00:00
Patrick Derichs a13abd6731 Add edit_note and spec for editing quick actions
Call QuickActionsService on Note update

Add support for notes which just contain
commands after editing

Return http status gone (410) if note was deleted

Temporary frontend addition so it is not
failing when a note is deleted

Move specs to shared examples

Fix rubocop style issue

Deleting note on frontend when status is 410

Use guard clause for note which got deleted

Simplified condition for nil note

This method should no longer be called
with nil note

Refactoring of execute method to reduce
complexity

Move errors update to delete_note method

Note is now deleted visually when it only
contains commands after update

Add expectation

Fix style issues

Changing action to fix tests

Add tests for removeNote and update
deleteNote expectations
2019-08-26 09:20:00 +00:00
Kushal Pandya 6044b3ed1e Add `searchBy` helper & `SidebarItemEpicsSelect`
- Adds `searchBy` util in common utils
- Adds placeholder `SidebarItemEpicsSelect`
2019-08-22 17:58:44 +05:30
Paul Slaughter 4fdc34c109
Fix mergeUrlParams handling of `+`
**What was the issue?**
If a param value had `+`, it would be encoded as a
literal `+` instead of a space.
2019-08-19 10:28:23 -05:00
minghuan lei aa137fd39f Add repo-refs control for search page
- only in blobs result
2019-08-09 16:32:17 +00:00
Simon Knox 055a7b973d Simplify getTimeDiff function
Pass keyname instead of translated string
2019-08-08 00:06:45 +00:00
Stan Hu 5fbbd3dd6e
Add support for Content-Security-Policy
A nonce-based Content-Security-Policy thwarts XSS attacks by allowing
inline JavaScript to execute if the script nonce matches the header
value. Rails 5.2 supports nonce-based Content-Security-Policy headers,
so provide configuration to enable this and make it work.

To support this, we need to change all `:javascript` HAML filters to the
following form:

```
= javascript_tag nonce: true do
  :plain
    ...
```

We use `%script` throughout our HAML to store JSON and other text, but
since this doesn't execute, browsers don't appear to block this content
from being used and require the nonce value to be present.
2019-08-07 12:37:31 +10:00
Paul Slaughter 84b6c7a5f3
Revert "Merge branch 'mh/editor-indents' into 'master'"
This reverts commit 28f2225bdf, reversing
changes made to 96ae5bd83d.
2019-08-01 12:31:13 -05:00
Mike Greiling b0ba7c72de
Override icons.svg asset path with sprockets asset 2019-07-29 16:44:45 -05:00
Ammar Alakkad 29a7c83eb3 Add color utils with relevant tests 2019-07-26 16:05:59 +03:00
Martin Hanzel c111d121d6 Add UndoStack class - a custom undo/redo engine
It will be hooked up to the markdown editor later
2019-07-26 07:18:15 +00:00
Ezekiel Kigbo 78d57823ca Removed pluralize function
Replaced instance of the `pluralize` js function
with `n__` to follow our development guide.
2019-07-24 17:39:18 +00:00
Lukas Eipert 7ca77203c0
Replace runtime isEE check with compile time one
This has the benefit that CE bundles will remove dead code in CE only
builds.

We have a follow-up issue to get rid of this completely:

https://gitlab.com/gitlab-org/gitlab-ce/issues/64173
2019-07-05 16:37:39 +02:00
Luke Ward 0d32d31864 Replace slugifyWithHyphens with improved slugify function 2019-07-03 08:20:57 +00:00
Phil Hughes df3d9361e5
Use GraphQL API to fetch last commit data for tree 2019-06-28 13:36:18 +01:00
Heinrich Lee Yu 275a17589c Rename to time_tracking_limit_to_hours
Changes migration and all other places the attribute is used
2019-06-25 09:31:23 +08:00
Jon Kolb 4e283ee706 Limit time tracking values to hours
Adds an instance setting to limit display of time tracking
values to hours only
2019-06-25 09:31:23 +08:00
Brandon Labuschagne 3d8163dcf6 Disable unnecessary ESLint i18n offences
Unnecessary offences include false positives as well as flagged
errors which have follow up issues in order to be addressed.

Not all issues have been addressed before this being submitted
in the spirit of results and iteration.
2019-06-13 19:15:25 +00:00
Mike Greiling eabd1b9e6a Merge branch 'prom-api-2' into 'master'
Switch charts to Prometheus API endpoint CE-2

See merge request gitlab-org/gitlab-ce!29226
2019-06-12 16:17:37 +00:00
Paul Slaughter 908829089c
Update IDE file mirror service (ce utils)
**Notes:**
This module is a client to the webide-file-sync service.
https://gitlab.com/gitlab-org/webide-file-sync
2019-06-07 09:12:11 -05:00
Simon Knox fba991dc48 Add feature flag and dashboard endpoint
First part of FE for Prometheus API
Dashboard endpoint fetches all info except for chart results
Renders empty groups after loading
2019-06-07 21:39:03 +10:00
Phil Hughes 7d47ec540d Merge branch '59232-add-storage-counter-ce' into 'master'
CE backport for Storage Counter changes

Closes #59232

See merge request gitlab-org/gitlab-ce!29206
2019-06-06 19:43:18 +00:00
Filipa Lacerda 74f78fa326 Adds hashed option to bs linked options
Adds isOdd function
2019-06-05 15:14:02 +01:00
Brandon Labuschagne 12b6a1d52c I18N datetime utility file
This is one of many MRs opened in order to improve the overall
internationalisation of the GitLab codebase.

This commit only targets Vanilla JS files.

i18n documentation
https://docs.gitlab.com/ee/development/i18n/externalization.html
2019-06-05 13:56:33 +02:00
Paul Gascou-Vaillancourt 07b6266924 Specify exception identifer in catch block 2019-06-04 18:09:00 -04:00
Nathan Friend bee3c7e847 Comply with `no-implicit-coercion` rule (CE)
This commit is the result of running `yarn eslint --fix` after enabling
the `no-implicit-coercion` ESLint rule.  This rule has been added to
our ESLint config here:

https://gitlab.com/gitlab-org/gitlab-eslint-config/merge_requests/14
2019-06-03 22:51:02 +00:00
Paul Gascou-Vaillancourt 6ca5b19aaf Add global isSafeURL utility
- Added isSafeURL utility based on prior work in gitlab-ee
- Also added isAbsoluteOrRootRelative() and getBaseURL() utils,
  needed by isSafeURL
- Removed URL() fallback because URL() is now polyfilled
- Updated specs
2019-06-03 08:10:34 -04:00
Justin Boyson fc0d638062 Add offset adjust to fix line position
Added offset adjustment for diff file header and version menus
container divs. This should make the linked line be visible.
2019-05-30 15:54:39 +00:00
Phil Hughes 301a7d32b4
Enable GraphQL batch requests 2019-05-29 10:31:16 +01:00
Paul Gascou-Vaillancourt dade5a44ec Throw an error when formatDate's input is invalid 2019-05-28 07:53:44 +00:00
Kushal Pandya 6a57552a36 Add support for second `config` param 2019-05-24 16:40:56 +05:30
Brandon Labuschagne b95183fb33 Internationalisation of lib directory
This is one of many MRs opened in order to improve the overall
internationalisation of the GitLab codebase.

i18n documentation
https://docs.gitlab.com/ee/development/i18n/externalization.html
2019-05-23 20:08:18 +00:00
Yoginth 2f6a20ce66 Fix typos in the whole gitlab-ce project 2019-05-20 14:11:44 +00:00
Paul Slaughter ec654bc41a
Fix webpack asset patch with '/' as relative root
https://gitlab.com/gitlab-org/gitlab-ce/issues/60932
2019-04-30 12:21:48 -05:00
Phil Hughes 97678c09fd Merge branch 'kp-add-base-url-support-graphql' into 'master'
Add support for baseUrl in ApolloClient instance within GraphQL helper

See merge request gitlab-org/gitlab-ce!27657
2019-04-25 08:15:41 +00:00
Kushal Pandya 8e808bc221 Add support for baseUrl in ApolloClient instance
Add support for providing baseUrl/rootUrl within `uri` while
creating ApolloClient instance.
2019-04-25 12:25:21 +05:30
Paul Slaughter 4abd436097
Fix API and IDE path with `/` relative_url_root
**Why?**
Previously we simply concatenated our paths, which led
to requesting `//api/v4/...` and obviously failed. The BE
supports a relative_url_root of `/`. It's a bug that the FE
does not.
2019-04-24 13:05:29 -05:00
Rajat Jain b5ab1d91e3 Display scoped labels in Issue Boards
This change brings new Scoped labels to Issue board as well.
With the last change, this was missed.
2019-04-15 09:58:30 +00:00
Constance Okoghenun a3966d92cf CE backport of Add Snowplow tracking to notes
Bacport of Snowplow tracking for
- Reply comment button
- Start discussion and Comment buttons
2019-04-12 15:32:24 +00:00
Paul Slaughter e42ecb1c07
Remove slugify text utility
**Why?**
This function was not being used and it's
documentation was out of date.
2019-04-12 08:46:00 -05:00
Mike Greiling 596d5fa21a
Revert "Merge branch 'fix-ide-web-worker-relative-url' into 'master'"
This reverts merge request !26015
2019-04-09 00:49:18 -05:00
Sam Bigelow bf47270e90 Improve diff navigation header
- Compare versions header is full width except in the unified diff mode
with no tree sidebar
  - Bar is always full width, but the content within stays centered when
unified and no tree sidebar
- File header is the same height as the "Compare versions header"
- aligns with the design system grid guidelines => 56px
- Diff file headers use a button group, switch icon order to open file
externally being the last option, all buttons will become icon buttons
(icon delivery by @dimitrieh)
- If a file header becomes sticky no rounded corner/double border
problem is visible anymore
2019-04-05 14:57:01 -04:00
Filipa Lacerda 941e00121c Merge branch 'ce-9262-move-project-search-bar-into-modal-dialog-on-operations-dashboard-page' into 'master'
CE backport: Add reusable project_selector component

See merge request gitlab-org/gitlab-ce!25036
2019-04-05 16:25:45 +00:00
Sergiu Marton 448d0bc3e1 Replace 'x seconds ago' with 'just now' 2019-04-03 18:21:15 +00:00
mfluharty eb95100c06
Make corrections to address review feedback
Refactor tests to follow conventions
Add XSS test
Eliminate a few unnecessary lines, comments, and parameters
Use Vue.set for nested state changes
2019-04-02 23:58:20 -06:00
Nathan Friend 06b88af046
Add reusable project_selector component
This commit adds a resuable UI component that allows a user to search
for a project name, shows the search results, and allows the user to
select one or more projects.  This component communicates with its
parent using props and events.

This component was originally created for use in the EE-specific
"Operations Dashboard" page, but it is applicable for CE use cases as
well, and so was added as a CE shared component.

In addition, some logic was extracted from the frequent_items_list_item
component into shared filters to avoid logic duplication.
2019-04-02 23:58:01 -06:00
Phil Hughes 07e61875de
CE backport of design-management-upload-client 2019-04-02 09:34:17 +01:00