mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech: cleanup and fixed build issue
This commit is contained in:
parent
f0e0e61809
commit
6aad2a5b2d
@ -9,6 +9,8 @@ import 'angular-sanitize';
|
||||
import 'angular-dragdrop';
|
||||
import 'angular-bindonce';
|
||||
import 'angular-ui';
|
||||
import 'react';
|
||||
import 'react-dom';
|
||||
import 'ngreact';
|
||||
|
||||
import $ from 'jquery';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import 'react-dom';
|
||||
import coreModule from '../core_module';
|
||||
|
||||
export interface IProps {
|
||||
|
@ -8,7 +8,6 @@ import "./directives/dropdown_typeahead";
|
||||
import "./directives/metric_segment";
|
||||
import "./directives/misc";
|
||||
import "./directives/ng_model_on_blur";
|
||||
import "./directives/password_strength";
|
||||
import "./directives/spectrum_picker";
|
||||
import "./directives/tags";
|
||||
import "./directives/value_select_dropdown";
|
||||
|
@ -1,45 +0,0 @@
|
||||
define([
|
||||
'../core_module',
|
||||
],
|
||||
function (coreModule) {
|
||||
'use strict';
|
||||
|
||||
coreModule.default.directive('passwordStrength2', function() {
|
||||
var template = '<div class="password-strength small" ng-if="!loginMode" ng-class="strengthClass">' +
|
||||
'<em>{{strengthText}}</em>' +
|
||||
'</div>';
|
||||
return {
|
||||
template: template,
|
||||
scope: {
|
||||
password: "=",
|
||||
},
|
||||
link: function($scope) {
|
||||
|
||||
$scope.strengthClass = '';
|
||||
|
||||
function passwordChanged(newValue) {
|
||||
if (!newValue) {
|
||||
$scope.strengthText = "";
|
||||
$scope.strengthClass = "hidden";
|
||||
return;
|
||||
}
|
||||
if (newValue.length < 4) {
|
||||
$scope.strengthText = "strength: weak sauce.";
|
||||
$scope.strengthClass = "password-strength-bad";
|
||||
return;
|
||||
}
|
||||
if (newValue.length <= 8) {
|
||||
$scope.strengthText = "strength: you can do better.";
|
||||
$scope.strengthClass = "password-strength-ok";
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.strengthText = "strength: strong like a bull.";
|
||||
$scope.strengthClass = "password-strength-good";
|
||||
}
|
||||
|
||||
$scope.$watch("password", passwordChanged);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
@ -65,7 +65,7 @@
|
||||
deps: ['jquery'],
|
||||
exports: 'angular',
|
||||
},
|
||||
'vendor/angular-mocks/angular-mocks.js': {
|
||||
'vendor/npm/angular-mocks/angular-mocks.js': {
|
||||
format: 'global',
|
||||
deps: ['angular'],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user