From 011e95b33122a54fd46cb2d09a43febd3337b1f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 16 Jun 2014 08:14:34 +0200 Subject: [PATCH 01/25] Graphite query lexer change, can now handle regex parameters for aliasSub function (Fixes #126) --- CHANGELOG.md | 1 + src/app/services/graphite/lexer.js | 56 ------------------------------ 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7735c729717..db2a1bd1792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Use datasources config instead. panel_names removed from config.js. Use plugins.panels to add custom panels #### Fixes +- Graphite query lexer change, can now handle regex parameters for aliasSub function (Fixes #126) - Filter option loading when having muliple nested filters now works better. Options are now reloaded correctly and there are no multiple renders/refresh inbetween (#447), After an option is changed and a nested template param is also reloaded, if the current value diff --git a/src/app/services/graphite/lexer.js b/src/app/services/graphite/lexer.js index c9b77103ad0..7143bdfdfe7 100644 --- a/src/app/services/graphite/lexer.js +++ b/src/app/services/graphite/lexer.js @@ -646,62 +646,6 @@ define([ var jump = 1; // A length of a jump, after we're done // parsing this character. - // Special treatment for some escaped characters. - if (char === "\\") { - this.skip(); - char = this.peek(); - - switch (char) { - case "'": - break; - case "b": - char = "\b"; - break; - case "f": - char = "\f"; - break; - case "n": - char = "\n"; - break; - case "r": - char = "\r"; - break; - case "t": - char = "\t"; - break; - case "0": - char = "\0"; - break; - case "u": - char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16)); - jump = 5; - break; - case "v": - char = "\v"; - break; - case "x": - var x = parseInt(this.input.substr(1, 2), 16); - char = String.fromCharCode(x); - jump = 3; - break; - case "\\": - case "\"": - case "/": - break; - case "": - char = ""; - break; - case "!": - if (value.slice(value.length - 2) === "<") { - break; - } - - /*falls through */ - default: - // Weird escaping. - } - } - value += char; this.skip(jump); } From 393dfd1e96bbe0bda673b1f0e32cc99b9494d739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 16 Jun 2014 12:24:04 +0200 Subject: [PATCH 02/25] changed version to 1.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e843b3d878..13bca3cb800 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "1.6.0-rc.1", + "version": "1.6.0", "repository": { "type": "git", "url": "http://github.com/torkelo/grafana.git" From 810f46c450c9582de763395c2edc4f209abc3632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 16 Jun 2014 12:40:41 +0200 Subject: [PATCH 03/25] updated karma dependencies in package.json --- package.json | 12 +- .../bootstrap/less/bak/bootswatch.dark.less | 545 ------- .../bootstrap/less/bak/variables.dark.less | 304 ---- src/vendor/bootstrap/less/tests/buttons.html | 139 -- src/vendor/bootstrap/less/tests/css-tests.css | 150 -- .../bootstrap/less/tests/css-tests.html | 1399 ----------------- .../less/tests/forms-responsive.html | 71 - src/vendor/bootstrap/less/tests/forms.html | 179 --- .../less/tests/navbar-fixed-top.html | 104 -- .../less/tests/navbar-static-top.html | 107 -- src/vendor/bootstrap/less/tests/navbar.html | 107 -- 11 files changed, 6 insertions(+), 3111 deletions(-) delete mode 100644 src/vendor/bootstrap/less/bak/bootswatch.dark.less delete mode 100644 src/vendor/bootstrap/less/bak/variables.dark.less delete mode 100644 src/vendor/bootstrap/less/tests/buttons.html delete mode 100644 src/vendor/bootstrap/less/tests/css-tests.css delete mode 100644 src/vendor/bootstrap/less/tests/css-tests.html delete mode 100644 src/vendor/bootstrap/less/tests/forms-responsive.html delete mode 100644 src/vendor/bootstrap/less/tests/forms.html delete mode 100644 src/vendor/bootstrap/less/tests/navbar-fixed-top.html delete mode 100644 src/vendor/bootstrap/less/tests/navbar-static-top.html delete mode 100644 src/vendor/bootstrap/less/tests/navbar.html diff --git a/package.json b/package.json index 13bca3cb800..004bd166b73 100644 --- a/package.json +++ b/package.json @@ -32,17 +32,17 @@ "expect.js": "~0.2.0", "karma-script-launcher": "~0.1.0", "karma-firefox-launcher": "~0.1.3", - "karma-chrome-launcher": "~0.1.2", + "karma-chrome-launcher": "~0.1.4", "karma-html2js-preprocessor": "~0.1.0", - "karma-jasmine": "~0.1.5", + "karma-jasmine": "~0.2.2", "requirejs": "~2.1.9", "karma-requirejs": "~0.2.1", "karma-coffee-preprocessor": "~0.1.2", "karma-phantomjs-launcher": "~0.1.1", - "karma": "~0.10.9", - "grunt-karma": "~0.6.2", - "karma-mocha": "~0.1.1", - "karma-expect": "~1.0.0", + "karma": "~0.12.16", + "grunt-karma": "~0.8.3", + "karma-mocha": "~0.1.4", + "karma-expect": "~1.1.0", "grunt-cli": "~0.1.13", "jshint-stylish": "~0.1.5", "grunt-contrib-concat": "^0.4.0", diff --git a/src/vendor/bootstrap/less/bak/bootswatch.dark.less b/src/vendor/bootstrap/less/bak/bootswatch.dark.less deleted file mode 100644 index 0483639ac75..00000000000 --- a/src/vendor/bootstrap/less/bak/bootswatch.dark.less +++ /dev/null @@ -1,545 +0,0 @@ -// Slate 2.3.2 -// Bootswatch -// ----------------------------------------------------- - -// TYPOGRAPHY -// ----------------------------------------------------- - -h1, h2, h3, h4, h5, h6 { - text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); -} - -code, pre { - background-color: #F7F7F7; - border: 1px solid darken(@grayDarker, 5%); - text-shadow: none; -} - -// SCAFFOLDING -// ----------------------------------------------------- - -legend, .page-header { - border-bottom: 1px solid @hrBorder; -} - -hr { - border-bottom: none; -} - -// NAVBAR -// ----------------------------------------------------- - -.navbar { - - .navbar-inner { - #gradient > .vertical-three-colors(@grayDark, darken(@bodyBackground,3%), 70%, darken(@bodyBackground,3%)); - } - - .brand { - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - border-right: none; - } - - .navbar-text { - padding: 0 15px; - font-weight: bold; - } - - .nav > li > a { - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - border-right: 1px solid rgba(0, 0, 0, 0.2); - border-left: 1px solid rgba(255, 255, 255, 0.1); - - &:hover { - #gradient > .directional(@grayDarker, @grayDark, 280deg); - border-left: 1px solid transparent; - border-right: 1px solid transparent; - } - } - - .nav > li.active > a, - .nav > li.active > a:hover { - color: @grayLighter; - background-color: @grayDark; - #gradient > .directional(lighten(@grayDarker, 2%), lighten(@grayDark, 2%), 0deg); - border-right: 1px solid darken(@gray, 15%); - } - - .navbar-search .search-query { - border: 1px solid darken(@gray, 15%); - } - - .btn, - .btn-group { - margin: 4px 0; - } - - .divider-vertical { - background-color: transparent; - border-right: none; - } - - .dropdown-menu::after { - border-bottom: 6px solid @grayDark; - } - - &-inverse { - - .navbar-inner { - #gradient > .vertical-three-colors(darken(@grayDarker, 3%), darken(@grayDarker, 8%), 70%, darken(@grayDarker, 8%)); - } - - .nav li > a { - background-image: none; - background-color: transparent; - } - - .nav li > a:hover, - .nav li.active > a, - .nav li.active > a:hover { - #gradient > .directional(darken(@grayDarker, 10%), darken(@grayDarker, 5%), 280deg); - } - } -} - -@media (max-width: @navbarCollapseWidth) { - - .navbar .nav-collapse { - - .nav li > a, - .nav li > a:hover, - .nav .active > a, - .nav .active > a:hover { - .box-shadow(none); - color: @grayLighter; - border: 1px solid transparent; - background-color: transparent; - background-image: none; - } - - .nav li > a:hover, - .nav .active > a:hover { - background-color: @grayDarker; - } - - .navbar-form, - .navbar-search { - border-color: transparent; - .box-shadow(none); - } - - .nav-header { - color: @grayLight; - } - } - - .navbar-inverse .nav-collapse { - - .nav li > a:hover, - .nav .active > a:hover { - background-color: @grayDarker !important; - } - } -} - -.nav-tabs { - .active > a, .active a:hover { - border-bottom: 1px solid darken(@grayDark, 5%);; - } -} - -div.subnav { - - margin: 0 1px; - //#gradient > .vertical-three-colors(@gray, @grayDark, 70%, @grayDark); - border: 1px solid transparent; - .box-shadow('0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1)'); - - .nav > li > a { - color: @grayLighter; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - border-right: 1px solid darken(@gray, 15%); - border-left: 1px solid @gray; - - &:hover { - color: @grayLighter; - background-color: @grayDark; - //#gradient > .directional(@grayDarker, @grayDark, 280deg); - border-left: 1px solid transparent; - border-right: 1px solid transparent; - } - } - - .nav > li.active > a, - .nav > li.active > a:hover { - color: @grayLighter; - background-color: @grayDark; - #gradient > .directional(lighten(@grayDarker, 4%), lighten(@grayDark, 4%), 280deg); - border-right: 1px solid darken(@gray, 15%); - } - - .nav > li:first-child > a, - .nav > li:first-child > a:hover { - border-left: 1px solid transparent; - } - - .nav > li.active:last-child > a, - .nav > li:last-child > a:hover { - border-right: 1px solid darken(@gray, 15%); - } - - .open .dropdown-toggle { - border-right: 1px solid darken(@gray, 15%); - border-left: 1px solid @gray; - } - - &.subnav-fixed { - top: @navbarHeight; - margin: 0; - .box-shadow(none); - - .nav > li.active:first-child > a, - .nav > li:first-child > a:hover { - border-left: 1px solid darken(@gray, 15%); - } - } -} - -// NAV -// ----------------------------------------------------- - -.nav { - - .nav-header { - text-shadow: -1px -1px 0 rgba(0,0,0,0.3); - } - - & > li > a { - //#gradient > .vertical-three-colors(@gray, @grayDark, 70%, @grayDark); - .box-shadow('0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1)'); - border: none; - color: @grayLight; - font-weight: bold; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - } - - li.active > a, - li.active > a:hover { - background-color: transparent; - color: @white; - } - - & > li.disabled > a, - & > li.disabled > a:hover { - color: @gray; - } - - li > a:hover { - background-color: transparent; - color: @grayLighter; - } - -} - -.breadcrumb { - border: 1px solid transparent; - #gradient > .vertical-three-colors(@gray, @grayDark, 70%, @grayDark); - .box-shadow('0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1)'); - - a { - color: @grayLighter; - font-weight: bold; - } - - li { - color: @grayLight; - font-weight: bold; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - } -} - -.pagination { - - ul { - .box-shadow(none); - } - - ul > li > a, - ul > li > span { - border-left: 1px solid @gray; - border-right: 1px solid darken(@gray, 15%); - border-top: none; - border-bottom: none; - #gradient > .vertical-three-colors(@gray, @grayDark, 70%, @grayDark); - .box-shadow('0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1)'); - color: @grayLighter; - font-weight: bold; - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); - - &:hover { - #gradient > .directional(@grayDarker, @grayDark, 280deg); - border-left: 1px solid transparent; - } - } - - ul > .active > a, - ul > .active > a:hover, - ul > .active > span, - ul > .active > span:hover { - color: @grayLighter; - background-color: @grayDark; - #gradient > .directional(lighten(@grayDarker, 4%), lighten(@grayDark, 4%), 280deg); - border-left: 1px solid transparent; - } - - ul > .disabled > a, - ul > .disabled > a:hover, - ul > .disabled > span, - ul > .disabled > span:hover { - border-left: 1px solid @gray; - border-right: 1px solid darken(@gray, 15%); - border-top: none; - border-bottom: none; - #gradient > .vertical-three-colors(@grayLight, @gray, 70%, @gray); - } -} - -.pager { - - li > a, - li > span { - - border: 1px solid transparent; - .box-shadow('0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1)'); - #gradient > .vertical-three-colors(@gray, @grayDark, 70%, @grayDark); - - &:hover { - #gradient > .directional(@grayDarker, @grayDark, 280deg); - border: 1px solid transparent; - } - } - - .disabled a, - .disabled a:hover { - background-color: transparent; - #gradient > .vertical-three-colors(@gray, @grayDark, 70%, @grayDark); - } -} - -// BUTTONS -// ----------------------------------------------------- - -.btn { - .buttonBackground(@gray, darken(@gray, 10%)); - .border-radius(3px); - border: 1px solid @grayDarker; -} - -.btn, .btn:hover { - color: @white; - font-weight: bold; - text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.3); -} - -.btn-primary { - .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); - color: @grayDark; - text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3); -} - -.btn-warning { - .buttonBackground(lighten(@orange, 15%), @orange); -} - -.btn-danger { - .buttonBackground(@red, #bd362f); -} - -.btn-success { - .buttonBackground(@green, #51a351); -} - -.btn-info { - .buttonBackground(@blue, #2f96b4); -} - -.btn-inverse { - .buttonBackground(@gray, @grayDarker); -} - -.caret { - border-top-color: @white; -} - -// TABLES -// ----------------------------------------------------- - -.table { - - tbody tr.success td { - background-color: @successText; - } - - tbody tr.error td { - background-color: @errorText; - } - - tbody tr.info td { - background-color: @infoText; - } - -} - - -// FORMS -// ----------------------------------------------------- - -label, input, button, select, textarea, legend { - color: @textColor; -} - -legend, label { - text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); -} - -.input-prepend .add-on, -.input-append .add-on { - vertical-align: top; - background-color: @gray; - border-top: 1px solid @grayLight; - border-left: 1px solid @grayLight; - border-bottom: 1px solid @grayDark; - border-right: 1px solid @grayDark; - text-shadow: none; -} - -.input-append .btn, -.input-prepend .btn { - margin-top: -1px; - padding: 5px 14px; -} - -.uneditable-input, -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - color: @gray; - background: @grayDarker; -} - -.form-actions { - border-top: none; -} - -// DROPDOWNS -// ----------------------------------------------------- - -.dropdown-menu { - .box-shadow(0 5px 5px rgba(0, 0, 0, 0.2)); -} - -.dropdown.open .dropdown-toggle { - background-color: @grayDark; - color: @grayLighter; -} - -.dropdown-submenu > a::after { - border-left-color: @white; -} - -// ALERTS, LABELS, BADGES -// ----------------------------------------------------- - -.label, .alert { - color: rgba(255, 255, 255, 0.9); - text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.3); - .box-shadow(1px 1px 1px rgba(0, 0, 0, 0.3)); -} - -.alert { - background-color: @orange; - border-color: @orange; - - .alert-heading { - color: rgba(255, 255, 255, 0.9); - text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.4); - } -} - -.alert-success { - background-color: @successText; - border-color: @successText; -} - -.alert-error { - background-color: @errorText; - border-color: @errorText; -} - -.alert-info { - background-color: @infoText; - border-color: @infoText; -} - -// MISC -// ----------------------------------------------------- - -.well, .hero-unit { - .box-shadow(inset 1px 1px 1px rgba(0, 0, 0, 0.5)); -} - -.thumbnail, -a.thumbnail:hover { - border: 1px solid darken(@grayDarker, 5%); -} - -.progress { - background-color: darken(@grayDarker, 3%); - #gradient > .vertical(darken(@grayDarker, 3%), darken(@grayDarker, 3%)); - .box-shadow(inset 1px 1px 1px rgba(0, 0, 0, 0.5)); -} - -.footer { - border-top: 1px solid darken(@grayDarker, 5%); - - p { - color: @textColor; - } -} - -.modal { - - background-color: darken(@grayDark, 5%); - - &-header { - border-bottom: none; - } - - &-body { - border-bottom: 1px solid #1C1E22; - } - - &-footer { - border-top: none; - background-color: @grayDarker; - .box-shadow(none); - } -} - -// MEDIA QUERIES -// ----------------------------------------------------- - -@media (max-width: 979px) { - .navbar .brand { - border-right: none; - } -} - -@media (max-width: 768px) { - div.subnav .nav > li + li > a { - border-top: 1px solid transparent; - } -} \ No newline at end of file diff --git a/src/vendor/bootstrap/less/bak/variables.dark.less b/src/vendor/bootstrap/less/bak/variables.dark.less deleted file mode 100644 index b412b96bf67..00000000000 --- a/src/vendor/bootstrap/less/bak/variables.dark.less +++ /dev/null @@ -1,304 +0,0 @@ -// Slate 2.3.2 -// Variables -// -------------------------------------------------- - - -// Global values -// -------------------------------------------------- - - -// Grays -// ------------------------- -@black: #000; -@grayDarker: #272B30; -@grayDark: #3A3F44; -@gray: #52575C; -@grayLight: #7A8288; -@grayLighter: #BBBFC2; -@white: #fff; - - -// Accent colors -// ------------------------- -@blue: #5bc0de; -@blueDark: #108CBB; -@green: #62c462; -@red: #ee5f5b; -@yellow: #F6D30D; -@orange: #f89406; -@pink: #c3325f; -@purple: #7a43b6; - - -// Scaffolding -// ------------------------- -@bodyBackground: @grayDarker; -@textColor: #C8C8C8; - - -// Links -// ------------------------- -@linkColor: @white; -@linkColorHover: @white; - - -// Typography -// ------------------------- -@sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; -@serifFontFamily: Georgia, "Times New Roman", Times, serif; -@monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace; - -@baseFontSize: 14px; -@baseFontFamily: @sansFontFamily; -@baseLineHeight: 21px; -@altFontFamily: @serifFontFamily; - -@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily -@headingsFontWeight: bold; // instead of browser default, bold -@headingsColor: inherit; // empty to use BS default, @textColor - - -// Component sizing -// ------------------------- -// Based on 14px font-size and 20px line-height - -@fontSizeLarge: @baseFontSize * 1.25; // ~18px -@fontSizeSmall: @baseFontSize * 0.85; // ~12px -@fontSizeMini: @baseFontSize * 0.75; // ~11px - -@paddingLarge: 11px 19px; // 44px -@paddingSmall: 2px 10px; // 26px -@paddingMini: 0px 6px; // 22px - -@baseBorderRadius: 4px; -@borderRadiusLarge: 6px; -@borderRadiusSmall: 3px; - - -// Tables -// ------------------------- -@tableBackground: transparent; // overall background-color -@tableBackgroundAccent: darken(@grayDark, 5%); // for striping -@tableBackgroundHover: @grayDark; // for hover -@tableBorder: lighten(@grayDark, 2%); // table and cell border - -// Buttons -// ------------------------- -@btnBackground: @gray; -@btnBackgroundHighlight: darken(@gray, 10%); -@btnBorder: darken(@gray, 20%); - -@btnPrimaryBackground: @grayLight; -@btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 15%); - -@btnInfoBackground: @blue; -@btnInfoBackgroundHighlight: #2f96b4; - -@btnSuccessBackground: @green; -@btnSuccessBackgroundHighlight: #51a351; - -@btnWarningBackground: lighten(@orange, 15%); -@btnWarningBackgroundHighlight: @orange; - -@btnDangerBackground: @red; -@btnDangerBackgroundHighlight: #bd362f; - -@btnInverseBackground: @gray; -@btnInverseBackgroundHighlight: @grayDarker; - -// Forms -// ------------------------- -@inputText: @white; -@inputBackground: @gray; -@inputBorder: @grayLight; -@inputBorderRadius: @baseBorderRadius; -@inputDisabledBackground: @grayLighter; -@formActionsBackground: darken(@grayDarker, 3%); -@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border - - -// Dropdowns -// ------------------------- -@dropdownBackground: @grayDark; -@dropdownBorder: rgba(0,0,0,.2); -@dropdownDividerTop: transparent; -@dropdownDividerBottom: darken(@grayDarker, 5%); - -@dropdownLinkColor: @grayLight; -@dropdownLinkColorHover: @white; -@dropdownLinkColorActive: @white; - -@dropdownLinkBackgroundActive: @grayDarker; -@dropdownLinkBackgroundHover: @grayDarker; - - - -// COMPONENT VARIABLES -// -------------------------------------------------- - - -// Z-index master list -// ------------------------- -// Used for a bird's eye view of components dependent on the z-axis -// Try to avoid customizing these :) -@zindexDropdown: 1000; -@zindexPopover: 1010; -@zindexTooltip: 1030; -@zindexFixedNavbar: 1030; -@zindexModalBackdrop: 1040; -@zindexModal: 1050; - - -// Sprite icons path -// ------------------------- -@iconSpritePath: "../img/glyphicons-halflings.png"; -@iconWhiteSpritePath: "../img/glyphicons-halflings-white.png"; - - -// Input placeholder text color -// ------------------------- -@placeholderText: @grayLight; - - -// Hr border color -// ------------------------- -@hrBorder: darken(@grayDarker, 5%); - - -// Horizontal forms & lists -// ------------------------- -@horizontalComponentOffset: 180px; - - -// Wells -// ------------------------- -@wellBackground: darken(@grayDarker, 3%); - - -// Navbar -// ------------------------- - -@navbarCollapseWidth: 979px; -@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1; -@navbarHeight: 40px; -@navbarBackground: @grayDarker; -@navbarBackgroundHighlight: @grayDark; -@navbarBorder: darken(@navbarBackground, 12%); - -@navbarText: @textColor; -@navbarLinkColor: @textColor; -@navbarLinkColorHover: @white; -@navbarLinkColorActive: @navbarLinkColorHover; -@navbarLinkBackgroundHover: @grayDark; -@navbarLinkBackgroundActive: @navbarBackground; - -@navbarBrandColor: @grayLighter; - -// Inverted navbar -@navbarInverseBackground: darken(@grayDarker, 10%); -@navbarInverseBackgroundHighlight: @grayDarker; -@navbarInverseBorder: #252525; - -@navbarInverseText: @grayLight; -@navbarInverseLinkColor: @grayLight; -@navbarInverseLinkColorHover: @white; -@navbarInverseLinkColorActive: @navbarInverseLinkColorHover; -@navbarInverseLinkBackgroundHover: transparent; -@navbarInverseLinkBackgroundActive: @navbarInverseBackground; - -@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%); -@navbarInverseSearchBackgroundFocus: @white; -@navbarInverseSearchBorder: @navbarInverseBackground; -@navbarInverseSearchPlaceholderColor: #ccc; - -@navbarInverseBrandColor: @navbarInverseLinkColor; - - -// Pagination -// ------------------------- -@paginationBackground: #fff; -@paginationBorder: #ddd; -@paginationActiveBackground: #f5f5f5; - - -// Hero unit -// ------------------------- -@heroUnitBackground: darken(@grayDarker, 3%); -@heroUnitHeadingColor: inherit; -@heroUnitLeadColor: inherit; - - -// Form states and alerts -// ------------------------- -@warningText: #c09853; -@warningBackground: #fcf8e3; -@warningBorder: darken(spin(@warningBackground, -10), 3%); - -@errorText: #b94a48; -@errorBackground: #f2dede; -@errorBorder: darken(spin(@errorBackground, -10), 3%); - -@successText: #468847; -@successBackground: #dff0d8; -@successBorder: darken(spin(@successBackground, -10), 5%); - -@infoText: #3a87ad; -@infoBackground: #d9edf7; -@infoBorder: darken(spin(@infoBackground, -10), 7%); - - -// Tooltips and popovers -// ------------------------- -@tooltipColor: #fff; -@tooltipBackground: @dropdownBackground; -@tooltipArrowWidth: 5px; -@tooltipArrowColor: @tooltipBackground; - -@popoverBackground: @dropdownBackground; -@popoverArrowWidth: 10px; -@popoverArrowColor: @dropdownBackground; -@popoverTitleBackground: lighten(@popoverBackground, 3%); - -// Special enhancement for popovers -@popoverArrowOuterWidth: @popoverArrowWidth + 1; -@popoverArrowOuterColor: rgba(0,0,0,.25); - - - -// GRID -// -------------------------------------------------- - - -// Default 940px grid -// ------------------------- -@gridColumns: 12; -@gridColumnWidth: 60px; -@gridGutterWidth: 10px; -@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); - -// 1200px min -@gridColumnWidth1200: 70px; -@gridGutterWidth1200: 10px; -@gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1)); - -// 768px-979px -@gridColumnWidth768: 42px; -@gridGutterWidth768: 10px; -@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1)); - - -// Fluid grid -// ------------------------- -@fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth); -@gridGutterWidth: 10px; -//@fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth); - -// 1200px min -@fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200); -@gridGutterWidth: 10px; -//@fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200); - -// 768px-979px -@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768); -@gridGutterWidth: 10px; -//@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768); diff --git a/src/vendor/bootstrap/less/tests/buttons.html b/src/vendor/bootstrap/less/tests/buttons.html deleted file mode 100644 index 9b3c2c572c0..00000000000 --- a/src/vendor/bootstrap/less/tests/buttons.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - Buttons · Bootstrap - - - - - - - - - - - - - - - - - - - - - - -
- -

Dropups

- - - -
- - - - - - - - - - - - - - - - - - - diff --git a/src/vendor/bootstrap/less/tests/css-tests.css b/src/vendor/bootstrap/less/tests/css-tests.css deleted file mode 100644 index 0f5604ee686..00000000000 --- a/src/vendor/bootstrap/less/tests/css-tests.css +++ /dev/null @@ -1,150 +0,0 @@ -/*! - * Bootstrap CSS Tests - */ - - -/* Remove background image */ -body { - background-image: none; -} - -/* Space out subhead */ -.subhead { - margin-bottom: 36px; -} -/*h4 { - margin-bottom: 5px; -} -*/ - -.type-test { - margin-bottom: 20px; - padding: 0 20px 20px; - background: url(../../docs/assets/img/grid-baseline-20px.png); -} -.type-test h1, -.type-test h2, -.type-test h3, -.type-test h4, -.type-test h5, -.type-test h6 { - background-color: rgba(255,0,0,.2); -} - - -/* colgroup tests */ -.col1 { - background-color: rgba(255,0,0,.1); -} -.col2 { - background-color: rgba(0,255,0,.1); -} -.col3 { - background-color: rgba(0,0,255,.1); -} - - -/* Fluid row inputs */ -#rowInputs .row > [class*=span], -#fluidRowInputs .row-fluid > [class*=span] { - background-color: rgba(255,0,0,.1); -} - - -/* Fluid grid */ -.fluid-grid { - margin-bottom: 45px; -} -.fluid-grid .row { - height: 40px; - padding-top: 10px; - margin-top: 10px; - color: #ddd; - text-align: center; -} -.fluid-grid .span1 { - background-color: #999; -} - - -/* Gradients */ - -[class^="gradient-"] { - width: 100%; - height: 400px; - margin: 20px 0; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -.gradient-horizontal { - background-color: #333333; - background-image: -moz-linear-gradient(left, #555555, #333333); - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#555555), to(#333333)); - background-image: -webkit-linear-gradient(left, #555555, #333333); - background-image: -o-linear-gradient(left, #555555, #333333); - background-image: linear-gradient(to right, #555555, #333333); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff555555', endColorstr='#ff333333', GradientType=1); -} - -.gradient-vertical { - background-color: #474747; - background-image: -moz-linear-gradient(top, #555555, #333333); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#333333)); - background-image: -webkit-linear-gradient(top, #555555, #333333); - background-image: -o-linear-gradient(top, #555555, #333333); - background-image: linear-gradient(to bottom, #555555, #333333); - background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff555555', endColorstr='#ff333333', GradientType=0); -} - -.gradient-directional { - background-color: #333333; - background-image: -moz-linear-gradient(45deg, #555555, #333333); - background-image: -webkit-linear-gradient(45deg, #555555, #333333); - background-image: -o-linear-gradient(45deg, #555555, #333333); - background-image: linear-gradient(45deg, #555555, #333333); - background-repeat: repeat-x; -} - -.gradient-vertical-three { - background-color: #8940a5; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#00b3ee), color-stop(50%, #7a43b6), to(#c3325f)); - background-image: -webkit-linear-gradient(#00b3ee, #7a43b6 50%, #c3325f); - background-image: -moz-linear-gradient(top, #00b3ee, #7a43b6 50%, #c3325f); - background-image: -o-linear-gradient(#00b3ee, #7a43b6 50%, #c3325f); - background-image: linear-gradient(#00b3ee, #7a43b6 50%, #c3325f); - background-repeat: no-repeat; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff00b3ee', endColorstr='#ffc3325f', GradientType=0); -} - -.gradient-radial { - background-color: #333333; - background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(#555555), to(#333333)); - background-image: -webkit-radial-gradient(circle, #555555, #333333); - background-image: -moz-radial-gradient(circle, #555555, #333333); - background-image: -o-radial-gradient(circle, #555555, #333333); - background-repeat: no-repeat; -} - -.gradient-striped { - background-color: #555555; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.gradient-horizontal-three { - background-color: #00b3ee; - background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(#00b3ee), color-stop(50%, #7a43b6), to(#c3325f)); - background-image: -webkit-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f); - background-image: -moz-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f); - background-image: -o-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f); - background-image: linear-gradient(to right, #00b3ee, #7a43b6 50%, #c3325f); - background-repeat: no-repeat; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00b3ee', endColorstr='#c3325f', GradientType=0); -} diff --git a/src/vendor/bootstrap/less/tests/css-tests.html b/src/vendor/bootstrap/less/tests/css-tests.html deleted file mode 100644 index 6778e9e688f..00000000000 --- a/src/vendor/bootstrap/less/tests/css-tests.html +++ /dev/null @@ -1,1399 +0,0 @@ - - - - - CSS Tests · Twitter Bootstrap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

CSS Tests

-

One stop shop for quick debugging and edge-case tests of CSS.

-
-
- - -
- -
- - - - - - - -
-
-
-

h1. Heading 1

-

h2. Heading 2

-

h3. Heading 3

-

h4. Heading 4

-
h5. Heading 5
-
h6. Heading 6
-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
-
-
-
-

h1. Heading 1

-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-

h2. Heading 2

-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-

h3. Heading 3

-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-

h4. Heading 4

-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
h5. Heading 5
-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
h6. Heading 6
-

Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

-
-
-
- - - - - - - -
-
- -
-
- -
-
- -
-
- -
- -
-
- -
-
- -
-
- -
-
- -

- - - - - - - - -
-
-
12 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
-
11 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
1 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
-
10 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
2 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
-
9 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
3 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
-
8 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
4 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
-
7 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
5 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
-
6 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
6 -
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
-
-
-
- - - - - - - -
-
-

Bordered without thead

- - - - - - - - - - - - - - - - - - -
123
123
123
-

Bordered without thead, with caption

- - - - - - - - - - - - - - - - - - - -
Table caption
123
123
123
-

Bordered without thead, with colgroup

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
123
123
123
369
-

Bordered with thead, with colgroup

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ABC
123
123
123
369
-
-
-

Bordered with thead and caption

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Table caption
123
123
123
123
369
-

Bordered with rowspan and colspan

- - - - - - - - - - - - - - - - - - - - - - - - - - -
123
1 and 23
123
13
2 and 3
-
-
- - -

Grid sizing

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
123
1 and 23
123
13
2 and 3
-
-
- -

Nesting and striping

- - - - - - - - - - - -
Test
- - - - - - - - - - - - - - - - - - - - - -
TestTest
- test - - test -
- test - - test -
- test - - test -
-
- -

Fluid grid sizing

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
123
1 and 23
123
13
2 and 3
-
-
- - - - - - - -

Buttons and button groups

-
- - - -
- -

Horizontal form errors

-
-
- -
- - Please correct the error -
-
-
- -
-
-

Prepend and append on inputs

-
-
-
- @ - -
-
-
-
- - @ -
-
-
-
- $ - - .00 -
-
-
-
-
-

Prepend and append with uneditable

-
-
- $ - Some value here -
-
- Some value here - .00 -
-
- $ - Some value here - .00 -
-
-
-
-

Prepend with type="submit"

- -
- - -
-
- - - -
-
-
- -

Fluid prepended and appended inputs

-
-
-
-
-
- @ -
-
-
-
- @ -
-
-
-
- $.00 -
-
-
-
-
- -

Fixed row with inputs

-

Inputs should not extend past the light red background, set on their parent, a .span* column.

- -
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -

Fluid row with inputs

-

Inputs should not extend past the light red background, set on their parent, a .span* column.

-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
- -
- -

Inline form in fluid row

- -
-
-
- - - - -
-
-
- - -
- - -

Fluid textarea at .span12

-
-
- -
-
- - -
- - -

Selects

-
- -
- - -
- - - - - - - - -

Dropdown link with hash URL

- - -

Dropdown link with custom URL and data-target

- - -

Dropdown on a button

- - -
- - - - - - -

Default thumbnails (no grid sizing)

-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
- - - -

Standard grid sizing

- - -

Fluid thumbnails

-
-
- -
-
- - - - - - - -
- -
-
-

I'm in Section 1.

- -
- -
-
-

I'm in Section 1.1.

-
-
-

I'm in Section 1.2.

-
-
-

I'm in Section 1.3.

-
-
-
-
-
-

Howdy, I'm in Section 2.

-
-
-

What up girl, this is Section 3.

-
-
-
- -
- - - - - - -
-
-

Inline label

-

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Maecenas sed diam Label name eget risus varius blandit sit amet non magna. Fusce .class-name dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

-
-
-
- - Hey! Read this. -
-
-
- - -
-
- -
- - - - - - - - - - - - - -
- Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. - -
- - - - -
-
- -

Mini buttons: text and icon

-
- - -
- -
- - - - - - - -

Visible on...

-
    -
  • Phone✔ Phone
  • -
  • Tablet✔ Tablet
  • -
  • Desktop✔ Desktop
  • -
-
    -
  • Phone + Tablet✔ Phone + Tablet
  • -
  • Tablet + Desktop✔ Tablet + Desktop
  • -
  • All✔ All
  • -
- -

Hidden on...

-
    -
  • Phone✔ Phone
  • -
  • Tablet✔ Tablet
  • -
  • Desktop✔ Desktop
  • -
-
    -
  • Phone + Tablet✔ Phone + Tablet
  • -
  • Tablet + Desktop✔ Tablet + Desktop
  • -
  • All✔ All
  • -
- - - - - - - -

Horizontal

-
- -

Vertical

-
- -

Directional

-
- -

Three colors

-
- -

Radial

-
- -

Striped

-
- -

Horizontal three colors

-
- - - - - -

Alert default

-
- - Alert! Best check yourself, you're not looking too good. -
-
- -

Alert! Best check yourself, you're not looking too good.

-
- -

Success

-
- - Success! Best check yourself, you're not looking too good. -
-
- -

Success! Best check yourself, you're not looking too good.

-
- -

Info

-
- - Info! Best check yourself, you're not looking too good. -
-
- -

Info! Best check yourself, you're not looking too good.

-
- -

Warning

-
- - Warning! Best check yourself, you're not looking too good. -
-
- -

Warning! Best check yourself, you're not looking too good.

-
- -

Error

-
- - Error! Best check yourself, you're not looking too good. -
-
- -

Error! Best check yourself, you're not looking too good.

-
- - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/vendor/bootstrap/less/tests/forms-responsive.html b/src/vendor/bootstrap/less/tests/forms-responsive.html deleted file mode 100644 index c3e208d0215..00000000000 --- a/src/vendor/bootstrap/less/tests/forms-responsive.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - Bootstrap, from Twitter - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Vertical alignment

- - - span1 - -

Width across elements

-
- -
-
- -
-
- span2 -
- - - - -
- - - span1 -
- -
- - - diff --git a/src/vendor/bootstrap/less/tests/forms.html b/src/vendor/bootstrap/less/tests/forms.html deleted file mode 100644 index a63d728a008..00000000000 --- a/src/vendor/bootstrap/less/tests/forms.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Bootstrap, from Twitter - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
- -
- - - diff --git a/src/vendor/bootstrap/less/tests/navbar-fixed-top.html b/src/vendor/bootstrap/less/tests/navbar-fixed-top.html deleted file mode 100644 index 2d9a7a718c2..00000000000 --- a/src/vendor/bootstrap/less/tests/navbar-fixed-top.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - Bootstrap, from Twitter - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-

Navbar example

-

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

-

- View navbar docs » -

-
- -
- - - - - - - - - - - - - - - - - - - diff --git a/src/vendor/bootstrap/less/tests/navbar-static-top.html b/src/vendor/bootstrap/less/tests/navbar-static-top.html deleted file mode 100644 index 4bead8ec672..00000000000 --- a/src/vendor/bootstrap/less/tests/navbar-static-top.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - Bootstrap, from Twitter - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-

Navbar example

-

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

-

- View navbar docs » -

-
- -
- - - - - - - - - - - - - - - - - - - diff --git a/src/vendor/bootstrap/less/tests/navbar.html b/src/vendor/bootstrap/less/tests/navbar.html deleted file mode 100644 index d5ad4784ef6..00000000000 --- a/src/vendor/bootstrap/less/tests/navbar.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - Bootstrap, from Twitter - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-

Navbar example

-

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

-

- View navbar docs » -

-
- -
- - - - - - - - - - - - - - - - - - - From 1eadf52f5e95c8e008e91eba63021e0285bfee15 Mon Sep 17 00:00:00 2001 From: Pauly Myjavec Date: Tue, 17 Jun 2014 22:35:31 +1000 Subject: [PATCH 04/25] Fixes regex InfluxDB queries intoduced in 1.6.0 Do not encapsulate regex with quotes in query string Fix the way series names are displayed, do not use column name but rather series names --- src/app/services/influxdb/influxdbDatasource.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index eaca5f3c80f..3c95f5fc220 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -68,7 +68,7 @@ function (angular, _, kbn) { } else { - var template = "select [[group]][[group_comma]] [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from \"[[series]]\" " + + var template = "select [[group]][[group_comma]] [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from [[series]] " + "where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " + "group by time([[interval]])[[group_comma]] [[group]] order asc"; @@ -86,6 +86,10 @@ function (angular, _, kbn) { group: target.groupby_field_add ? target.groupby_field : '', }; + if(!templateData.series.match('^/.*/')) { + templateData.series = '"' + templateData.series + '"'; + } + query = _.template(template, templateData, this.templateSettings); query = filterSrv.applyTemplateToTarget(query); @@ -112,12 +116,11 @@ function (angular, _, kbn) { }; InfluxDatasource.prototype.listColumns = function(seriesName) { - return this.doInfluxRequest('select * from "' + seriesName + '" limit 1').then(function(data) { + return this.doInfluxRequest('select * from /' + seriesName + '/ limit 1').then(function(data) { if (!data) { return []; } - return data[0].columns; }); }; @@ -229,7 +232,7 @@ function (angular, _, kbn) { datapoints[i] = [metricValue, groupPoints[i][timeCol]]; } - seriesName = alias ? alias : key; + seriesName = alias ? alias : series.name; // if mulitple groups append key to alias if (alias && groupByField) { From 2fbb87e17a3db03c9791d6cd001e1b884acb101d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 17 Jun 2014 18:09:10 +0200 Subject: [PATCH 05/25] fix jshint and updated changelog with PR #500 --- CHANGELOG.md | 8 +++++++- latest.json | 4 ++-- src/app/services/influxdb/influxdbDatasource.js | 2 +- src/config.sample.js | 7 +++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db2a1bd1792..633288a0588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -# vNext +vNext + +**Fixes** + +- Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500) + +# 1.6.0 (2014-06-16) #### New features or improvements - New Y-axis formater for metric values that represent seconds (Issue #427) - thx @jippi diff --git a/latest.json b/latest.json index 0db600fdcc6..458f3ba8903 100644 --- a/latest.json +++ b/latest.json @@ -1,4 +1,4 @@ { - "version": "1.5.4", - "url": "http://grafanarel.s3.amazonaws.com/grafana-1.5.4.tar.gz" + "version": "1.6.0", + "url": "http://grafanarel.s3.amazonaws.com/grafana-1.6.0.tar.gz" } \ No newline at end of file diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index 3c95f5fc220..af7a81352be 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -87,7 +87,7 @@ function (angular, _, kbn) { }; if(!templateData.series.match('^/.*/')) { - templateData.series = '"' + templateData.series + '"'; + templateData.series = '"' + templateData.series + '"'; } query = _.template(template, templateData, this.templateSettings); diff --git a/src/config.sample.js b/src/config.sample.js index d2893a0c21e..98f3ad41ed9 100644 --- a/src/config.sample.js +++ b/src/config.sample.js @@ -32,6 +32,9 @@ function (Settings) { // default start dashboard default_route: '/dashboard/file/default.json', + // Elasticsearch index for storing dashboards + grafana_index: "grafana-dash", + // timezoneOFfset: // If you experiance problems with zoom, it is probably caused by timezone diff between // your browser and the graphite-web application. timezoneOffset setting can be used to have Grafana @@ -44,9 +47,6 @@ function (Settings) { // timezoneOffset: null, - // Elasticsearch index for storing dashboards - grafana_index: "grafana-dash", - // set to false to disable unsaved changes warning unsaved_changes_warning: true, @@ -54,7 +54,6 @@ function (Settings) { // Example: "1m", "1h" playlist_timespan: "1m", - // Add your own custom pannels plugins: { panels: [] From 8743ba2886c52e1f3faa7aba52c71bff26a6507c Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Thu, 19 Jun 2014 21:49:49 +0000 Subject: [PATCH 06/25] Added left and right min and max for y-axis --- src/app/directives/grafanaGraph.js | 6 ++++-- src/app/panels/graph/axisEditor.html | 16 ++++++++++++---- src/app/panels/graph/module.js | 6 ++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 95e2848a8b1..e7dec1abfd5 100755 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -258,8 +258,8 @@ function (angular, $, kbn, moment, _) { var defaults = { position: 'left', show: scope.panel['y-axis'], - min: scope.panel.grid.min, - max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.max, + min: scope.panel.grid.leftMin, + max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.leftMax, }; options.yaxes.push(defaults); @@ -267,6 +267,8 @@ function (angular, $, kbn, moment, _) { if (_.findWhere(data, {yaxis: 2})) { var secondY = _.clone(defaults); secondY.position = 'right'; + secondY.min = scope.panel.grid.rightMin; + secondY.max = scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.rightMax; options.yaxes.push(secondY); configureAxisMode(options.yaxes[1], scope.panel.y_formats[1]); } diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index a87ffb435b2..e4f42687304 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -36,12 +36,20 @@
Grid
- - + +
- - + + +
+
+ + +
+
+ +
diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 0533c97b98d..1964b8fe526 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -95,8 +95,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) { * grid.ma1::: Maximum y-axis value */ grid : { - max: null, - min: null, + leftMax: null, + rightMax: null, + leftMin: null, + rightMin: null, threshold1: null, threshold2: null, threshold1Color: 'rgba(216, 200, 27, 0.27)', From c37496f2b0d538145d81da32a84d12038a25fb3c Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 02:40:01 +0000 Subject: [PATCH 07/25] added nginx conf examples for graphite CORS configuration --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index efe3edee048..f5ee64affe4 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,14 @@ Header set Access-Control-Allow-Headers "origin, authorization, accept" ``` Note that using "\*" leaves your graphite instance quite open so you might want to consider using "http://my.graphite-dom.ain" in place of "\*" -If your Graphite web is proteced by basic authentication, you have to enable the HTTP verb OPTIONS, origin +Here is the same thing, in nginx format: +``` +add_header "Access-Control-Allow-Origin" "*"; +add_header "Access-Control-Allow-Credentials" "true"; +add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; +add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; +``` +If your Graphite web is protected by basic authentication, you have to enable the HTTP verb OPTIONS, origin (no wildcards are allowed in this case) and add Access-Control-Allow-Credentials. This looks like the following for Apache: ``` Header set Access-Control-Allow-Origin "http://mygrafana.com:5656" @@ -86,7 +93,18 @@ Header set Access-Control-Allow-Credentials true ``` - +And in nginx: +``` +if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if request is from allowed domain, you can use multiple if + set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. +} +if ($cors = 'true') { + add_header Access-Control-Allow-Origin $http_origin; + add_header "Access-Control-Allow-Credentials" "true"; + add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; + add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; +} +``` # Roadmap - Improve and refine the target parser and editing - Improve graphite import feature From be03f6adb6e2cf7ea88388f1b6f19dd301a030d4 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 02:42:18 +0000 Subject: [PATCH 08/25] updated nginx conf examples for graphite CORS configuration --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5ee64affe4..70f23a624ed 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,8 @@ if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if req set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. } if ($cors = 'true') { - add_header Access-Control-Allow-Origin $http_origin; - add_header "Access-Control-Allow-Credentials" "true"; + add_header Access-Control-Allow-Origin $http_origin; #this mirrors back whatever domain the request came from as authorized, as + add_header "Access-Control-Allow-Credentials" "true"; #as long as it matches one of your if statements add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; } From 9edaa407f2444ab3bcadd1c53a8e4864bb6e97e1 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 02:44:45 +0000 Subject: [PATCH 09/25] updated nginx conf examples for graphite CORS configuration --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 70f23a624ed..72062b0c1fe 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,8 @@ Header set Access-Control-Allow-Credentials true ``` And in nginx: ``` +auth_basic "Restricted"; +auth_basic_user_file /path/to/my/htpasswd/file; if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if request is from allowed domain, you can use multiple if set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. } From 05303dab451df556bc1127a62f51daa7af3c1db1 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 02:54:34 +0000 Subject: [PATCH 10/25] Revert "Added left and right min and max for y-axis" This reverts commit 8743ba2886c52e1f3faa7aba52c71bff26a6507c. --- src/app/directives/grafanaGraph.js | 6 ++---- src/app/panels/graph/axisEditor.html | 16 ++++------------ src/app/panels/graph/module.js | 6 ++---- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index e7dec1abfd5..95e2848a8b1 100755 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -258,8 +258,8 @@ function (angular, $, kbn, moment, _) { var defaults = { position: 'left', show: scope.panel['y-axis'], - min: scope.panel.grid.leftMin, - max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.leftMax, + min: scope.panel.grid.min, + max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.max, }; options.yaxes.push(defaults); @@ -267,8 +267,6 @@ function (angular, $, kbn, moment, _) { if (_.findWhere(data, {yaxis: 2})) { var secondY = _.clone(defaults); secondY.position = 'right'; - secondY.min = scope.panel.grid.rightMin; - secondY.max = scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.rightMax; options.yaxes.push(secondY); configureAxisMode(options.yaxes[1], scope.panel.y_formats[1]); } diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index e4f42687304..a87ffb435b2 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -36,20 +36,12 @@
Grid
- - + +
- - -
-
- - -
-
- - + +
diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 1964b8fe526..0533c97b98d 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -95,10 +95,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) { * grid.ma1::: Maximum y-axis value */ grid : { - leftMax: null, - rightMax: null, - leftMin: null, - rightMin: null, + max: null, + min: null, threshold1: null, threshold2: null, threshold1Color: 'rgba(216, 200, 27, 0.27)', From 6ef03b7c6c7bdf0013526e51794c28612645230b Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 02:59:52 +0000 Subject: [PATCH 11/25] Revert "Revert "Added left and right min and max for y-axis"" This reverts commit 05303dab451df556bc1127a62f51daa7af3c1db1. --- src/app/directives/grafanaGraph.js | 6 ++++-- src/app/panels/graph/axisEditor.html | 16 ++++++++++++---- src/app/panels/graph/module.js | 6 ++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 95e2848a8b1..e7dec1abfd5 100755 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -258,8 +258,8 @@ function (angular, $, kbn, moment, _) { var defaults = { position: 'left', show: scope.panel['y-axis'], - min: scope.panel.grid.min, - max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.max, + min: scope.panel.grid.leftMin, + max: scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.leftMax, }; options.yaxes.push(defaults); @@ -267,6 +267,8 @@ function (angular, $, kbn, moment, _) { if (_.findWhere(data, {yaxis: 2})) { var secondY = _.clone(defaults); secondY.position = 'right'; + secondY.min = scope.panel.grid.rightMin; + secondY.max = scope.panel.percentage && scope.panel.stack ? 100 : scope.panel.grid.rightMax; options.yaxes.push(secondY); configureAxisMode(options.yaxes[1], scope.panel.y_formats[1]); } diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index a87ffb435b2..e4f42687304 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -36,12 +36,20 @@
Grid
- - + +
- - + + +
+
+ + +
+
+ +
diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 0533c97b98d..1964b8fe526 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -95,8 +95,10 @@ function (angular, app, $, _, kbn, moment, timeSeries) { * grid.ma1::: Maximum y-axis value */ grid : { - max: null, - min: null, + leftMax: null, + rightMax: null, + leftMin: null, + rightMin: null, threshold1: null, threshold2: null, threshold1Color: 'rgba(216, 200, 27, 0.27)', From f6ba577cf47b25ae20cc13b6e2aee5b9fa91657f Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 03:00:31 +0000 Subject: [PATCH 12/25] Revert "updated nginx conf examples for graphite CORS configuration" This reverts commit 9edaa407f2444ab3bcadd1c53a8e4864bb6e97e1. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 72062b0c1fe..70f23a624ed 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,6 @@ Header set Access-Control-Allow-Credentials true ``` And in nginx: ``` -auth_basic "Restricted"; -auth_basic_user_file /path/to/my/htpasswd/file; if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if request is from allowed domain, you can use multiple if set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. } From a0c3f99d80443cda2c2cdbd5bfc5d9091fd90344 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 03:00:50 +0000 Subject: [PATCH 13/25] Revert "updated nginx conf examples for graphite CORS configuration" This reverts commit be03f6adb6e2cf7ea88388f1b6f19dd301a030d4. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 70f23a624ed..f5ee64affe4 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,8 @@ if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if req set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. } if ($cors = 'true') { - add_header Access-Control-Allow-Origin $http_origin; #this mirrors back whatever domain the request came from as authorized, as - add_header "Access-Control-Allow-Credentials" "true"; #as long as it matches one of your if statements + add_header Access-Control-Allow-Origin $http_origin; + add_header "Access-Control-Allow-Credentials" "true"; add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; } From 5ce6464461e1ee4f37f22e0b795bd4d5ecbada39 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Fri, 20 Jun 2014 03:01:13 +0000 Subject: [PATCH 14/25] Revert "added nginx conf examples for graphite CORS configuration" This reverts commit c37496f2b0d538145d81da32a84d12038a25fb3c. --- README.md | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index f5ee64affe4..efe3edee048 100644 --- a/README.md +++ b/README.md @@ -71,14 +71,7 @@ Header set Access-Control-Allow-Headers "origin, authorization, accept" ``` Note that using "\*" leaves your graphite instance quite open so you might want to consider using "http://my.graphite-dom.ain" in place of "\*" -Here is the same thing, in nginx format: -``` -add_header "Access-Control-Allow-Origin" "*"; -add_header "Access-Control-Allow-Credentials" "true"; -add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; -add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; -``` -If your Graphite web is protected by basic authentication, you have to enable the HTTP verb OPTIONS, origin +If your Graphite web is proteced by basic authentication, you have to enable the HTTP verb OPTIONS, origin (no wildcards are allowed in this case) and add Access-Control-Allow-Credentials. This looks like the following for Apache: ``` Header set Access-Control-Allow-Origin "http://mygrafana.com:5656" @@ -93,18 +86,7 @@ Header set Access-Control-Allow-Credentials true ``` -And in nginx: -``` -if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if request is from allowed domain, you can use multiple if - set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. -} -if ($cors = 'true') { - add_header Access-Control-Allow-Origin $http_origin; - add_header "Access-Control-Allow-Credentials" "true"; - add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; - add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; -} -``` + # Roadmap - Improve and refine the target parser and editing - Improve graphite import feature From bef61cf0198903a0a49edfcca80febb0c3dc5eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 21 Jun 2014 17:18:24 +0200 Subject: [PATCH 15/25] Ability to set y min/max for right y-axis (RR #519, Closes #360) --- CHANGELOG.md | 3 + src/app/panels/graph/axisEditor.html | 96 ++++++++++++++-------------- src/app/panels/graph/module.js | 11 ++++ 3 files changed, 62 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 633288a0588..55b2582bd2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ vNext +**New features or improvements** +- Ability to set y min/max for right y-axis (RR #519, Closes #360) - thx @acedrew + **Fixes** - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500) diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html index e4f42687304..eb8ac3fb081 100644 --- a/src/app/panels/graph/axisEditor.html +++ b/src/app/panels/graph/axisEditor.html @@ -1,57 +1,47 @@ +
-
-
Axes
-
- -
-
- -
-
- - -
-
- - -
- -
- - -
-
- - -
- +
Left Y Axis
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
Right Y Axis
+
+ + +
+
+ + +
+
+ + +
+
+ + +
- -
-
-
-
Grid
-
- - -
-
- - -
-
- - -
-
- - -
-
+
Grid thresholds
@@ -110,4 +100,14 @@
+
+
Show Axes
+
+ +
+
+ +
+
+
diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js index 1964b8fe526..66994361d91 100644 --- a/src/app/panels/graph/module.js +++ b/src/app/panels/graph/module.js @@ -193,10 +193,21 @@ function (angular, app, $, _, kbn, moment, timeSeries) { _.defaults($scope.panel.legend, _d.legend); } + if ($scope.panel.grid.min) { + $scope.panel.grid.leftMin = $scope.panel.grid.min; + delete $scope.panel.grid.min; + } + + if ($scope.panel.grid.max) { + $scope.panel.grid.leftMax = $scope.panel.grid.max; + delete $scope.panel.grid.max; + } + if ($scope.panel.y_format) { $scope.panel.y_formats[0] = $scope.panel.y_format; delete $scope.panel.y_format; } + if ($scope.panel.y2_format) { $scope.panel.y_formats[1] = $scope.panel.y2_format; delete $scope.panel.y2_format; From 012ffcf6f6e095831fea12bfb50b0300a7083abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 21 Jun 2014 17:27:57 +0200 Subject: [PATCH 16/25] Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506) --- CHANGELOG.md | 1 + src/app/filters/all.js | 6 ------ src/app/panels/filtering/module.html | 2 +- src/app/panels/graph/legend.html | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55b2582bd2c..cf8e2f6d330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ vNext **Fixes** - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500) +- Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506) # 1.6.0 (2014-06-16) diff --git a/src/app/filters/all.js b/src/app/filters/all.js index 0a6dd12b816..e4ffe7088c8 100755 --- a/src/app/filters/all.js +++ b/src/app/filters/all.js @@ -114,10 +114,4 @@ define(['angular', 'jquery', 'underscore', 'moment'], function (angular, $, _, m }; }); - module.filter('urlDecode', function() { - return function(input) { - return decodeURIComponent(input); - }; - }); - }); \ No newline at end of file diff --git a/src/app/panels/filtering/module.html b/src/app/panels/filtering/module.html index 3c95fbd3751..96b5751ce7d 100755 --- a/src/app/panels/filtering/module.html +++ b/src/app/panels/filtering/module.html @@ -17,7 +17,7 @@ diff --git a/src/app/panels/graph/legend.html b/src/app/panels/graph/legend.html index 45eca738848..84aab5020f6 100755 --- a/src/app/panels/graph/legend.html +++ b/src/app/panels/graph/legend.html @@ -9,7 +9,7 @@ - {{series.alias | urlDecode}} + {{series.alias}} From bb281649fcfdacb1abe7b053fcf056f4b5dd4a34 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Sat, 21 Jun 2014 16:10:07 +0000 Subject: [PATCH 17/25] prepare for master branch after all sorts of git shenanigans From dfe0314ba0a26292664b210dfbb79da3d28f93f6 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Sat, 21 Jun 2014 16:17:45 +0000 Subject: [PATCH 18/25] Added nginx config examples for CORS headers, and CORS selective reflection --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index efe3edee048..72062b0c1fe 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,14 @@ Header set Access-Control-Allow-Headers "origin, authorization, accept" ``` Note that using "\*" leaves your graphite instance quite open so you might want to consider using "http://my.graphite-dom.ain" in place of "\*" -If your Graphite web is proteced by basic authentication, you have to enable the HTTP verb OPTIONS, origin +Here is the same thing, in nginx format: +``` +add_header "Access-Control-Allow-Origin" "*"; +add_header "Access-Control-Allow-Credentials" "true"; +add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; +add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; +``` +If your Graphite web is protected by basic authentication, you have to enable the HTTP verb OPTIONS, origin (no wildcards are allowed in this case) and add Access-Control-Allow-Credentials. This looks like the following for Apache: ``` Header set Access-Control-Allow-Origin "http://mygrafana.com:5656" @@ -86,7 +93,20 @@ Header set Access-Control-Allow-Credentials true ``` - +And in nginx: +``` +auth_basic "Restricted"; +auth_basic_user_file /path/to/my/htpasswd/file; +if ($http_origin ~* (https?://[^/]*\.somedomain\.com(:[0-9]+)?)) { #Test if request is from allowed domain, you can use multiple if + set $cors "true"; #statements to allow multiple domains, simply setting $cors to true in each one. +} +if ($cors = 'true') { + add_header Access-Control-Allow-Origin $http_origin; #this mirrors back whatever domain the request came from as authorized, as + add_header "Access-Control-Allow-Credentials" "true"; #as long as it matches one of your if statements + add_header "Access-Control-Allow-Methods" "GET, OPTIONS"; + add_header "Access-Control-Allow-Headers" "Authorization, origin, accept"; +} +``` # Roadmap - Improve and refine the target parser and editing - Improve graphite import feature From 574ecdb5128ee9f167d9471f05c663ee0032cfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 11:09:27 +0200 Subject: [PATCH 19/25] fixed column typehead, introduced in PR #500 --- src/app/services/influxdb/influxdbDatasource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index af7a81352be..ab054a8c2d2 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -120,7 +120,7 @@ function (angular, _, kbn) { if (!data) { return []; } - + return data[0].columns; }); }; From ed0c71fa5683787b31f13fa5d2b3dcea2baafe8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 11:26:57 +0200 Subject: [PATCH 20/25] Series names and column name typeahead cache fix (Fixes #522) --- CHANGELOG.md | 1 + src/app/controllers/influxTargetCtrl.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf8e2f6d330..c9acfa4de25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ vNext - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500) - Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506) +- Series names and column name typeahead cache fix (Fixes #522) # 1.6.0 (2014-06-16) diff --git a/src/app/controllers/influxTargetCtrl.js b/src/app/controllers/influxTargetCtrl.js index f94844e380e..b0693a85ccf 100644 --- a/src/app/controllers/influxTargetCtrl.js +++ b/src/app/controllers/influxTargetCtrl.js @@ -42,6 +42,7 @@ function (angular) { $scope.seriesBlur = function() { if ($scope.oldSeries !== $scope.target.series) { $scope.oldSeries = $scope.target.series; + $scope.columnList = null; $scope.get_data(); } }; @@ -67,7 +68,7 @@ function (angular) { }; $scope.listSeries = function(query, callback) { - if (!seriesList) { + if (!seriesList || query === '') { seriesList = []; $scope.datasource.listSeries().then(function(series) { seriesList = series; From a3aca0bae4497a1301e15e1e90839856ae93adca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 11:53:58 +0200 Subject: [PATCH 21/25] restored influxdb series naming default to series.value_func --- src/app/services/influxdb/influxdbDatasource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index ab054a8c2d2..9b61df3914e 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -232,7 +232,7 @@ function (angular, _, kbn) { datapoints[i] = [metricValue, groupPoints[i][timeCol]]; } - seriesName = alias ? alias : series.name; + seriesName = alias ? alias : (series.name + '.' + key); // if mulitple groups append key to alias if (alias && groupByField) { From 551771c6cfcd5d7d66ef9bf5dfd6214f463ec93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 12:01:41 +0200 Subject: [PATCH 22/25] ixed influxdb issue with raw query that caused wrong value column detection (Fixes #504) --- CHANGELOG.md | 1 + src/app/services/influxdb/influxdbDatasource.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9acfa4de25..72919a93017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ vNext - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500) - Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506) - Series names and column name typeahead cache fix (Fixes #522) +- Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504) # 1.6.0 (2014-06-16) diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index 9b61df3914e..d3adca618b7 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -43,7 +43,7 @@ function (angular, _, kbn) { var groupByIndex = lowerCaseQueryElements.indexOf("group"); var orderIndex = lowerCaseQueryElements.indexOf("order"); - if (lowerCaseQueryElements[1].indexOf(',')) { + if (lowerCaseQueryElements[1].indexOf(',') !== -1) { groupByField = lowerCaseQueryElements[1].replace(',', ''); } From 9a53779b6c125b470f6ee07392175413d346b60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 18:02:43 +0200 Subject: [PATCH 23/25] Default property that marks which datasource is default in config.js is now optional (Fixes #526) --- CHANGELOG.md | 1 + src/app/services/datasourceSrv.js | 3 +++ src/app/services/influxdb/influxdbDatasource.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72919a93017..bf6ad182113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ vNext - Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506) - Series names and column name typeahead cache fix (Fixes #522) - Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504) +- Default property that marks which datasource is default in config.js is now optional (Fixes #526) # 1.6.0 (2014-06-16) diff --git a/src/app/services/datasourceSrv.js b/src/app/services/datasourceSrv.js index 5fa651f52be..cccdaca7ae1 100644 --- a/src/app/services/datasourceSrv.js +++ b/src/app/services/datasourceSrv.js @@ -15,6 +15,9 @@ function (angular, _, config) { this.init = function() { var defaultDatasource = _.findWhere(_.values(config.datasources), { default: true }); + if (!defaultDatasource) { + defaultDatasource = config.datasources[_.keys(config.datasources)[0]]; + } this.default = this.datasourceFactory(defaultDatasource); }; diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js index d3adca618b7..c63b735b9ea 100644 --- a/src/app/services/influxdb/influxdbDatasource.js +++ b/src/app/services/influxdb/influxdbDatasource.js @@ -68,7 +68,7 @@ function (angular, _, kbn) { } else { - var template = "select [[group]][[group_comma]] [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from [[series]] " + + var template = "select [[group]][[group_comma]] [[func]]([[column]]) from [[series]] " + "where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " + "group by time([[interval]])[[group_comma]] [[group]] order asc"; From 186f753aec06d9b76db1ee80723d4ed819d6ece7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 18:21:38 +0200 Subject: [PATCH 24/25] style changing now works again --- src/app/controllers/dash.js | 2 ++ src/app/controllers/dashLoader.js | 6 +++++- src/app/controllers/grafanaCtrl.js | 3 +++ src/app/partials/dasheditor.html | 2 +- src/index.html | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/controllers/dash.js b/src/app/controllers/dash.js index c4ab3669458..2381a73c90d 100644 --- a/src/app/controllers/dash.js +++ b/src/app/controllers/dash.js @@ -45,6 +45,8 @@ function (angular, $, config, _) { $rootScope.fullscreen = false; $scope.dashboard = dashboard.create(dashboardData); + $scope.grafana.style = $scope.dashboard.style; + $scope.filter = filterSrv; $scope.filter.init($scope.dashboard); diff --git a/src/app/controllers/dashLoader.js b/src/app/controllers/dashLoader.js index 6b28ccc55d8..303e889b2c1 100644 --- a/src/app/controllers/dashLoader.js +++ b/src/app/controllers/dashLoader.js @@ -17,7 +17,7 @@ function (angular, _, moment) { $scope.elasticsearch = $scope.elasticsearch || {}; $scope.onAppEvent('save-dashboard', function() { - $scope.elasticsearch_save('dashboard', false); + $scope.saveDashboard(); }); $scope.onAppEvent('zoom-out', function() { @@ -142,6 +142,10 @@ function (angular, _, moment) { }); }; + $scope.styleUpdated = function() { + $scope.grafana.style = $scope.dashboard.style; + }; + $scope.openSaveDropdown = function() { $scope.isFavorite = playlistSrv.isCurrentFavorite($scope.dashboard); }; diff --git a/src/app/controllers/grafanaCtrl.js b/src/app/controllers/grafanaCtrl.js index fde4e2003ab..17a2beba798 100644 --- a/src/app/controllers/grafanaCtrl.js +++ b/src/app/controllers/grafanaCtrl.js @@ -15,6 +15,9 @@ function (angular, config, _) { $scope.init = function() { $scope._ = _; $scope.dashAlerts = alertSrv; + $scope.grafana = { + style: 'dark' + }; }; $rootScope.onAppEvent = function(name, callback) { diff --git a/src/app/partials/dasheditor.html b/src/app/partials/dasheditor.html index 69ff346d1be..5524352cf17 100644 --- a/src/app/partials/dasheditor.html +++ b/src/app/partials/dasheditor.html @@ -15,7 +15,7 @@
- +
diff --git a/src/index.html b/src/index.html index b8fa8a07dd9..5e3bc08309e 100644 --- a/src/index.html +++ b/src/index.html @@ -20,7 +20,7 @@ - + From d14a86069a1c855071b32cbdff3c45279752baa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 22 Jun 2014 18:51:27 +0200 Subject: [PATCH 25/25] Auto-refresh caused 2 refreshes (and hence mulitple queries) each time (at least in firefox) (Fixes #342) --- CHANGELOG.md | 1 + src/app/services/dashboard.js | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf6ad182113..c0c8fe29f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ vNext - Series names and column name typeahead cache fix (Fixes #522) - Fixed influxdb issue with raw query that caused wrong value column detection (Fixes #504) - Default property that marks which datasource is default in config.js is now optional (Fixes #526) +- Auto-refresh caused 2 refreshes (and hence mulitple queries) each time (at least in firefox) (Fixes #342) # 1.6.0 (2014-06-16) diff --git a/src/app/services/dashboard.js b/src/app/services/dashboard.js index a6faac89906..a12a8ad5aa1 100644 --- a/src/app/services/dashboard.js +++ b/src/app/services/dashboard.js @@ -445,20 +445,28 @@ function (angular, $, kbn, _, config, moment, Modernizr) { }); }; + this.start_scheduled_refresh = function (after_ms) { + this.cancel_scheduled_refresh(); + self.refresh_timer = timer.register($timeout(function () { + self.start_scheduled_refresh(after_ms); + self.refresh(); + }, after_ms)); + }; + + this.cancel_scheduled_refresh = function () { + timer.cancel(self.refresh_timer); + }; + this.set_interval = function (interval) { self.current.refresh = interval; - if(interval) { + if (interval) { var _i = kbn.interval_to_ms(interval); - timer.cancel(self.refresh_timer); - self.refresh_timer = timer.register($timeout(function() { - self.set_interval(interval); - self.refresh(); - },_i)); - self.refresh(); + this.start_scheduled_refresh(_i); } else { - timer.cancel(self.refresh_timer); + this.cancel_scheduled_refresh(); } }; + }); });