Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bddbdc7c
Commit
bddbdc7c
authored
Feb 02, 2022
by
Darby Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Secure Files UI MVC
parent
b8965389
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
157 additions
and
0 deletions
+157
-0
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+7
-0
app/assets/javascripts/ci_secure_files/components/secure_files_list.vue
...ascripts/ci_secure_files/components/secure_files_list.vue
+95
-0
app/assets/javascripts/ci_secure_files/index.js
app/assets/javascripts/ci_secure_files/index.js
+16
-0
app/assets/javascripts/pages/projects/ci/secure_files/show/index.js
.../javascripts/pages/projects/ci/secure_files/show/index.js
+3
-0
app/controllers/projects/ci/secure_files_controller.rb
app/controllers/projects/ci/secure_files_controller.rb
+18
-0
app/views/projects/ci/secure_files/show.html.haml
app/views/projects/ci/secure_files/show.html.haml
+7
-0
config/routes/project.rb
config/routes/project.rb
+1
-0
lib/api/entities/ci/secure_file.rb
lib/api/entities/ci/secure_file.rb
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+9
-0
No files found.
app/assets/javascripts/api.js
View file @
bddbdc7c
...
...
@@ -92,6 +92,7 @@ const Api = {
groupNotificationSettingsPath
:
'
/api/:version/groups/:id/notification_settings
'
,
notificationSettingsPath
:
'
/api/:version/notification_settings
'
,
deployKeysPath
:
'
/api/:version/deploy_keys
'
,
secureFilesPath
:
'
/api/:version/projects/:project_id/secure_files
'
,
group
(
groupId
,
callback
=
()
=>
{})
{
const
url
=
Api
.
buildUrl
(
Api
.
groupPath
).
replace
(
'
:id
'
,
groupId
);
...
...
@@ -957,6 +958,12 @@ const Api = {
return
axios
.
get
(
url
,
{
params
:
{
per_page
:
DEFAULT_PER_PAGE
,
...
params
}
});
},
projectSecureFiles
(
projectId
){
const
url
=
Api
.
buildUrl
(
this
.
secureFilesPath
).
replace
(
'
:project_id
'
,
projectId
);
return
axios
.
get
(
url
);
},
async
updateNotificationSettings
(
projectId
,
groupId
,
data
=
{})
{
let
url
=
Api
.
buildUrl
(
this
.
notificationSettingsPath
);
...
...
app/assets/javascripts/ci_secure_files/components/secure_files_list.vue
0 → 100644
View file @
bddbdc7c
<
script
>
import
{
GlTable
,
GlButton
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
Api
from
'
~/api
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
TimeagoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
export
default
{
props
:
{
projectId
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
projectSecureFiles
:
[],
};
},
fields
:
[
{
key
:
'
name
'
,
label
:
s__
(
'
ciSecureFiles|Filename
'
),
},
{
key
:
'
permissions
'
,
label
:
s__
(
'
ciSecureFiles|Permissions
'
),
tdClass
:
'
text-plain
'
,
},
{
key
:
'
created_at
'
,
label
:
s__
(
'
ciSecureFiles|Created
'
),
},
],
components
:
{
GlTable
,
GlButton
,
GlIcon
,
TimeagoTooltip
,
},
computed
:
{
fields
()
{
return
this
.
$options
.
fields
;
},
},
created
()
{
this
.
getProjectSecureFiles
();
},
methods
:
{
async
getProjectSecureFiles
(){
const
response
=
await
Api
.
projectSecureFiles
(
this
.
projectId
)
this
.
projectSecureFiles
=
response
.
data
}
}
};
</
script
>
<
template
>
<div>
<h2
data-testid=
"title"
class=
"gl-font-size-h1 gl-mt-3 gl-mb-0"
>
Secure Files
</h2>
<p>
<span
data-testid=
"info-message"
class=
"gl-mr-2"
>
Use Secure Files to store files used by your pipelines such as Android keystores, or Apple provisioning profiles and signing certificates.
<a
href=
""
rel=
"noopener"
target=
"_blank"
class=
"gl-link"
>
More information
</a>
</span>
</p>
<gl-table
:fields=
"fields"
:items=
"this.projectSecureFiles"
tbody-tr-class=
"js-ci-secure-files-row"
data-qa-selector=
"ci_secure_files_table_content"
sort-by=
"key"
sort-direction=
"asc"
stacked=
"lg"
table-class=
"text-secondary"
show-empty
sort-icon-left
no-sort-reset
>
<template
#cell(name)=
"
{ item }">
{{
item
.
name
}}
</
template
>
<
template
#cell(permissions)=
"{ item }"
>
{{
item
.
permissions
}}
</
template
>
<
template
#cell(created_at)=
"{ item }"
>
<timeago-tooltip
:time=
"item.created_at"
/>
</
template
>
</gl-table>
</div>
</template>
app/assets/javascripts/ci_secure_files/index.js
0 → 100644
View file @
bddbdc7c
import
Vue
from
'
vue
'
;
import
SecureFilesList
from
'
./components/secure_files_list.vue
'
;
export
const
initCiSecureFiles
=
(
selector
=
'
#js-ci-secure-files
'
)
=>
{
const
containerEl
=
document
.
querySelector
(
selector
);
const
{
projectId
}
=
containerEl
.
dataset
;
return
new
Vue
({
el
:
containerEl
,
render
(
createElement
)
{
return
createElement
(
SecureFilesList
,
{
props
:
{
projectId
:
projectId
},
});
},
});
};
app/assets/javascripts/pages/projects/ci/secure_files/show/index.js
0 → 100644
View file @
bddbdc7c
import
{
initCiSecureFiles
}
from
'
~/ci_secure_files
'
;
initCiSecureFiles
();
app/controllers/projects/ci/secure_files_controller.rb
0 → 100644
View file @
bddbdc7c
# frozen_string_literal: true
class
Projects::Ci::SecureFilesController
<
Projects
::
ApplicationController
before_action
:check_can_collaborate!
feature_category
:pipeline_authoring
urgency
:low
,
[
:show
]
def
show
end
private
def
check_can_collaborate!
render_404
unless
can_collaborate_with_project?
(
@project
)
end
end
app/views/projects/ci/secure_files/show.html.haml
0 → 100644
View file @
bddbdc7c
-
@content_class
=
"limit-container-width"
-
page_title
s_
(
'Pipelines|Secure Files'
)
-
content_for
:prefetch_asset_tags
do
-
webpack_preload_asset_tag
(
'monaco'
)
#js-ci-secure-files
{
data:
{
project_id:
@project
.
id
}
}
\ No newline at end of file
config/routes/project.rb
View file @
bddbdc7c
...
...
@@ -96,6 +96,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
namespace
:ci
do
resource
:lint
,
only:
[
:show
,
:create
]
resource
:pipeline_editor
,
only:
[
:show
],
controller: :pipeline_editor
,
path:
'editor'
resource
:secure_files
,
only:
[
:show
],
controller: :secure_files
,
path:
'secure_files'
resources
:daily_build_group_report_results
,
only:
[
:index
],
constraints:
{
format:
/(csv|json)/
}
namespace
:prometheus_metrics
do
resources
:histograms
,
only:
[
:create
],
constraints:
{
format:
'json'
}
...
...
lib/api/entities/ci/secure_file.rb
View file @
bddbdc7c
...
...
@@ -9,6 +9,7 @@ module API
expose
:permissions
expose
:checksum
expose
:checksum_algorithm
expose
:created_at
end
end
end
...
...
locale/gitlab.pot
View file @
bddbdc7c
...
...
@@ -43302,6 +43302,15 @@ msgstr ""
msgid "ciReport|is loading, errors when loading results"
msgstr ""
msgid "ciSecureFiles|Filename"
msgstr ""
msgid "ciSecureFiles|Permissions"
msgstr ""
msgid "ciSecureFiles|Created"
msgstr ""
msgid "closed"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment