Explorar el Código

Hide time info switch when no time options are specified

Torkel Ödegaard hace 7 años
padre
commit
a5455691b3
Se han modificado 1 ficheros con 5 adiciones y 4 borrados
  1. 5 4
      public/app/features/dashboard/panel_editor/QueryOptions.tsx

+ 5 - 4
public/app/features/dashboard/panel_editor/QueryOptions.tsx

@@ -210,10 +210,11 @@ export class QueryOptions extends PureComponent<Props, State> {
             value={timeShift}
           />
         </div>
-
-        <div className="gf-form-inline">
-          <Switch label="Hide time info" checked={hideTimeOverride} onChange={this.onToggleTimeOverride} />
-        </div>
+        {(timeShift || relativeTime) && (
+          <div className="gf-form-inline">
+            <Switch label="Hide time info" checked={hideTimeOverride} onChange={this.onToggleTimeOverride} />
+          </div>
+        )}
       </div>
     );
   }