A platform for community discussion. Free, open, simple.
UX: add data explorer view button for default queries (#43686)
David Battersby11cfa538bf6b
diff --git a/plugins/discourse-data-explorer/admin/assets/javascripts/admin/templates/admin-plugins/show/explorer/index.gjs b/plugins/discourse-data-explorer/admin/assets/javascripts/admin/templates/admin-plugins/show/explorer/index.gjsindex 582a488b621..784c2428fd4 100644--- a/plugins/discourse-data-explorer/admin/assets/javascripts/admin/templates/admin-plugins/show/explorer/index.gjs+++ b/plugins/discourse-data-explorer/admin/assets/javascripts/admin/templates/admin-plugins/show/explorer/index.gjs@@ -196,7 +196,11 @@ export default <template>@route="adminPlugins.show.explorer.edit"{{on "click" @controller.scrollTop}}>- {{i18n "edit"}}+ {{#if query.is_default}}+ {{i18n "explorer.view_query"}}+ {{else}}+ {{i18n "edit"}}+ {{/if}}</LinkTo></div>diff --git a/plugins/discourse-data-explorer/assets/stylesheets/explorer.scss b/plugins/discourse-data-explorer/assets/stylesheets/explorer.scssindex 4324f7971ca..5568b0e1936 100644--- a/plugins/discourse-data-explorer/assets/stylesheets/explorer.scss+++ b/plugins/discourse-data-explorer/assets/stylesheets/explorer.scss@@ -1021,6 +1021,10 @@ table.group-reports {.query-created-at {color: var(--primary-medium);}++ .d-table__cell-actions .btn {+ min-width: 4.5em;+ }}.query-row:hover {diff --git a/plugins/discourse-data-explorer/config/locales/client.en.yml b/plugins/discourse-data-explorer/config/locales/client.en.ymlindex fa74e773b5c..bba4f8db900 100644--- a/plugins/discourse-data-explorer/config/locales/client.en.yml+++ b/plugins/discourse-data-explorer/config/locales/client.en.yml@@ -25,6 +25,7 @@ en:resize_editor: "Resize the query editor"default_query: "Default"default_query_notice: "This is a default query, the SQL cannot be edited. To edit the SQL, create a new query."+ view_query: "View"queries: "Queries"query_created: "Query created!"mode: