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
97c28112
Commit
97c28112
authored
May 28, 2020
by
Mike Greiling
Committed by
Paul Slaughter
May 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use less cryptic error message for missing Knative domain
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32799
parent
82451021
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
app/assets/javascripts/clusters/clusters_bundle.js
app/assets/javascripts/clusters/clusters_bundle.js
+6
-0
app/assets/javascripts/clusters/components/knative_domain_editor.vue
...javascripts/clusters/components/knative_domain_editor.vue
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/clusters/clusters_bundle_spec.js
spec/frontend/clusters/clusters_bundle_spec.js
+7
-2
No files found.
app/assets/javascripts/clusters/clusters_bundle.js
View file @
97c28112
...
...
@@ -468,6 +468,11 @@ export default class Clusters {
return
;
}
if
(
appId
===
KNATIVE
&&
!
params
.
hostname
&&
!
params
.
pages_domain_id
)
{
reject
(
s__
(
'
ClusterIntegration|You must specify a domain before you can install Knative.
'
));
return
;
}
resolve
();
});
}
...
...
@@ -520,6 +525,7 @@ export default class Clusters {
this
.
store
.
updateAppProperty
(
appId
,
'
isEditingDomain
'
,
true
);
this
.
store
.
updateAppProperty
(
appId
,
'
hostname
'
,
domain
);
this
.
store
.
updateAppProperty
(
appId
,
'
pagesDomain
'
,
domainId
?
{
id
:
domainId
,
domain
}
:
null
);
this
.
store
.
updateAppProperty
(
appId
,
'
validationError
'
,
null
);
}
setCrossplaneProviderStack
(
data
)
{
...
...
app/assets/javascripts/clusters/components/knative_domain_editor.vue
View file @
97c28112
...
...
@@ -82,6 +82,9 @@ export default {
showDomainsDropdown
()
{
return
this
.
availableDomains
.
length
>
0
;
},
validationError
()
{
return
this
.
knative
.
validationError
;
},
},
watch
:
{
knativeUpdateSuccessful
(
updateSuccessful
)
{
...
...
@@ -157,6 +160,8 @@ export default {
type=
"text"
class=
"form-control js-knative-domainname"
/>
<span
v-if=
"validationError"
class=
"gl-field-error"
>
{{ validationError }}
</span>
</div>
<
template
v-if=
"knativeInstalled"
>
...
...
locale/gitlab.pot
View file @
97c28112
...
...
@@ -5368,6 +5368,9 @@ msgstr ""
msgid "ClusterIntegration|You must have an RBAC-enabled cluster to install Knative."
msgstr ""
msgid "ClusterIntegration|You must specify a domain before you can install Knative."
msgstr ""
msgid "ClusterIntegration|You should select at least two subnets"
msgstr ""
...
...
spec/frontend/clusters/clusters_bundle_spec.js
View file @
97c28112
...
...
@@ -268,13 +268,18 @@ describe('Clusters', () => {
cluster
.
store
.
state
.
applications
[
applicationId
].
status
=
INSTALLABLE
;
const
params
=
{};
if
(
applicationId
===
'
knative
'
)
{
params
.
hostname
=
'
test-example.com
'
;
}
// eslint-disable-next-line promise/valid-params
cluster
.
installApplication
({
id
:
applicationId
})
.
installApplication
({
id
:
applicationId
,
params
})
.
then
(()
=>
{
expect
(
cluster
.
store
.
state
.
applications
[
applicationId
].
status
).
toEqual
(
INSTALLING
);
expect
(
cluster
.
store
.
state
.
applications
[
applicationId
].
requestReason
).
toEqual
(
null
);
expect
(
cluster
.
service
.
installApplication
).
toHaveBeenCalledWith
(
applicationId
,
undefined
);
expect
(
cluster
.
service
.
installApplication
).
toHaveBeenCalledWith
(
applicationId
,
params
);
done
();
})
.
catch
();
...
...
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