Просмотр исходного кода

Merge pull request #3679 from volter/colored-bolt

Color the annotation bolt (#3590)

closes #3590
Carl Bergquist 10 лет назад
Родитель
Сommit
ab30297d02
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      public/app/features/annotations/partials/editor.html
  2. 1 1
      public/app/partials/submenu.html

+ 1 - 1
public/app/features/annotations/partials/editor.html

@@ -44,7 +44,7 @@
 				<table class="grafana-options-table">
 				<table class="grafana-options-table">
 					<tr ng-repeat="annotation in annotations">
 					<tr ng-repeat="annotation in annotations">
 						<td style="width:90%">
 						<td style="width:90%">
-							<i class="fa fa-bolt"></i> &nbsp;
+                            <i class="fa fa-bolt" style="color:{{annotation.iconColor}}"></i> &nbsp;
 							{{annotation.name}}
 							{{annotation.name}}
 						</td>
 						</td>
 						<td style="width: 1%"><i ng-click="_.move(annotations,$index,$index-1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i></td>
 						<td style="width: 1%"><i ng-click="_.move(annotations,$index,$index-1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i></td>

+ 1 - 1
public/app/partials/submenu.html

@@ -13,7 +13,7 @@
 		<ul class="tight-form-list" ng-if="dashboard.annotations.list.length > 0">
 		<ul class="tight-form-list" ng-if="dashboard.annotations.list.length > 0">
 			<li ng-repeat="annotation in dashboard.annotations.list" class="submenu-item annotation-segment" ng-class="{'annotation-disabled': !annotation.enable}">
 			<li ng-repeat="annotation in dashboard.annotations.list" class="submenu-item annotation-segment" ng-class="{'annotation-disabled': !annotation.enable}">
 				<a ng-click="disableAnnotation(annotation)">
 				<a ng-click="disableAnnotation(annotation)">
-					<i class="fa fa-bolt"></i>
+                    <i class="fa fa-bolt" style="color:{{annotation.iconColor}}"></i>
 					{{annotation.name}}
 					{{annotation.name}}
 					<input class="cr1" id="hideYAxis" type="checkbox" ng-model="annotation.enable" ng-checked="annotation.enable">
 					<input class="cr1" id="hideYAxis" type="checkbox" ng-model="annotation.enable" ng-checked="annotation.enable">
 					<label for="hideYAxis" class="cr1"></label>
 					<label for="hideYAxis" class="cr1"></label>