mistercrunch closed pull request #4049: Change reference for slices to chart
URL: https://github.com/apache/incubator-superset/pull/4049
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/javascripts/profile/components/Favorites.jsx 
b/superset/assets/javascripts/profile/components/Favorites.jsx
index 3141bb0c32..e1748adccf 100644
--- a/superset/assets/javascripts/profile/components/Favorites.jsx
+++ b/superset/assets/javascripts/profile/components/Favorites.jsx
@@ -29,9 +29,9 @@ export default class Favorites extends React.PureComponent {
       <TableLoader
         dataEndpoint={`/superset/fave_slices/${this.props.user.userId}/`}
         className="table table-condensed"
-        columns={['slice', 'creator', 'favorited']}
+        columns={['chart', 'creator', 'favorited']}
         mutator={mutator}
-        noDataText={t('No favorite slices yet, go click on stars!')}
+        noDataText={t('No favorite charts yet, go click on stars!')}
         sortable
       />
     );
@@ -59,7 +59,7 @@ export default class Favorites extends React.PureComponent {
         <h3>{t('Dashboards')}</h3>
         {this.renderDashboardTable()}
         <hr />
-        <h3>{t('Slices')}</h3>
+        <h3>{t('Charts')}</h3>
         {this.renderSliceTable()}
       </div>
     );
diff --git a/superset/connectors/base/views.py 
b/superset/connectors/base/views.py
index 2794d183d7..46a7120c2b 100644
--- a/superset/connectors/base/views.py
+++ b/superset/connectors/base/views.py
@@ -9,5 +9,5 @@ def pre_delete(self, obj):
         if obj.slices:
             raise SupersetException(Markup(
                 'Cannot delete a datasource that has slices attached to it.'
-                "Here's the list of associated slices: " +
+                "Here's the list of associated charts: " +
                 ''.join([o.slice_link for o in obj.slices])))
diff --git a/superset/connectors/druid/views.py 
b/superset/connectors/druid/views.py
index 66b3bc50e5..fcd4adbd77 100644
--- a/superset/connectors/druid/views.py
+++ b/superset/connectors/druid/views.py
@@ -243,7 +243,7 @@ class DruidDatasourceModelView(DatasourceModelView, 
DeleteMixin, YamlExportMixin
     }
     base_filters = [['id', DatasourceFilter, lambda: []]]
     label_columns = {
-        'slices': _('Associated Slices'),
+        'slices': _('Associated Charts'),
         'datasource_link': _('Data Source'),
         'cluster': _('Cluster'),
         'description': _('Description'),
diff --git a/superset/connectors/sqla/views.py 
b/superset/connectors/sqla/views.py
index 2f394cebf5..12f9d6d555 100644
--- a/superset/connectors/sqla/views.py
+++ b/superset/connectors/sqla/views.py
@@ -210,7 +210,7 @@ class TableModelView(DatasourceModelView, DeleteMixin, 
YamlExportMixin):  # noqa
     }
     base_filters = [['id', DatasourceFilter, lambda: []]]
     label_columns = {
-        'slices': _('Associated Slices'),
+        'slices': _('Associated Charts'),
         'link': _('Table'),
         'changed_by_': _('Changed By'),
         'database': _('Database'),
diff --git a/superset/views/core.py b/superset/views/core.py
index 8307e4f4fd..00254b4ca2 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -405,10 +405,10 @@ class AccessRequestsModelView(SupersetModelView, 
DeleteMixin):
 class SliceModelView(SupersetModelView, DeleteMixin):  # noqa
     datamodel = SQLAInterface(models.Slice)
 
-    list_title = _('List Slices')
-    show_title = _('Show Slice')
-    add_title = _('Add Slice')
-    edit_title = _('Edit Slice')
+    list_title = _('List Charts')
+    show_title = _('Show Chart')
+    add_title = _('Add Chart')
+    edit_title = _('Edit Chart')
 
     can_add = False
     label_columns = {
@@ -449,7 +449,7 @@ class SliceModelView(SupersetModelView, DeleteMixin):  # 
noqa
         'modified': _('Last Modified'),
         'owners': _('Owners'),
         'params': _('Parameters'),
-        'slice_link': _('Slice'),
+        'slice_link': _('Chart'),
         'slice_name': _('Name'),
         'table': _('Table'),
         'viz_type': _('Visualization Type'),
@@ -483,8 +483,8 @@ def add(self):
 
 appbuilder.add_view(
     SliceModelView,
-    'Slices',
-    label=__('Slices'),
+    'Charts',
+    label=__('Charts'),
     icon='fa-bar-chart',
     category='',
     category_icon='',)
@@ -496,7 +496,7 @@ class SliceAsync(SliceModelView):  # noqa
         'creator', 'modified', 'icons']
     label_columns = {
         'icons': ' ',
-        'slice_link': _('Slice'),
+        'slice_link': _('Chart'),
     }
 
 
@@ -556,7 +556,7 @@ class DashboardModelView(SupersetModelView, DeleteMixin):  
# noqa
         'dashboard_link': _('Dashboard'),
         'dashboard_title': _('Title'),
         'slug': _('Slug'),
-        'slices': _('Slices'),
+        'slices': _('Charts'),
         'owners': _('Owners'),
         'creator': _('Creator'),
         'modified': _('Modified'),
diff --git a/tests/core_tests.py b/tests/core_tests.py
index e6381b779e..bdc758502f 100644
--- a/tests/core_tests.py
+++ b/tests/core_tests.py
@@ -548,7 +548,7 @@ def test_add_slices(self, username='admin'):
 
     def test_gamma(self):
         self.login(username='gamma')
-        assert 'List Slice' in self.get_resp('/slicemodelview/list/')
+        assert 'List Charts' in self.get_resp('/slicemodelview/list/')
         assert 'List Dashboard' in self.get_resp('/dashboardmodelview/list/')
 
     def test_csv_endpoint(self):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to