Skip to content

Commit

Permalink
fix dashboard graph metric list icon paths with URL_PREFIX
Browse files Browse the repository at this point in the history
use global *_ICON vars like the other image assets
  • Loading branch information
ploxiln authored and piotr1212 committed Feb 7, 2019
1 parent 2ba5e36 commit 1ba4da5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions webapp/graphite/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*global AUTOCOMPLETE_DELAY CALENDAR_ICON CLOCK_ICON CONTEXT_FIELD_WIDTH FINDER_QUERY_DELAY*/
/*global HELP_ICON NEW_DASHBOARD_REMOVE_GRAPHS REFRESH_ICON REMOVE_ICON RESIZE_ICON*/
/*global SHARE_ICON UI_CONFIG initialState initialError permissions queryString userName*/
/*global permissionsUnauthenticated schemes*/
/*global UP_ICON DOWN_ICON TRASH_ICON permissionsUnauthenticated schemes*/
// Defined in composer_widgets.js
/*global createFunctionsMenu createOptionsMenu updateCheckItems*/

Expand Down Expand Up @@ -1922,7 +1922,7 @@ function graphClicked(graphView, graphIndex, element, evt) {
width: 30,
sortable: false,
items: [{
icon: '/static/img/move_up.png',
icon: UP_ICON,
tooltip: 'Move Up',
handler: function(grid, rowIndex, colIndex) {
var record = targetStore.getAt(rowIndex);
Expand All @@ -1941,7 +1941,7 @@ function graphClicked(graphView, graphIndex, element, evt) {
width: 30,
sortable: false,
items: [{
icon: '/static/img/move_down.png',
icon: DOWN_ICON,
tooltip: 'Move Down',
handler: function(grid, rowIndex, colIndex) {
var record = targetStore.getAt(rowIndex);
Expand All @@ -1960,7 +1960,7 @@ function graphClicked(graphView, graphIndex, element, evt) {
width: 30,
sortable: false,
items: [{
icon: '/static/img/trash.png',
icon: TRASH_ICON,
tooltip: 'Delete Row',
handler: function(grid, rowIndex, colIndex) {
var record = targetStore.getAt(rowIndex);
Expand Down
10 changes: 4 additions & 6 deletions webapp/graphite/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
var REMOVE_ICON = '{% static "js/ext/resources/icons/fam/cross.gif" %}';
var REFRESH_ICON = '{% static "js/ext/resources/icons/fam/table_refresh.png" %}';
var SHARE_ICON = '{% static "js/ext/resources/icons/fam/application_go.png" %}';
var HELP_ICON = '{% static "js/ext/resources/icons/fam/information.png" %}';
var CALENDAR_ICON = '{% static "js/ext/resources/images/default/shared/calendar.gif" %}';
var CLOCK_ICON = '{% static "img/clock_16.png" %}';
var HELP_ICON = '{% static "js/ext/resources/icons/fam/information.png" %}';

// Prefetch images for use in Target grid
(new Image()).src = '{% static "img/move_up.png" %}';
(new Image()).src = '{% static "img/move_down.png" %}';
(new Image()).src = '{% static "img/trash.png" %}';
var UP_ICON = '{% static "img/move_up.png" %}';
var DOWN_ICON = '{% static "img/move_down.png" %}';
var TRASH_ICON = '{% static "img/trash.png" %}';

{% if initialState %}
var initialState = JSON.parse('{{ initialState|escapejs }}');
Expand Down

0 comments on commit 1ba4da5

Please sign in to comment.