Commit Graph
11393 Commits
Author SHA1 Message Date
Grzegorz Bizon 94cf759001 Attach download action to artifacts file in ZIP archive 2016-01-14 12:48:16 +01:00
Grzegorz Bizon e9c2628220 Check if file exists in metadata in download action 2016-01-14 12:48:16 +01:00
Grzegorz Bizon 09a4a5aff8 Render only valid paths in artifacts metadata
In this version we will support only relative paths in artifacts
metadata. Support for absolute paths will be introduced later.
2016-01-14 12:48:16 +01:00
Grzegorz Bizon 61fb47a432 Simplify implementation of build artifacts browser (refactoring) 2016-01-14 12:48:15 +01:00
Grzegorz Bizon 387b27813d Change format of artifacts metadata from text to binary 0.0.1
This changes the format of metadata to handle paths, that may contain
whitespace characters, new line characters and non-UTF-8 characters.

Now those paths along with metadata in JSON format are stored as
length-prefixed strings (uint32 prefix).

Metadata file has a custom format:

1.   First string field is metadata version field (string)
2.   Second string field is metadata errors field (JSON strong)
3.   All subsequent fields is pair of path (string) and path metadata
     in JSON format.

Path's metadata contains all fields that where possible to extract from
ZIP archive like date of modification, CRC, compressed size,
uncompressed size and comment.
2016-01-14 12:48:15 +01:00
Grzegorz Bizon 1b1793c253 Show file size in artifacts browser using metadata 2016-01-14 12:48:15 +01:00
Grzegorz Bizon cd3b8bbd2f Add method that checks if path exists in StringPath 2016-01-14 12:48:15 +01:00
Grzegorz Bizon a5e1905d28 Render 404 when artifacts path is invalid 2016-01-14 12:48:15 +01:00
Grzegorz Bizon a7f99b67a0 Extract artifacts metadata implementation to separate class 2016-01-14 12:48:15 +01:00
Grzegorz Bizon df41148662 Improve path sanitization in StringPath 2016-01-14 12:48:15 +01:00
Grzegorz Bizon 3de8a4620a Parse artifacts metadata stored in JSON format 2016-01-14 12:48:15 +01:00
Grzegorz Bizon 447f56036e Use metadata stored in artifacats metadata file 2016-01-14 12:48:14 +01:00
Grzegorz Bizon 662f4b9e1d Add artifacts metadata uploader filed
Artifacts metadata field will be used to store a filename of gzipped
file containing metadata definition for given artifacts archive.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon c33b105f11 Make some conditions in Ci::Build more readable 2016-01-14 12:48:14 +01:00
Grzegorz Bizon ece114e630 Update artifacts download specs 2016-01-14 12:48:14 +01:00
Grzegorz Bizon 5ff7ec42dc Add method that checks if artifacts browser is supported
This is needed because of backward compatibility. Previously artifacts
archive had `.tar.gz` format, but artifacts browser requires ZIP format
now.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon 8eeed761a9 Update specs for CI Build, add artifacts? method
`artifacts?` method checks if artifacts archive is available.
2016-01-14 12:48:14 +01:00
Grzegorz Bizon 9e0e9342a4 Rename method that returns url to CI build artifacts download 2016-01-14 12:48:14 +01:00
Grzegorz Bizon 612ab584bf Mix url_helpers into Ci::Build 2016-01-14 12:48:14 +01:00
Grzegorz Bizon d8cc9e4ef7 Add button to CI build artifacts browser into build summary 2016-01-14 12:48:14 +01:00
Grzegorz Bizon ebd69c5fc1 Remove artifacts metadata column from database 2016-01-14 12:48:13 +01:00
Grzegorz Bizon b19e958d86 Add support for parent directories in StringPath
This support is not completed though, as parent directory that is first
in collection returned by `directories!` is not iterable yet.
2016-01-14 12:48:13 +01:00
Grzegorz Bizon aae674c3a2 Improve CI build artifacts browser view 2016-01-14 12:48:13 +01:00
Grzegorz Bizon 5a1faf61f6 Add artifacts browser
This implementation makes it possible to browse artifacts, it
depends on artifacts metadata.
2016-01-14 12:48:13 +01:00
Grzegorz Bizon 80a71576ba Use Gitlab::StringPath in CI build artifacts controller 2016-01-14 12:48:13 +01:00
Grzegorz Bizon f091272f19 Move artifacts controller level up
This reverts nesting artifacts controller in builds module.
2016-01-14 12:48:12 +01:00
Grzegorz Bizon a96d45c694 Add view action to artifacts controller 2016-01-14 12:48:12 +01:00
Grzegorz Bizon 79fe18d9e7 Move build artifacts implementation to separate controller 2016-01-14 12:48:12 +01:00
Grzegorz Bizon a1cfd2754e Add artifacts_metadata field to Ci::Build
This will contain serialized array of files inside artifacts tarball.
2016-01-14 12:48:12 +01:00
Douwe Maan 642699b059 Merge branch 'fix/titles-weight' into 'master'
Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages

See #3956.

Following is before/after for each page:

## Group title

### Before
![group-title-before](/uploads/d6c013c69f526d553555ff974c29b349/group-title-before.png)

### After
![group-title-after](/uploads/56e0bd176d12943297b5b95d20beb437/group-title-after.png)

---

## Commit title

### Before
![commit-title-before](/uploads/a9bda5212eea843ab4c92acbcf411cdd/commit-title-before.png)

### After
![commit-title-after](/uploads/e3a532460a1e7b0b2a8eb8a6af12abea/commit-title-after.png)

---

## Branch name

### Before
![branch-name-before](/uploads/9d77e39f07cd7b757d02a39f5bc57570/branch-name-before.png)

### After
![branch-name-after](/uploads/6831e9560d196d8a4da209166f224a0f/branch-name-after.png)

---

## Tags name in list

### Before
![tags-name-in-list-before](/uploads/cf0141713af751132fd29220621ea9ab/tags-name-in-list-before.png)

### After
![tags-name-in-list-after](/uploads/902c5b029dc832216ac536d2ad372b83/tags-name-in-list-after.png)

---

## Tag name

### Before
![tags-name-before](/uploads/495acb6b4bab8464a0ffeb8f703435b6/tags-name-before.png)

### After
![tags-name-after](/uploads/f86868dbad57b8226611bcb03e5a9524/tags-name-after.png)

---

## Issue title in list

### Before
![issue-title-in-list-before](/uploads/5f01450aceefdcc2f51984832a4ce6b5/issue-title-in-list-before.png)

### After
![issue-title-in-list-after](/uploads/3144fb231874d23b6b46e108da24b128/issue-title-in-list-after.png)

---

## MR title in list

### Before
![mr-title-in-list-before](/uploads/bd0239104ebf4a5090c724c3851df57c/mr-title-in-list-before.png)

### After
![mr-title-in-list-after](/uploads/16be5460dffc33ff173a6b8ff3250206/mr-title-in-list-after.png)

See merge request !2422
2016-01-14 11:47:21 +00:00
Douwe Maan 4d64a32c88 Merge branch 'feature/ldap-sync-edgecases' into 'master'
LDAP Sync blocked user edgecases

Allow GitLab admins to block otherwise valid GitLab LDAP users
(https://gitlab.com/gitlab-org/gitlab-ce/issues/3462)

Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other.

Expected behavior:

- [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?`
- [x] "ldap_blocked" users can't be unblocked by the Admin UI
- [x] "ldap_blocked" users can't be unblocked by the API
- [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked"
- [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization
- [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked`
 
Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users:
![image](/uploads/4f56fc17b73cb2c9e2a154a22e7ad291/image.png)

There will be another MR for the EE version.

See merge request !2242
2016-01-14 11:00:08 +00:00
Douwe Maan cda9635441 Merge branch 'fix-safe-import-url' into 'master'
Fix the undefinded variable error in Project's safe_import_url method

Fixes #7982

See merge request !2419
2016-01-14 10:53:13 +00:00
Douwe Maan 9f8c38bdac Merge branch 'fix/private-references' into 'master'
Show referenced MRs & Issues only when the current viewer can access them

This addresses both issues identified in #6066.

## The private MR by user `remy2` with a note referencing to a public issue

![Screen_Shot_2016-01-12_at_16.45.02](/uploads/c245ec2c1fdea1f9ba05183c24e142d9/Screen_Shot_2016-01-12_at_16.45.02.png)

---

## The public issue viewed by user `remy` **who doesn't have access to `remy2/private-project`** before the fix

![Screen_Shot_2016-01-12_at_18.14.50](/uploads/8db5580e803f5bddd6cb935233c579a0/Screen_Shot_2016-01-12_at_18.14.50.png)

---

## The public issue viewed by user `remy` **who doesn't have access to `remy2/private-project`** with the fix

![Screen_Shot_2016-01-13_at_12.02.32](/uploads/cb199f7b78191fba486a11412412e307/Screen_Shot_2016-01-13_at_12.02.32.png)

---

## The public issue viewed by user `remy2` with the fix (no change)

![Screen_Shot_2016-01-13_at_11.54.06](/uploads/ddece590d69f597a95559beddcd36660/Screen_Shot_2016-01-13_at_11.54.06.png)


See merge request !2405
2016-01-14 10:36:39 +00:00
Douwe Maan 54734fa613 Merge branch 'rs-broadcasts' into 'master'
Allow broadcast messages to be edited

Closes #3046 

See merge request !2268
2016-01-14 10:34:56 +00:00
Rémy Coutable 818607f011 Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages 2016-01-14 09:41:11 +01:00
Gabriel Mazetto dd6fc01ff8 fixed LDAP activation on login to use new ldap_blocked state 2016-01-14 03:31:27 -02:00
Gabriel Mazetto fc7e6e8ffc Fix Admin/Users view to position buttons without spacing magic 2016-01-14 03:08:40 -02:00
DJ Mountney d11ca78cdc Fix the undefinded variable error in Project's safe_import_url method 2016-01-13 17:01:05 -08:00
Robert Speicher da3c57080f Fix misaligned edit button in milestone collection partial 2016-01-13 16:07:36 -05:00
Robert Speicher 650a3f2a41 Update button styles for Milestones#show 2016-01-13 16:07:20 -05:00
Rémy Coutable 33ea09bdf9 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into fix/private-references 2016-01-13 19:46:38 +01:00
Robert Speicher 55d0323961 Remove (invalid) timestamp formatting 2016-01-13 12:01:58 -05:00
Robert Speicher 843662821d Move BroadcastMessage#status to a helper since it's presentational 2016-01-13 11:49:59 -05:00
Robert Speicher 00e8700433 Broadcast Messages can now be edited
Closes #3046
2016-01-13 11:42:15 -05:00
Robert Speicher df496fcaf0 Update BroadcastMessage model
- Adds default values for `color` and `font` attributes
- Adds `active?`, `started?`, `ended?`, and 'status' methods
2016-01-13 11:34:58 -05:00
Robert Speicher 5a1706791e Update broadcast_message helper
Now it returns the fully-formatted message so we can be consistent about
how it's shown.
2016-01-13 11:34:58 -05:00
Robert Speicher 12903762d1 Simplify broadcast message JS
Also resets the default example message when the user input is blank.
2016-01-13 11:34:58 -05:00
Robert Speicher 6ae39c2cd1 Remove alert_type attribute from BroadcastMessage 2016-01-13 11:34:57 -05:00
Robert Speicher 7e24c5c45a Move broadcast message form to a partial 2016-01-13 11:34:19 -05:00
Robert Speicher 1c7febc3e3 Style the broadcast message form 2016-01-13 11:34:19 -05:00