fix lint problems

This commit is contained in:
ryan
2018-03-15 00:03:47 +01:00
parent 7a7e407393
commit cae9c28f70
46 changed files with 1144 additions and 1062 deletions
+18 -11
View File
@@ -53,9 +53,9 @@ $enable-flex: true;
// Typography
// -------------------------
$font-family-sans-serif: 'Roboto', Helvetica, Arial, sans-serif;
$font-family-serif: Georgia, 'Times New Roman', Times, serif;
$font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace;
$font-family-sans-serif: "Roboto", Helvetica, Arial, sans-serif;
$font-family-serif: Georgia, "Times New Roman", Times, serif;
$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
$font-family-base: $font-family-sans-serif !default;
$font-size-root: 14px !default;
@@ -90,7 +90,7 @@ $lead-font-size: 1.25rem !default;
$lead-font-weight: 300 !default;
$headings-margin-bottom: ($spacer / 2) !default;
$headings-font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$headings-font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
$headings-font-weight: 400 !default;
$headings-line-height: 1.1 !default;
@@ -152,9 +152,16 @@ $input-padding-y-sm: 4px !default;
$input-padding-x-lg: 20px !default;
$input-padding-y-lg: 10px !default;
$input-height: (($font-size-base * $line-height-base) + ($input-padding-y * 2)) !default;
$input-height-lg: ( ($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)) !default;
$input-height-sm: ( ($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)) !default;
$input-height: (($font-size-base * $line-height-base) + ($input-padding-y * 2))
!default;
$input-height-lg: (
($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)
)
!default;
$input-height-sm: (
($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)
)
!default;
$form-group-margin-bottom: $spacer-y !default;
$gf-form-margin: 0.2rem;
@@ -214,9 +221,9 @@ $panel-padding: 0px 10px 5px 10px;
$tabs-padding: 10px 15px 9px;
$external-services: (
github: (bgColor: #464646, borderColor: #393939, icon: ''),
google: (bgColor: #e84d3c, borderColor: #b83e31, icon: ''),
grafanacom: (bgColor: inherit, borderColor: #393939, icon: ''),
oauth: (bgColor: inherit, borderColor: #393939, icon: '')
github: (bgColor: #464646, borderColor: #393939, icon: ""),
google: (bgColor: #e84d3c, borderColor: #b83e31, icon: ""),
grafanacom: (bgColor: inherit, borderColor: #393939, icon: ""),
oauth: (bgColor: inherit, borderColor: #393939, icon: "")
)
!default;
+22 -22
View File
@@ -58,19 +58,19 @@ textarea {
}
// Reset width of input images, buttons, radios, checkboxes
input[type='file'],
input[type='image'],
input[type='submit'],
input[type='reset'],
input[type='button'],
input[type='radio'],
input[type='checkbox'] {
input[type="file"],
input[type="image"],
input[type="submit"],
input[type="reset"],
input[type="button"],
input[type="radio"],
input[type="checkbox"] {
width: auto; // Override of generic input selector
}
// Set the height of select and file controls to match text inputs
select,
input[type='file'] {
input[type="file"] {
height: $input-height; /* In IE7, the height of the select element cannot be changed by height, only font-size */
line-height: $input-height;
}
@@ -90,19 +90,19 @@ select[size] {
// Focus for select, file, radio, and checkbox
select:focus,
input[type='file']:focus,
input[type='radio']:focus,
input[type='checkbox']:focus {
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
@include tab-focus();
}
// not a big fan of number fields
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type='number'] {
input[type="number"] {
-moz-appearance: textfield;
}
// Placeholder
@@ -155,15 +155,15 @@ textarea[readonly] {
}
// Explicitly reset the colors here
input[type='radio'][disabled],
input[type='checkbox'][disabled],
input[type='radio'][readonly],
input[type='checkbox'][readonly] {
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][readonly],
input[type="checkbox"][readonly] {
cursor: $cursor-disabled;
background-color: transparent;
}
input[type='text'].input-fluid {
input[type="text"].input-fluid {
width: 100%;
box-sizing: border-box;
padding: 10px;
@@ -172,7 +172,7 @@ input[type='text'].input-fluid {
height: 100%;
}
input[type='checkbox'].cr1 {
input[type="checkbox"].cr1 {
display: none;
}
@@ -194,7 +194,7 @@ label.cr1 {
cursor: pointer;
}
input[type='checkbox'].cr1:checked + label {
input[type="checkbox"].cr1:checked + label {
background: url($checkboxImageUrl) 0px -18px no-repeat;
}
@@ -203,7 +203,7 @@ input[type='checkbox'].cr1:checked + label {
display: block;
overflow: hidden;
padding-right: 10px;
input[type='text'] {
input[type="text"] {
width: 100%;
padding: 5px 6px;
height: 100%;
+62 -61
View File
@@ -1,17 +1,18 @@
@font-face {
font-family: 'grafana-icons';
src: url('../fonts/grafana-icons.eot?okx5td');
src: url('../fonts/grafana-icons.eot?okx5td#iefix') format('embedded-opentype'),
url('../fonts/grafana-icons.ttf?okx5td') format('truetype'),
url('../fonts/grafana-icons.woff?okx5td') format('woff'),
url('../fonts/grafana-icons.svg?okx5td#grafana-icons') format('svg');
font-family: "grafana-icons";
src: url("../fonts/grafana-icons.eot?okx5td");
src: url("../fonts/grafana-icons.eot?okx5td#iefix")
format("embedded-opentype"),
url("../fonts/grafana-icons.ttf?okx5td") format("truetype"),
url("../fonts/grafana-icons.woff?okx5td") format("woff"),
url("../fonts/grafana-icons.svg?okx5td#grafana-icons") format("svg");
font-weight: normal;
font-style: normal;
}
.icon-gf {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'grafana-icons' !important;
font-family: "grafana-icons" !important;
speak: none;
font-style: normal;
font-weight: normal;
@@ -36,165 +37,165 @@
}
.icon-gf-raintank_wordmark:before {
content: '\e600';
content: "\e600";
}
.micon-gf-raintank_icn:before {
content: '\e601';
content: "\e601";
}
.icon-gf-raintank_r-icn:before {
content: '\e905';
content: "\e905";
}
.icon-gf-check-alt:before {
content: '\e603';
content: "\e603";
}
.icon-gf-check:before {
content: '\e604';
content: "\e604";
}
.icon-gf-collector:before {
content: '\e605';
content: "\e605";
}
.icon-gf-dashboard:before {
content: '\e606';
content: "\e606";
}
.icon-gf-panel:before {
content: '\e904';
content: "\e904";
}
.icon-gf-datasources:before {
content: '\e607';
content: "\e607";
}
.icon-gf-endpoint-tiny:before {
content: '\e608';
content: "\e608";
}
.icon-gf-endpoint:before {
content: '\e609';
content: "\e609";
}
.icon-gf-page:before {
content: '\e908';
content: "\e908";
}
.icon-gf-filter:before {
content: '\e60a';
content: "\e60a";
}
.icon-gf-status:before {
content: '\e60b';
content: "\e60b";
}
.icon-gf-monitoring:before {
content: '\e60c';
content: "\e60c";
}
.icon-gf-monitoring-tiny:before {
content: '\e620';
content: "\e620";
}
.icon-gf-jump-to-dashboard:before {
content: '\e60d';
content: "\e60d";
}
.icon-gf-warn,
.icon-gf-warning:before {
content: '\e60e';
content: "\e60e";
}
.icon-gf-nodata:before {
content: '\e60f';
content: "\e60f";
}
.icon-gf-critical:before {
content: '\e610';
content: "\e610";
}
.icon-gf-crit:before {
content: '\e610';
content: "\e610";
}
.icon-gf-online:before {
content: '\e611';
content: "\e611";
}
.icon-gf-event-error:before {
content: '\e623';
content: "\e623";
}
.icon-gf-event:before {
content: '\e624';
content: "\e624";
}
.icon-gf-sadface:before {
content: '\e907';
content: "\e907";
}
.icon-gf-private-collector:before {
content: '\e612';
content: "\e612";
}
.icon-gf-alert:before {
content: '\e61f';
content: "\e61f";
}
.icon-gf-alert-disabled:before {
content: '\e621';
content: "\e621";
}
.icon-gf-refresh:before {
content: '\e613';
content: "\e613";
}
.icon-gf-save:before {
content: '\e614';
content: "\e614";
}
.icon-gf-share:before {
content: '\e616';
content: "\e616";
}
.icon-gf-star:before {
content: '\e617';
content: "\e617";
}
.icon-gf-search:before {
content: '\e618';
content: "\e618";
}
.icon-gf-settings:before {
content: '\e615';
content: "\e615";
}
.icon-gf-add:before {
content: '\e619';
content: "\e619";
}
.icon-gf-remove:before {
content: '\e61a';
content: "\e61a";
}
.icon-gf-video:before {
content: '\e61b';
content: "\e61b";
}
.icon-gf-bulk_action:before {
content: '\e61c';
content: "\e61c";
}
.icon-gf-grabber:before {
content: '\e90b';
content: "\e90b";
}
.icon-gf-users:before {
content: '\e622';
content: "\e622";
}
.icon-gf-globe:before {
content: '\e61d';
content: "\e61d";
}
.icon-gf-snapshot:before {
content: '\e61e';
content: "\e61e";
}
.icon-gf-play-grafana-icon:before {
content: '\e629';
content: "\e629";
}
.icon-gf-grafana-icon:before {
content: '\e625';
content: "\e625";
}
.icon-gf-email:before {
content: '\e628';
content: "\e628";
}
.icon-gf-stopwatch:before {
content: '\e626';
content: "\e626";
}
.icon-gf-skull:before {
content: '\e900';
content: "\e900";
}
.icon-gf-probe:before {
content: '\e901';
content: "\e901";
}
.icon-gf-apps:before {
content: '\e902';
content: "\e902";
}
.icon-gf-scale:before {
content: '\e906';
content: "\e906";
}
.icon-gf-pending:before {
content: '\e909';
content: "\e909";
}
.icon-gf-verified:before {
content: '\e90a';
content: "\e90a";
}
.icon-gf-worldping:before {
content: '\e627';
content: "\e627";
}
.icon-gf-grafana_wordmark:before {
content: '\e903';
content: "\e903";
}
+10 -10
View File
@@ -291,9 +291,9 @@ select {
//
button,
html input[type='button'],
// 1 input[type='reset'],
input[type='submit'] {
html input[type="button"],
// 1 input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; // 2
cursor: pointer; // 3
}
@@ -334,8 +334,8 @@ input {
// 2. Remove excess padding in IE 8/9/10.
//
input[type='checkbox'],
input[type='radio'] {
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; // 1
padding: 0; // 2
}
@@ -346,8 +346,8 @@ input[type='radio'] {
// decrement button to change from `default` to `text`.
//
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
@@ -355,7 +355,7 @@ input[type='number']::-webkit-outer-spin-button {
// Address `appearance` set to `searchfield` in Safari and Chrome.
//
input[type='search'] {
input[type="search"] {
-webkit-appearance: textfield;
}
@@ -365,8 +365,8 @@ input[type='search'] {
// padding (and `textfield` appearance).
//
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
+4 -4
View File
@@ -87,7 +87,7 @@ body {
// might still respond to pointer events.
//
// Credit: https://github.com/suitcss/base
[tabindex='-1']:focus {
[tabindex="-1"]:focus {
outline: none !important;
}
@@ -214,7 +214,7 @@ img {
// for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
[role='button'] {
[role="button"] {
cursor: pointer;
}
@@ -231,7 +231,7 @@ img {
a,
area,
button,
[role='button'],
[role="button"],
input,
label,
select,
@@ -320,7 +320,7 @@ legend {
// border: 0;
}
input[type='search'] {
input[type="search"] {
// This overrides the extra rounded corners on search inputs in iOS so that our
// `.form-control` class can properly style them. Note that this cannot simply
// be added to `.form-control` as it's not specific enough. For details, see
+2 -1
View File
@@ -3,7 +3,8 @@
.#{$fa-css-prefix} {
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base}
FontAwesome; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased;
+4 -3
View File
@@ -3,7 +3,8 @@
@mixin fa-icon() {
display: inline-block;
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base}
FontAwesome; // shortening font declaration
font-size: inherit; // can't have font-size inherit on line above, so need to override
text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased;
@@ -11,14 +12,14 @@
}
@mixin fa-icon-rotate($degrees, $rotation) {
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})';
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})";
-webkit-transform: rotate($degrees);
-ms-transform: rotate($degrees);
transform: rotate($degrees);
}
@mixin fa-icon-flip($horiz, $vert, $rotation) {
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)';
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)";
-webkit-transform: scale($horiz, $vert);
-ms-transform: scale($horiz, $vert);
transform: scale($horiz, $vert);
+12 -7
View File
@@ -2,13 +2,18 @@
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
font-family: "FontAwesome";
src: url("#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}");
src: url("#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}")
format("embedded-opentype"),
url("#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}")
format("woff2"),
url("#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}")
format("woff"),
url("#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}")
format("truetype"),
url("#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular")
format("svg");
// src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
font-weight: normal;
font-style: normal;
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -5,13 +5,13 @@ $useDropShadow: false;
$attachmentOffset: 0%;
$easing: cubic-bezier(0, 0, 0.265, 1);
@include drop-theme('error', $popover-error-bg, $popover-color);
@include drop-theme('popover', $popover-bg, $popover-color, $popover-border-color);
@include drop-theme('help', $popover-help-bg, $popover-help-color);
@include drop-theme("error", $popover-error-bg, $popover-color);
@include drop-theme("popover", $popover-bg, $popover-color, $popover-border-color);
@include drop-theme("help", $popover-help-bg, $popover-help-color);
@include drop-animation-scale('drop', 'help', $attachmentOffset: $attachmentOffset, $easing: $easing);
@include drop-animation-scale('drop', 'error', $attachmentOffset: $attachmentOffset, $easing: $easing);
@include drop-animation-scale('drop', 'popover', $attachmentOffset: $attachmentOffset, $easing: $easing);
@include drop-animation-scale("drop", "help", $attachmentOffset: $attachmentOffset, $easing: $easing);
@include drop-animation-scale("drop", "error", $attachmentOffset: $attachmentOffset, $easing: $easing);
@include drop-animation-scale("drop", "popover", $attachmentOffset: $attachmentOffset, $easing: $easing);
.drop-element {
z-index: 10000;
+3 -3
View File
@@ -67,17 +67,17 @@
text-transform: uppercase;
&.online {
background-image: url('/img/online.svg');
background-image: url("/img/online.svg");
color: $online;
}
&.warn {
background-image: url('/img/warn-tiny.svg');
background-image: url("/img/warn-tiny.svg");
color: $warn;
}
&.critical {
background-image: url('/img/critical.svg');
background-image: url("/img/critical.svg");
color: $critical;
}
}
+2 -2
View File
@@ -25,7 +25,7 @@
display: inline-block;
padding-right: 2px;
&::after {
content: ' | ';
content: " | ";
padding-left: 2px;
}
}
@@ -33,7 +33,7 @@
li:last-child {
&::after {
padding-left: 0;
content: '';
content: "";
}
}
}
+3 -3
View File
@@ -21,10 +21,10 @@
display: none;
}
&.json-formatter-object::after {
content: 'No properties';
content: "No properties";
}
&.json-formatter-array::after {
content: '[]';
content: "[]";
}
}
}
@@ -87,7 +87,7 @@
&::after {
display: inline-block;
transition: transform $json-explorer-rotate-time ease-in;
content: '►';
content: "►";
}
}
+2 -2
View File
@@ -35,12 +35,12 @@ json-tree {
color: $variable;
padding: 5px 10px 5px 15px;
&::after {
content: ':';
content: ":";
}
}
json-node.expandable {
&::before {
content: '\25b6';
content: "\25b6";
position: absolute;
left: 0px;
font-size: 8px;
@@ -52,7 +52,7 @@ $path-position: $marker-size-half - ($path-height / 2);
&::after {
right: -50%;
content: '';
content: "";
display: block;
position: absolute;
z-index: 1;
@@ -105,7 +105,7 @@ $path-position: $marker-size-half - ($path-height / 2);
// change icon to check
.icon-gf::before {
content: '\e604';
content: "\e604";
}
}
.progress-text {
+1 -1
View File
@@ -69,7 +69,7 @@
cursor: move;
width: 1rem;
height: 100%;
background: url('../img/grab_dark.svg') no-repeat 50% 50%;
background: url("../img/grab_dark.svg") no-repeat 50% 50%;
background-size: 8px;
visibility: hidden;
position: absolute;
+1 -1
View File
@@ -33,7 +33,7 @@
text-align: center;
margin-right: 0.3rem;
padding: 3px 5px;
font: 11px Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
+4 -4
View File
@@ -64,8 +64,8 @@
}
input + label::before {
font-family: 'FontAwesome';
content: '\f096'; // square-o
font-family: "FontAwesome";
content: "\f096"; // square-o
color: $text-color-weak;
transition: transform 0.4s;
backface-visibility: hidden;
@@ -73,11 +73,11 @@
}
input + label::after {
content: '\f046'; // check-square-o
content: "\f046"; // check-square-o
color: $orange;
text-shadow: $text-shadow-strong;
font-family: 'FontAwesome';
font-family: "FontAwesome";
transition: transform 0.4s;
transform: rotateY(180deg);
backface-visibility: hidden;
+7 -2
View File
@@ -44,13 +44,18 @@
&::before {
display: block;
content: ' ';
content: " ";
position: absolute;
left: 0;
right: 0;
height: 2px;
top: 0;
background-image: linear-gradient(to right, #ffd500 0%, #ff4400 99%, #ff4400 100%);
background-image: linear-gradient(
to right,
#ffd500 0%,
#ff4400 99%,
#ff4400 100%
);
}
}
}
+2 -2
View File
@@ -103,10 +103,10 @@
}
.fa-chevron-left::before {
content: '\f053';
content: "\f053";
}
.fa-chevron-right::before {
content: '\f054';
content: "\f054";
}
.glyphicon-chevron-right {
+3 -3
View File
@@ -1,3 +1,3 @@
@import 'variables';
@import 'variables.dark';
@import 'grafana';
@import "variables";
@import "variables.dark";
@import "grafana";
+34 -18
View File
@@ -15,7 +15,7 @@
border: 1px solid $border-color;
&:before {
content: '';
content: "";
display: block;
position: absolute;
width: 0;
@@ -88,7 +88,8 @@
left: $popover-arrow-size * 2;
}
&.drop-element-attached-top.drop-element-attached-left.drop-target-attached-middle .drop-content {
&.drop-element-attached-top.drop-element-attached-left.drop-target-attached-middle
.drop-content {
margin-top: $popover-arrow-size;
&:before {
@@ -98,7 +99,8 @@
}
}
&.drop-element-attached-top.drop-element-attached-right.drop-target-attached-middle .drop-content {
&.drop-element-attached-top.drop-element-attached-right.drop-target-attached-middle
.drop-content {
margin-top: $popover-arrow-size;
&:before {
@@ -108,7 +110,8 @@
}
}
&.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-middle .drop-content {
&.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-middle
.drop-content {
margin-bottom: $popover-arrow-size;
&:before {
@@ -118,7 +121,8 @@
}
}
&.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-middle .drop-content {
&.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-middle
.drop-content {
margin-bottom: $popover-arrow-size;
&:before {
@@ -129,7 +133,8 @@
}
// Top and bottom corners
&.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom .drop-content {
&.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom
.drop-content {
margin-top: $popover-arrow-size;
&:before {
@@ -139,7 +144,8 @@
}
}
&.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom .drop-content {
&.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom
.drop-content {
margin-top: $popover-arrow-size;
&:before {
@@ -149,7 +155,8 @@
}
}
&.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top .drop-content {
&.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top
.drop-content {
margin-bottom: $popover-arrow-size;
&:before {
@@ -159,7 +166,8 @@
}
}
&.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top .drop-content {
&.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top
.drop-content {
margin-bottom: $popover-arrow-size;
&:before {
@@ -170,7 +178,8 @@
}
// Side corners
&.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left .drop-content {
&.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left
.drop-content {
margin-right: $popover-arrow-size;
&:before {
@@ -180,7 +189,8 @@
}
}
&.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right .drop-content {
&.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right
.drop-content {
margin-left: $popover-arrow-size;
&:before {
@@ -190,7 +200,8 @@
}
}
&.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left .drop-content {
&.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left
.drop-content {
margin-right: $popover-arrow-size;
&:before {
@@ -200,7 +211,8 @@
}
}
&.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right .drop-content {
&.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right
.drop-content {
margin-left: $popover-arrow-size;
&:before {
@@ -212,7 +224,7 @@
}
}
@mixin drop-animation-scale($themePrefix: 'drop', $themeName: 'default', $attachmentOffset: 0, $easing: 'linear') {
@mixin drop-animation-scale($themePrefix: "drop", $themeName: "default", $attachmentOffset: 0, $easing: "linear") {
.#{$themePrefix}-element.#{$themePrefix}-#{$themeName} {
transform: translateZ(0);
transition: opacity 100ms;
@@ -235,16 +247,20 @@
}
}
// Centers and middles
&.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-center .#{$themePrefix}-content {
&.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-center
.#{$themePrefix}-content {
transform-origin: 50% calc(100% + #{$attachmentOffset});
}
&.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-center .#{$themePrefix}-content {
&.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-center
.#{$themePrefix}-content {
transform-origin: 50% (-$attachmentOffset);
}
&.#{$themePrefix}-element-attached-right.#{$themePrefix}-element-attached-middle .#{$themePrefix}-content {
&.#{$themePrefix}-element-attached-right.#{$themePrefix}-element-attached-middle
.#{$themePrefix}-content {
transform-origin: calc(100% + #{$attachmentOffset}) 50%;
}
&.#{$themePrefix}-element-attached-left.#{$themePrefix}-element-attached-middle .#{$themePrefix}-content {
&.#{$themePrefix}-element-attached-left.#{$themePrefix}-element-attached-middle
.#{$themePrefix}-content {
transform-origin: -($attachmentOffset 50%);
}
// Top and bottom corners
+2 -1
View File
@@ -41,7 +41,8 @@
&:focus {
border-color: $input-border-focus;
outline: none;
$shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 5px $input-box-shadow-focus;
$shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 5px $input-box-shadow-focus;
@include box-shadow($shadow);
}
}
+53 -10
View File
@@ -1,6 +1,6 @@
@mixin clearfix() {
&::after {
content: '';
content: "";
display: table;
clear: both;
}
@@ -265,10 +265,20 @@
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
#translucent {
@mixin background($color: $white, $alpha: 1) {
background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
background-color: hsla(
hue($color),
saturation($color),
lightness($color),
$alpha
);
}
@mixin border($color: $white, $alpha: 1) {
border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
border-color: hsla(
hue($color),
saturation($color),
lightness($color),
$alpha
);
@include background-clip(padding-box);
}
}
@@ -284,37 +294,66 @@
// Gradients
@mixin gradient-horizontal($startColor: #555, $endColor: #333) {
background-color: $endColor;
background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
background-image: linear-gradient(
to right,
$startColor,
$endColor
); // Standard, IE10
background-repeat: repeat-x;
}
@mixin gradient-vertical($startColor: #555, $endColor: #333) {
background-color: mix($startColor, $endColor, 60%);
background-image: linear-gradient(to bottom, $startColor, $endColor); // Standard, IE10
background-image: linear-gradient(
to bottom,
$startColor,
$endColor
); // Standard, IE10
background-repeat: repeat-x;
}
@mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
background-color: $endColor;
background-repeat: repeat-x;
background-image: linear-gradient($deg, $startColor, $endColor); // Standard, IE10
background-image: linear-gradient(
$deg,
$startColor,
$endColor
); // Standard, IE10
}
@mixin gradient-horizontal-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
background-color: mix($midColor, $endColor, 80%);
background-image: linear-gradient(to right, $startColor, $midColor $colorStop, $endColor);
background-image: linear-gradient(
to right,
$startColor,
$midColor $colorStop,
$endColor
);
background-repeat: no-repeat;
}
@mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
background-color: mix($midColor, $endColor, 80%);
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
background-image: linear-gradient(
$startColor,
$midColor $colorStop,
$endColor
);
background-repeat: no-repeat;
}
@mixin gradient-radial($innerColor: #555, $outerColor: #333) {
background-color: $outerColor;
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
background-image: -webkit-gradient(
radial,
center center,
0,
center center,
460,
from($innerColor),
to($outerColor)
);
background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
background-image: -o-radial-gradient(circle, $innerColor, $outerColor);
@@ -341,7 +380,11 @@
@mixin left-brand-border-gradient() {
border: none;
border-image: linear-gradient(rgba(255, 213, 0, 1) 0%, rgba(255, 68, 0, 1) 99%, rgba(255, 68, 0, 1) 100%);
border-image: linear-gradient(
rgba(255, 213, 0, 1) 0%,
rgba(255, 68, 0, 1) 99%,
rgba(255, 68, 0, 1) 100%
);
border-image-slice: 1;
border-style: solid;
border-top: 0;
+1 -1
View File
@@ -371,7 +371,7 @@ select:-webkit-autofill:focus {
left: 0;
right: 0;
height: 100%;
content: '';
content: "";
display: block;
}
+2 -2
View File
@@ -84,11 +84,11 @@
background-color: $list-item-bg;
margin-bottom: 4px;
.search-result-icon:before {
content: '\f009';
content: "\f009";
}
&.search-item-dash-home .search-result-icon:before {
content: '\f015';
content: "\f015";
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
input[type='text'].ng-dirty.ng-invalid {
input[type="text"].ng-dirty.ng-invalid {
}
input.validation-error,
+18 -18
View File
@@ -1,8 +1,8 @@
import { describe, beforeEach, it, expect } from 'test/lib/common';
import {describe, beforeEach, it, expect} from 'test/lib/common';
import { SemVersion, isVersionGtOrEq } from 'app/core/utils/version';
import {SemVersion, isVersionGtOrEq} from 'app/core/utils/version';
describe('SemVersion', () => {
describe("SemVersion", () => {
let version = '1.0.0-alpha.1';
describe('parsing', () => {
@@ -23,13 +23,13 @@ describe('SemVersion', () => {
it('should detect greater version properly', () => {
let semver = new SemVersion(version);
let cases = [
{ value: '3.4.5', expected: true },
{ value: '3.4.4', expected: true },
{ value: '3.4.6', expected: false },
{ value: '4', expected: false },
{ value: '3.5', expected: false },
{value: '3.4.5', expected: true},
{value: '3.4.4', expected: true},
{value: '3.4.6', expected: false},
{value: '4', expected: false},
{value: '3.5', expected: false},
];
cases.forEach(testCase => {
cases.forEach((testCase) => {
expect(semver.isGtOrEq(testCase.value)).to.be(testCase.expected);
});
});
@@ -38,16 +38,16 @@ describe('SemVersion', () => {
describe('isVersionGtOrEq', () => {
it('should compare versions properly (a >= b)', () => {
let cases = [
{ values: ['3.4.5', '3.4.5'], expected: true },
{ values: ['3.4.5', '3.4.4'], expected: true },
{ values: ['3.4.5', '3.4.6'], expected: false },
{ values: ['3.4', '3.4.0'], expected: true },
{ values: ['3', '3.0.0'], expected: true },
{ values: ['3.1.1-beta1', '3.1'], expected: true },
{ values: ['3.4.5', '4'], expected: false },
{ values: ['3.4.5', '3.5'], expected: false },
{values: ['3.4.5', '3.4.5'], expected: true},
{values: ['3.4.5', '3.4.4'] , expected: true},
{values: ['3.4.5', '3.4.6'], expected: false},
{values: ['3.4', '3.4.0'], expected: true},
{values: ['3', '3.0.0'], expected: true},
{values: ['3.1.1-beta1', '3.1'], expected: true},
{values: ['3.4.5', '4'], expected: false},
{values: ['3.4.5', '3.5'], expected: false},
];
cases.forEach(testCase => {
cases.forEach((testCase) => {
expect(isVersionGtOrEq(testCase.values[0], testCase.values[1])).to.be(testCase.expected);
});
});
+2 -1
View File
@@ -1,5 +1,6 @@
declare var global: NodeJS.Global;
(<any>global).requestAnimationFrame = callback => {
(<any>global).requestAnimationFrame = (callback) => {
setTimeout(callback, 0);
};
+4 -1
View File
@@ -1,5 +1,8 @@
export class BackendSrvMock {
search: any;
constructor() {}
constructor() {
}
}
+11 -11
View File
@@ -1,8 +1,8 @@
import _ from 'lodash';
import config from 'app/core/config';
import * as dateMath from 'app/core/utils/datemath';
import { angularMocks, sinon } from '../lib/common';
import { PanelModel } from 'app/features/dashboard/panel_model';
import {angularMocks, sinon} from '../lib/common';
import {PanelModel} from 'app/features/dashboard/panel_model';
export function ControllerTestContext() {
var self = this;
@@ -42,8 +42,8 @@ export function ControllerTestContext() {
self.$location = $location;
self.$browser = $browser;
self.$q = $q;
self.panel = new PanelModel({ type: 'test' });
self.dashboard = { meta: {} };
self.panel = new PanelModel({type: 'test'});
self.dashboard = {meta: {}};
$rootScope.appEvent = sinon.spy();
$rootScope.onAppEvent = sinon.spy();
@@ -53,14 +53,14 @@ export function ControllerTestContext() {
$rootScope.colors.push('#' + i);
}
config.panels['test'] = { info: {} };
config.panels['test'] = {info: {}};
self.ctrl = $controller(
Ctrl,
{ $scope: self.scope },
{$scope: self.scope},
{
panel: self.panel,
dashboard: self.dashboard,
}
},
);
});
};
@@ -72,7 +72,7 @@ export function ControllerTestContext() {
self.$browser = $browser;
self.scope.contextSrv = {};
self.scope.panel = {};
self.scope.dashboard = { meta: {} };
self.scope.dashboard = {meta: {}};
self.scope.dashboardMeta = {};
self.scope.dashboardViewState = new DashboardViewStateStub();
self.scope.appEvent = sinon.spy();
@@ -131,7 +131,7 @@ export function DashboardViewStateStub() {
export function TimeSrvStub() {
this.init = sinon.spy();
this.time = { from: 'now-1h', to: 'now' };
this.time = {from: 'now-1h', to: 'now'};
this.timeRange = function(parse) {
if (parse === false) {
return this.time;
@@ -159,7 +159,7 @@ export function ContextSrvStub() {
export function TemplateSrvStub() {
this.variables = [];
this.templateSettings = { interpolate: /\[\[([\s\S]+?)\]\]/g };
this.templateSettings = {interpolate: /\[\[([\s\S]+?)\]\]/g};
this.data = {};
this.replace = function(text) {
return _.template(text, this.templateSettings)(this.data);
@@ -188,7 +188,7 @@ var allDeps = {
TimeSrvStub: TimeSrvStub,
ControllerTestContext: ControllerTestContext,
ServiceTestContext: ServiceTestContext,
DashboardViewStateStub: DashboardViewStateStub,
DashboardViewStateStub: DashboardViewStateStub
};
// for legacy
+1 -1
View File
@@ -457,7 +457,7 @@ func (c *Client) GetMulti(keys []string) (map[string]*Item, error) {
}
var err error
for range keyMap {
for _ = range keyMap {
if ge := <-ch; ge != nil {
err = ge
}
+1 -1
View File
@@ -567,7 +567,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
// so they don't block since it is an io.Pipe
defer func() {
go func() {
for range linesCh {
for _ = range linesCh {
}
}()
}()
+1 -1
View File
@@ -75,7 +75,7 @@ func NewRPCClient(conn io.ReadWriteCloser, plugins map[string]Plugin) (*RPCClien
// Connect stdout, stderr streams
stdstream := make([]net.Conn, 2)
for i := range stdstream {
for i, _ := range stdstream {
stdstream[i], err = mux.Open()
if err != nil {
mux.Close()
+1 -1
View File
@@ -78,7 +78,7 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {
// Connect the stdstreams (in, out, err)
stdstream := make([]net.Conn, 2)
for i := range stdstream {
for i, _ := range stdstream {
stdstream[i], err = mux.Accept()
if err != nil {
mux.Close()
+13 -13
View File
@@ -85,7 +85,7 @@ func (dmp *DiffMatchPatch) diffMainRunes(text1, text2 []rune, checklines bool, d
// Restore the prefix and suffix.
if len(commonprefix) != 0 {
diffs = append([]Diff{{DiffEqual, string(commonprefix)}}, diffs...)
diffs = append([]Diff{Diff{DiffEqual, string(commonprefix)}}, diffs...)
}
if len(commonsuffix) != 0 {
diffs = append(diffs, Diff{DiffEqual, string(commonsuffix)})
@@ -122,16 +122,16 @@ func (dmp *DiffMatchPatch) diffCompute(text1, text2 []rune, checklines bool, dea
}
// Shorter text is inside the longer text (speedup).
return []Diff{
{op, string(longtext[:i])},
{DiffEqual, string(shorttext)},
{op, string(longtext[i+len(shorttext):])},
Diff{op, string(longtext[:i])},
Diff{DiffEqual, string(shorttext)},
Diff{op, string(longtext[i+len(shorttext):])},
}
} else if len(shorttext) == 1 {
// Single character string.
// After the previous speedup, the character can't be an equality.
return []Diff{
{DiffDelete, string(text1)},
{DiffInsert, string(text2)},
Diff{DiffDelete, string(text1)},
Diff{DiffInsert, string(text2)},
}
// Check to see if the problem can be split in two.
} else if hm := dmp.diffHalfMatch(text1, text2); hm != nil {
@@ -145,7 +145,7 @@ func (dmp *DiffMatchPatch) diffCompute(text1, text2 []rune, checklines bool, dea
diffsA := dmp.diffMainRunes(text1A, text2A, checklines, deadline)
diffsB := dmp.diffMainRunes(text1B, text2B, checklines, deadline)
// Merge the results.
return append(diffsA, append([]Diff{{DiffEqual, string(midCommon)}}, diffsB...)...)
return append(diffsA, append([]Diff{Diff{DiffEqual, string(midCommon)}}, diffsB...)...)
} else if checklines && len(text1) > 100 && len(text2) > 100 {
return dmp.diffLineMode(text1, text2, deadline)
}
@@ -330,8 +330,8 @@ func (dmp *DiffMatchPatch) diffBisect(runes1, runes2 []rune, deadline time.Time)
}
// Diff took too long and hit the deadline or number of diffs equals number of characters, no commonality at all.
return []Diff{
{DiffDelete, string(runes1)},
{DiffInsert, string(runes2)},
Diff{DiffDelete, string(runes1)},
Diff{DiffInsert, string(runes2)},
}
}
@@ -673,7 +673,7 @@ func (dmp *DiffMatchPatch) DiffCleanupSemantic(diffs []Diff) []Diff {
insPoint := equalities.data
diffs = append(
diffs[:insPoint],
append([]Diff{{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
append([]Diff{Diff{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
// Change second copy to insert.
diffs[insPoint+1].Type = DiffInsert
@@ -726,7 +726,7 @@ func (dmp *DiffMatchPatch) DiffCleanupSemantic(diffs []Diff) []Diff {
// Overlap found. Insert an equality and trim the surrounding edits.
diffs = append(
diffs[:pointer],
append([]Diff{{DiffEqual, insertion[:overlapLength1]}}, diffs[pointer:]...)...)
append([]Diff{Diff{DiffEqual, insertion[:overlapLength1]}}, diffs[pointer:]...)...)
diffs[pointer-1].Text =
deletion[0 : len(deletion)-overlapLength1]
@@ -955,7 +955,7 @@ func (dmp *DiffMatchPatch) DiffCleanupEfficiency(diffs []Diff) []Diff {
// Duplicate record.
diffs = append(diffs[:insPoint],
append([]Diff{{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
append([]Diff{Diff{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
// Change second copy to insert.
diffs[insPoint+1].Type = DiffInsert
@@ -1028,7 +1028,7 @@ func (dmp *DiffMatchPatch) DiffCleanupMerge(diffs []Diff) []Diff {
if x > 0 && diffs[x-1].Type == DiffEqual {
diffs[x-1].Text += string(textInsert[:commonlength])
} else {
diffs = append([]Diff{{DiffEqual, string(textInsert[:commonlength])}}, diffs...)
diffs = append([]Diff{Diff{DiffEqual, string(textInsert[:commonlength])}}, diffs...)
pointer++
}
textInsert = textInsert[commonlength:]
+2 -2
View File
@@ -93,7 +93,7 @@ func (dmp *DiffMatchPatch) PatchAddContext(patch Patch, text string) Patch {
// Add the prefix.
prefix := text[max(0, patch.Start2-padding):patch.Start2]
if len(prefix) != 0 {
patch.diffs = append([]Diff{{DiffEqual, prefix}}, patch.diffs...)
patch.diffs = append([]Diff{Diff{DiffEqual, prefix}}, patch.diffs...)
}
// Add the suffix.
suffix := text[patch.Start2+patch.Length1 : min(len(text), patch.Start2+patch.Length1+padding)]
@@ -336,7 +336,7 @@ func (dmp *DiffMatchPatch) PatchAddPadding(patches []Patch) string {
// Add some padding on start of first diff.
if len(patches[0].diffs) == 0 || patches[0].diffs[0].Type != DiffEqual {
// Add nullPadding equality.
patches[0].diffs = append([]Diff{{DiffEqual, nullPadding}}, patches[0].diffs...)
patches[0].diffs = append([]Diff{Diff{DiffEqual, nullPadding}}, patches[0].diffs...)
patches[0].Start1 -= paddingLength // Should be 0.
patches[0].Start2 -= paddingLength // Should be 0.
patches[0].Length1 += paddingLength
+1 -3
View File
@@ -321,9 +321,7 @@ func (noCachedConnError) Error() string { return "http2: no cached c
// or its equivalent renamed type in net/http2's h2_bundle.go. Both types
// may coexist in the same running program.
func isNoCachedConnError(err error) bool {
_, ok := err.(interface {
IsHTTP2NoCachedConnError()
})
_, ok := err.(interface{ IsHTTP2NoCachedConnError() })
return ok
}
+1 -1
View File
@@ -1050,7 +1050,7 @@ func (b *builder) writeRegion() {
m49Index := [9]int16{}
fromM49 := []uint16{}
m49 := []int{}
for k := range fromM49map {
for k, _ := range fromM49map {
m49 = append(m49, int(k))
}
sort.Ints(m49)
+28 -28
View File
@@ -344,39 +344,39 @@ var (
// grandfatheredMap holds a mapping from legacy and grandfathered tags to
// their base language or index to more elaborate tag.
grandfatheredMap = map[[maxLen]byte]int16{
{'a', 'r', 't', '-', 'l', 'o', 'j', 'b', 'a', 'n'}: _jbo, // art-lojban
{'i', '-', 'a', 'm', 'i'}: _ami, // i-ami
{'i', '-', 'b', 'n', 'n'}: _bnn, // i-bnn
{'i', '-', 'h', 'a', 'k'}: _hak, // i-hak
{'i', '-', 'k', 'l', 'i', 'n', 'g', 'o', 'n'}: _tlh, // i-klingon
{'i', '-', 'l', 'u', 'x'}: _lb, // i-lux
{'i', '-', 'n', 'a', 'v', 'a', 'j', 'o'}: _nv, // i-navajo
{'i', '-', 'p', 'w', 'n'}: _pwn, // i-pwn
{'i', '-', 't', 'a', 'o'}: _tao, // i-tao
{'i', '-', 't', 'a', 'y'}: _tay, // i-tay
{'i', '-', 't', 's', 'u'}: _tsu, // i-tsu
{'n', 'o', '-', 'b', 'o', 'k'}: _nb, // no-bok
{'n', 'o', '-', 'n', 'y', 'n'}: _nn, // no-nyn
{'s', 'g', 'n', '-', 'b', 'e', '-', 'f', 'r'}: _sfb, // sgn-BE-FR
{'s', 'g', 'n', '-', 'b', 'e', '-', 'n', 'l'}: _vgt, // sgn-BE-NL
{'s', 'g', 'n', '-', 'c', 'h', '-', 'd', 'e'}: _sgg, // sgn-CH-DE
{'z', 'h', '-', 'g', 'u', 'o', 'y', 'u'}: _cmn, // zh-guoyu
{'z', 'h', '-', 'h', 'a', 'k', 'k', 'a'}: _hak, // zh-hakka
{'z', 'h', '-', 'm', 'i', 'n', '-', 'n', 'a', 'n'}: _nan, // zh-min-nan
{'z', 'h', '-', 'x', 'i', 'a', 'n', 'g'}: _hsn, // zh-xiang
[maxLen]byte{'a', 'r', 't', '-', 'l', 'o', 'j', 'b', 'a', 'n'}: _jbo, // art-lojban
[maxLen]byte{'i', '-', 'a', 'm', 'i'}: _ami, // i-ami
[maxLen]byte{'i', '-', 'b', 'n', 'n'}: _bnn, // i-bnn
[maxLen]byte{'i', '-', 'h', 'a', 'k'}: _hak, // i-hak
[maxLen]byte{'i', '-', 'k', 'l', 'i', 'n', 'g', 'o', 'n'}: _tlh, // i-klingon
[maxLen]byte{'i', '-', 'l', 'u', 'x'}: _lb, // i-lux
[maxLen]byte{'i', '-', 'n', 'a', 'v', 'a', 'j', 'o'}: _nv, // i-navajo
[maxLen]byte{'i', '-', 'p', 'w', 'n'}: _pwn, // i-pwn
[maxLen]byte{'i', '-', 't', 'a', 'o'}: _tao, // i-tao
[maxLen]byte{'i', '-', 't', 'a', 'y'}: _tay, // i-tay
[maxLen]byte{'i', '-', 't', 's', 'u'}: _tsu, // i-tsu
[maxLen]byte{'n', 'o', '-', 'b', 'o', 'k'}: _nb, // no-bok
[maxLen]byte{'n', 'o', '-', 'n', 'y', 'n'}: _nn, // no-nyn
[maxLen]byte{'s', 'g', 'n', '-', 'b', 'e', '-', 'f', 'r'}: _sfb, // sgn-BE-FR
[maxLen]byte{'s', 'g', 'n', '-', 'b', 'e', '-', 'n', 'l'}: _vgt, // sgn-BE-NL
[maxLen]byte{'s', 'g', 'n', '-', 'c', 'h', '-', 'd', 'e'}: _sgg, // sgn-CH-DE
[maxLen]byte{'z', 'h', '-', 'g', 'u', 'o', 'y', 'u'}: _cmn, // zh-guoyu
[maxLen]byte{'z', 'h', '-', 'h', 'a', 'k', 'k', 'a'}: _hak, // zh-hakka
[maxLen]byte{'z', 'h', '-', 'm', 'i', 'n', '-', 'n', 'a', 'n'}: _nan, // zh-min-nan
[maxLen]byte{'z', 'h', '-', 'x', 'i', 'a', 'n', 'g'}: _hsn, // zh-xiang
// Grandfathered tags with no modern replacement will be converted as
// follows:
{'c', 'e', 'l', '-', 'g', 'a', 'u', 'l', 'i', 's', 'h'}: -1, // cel-gaulish
{'e', 'n', '-', 'g', 'b', '-', 'o', 'e', 'd'}: -2, // en-GB-oed
{'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}: -3, // i-default
{'i', '-', 'e', 'n', 'o', 'c', 'h', 'i', 'a', 'n'}: -4, // i-enochian
{'i', '-', 'm', 'i', 'n', 'g', 'o'}: -5, // i-mingo
{'z', 'h', '-', 'm', 'i', 'n'}: -6, // zh-min
[maxLen]byte{'c', 'e', 'l', '-', 'g', 'a', 'u', 'l', 'i', 's', 'h'}: -1, // cel-gaulish
[maxLen]byte{'e', 'n', '-', 'g', 'b', '-', 'o', 'e', 'd'}: -2, // en-GB-oed
[maxLen]byte{'i', '-', 'd', 'e', 'f', 'a', 'u', 'l', 't'}: -3, // i-default
[maxLen]byte{'i', '-', 'e', 'n', 'o', 'c', 'h', 'i', 'a', 'n'}: -4, // i-enochian
[maxLen]byte{'i', '-', 'm', 'i', 'n', 'g', 'o'}: -5, // i-mingo
[maxLen]byte{'z', 'h', '-', 'm', 'i', 'n'}: -6, // zh-min
// CLDR-specific tag.
{'r', 'o', 'o', 't'}: 0, // root
{'e', 'n', '-', 'u', 's', '-', 'p', 'o', 's', 'i', 'x'}: -7, // en_US_POSIX"
[maxLen]byte{'r', 'o', 'o', 't'}: 0, // root
[maxLen]byte{'e', 'n', '-', 'u', 's', '-', 'p', 'o', 's', 'i', 'x'}: -7, // en_US_POSIX"
}
altTagIndex = [...]uint8{0, 17, 31, 45, 61, 74, 86, 102}
+3 -3
View File
@@ -3348,9 +3348,9 @@ var regionToGroups = [358]uint8{
// Size: 18 bytes, 3 elements
var paradigmLocales = [3][3]uint16{
0: {0x139, 0x0, 0x7b},
1: {0x13e, 0x0, 0x1f},
2: {0x3c0, 0x41, 0xee},
0: [3]uint16{0x139, 0x0, 0x7b},
1: [3]uint16{0x13e, 0x0, 0x1f},
2: [3]uint16{0x3c0, 0x41, 0xee},
}
type mutualIntelligibility struct {
+1 -1
View File
@@ -110,7 +110,7 @@ func (cldr *CLDR) Supplemental() *SupplementalData {
func (cldr *CLDR) Locales() []string {
loc := []string{"root"}
hasRoot := false
for l := range cldr.locale {
for l, _ := range cldr.locale {
if l == "root" {
hasRoot = true
continue
+2 -2
View File
@@ -289,7 +289,7 @@ var distinguishing = map[string][]string{
"mzone": nil,
"from": nil,
"to": nil,
"type": {
"type": []string{
"abbreviationFallback",
"default",
"mapping",
@@ -527,7 +527,7 @@ func (cldr *CLDR) inheritSlice(enc, v, parent reflect.Value) (res reflect.Value,
}
}
keys := make([]string, 0, len(index))
for k := range index {
for k, _ := range index {
keys = append(keys, k)
}
sort.Strings(keys)
+1 -1
View File
@@ -83,7 +83,7 @@ func (s Slice) Group(fn func(e Elem) string) []Slice {
m[key] = append(m[key], vi)
}
keys := []string{}
for k := range m {
for k, _ := range m {
keys = append(keys, k)
}
sort.Strings(keys)
+1 -1
View File
@@ -241,7 +241,7 @@ func compactCCC() {
m[c.ccc] = 0
}
cccs := []int{}
for v := range m {
for v, _ := range m {
cccs = append(cccs, int(v))
}
sort.Ints(cccs)
+1 -1
View File
@@ -270,7 +270,7 @@ func (ctx *Context) SetParams(name, val string) {
// ReplaceAllParams replace all current params with given params
func (ctx *Context) ReplaceAllParams(params Params) {
ctx.params = params
ctx.params = params;
}
// ParamsEscape returns escapred params result.