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
b485f5d4
Commit
b485f5d4
authored
Oct 12, 2021
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move JS code out of pages directory
parent
94aeceba
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
77 additions
and
76 deletions
+77
-76
app/assets/javascripts/pages/projects/new/index.js
app/assets/javascripts/pages/projects/new/index.js
+3
-68
app/assets/javascripts/projects/new/components/app.vue
app/assets/javascripts/projects/new/components/app.vue
+0
-0
app/assets/javascripts/projects/new/components/new_project_push_tip_popover.vue
.../projects/new/components/new_project_push_tip_popover.vue
+0
-0
app/assets/javascripts/projects/new/components/new_project_url_select.vue
...cripts/projects/new/components/new_project_url_select.vue
+0
-0
app/assets/javascripts/projects/new/event_hub.js
app/assets/javascripts/projects/new/event_hub.js
+0
-0
app/assets/javascripts/projects/new/index.js
app/assets/javascripts/projects/new/index.js
+66
-0
app/assets/javascripts/projects/new/queries/search_namespaces_where_user_can_create_projects.query.graphql
...h_namespaces_where_user_can_create_projects.query.graphql
+0
-0
ee/app/assets/javascripts/projects/custom_project_templates.js
...p/assets/javascripts/projects/custom_project_templates.js
+1
-1
qa/qa/page/project/import/repo_by_url.rb
qa/qa/page/project/import/repo_by_url.rb
+1
-1
qa/qa/page/project/new.rb
qa/qa/page/project/new.rb
+1
-1
spec/frontend/projects/new/components/app_spec.js
spec/frontend/projects/new/components/app_spec.js
+1
-1
spec/frontend/projects/new/components/new_project_push_tip_popover_spec.js
...jects/new/components/new_project_push_tip_popover_spec.js
+1
-1
spec/frontend/projects/new/components/new_project_url_select_spec.js
...nd/projects/new/components/new_project_url_select_spec.js
+3
-3
No files found.
app/assets/javascripts/pages/projects/new/index.js
View file @
b485f5d4
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
initProjectVisibilitySelector
from
'
../../../project_visibility
'
;
import
initProjectNew
from
'
../../../projects/project_new
'
;
import
NewProjectCreationApp
from
'
./components/app.vue
'
;
import
NewProjectUrlSelect
from
'
./components/new_project_url_select.vue
'
;
function
initNewProjectCreation
()
{
const
el
=
document
.
querySelector
(
'
.js-new-project-creation
'
);
const
{
pushToCreateProjectCommand
,
workingWithProjectsHelpPath
,
newProjectGuidelines
,
hasErrors
,
isCiCdAvailable
,
}
=
el
.
dataset
;
const
props
=
{
hasErrors
:
parseBoolean
(
hasErrors
),
isCiCdAvailable
:
parseBoolean
(
isCiCdAvailable
),
newProjectGuidelines
,
};
const
provide
=
{
workingWithProjectsHelpPath
,
pushToCreateProjectCommand
,
};
return
new
Vue
({
el
,
provide
,
render
(
h
)
{
return
h
(
NewProjectCreationApp
,
{
props
});
},
});
}
function
initNewProjectUrlSelect
()
{
const
elements
=
document
.
querySelectorAll
(
'
.js-vue-new-project-url-select
'
);
if
(
!
elements
.
length
)
{
return
;
}
Vue
.
use
(
VueApollo
);
elements
.
forEach
(
(
el
)
=>
new
Vue
({
el
,
apolloProvider
:
new
VueApollo
({
defaultClient
:
createDefaultClient
({},
{
assumeImmutableResults
:
true
}),
}),
provide
:
{
namespaceFullPath
:
el
.
dataset
.
namespaceFullPath
,
namespaceId
:
el
.
dataset
.
namespaceId
,
rootUrl
:
el
.
dataset
.
rootUrl
,
trackLabel
:
el
.
dataset
.
trackLabel
,
userNamespaceFullPath
:
el
.
dataset
.
userNamespaceFullPath
,
userNamespaceId
:
el
.
dataset
.
userNamespaceId
,
},
render
:
(
createElement
)
=>
createElement
(
NewProjectUrlSelect
),
}),
);
}
import
{
initNewProjectCreation
,
initNewProjectUrlSelect
}
from
'
~/projects/new
'
;
import
initProjectVisibilitySelector
from
'
~/project_visibility
'
;
import
initProjectNew
from
'
~/projects/project_new
'
;
initProjectVisibilitySelector
();
initProjectNew
.
bindEvents
();
...
...
app/assets/javascripts/p
ages/p
rojects/new/components/app.vue
→
app/assets/javascripts/projects/new/components/app.vue
View file @
b485f5d4
File moved
app/assets/javascripts/p
ages/p
rojects/new/components/new_project_push_tip_popover.vue
→
app/assets/javascripts/projects/new/components/new_project_push_tip_popover.vue
View file @
b485f5d4
File moved
app/assets/javascripts/p
ages/p
rojects/new/components/new_project_url_select.vue
→
app/assets/javascripts/projects/new/components/new_project_url_select.vue
View file @
b485f5d4
File moved
app/assets/javascripts/p
ages/p
rojects/new/event_hub.js
→
app/assets/javascripts/projects/new/event_hub.js
View file @
b485f5d4
File moved
app/assets/javascripts/projects/new/index.js
0 → 100644
View file @
b485f5d4
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
NewProjectCreationApp
from
'
./components/app.vue
'
;
import
NewProjectUrlSelect
from
'
./components/new_project_url_select.vue
'
;
export
function
initNewProjectCreation
()
{
const
el
=
document
.
querySelector
(
'
.js-new-project-creation
'
);
const
{
pushToCreateProjectCommand
,
workingWithProjectsHelpPath
,
newProjectGuidelines
,
hasErrors
,
isCiCdAvailable
,
}
=
el
.
dataset
;
const
props
=
{
hasErrors
:
parseBoolean
(
hasErrors
),
isCiCdAvailable
:
parseBoolean
(
isCiCdAvailable
),
newProjectGuidelines
,
};
const
provide
=
{
workingWithProjectsHelpPath
,
pushToCreateProjectCommand
,
};
return
new
Vue
({
el
,
provide
,
render
(
h
)
{
return
h
(
NewProjectCreationApp
,
{
props
});
},
});
}
export
function
initNewProjectUrlSelect
()
{
const
elements
=
document
.
querySelectorAll
(
'
.js-vue-new-project-url-select
'
);
if
(
!
elements
.
length
)
{
return
;
}
Vue
.
use
(
VueApollo
);
elements
.
forEach
(
(
el
)
=>
new
Vue
({
el
,
apolloProvider
:
new
VueApollo
({
defaultClient
:
createDefaultClient
({},
{
assumeImmutableResults
:
true
}),
}),
provide
:
{
namespaceFullPath
:
el
.
dataset
.
namespaceFullPath
,
namespaceId
:
el
.
dataset
.
namespaceId
,
rootUrl
:
el
.
dataset
.
rootUrl
,
trackLabel
:
el
.
dataset
.
trackLabel
,
userNamespaceFullPath
:
el
.
dataset
.
userNamespaceFullPath
,
userNamespaceId
:
el
.
dataset
.
userNamespaceId
,
},
render
:
(
createElement
)
=>
createElement
(
NewProjectUrlSelect
),
}),
);
}
app/assets/javascripts/p
ages/p
rojects/new/queries/search_namespaces_where_user_can_create_projects.query.graphql
→
app/assets/javascripts/projects/new/queries/search_namespaces_where_user_can_create_projects.query.graphql
View file @
b485f5d4
File moved
ee/app/assets/javascripts/projects/custom_project_templates.js
View file @
b485f5d4
import
$
from
'
jquery
'
;
import
{
Rails
}
from
'
~/lib/utils/rails_ujs
'
;
import
eventHub
from
'
~/p
ages/p
rojects/new/event_hub
'
;
import
eventHub
from
'
~/projects/new/event_hub
'
;
import
projectNew
from
'
~/projects/project_new
'
;
const
bindEvents
=
()
=>
{
...
...
qa/qa/page/project/import/repo_by_url.rb
View file @
b485f5d4
...
...
@@ -5,7 +5,7 @@ module QA
module
Project
module
Import
class
RepoByURL
<
Page
::
Base
view
'app/assets/javascripts/p
ages/p
rojects/new/components/new_project_url_select.vue'
do
view
'app/assets/javascripts/projects/new/components/new_project_url_select.vue'
do
element
:select_namespace_dropdown
element
:select_namespace_dropdown_search_field
end
...
...
qa/qa/page/project/new.rb
View file @
b485f5d4
...
...
@@ -26,7 +26,7 @@ module QA
element
:template_option_row
end
view
'app/assets/javascripts/p
ages/p
rojects/new/components/new_project_url_select.vue'
do
view
'app/assets/javascripts/projects/new/components/new_project_url_select.vue'
do
element
:select_namespace_dropdown
element
:select_namespace_dropdown_search_field
end
...
...
spec/frontend/p
ages/p
rojects/new/components/app_spec.js
→
spec/frontend/projects/new/components/app_spec.js
View file @
b485f5d4
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
App
from
'
~/p
ages/p
rojects/new/components/app.vue
'
;
import
App
from
'
~/projects/new/components/app.vue
'
;
import
NewNamespacePage
from
'
~/vue_shared/new_namespace/new_namespace_page.vue
'
;
describe
(
'
Experimental new project creation app
'
,
()
=>
{
...
...
spec/frontend/p
ages/p
rojects/new/components/new_project_push_tip_popover_spec.js
→
spec/frontend/projects/new/components/new_project_push_tip_popover_spec.js
View file @
b485f5d4
import
{
GlPopover
,
GlFormInputGroup
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
NewProjectPushTipPopover
from
'
~/p
ages/p
rojects/new/components/new_project_push_tip_popover.vue
'
;
import
NewProjectPushTipPopover
from
'
~/projects/new/components/new_project_push_tip_popover.vue
'
;
import
ClipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
describe
(
'
New project push tip popover
'
,
()
=>
{
...
...
spec/frontend/p
ages/p
rojects/new/components/new_project_url_select_spec.js
→
spec/frontend/projects/new/components/new_project_url_select_spec.js
View file @
b485f5d4
...
...
@@ -10,9 +10,9 @@ import VueApollo from 'vue-apollo';
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
{
mockTracking
,
unmockTracking
}
from
'
helpers/tracking_helper
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
eventHub
from
'
~/p
ages/p
rojects/new/event_hub
'
;
import
NewProjectUrlSelect
from
'
~/p
ages/p
rojects/new/components/new_project_url_select.vue
'
;
import
searchQuery
from
'
~/p
ages/p
rojects/new/queries/search_namespaces_where_user_can_create_projects.query.graphql
'
;
import
eventHub
from
'
~/projects/new/event_hub
'
;
import
NewProjectUrlSelect
from
'
~/projects/new/components/new_project_url_select.vue
'
;
import
searchQuery
from
'
~/projects/new/queries/search_namespaces_where_user_can_create_projects.query.graphql
'
;
describe
(
'
NewProjectUrlSelect component
'
,
()
=>
{
let
wrapper
;
...
...
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