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
9abb3dcc
Commit
9abb3dcc
authored
Mar 10, 2020
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pre-populate survey fields
parent
ba333213
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
app/assets/javascripts/serverless/survey_banner.js
app/assets/javascripts/serverless/survey_banner.js
+21
-3
app/views/projects/serverless/functions/index.html.haml
app/views/projects/serverless/functions/index.html.haml
+1
-1
No files found.
app/assets/javascripts/serverless/survey_banner.js
View file @
9abb3dcc
import
Vue
from
'
vue
'
;
import
{
setUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
SurveyBanner
from
'
./survey_banner.vue
'
;
let
bannerInstance
;
const
SURVEY_URL_BASE
=
'
https://gitlab.fra1.qualtrics.com/jfe/form/SV_00PfofFfY9s8Shf
'
;
export
default
function
initServerlessSurveyBanner
()
{
const
el
=
document
.
querySelector
(
'
.js-serverless-survey-banner
'
);
if
(
el
)
{
const
surveyUrl
=
'
https://gitlab.fra1.qualtrics.com/jfe/form/SV_51J9D8skLbWqdil
'
;
new
Vue
({
if
(
el
&&
!
bannerInstance
)
{
const
{
userName
,
userEmail
}
=
el
.
dataset
;
// pre-populate survey fields
const
surveyUrl
=
setUrlParams
(
{
Q_PopulateResponse
:
JSON
.
stringify
({
QID1
:
userEmail
,
QID2
:
userName
,
QID16
:
'
1
'
,
// selects "yes" to "do you currently use GitLab?"
}),
},
SURVEY_URL_BASE
,
);
// eslint-disable-next-line no-new
bannerInstance
=
new
Vue
({
el
,
render
(
createElement
)
{
return
createElement
(
SurveyBanner
,
{
...
...
app/views/projects/serverless/functions/index.html.haml
View file @
9abb3dcc
...
...
@@ -10,7 +10,7 @@
help_path:
help_page_path
(
'user/project/clusters/serverless/index'
)
}
}
%div
{
class:
[(
'limit-container-width'
unless
fluid_layout
)]
}
.js-serverless-survey-banner
.js-serverless-survey-banner
{
data:
{
user_name:
current_user
.
name
,
user_email:
current_user
.
email
}
}
.js-serverless-functions-notice
.flash-container
...
...
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