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
c47a11f3
Commit
c47a11f3
authored
Jan 23, 2020
by
Zack Cuddy
Committed by
Martin Wortschack
Jan 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Geo Designs Feature Flag
Remove reference in app.vue Remove tests Locale
parent
ace72713
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
213 deletions
+43
-213
ee/app/assets/javascripts/geo_designs/components/app.vue
ee/app/assets/javascripts/geo_designs/components/app.vue
+10
-27
ee/app/assets/javascripts/geo_designs/components/geo_designs_disabled.vue
...vascripts/geo_designs/components/geo_designs_disabled.vue
+0
-49
ee/spec/frontend/geo_designs/components/app_spec.js
ee/spec/frontend/geo_designs/components/app_spec.js
+33
-73
ee/spec/frontend/geo_designs/components/geo_designs_disabled_spec.js
...ntend/geo_designs/components/geo_designs_disabled_spec.js
+0
-52
locale/gitlab.pot
locale/gitlab.pot
+0
-12
No files found.
ee/app/assets/javascripts/geo_designs/components/app.vue
View file @
c47a11f3
<
script
>
<
script
>
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
GeoDesignsFilterBar
from
'
./geo_designs_filter_bar.vue
'
;
import
GeoDesignsFilterBar
from
'
./geo_designs_filter_bar.vue
'
;
import
GeoDesigns
from
'
./geo_designs.vue
'
;
import
GeoDesigns
from
'
./geo_designs.vue
'
;
import
GeoDesignsEmptyState
from
'
./geo_designs_empty_state.vue
'
;
import
GeoDesignsEmptyState
from
'
./geo_designs_empty_state.vue
'
;
import
GeoDesignsDisabled
from
'
./geo_designs_disabled.vue
'
;
export
default
{
export
default
{
name
:
'
GeoDesignsApp
'
,
name
:
'
GeoDesignsApp
'
,
...
@@ -14,9 +12,7 @@ export default {
...
@@ -14,9 +12,7 @@ export default {
GeoDesignsFilterBar
,
GeoDesignsFilterBar
,
GeoDesigns
,
GeoDesigns
,
GeoDesignsEmptyState
,
GeoDesignsEmptyState
,
GeoDesignsDisabled
,
},
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
props
:
{
geoSvgPath
:
{
geoSvgPath
:
{
type
:
String
,
type
:
String
,
...
@@ -35,11 +31,6 @@ export default {
...
@@ -35,11 +31,6 @@ export default {
required
:
true
,
required
:
true
,
},
},
},
},
data
()
{
return
{
designsEnabled
:
Boolean
(
this
.
glFeatures
.
enableGeoDesignSync
),
};
},
computed
:
{
computed
:
{
...
mapState
([
'
isLoading
'
,
'
totalDesigns
'
]),
...
mapState
([
'
isLoading
'
,
'
totalDesigns
'
]),
hasDesigns
()
{
hasDesigns
()
{
...
@@ -57,7 +48,6 @@ export default {
...
@@ -57,7 +48,6 @@ export default {
<
template
>
<
template
>
<article
class=
"geo-designs-container"
>
<article
class=
"geo-designs-container"
>
<section
v-if=
"designsEnabled"
>
<geo-designs-filter-bar
/>
<geo-designs-filter-bar
/>
<gl-loading-icon
v-if=
"isLoading"
size=
"xl"
/>
<gl-loading-icon
v-if=
"isLoading"
size=
"xl"
/>
<template
v-else
>
<template
v-else
>
...
@@ -68,12 +58,5 @@ export default {
...
@@ -68,12 +58,5 @@ export default {
:geo-troubleshooting-link=
"geoTroubleshootingLink"
:geo-troubleshooting-link=
"geoTroubleshootingLink"
/>
/>
</
template
>
</
template
>
</section>
<geo-designs-disabled
v-else
:geo-svg-path=
"geoSvgPath"
:geo-troubleshooting-link=
"geoTroubleshootingLink"
:design-management-link=
"designManagementLink"
/>
</article>
</article>
</template>
</template>
ee/app/assets/javascripts/geo_designs/components/geo_designs_disabled.vue
deleted
100644 → 0
View file @
ace72713
<
script
>
import
{
GlEmptyState
,
GlButton
}
from
'
@gitlab/ui
'
;
export
default
{
name
:
'
GeoDesignsDisabled
'
,
components
:
{
GlEmptyState
,
GlButton
,
},
props
:
{
geoSvgPath
:
{
type
:
String
,
required
:
true
,
},
geoTroubleshootingLink
:
{
type
:
String
,
required
:
true
,
},
designManagementLink
:
{
type
:
String
,
required
:
true
,
},
},
};
</
script
>
<
template
>
<gl-empty-state
:title=
"__('Design Sync Not Enabled')"
:svg-path=
"geoSvgPath"
>
<template
#description
>
<div
class=
"text-center"
>
<p>
{{
__
(
'
If you believe this page to be an error, check out the links below for more information.
'
,
)
}}
</p>
<div>
<gl-button
:href=
"geoTroubleshootingLink"
new-style
>
{{
__
(
'
Geo Troubleshooting
'
)
}}
</gl-button>
<gl-button
:href=
"designManagementLink"
new-style
>
{{
__
(
'
Design Management
'
)
}}
</gl-button>
</div>
</div>
</
template
>
</gl-empty-state>
</template>
ee/spec/frontend/geo_designs/components/app_spec.js
View file @
c47a11f3
...
@@ -3,7 +3,6 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
...
@@ -3,7 +3,6 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
GeoDesignsApp
from
'
ee/geo_designs/components/app.vue
'
;
import
GeoDesignsApp
from
'
ee/geo_designs/components/app.vue
'
;
import
store
from
'
ee/geo_designs/store
'
;
import
store
from
'
ee/geo_designs/store
'
;
import
GeoDesignsDisabled
from
'
ee/geo_designs/components/geo_designs_disabled.vue
'
;
import
GeoDesigns
from
'
ee/geo_designs/components/geo_designs.vue
'
;
import
GeoDesigns
from
'
ee/geo_designs/components/geo_designs.vue
'
;
import
GeoDesignsEmptyState
from
'
ee/geo_designs/components/geo_designs_empty_state.vue
'
;
import
GeoDesignsEmptyState
from
'
ee/geo_designs/components/geo_designs_empty_state.vue
'
;
import
GeoDesignsFilterBar
from
'
ee/geo_designs/components/geo_designs_filter_bar.vue
'
;
import
GeoDesignsFilterBar
from
'
ee/geo_designs/components/geo_designs_filter_bar.vue
'
;
...
@@ -33,10 +32,6 @@ describe('GeoDesignsApp', () => {
...
@@ -33,10 +32,6 @@ describe('GeoDesignsApp', () => {
setEndpoint
:
jest
.
fn
(),
setEndpoint
:
jest
.
fn
(),
};
};
const
glFeatures
=
{
enableGeoDesignSync
:
true
,
};
const
createComponent
=
()
=>
{
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
GeoDesignsApp
,
{
wrapper
=
shallowMount
(
GeoDesignsApp
,
{
localVue
,
localVue
,
...
@@ -45,9 +40,6 @@ describe('GeoDesignsApp', () => {
...
@@ -45,9 +40,6 @@ describe('GeoDesignsApp', () => {
methods
:
{
methods
:
{
...
actionSpies
,
...
actionSpies
,
},
},
provide
:
{
glFeatures
,
},
});
});
};
};
...
@@ -56,8 +48,6 @@ describe('GeoDesignsApp', () => {
...
@@ -56,8 +48,6 @@ describe('GeoDesignsApp', () => {
});
});
const
findGeoDesignsContainer
=
()
=>
wrapper
.
find
(
'
.geo-designs-container
'
);
const
findGeoDesignsContainer
=
()
=>
wrapper
.
find
(
'
.geo-designs-container
'
);
const
findGeoDesignsEnabledContainer
=
()
=>
findGeoDesignsContainer
().
find
(
'
section
'
);
const
findGeoDesignsDisabled
=
()
=>
findGeoDesignsContainer
().
find
(
GeoDesignsDisabled
);
const
findGlLoadingIcon
=
()
=>
findGeoDesignsContainer
().
find
(
GlLoadingIcon
);
const
findGlLoadingIcon
=
()
=>
findGeoDesignsContainer
().
find
(
GlLoadingIcon
);
const
findGeoDesigns
=
()
=>
findGeoDesignsContainer
().
find
(
GeoDesigns
);
const
findGeoDesigns
=
()
=>
findGeoDesignsContainer
().
find
(
GeoDesigns
);
const
findGeoDesignsEmptyState
=
()
=>
findGeoDesignsContainer
().
find
(
GeoDesignsEmptyState
);
const
findGeoDesignsEmptyState
=
()
=>
findGeoDesignsContainer
().
find
(
GeoDesignsEmptyState
);
...
@@ -72,35 +62,6 @@ describe('GeoDesignsApp', () => {
...
@@ -72,35 +62,6 @@ describe('GeoDesignsApp', () => {
expect
(
findGeoDesignsContainer
().
exists
()).
toBe
(
true
);
expect
(
findGeoDesignsContainer
().
exists
()).
toBe
(
true
);
});
});
describe
(
'
when designsEnabled = false
'
,
()
=>
{
beforeEach
(()
=>
{
glFeatures
.
enableGeoDesignSync
=
false
;
createComponent
();
});
it
(
'
shows designs disabled component
'
,
()
=>
{
expect
(
findGeoDesignsDisabled
().
exists
()).
toBe
(
true
);
});
it
(
'
hides designs enabled container
'
,
()
=>
{
expect
(
findGeoDesignsEnabledContainer
().
exists
()).
toBe
(
false
);
});
});
describe
(
'
when designsEnabled = true
'
,
()
=>
{
beforeEach
(()
=>
{
glFeatures
.
enableGeoDesignSync
=
true
;
createComponent
();
});
it
(
'
hides designs disabled component
'
,
()
=>
{
expect
(
findGeoDesignsDisabled
().
exists
()).
toBe
(
false
);
});
it
(
'
shows designs enabled container
'
,
()
=>
{
expect
(
findGeoDesignsEnabledContainer
().
exists
()).
toBe
(
true
);
});
it
(
'
renders the filter bar
'
,
()
=>
{
it
(
'
renders the filter bar
'
,
()
=>
{
expect
(
findGeoDesignsFilterBar
().
exists
()).
toBe
(
true
);
expect
(
findGeoDesignsFilterBar
().
exists
()).
toBe
(
true
);
});
});
...
@@ -167,7 +128,6 @@ describe('GeoDesignsApp', () => {
...
@@ -167,7 +128,6 @@ describe('GeoDesignsApp', () => {
});
});
});
});
});
});
});
describe
(
'
onCreate
'
,
()
=>
{
describe
(
'
onCreate
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
...
ee/spec/frontend/geo_designs/components/geo_designs_disabled_spec.js
deleted
100644 → 0
View file @
ace72713
import
Vuex
from
'
vuex
'
;
import
{
createLocalVue
,
mount
}
from
'
@vue/test-utils
'
;
import
{
GlButton
,
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
GeoDesignsDisabled
from
'
ee/geo_designs/components/geo_designs_disabled.vue
'
;
import
store
from
'
ee/geo_designs/store
'
;
import
{
MOCK_GEO_SVG_PATH
,
MOCK_GEO_TROUBLESHOOTING_LINK
,
MOCK_DESIGN_MANAGEMENT_LINK
,
}
from
'
../mock_data
'
;
const
localVue
=
createLocalVue
();
localVue
.
use
(
Vuex
);
describe
(
'
GeoDesignsDisabled
'
,
()
=>
{
let
wrapper
;
const
propsData
=
{
geoSvgPath
:
MOCK_GEO_SVG_PATH
,
geoTroubleshootingLink
:
MOCK_GEO_TROUBLESHOOTING_LINK
,
designManagementLink
:
MOCK_DESIGN_MANAGEMENT_LINK
,
};
const
createComponent
=
()
=>
{
wrapper
=
mount
(
GeoDesignsDisabled
,
{
localVue
,
store
,
propsData
,
});
};
afterEach
(()
=>
{
wrapper
.
destroy
();
});
const
findGlEmptyState
=
()
=>
wrapper
.
find
(
GlEmptyState
);
const
findGlButton
=
()
=>
findGlEmptyState
().
findAll
(
GlButton
);
describe
(
'
template
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
();
});
it
(
'
renders GlEmptyState
'
,
()
=>
{
expect
(
findGlEmptyState
().
exists
()).
toEqual
(
true
);
});
it
(
'
renders 2 GlButtons
'
,
()
=>
{
expect
(
findGlButton
().
length
).
toEqual
(
2
);
});
});
});
locale/gitlab.pot
View file @
c47a11f3
...
@@ -6399,15 +6399,9 @@ msgstr ""
...
@@ -6399,15 +6399,9 @@ msgstr ""
msgid "Deselect all"
msgid "Deselect all"
msgstr ""
msgstr ""
msgid "Design Management"
msgstr ""
msgid "Design Management files and data"
msgid "Design Management files and data"
msgstr ""
msgstr ""
msgid "Design Sync Not Enabled"
msgstr ""
msgid "DesignManagement|%{current_design} of %{designs_count}"
msgid "DesignManagement|%{current_design} of %{designs_count}"
msgstr ""
msgstr ""
...
@@ -8528,9 +8522,6 @@ msgstr ""
...
@@ -8528,9 +8522,6 @@ msgstr ""
msgid "Geo Settings"
msgid "Geo Settings"
msgstr ""
msgstr ""
msgid "Geo Troubleshooting"
msgstr ""
msgid "Geo allows you to replicate your GitLab instance to other geographical locations."
msgid "Geo allows you to replicate your GitLab instance to other geographical locations."
msgstr ""
msgstr ""
...
@@ -10012,9 +10003,6 @@ msgstr ""
...
@@ -10012,9 +10003,6 @@ msgstr ""
msgid "If you believe this may be an error, please refer to the %{linkStart}Geo Troubleshooting%{linkEnd} documentation for more information."
msgid "If you believe this may be an error, please refer to the %{linkStart}Geo Troubleshooting%{linkEnd} documentation for more information."
msgstr ""
msgstr ""
msgid "If you believe this page to be an error, check out the links below for more information."
msgstr ""
msgid "If you lose your recovery codes you can generate new ones, invalidating all previous codes."
msgid "If you lose your recovery codes you can generate new ones, invalidating all previous codes."
msgstr ""
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