Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: update dependencies #6948

Merged
merged 1 commit into from
May 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ui/embedded.go

Large diffs are not rendered by default.

865 changes: 619 additions & 246 deletions ui/npm-shrinkwrap.json

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"bower": ">=1.7.2",
"del": ">=2.0.2",
"gulp": ">=3.9.0",
"gulp-livereload": ">=3.8.0",
"gulp-rename": ">=1.2.2",
"gulp-stylus": ">=2.0.7",
"gulp-typescript": ">=2.9.0",
"lodash": ">=4.5.1",
"moment-timezone": ">=0.4.1",
"nib": ">=1.1.0",
"npm": ">=3.3.4",
"shonkwrap": ">=1.1.2",
"stylint": ">=1.3.5",
"stylus": ">=0.51.1",
"tslint": ">=3.0.0",
"typescript": ">=1.6.2",
"typings": ">=0.6.6"
"bower": "^1.7",
"gulp": "^3.9.0",
"gulp-livereload": "^3.8.0",
"gulp-rename": "^1.2.2",
"gulp-stylus": "^2.0.7",
"gulp-typescript": "^2.9.0",
"lodash": "^4.5",
"moment-timezone": "^0.5",
"nib": "^1.1",
"npm": "^3.9",
"shonkwrap": "^1.1",
"stylint": "^1.3",
"stylus": "^0.54",
"tslint": "^3.0",
"typescript": "^1.6",
"typings": "^0.6"
}
}
5 changes: 3 additions & 2 deletions ui/styl/partials/layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ button
z-index 1

.sql-table
margin 20 20
margin 20

a.toggle
font Lato-Bold
Expand Down Expand Up @@ -537,7 +537,8 @@ a.toggle

.section
.node-info, .store-info
padding 0 0 20px 0
padding 0
padding-bottom 20px

h1
padding-left 0
Expand Down
17 changes: 10 additions & 7 deletions ui/ts/components/helpusprompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,16 @@ module Components {
m("input[type=checkbox][name=optin][required=true]", {id: "optin", checked: true}),
m("label", {for: "optin"}, "Share data with Cockroach Labs"),
]),
m(".optin-text", [`By enabling this feature, you are agreeing to send us anonymous,
aggregate information about your running CockroachDB cluster,
which may include capacity and usage, server and storage device metadata, basic network topology,
and other information that helps us improve our products and services. We never collect any of
the actual data that you store in your CockroachDB cluster.
Except as set out above, our `, m("a", {href: "/assets/privacyPolicy.html", target: "_blank"}, "Privacy Policy"), ` governs our collection
and use of information from users of our products and services.`, ]),
m(".optin-text", [
`By enabling this feature, you are agreeing to send us anonymous, aggregate
information about your running CockroachDB cluster, which may include
capacity and usage, server and storage device metadata, basic network
topology, and other information that helps us improve our products and
services. We never collect any of the actual data that you store in your
CockroachDB cluster. Except as set out above, our `,
m("a", {href: "/assets/privacyPolicy.html", target: "_blank"}, "Privacy Policy"),
` governs our collection and use of information from users of our products and services.`,
]),
m("", [
m("input[type=checkbox][name=updates]", {id: "updates"}),
m("label", {for: "updates"}, "Send me product and feature updates"),
Expand Down
78 changes: 39 additions & 39 deletions ui/ts/components/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@
* or multiple times on the same page.
*/
module Components {
"use strict";
/**
* Select is a basic html option select.
*/
export module Select {
import Property = _mithril.MithrilProperty;
"use strict";
/**
* Select is a basic html option select.
*/
export module Select {
import Property = _mithril.MithrilProperty;

/**
* Item represents each option that can be selected. The value is the
* internal value representing the option and the text represents
* the text that is displayed in the option list.
*/
export interface Item {
value: string;
text: string;
}
/**
* Item represents each option that can be selected. The value is the
* internal value representing the option and the text represents
* the text that is displayed in the option list.
*/
export interface Item {
value: string;
text: string;
}

/**
* Options contains all the info needed by the selector. The items are
* a list of options that can be selected. Selected is a mithril
* property containing the currently selected option's value. Set this
* to the default value when creating the Select. onChange is any
* function that takes a string (the updated value) that will be called
* right after the selected option changes.
*/
export interface Options {
items: Item[];
value: Property<string>;
onChange: (val: string) => void;
}
/**
* Options contains all the info needed by the selector. The items are
* a list of options that can be selected. Selected is a mithril
* property containing the currently selected option's value. Set this
* to the default value when creating the Select. onChange is any
* function that takes a string (the updated value) that will be called
* right after the selected option changes.
*/
export interface Options {
items: Item[];
value: Property<string>;
onChange: (val: string) => void;
}

export function controller(options: Options): Options {
return options;
}
export function controller(options: Options): Options {
return options;
}

export function view(ctrl: Options): _mithril.MithrilVirtualElement {
return m("select", { onchange: m.withAttr("value", ctrl.onChange) }, [
ctrl.items.map(function(item: Item): _mithril.MithrilVirtualElement {
return m("option", { value: item.value, selected: (item.value === ctrl.value()) }, item.text);
}),
]);
}
}
export function view(ctrl: Options): _mithril.MithrilVirtualElement {
return m("select", { onchange: m.withAttr("value", ctrl.onChange) }, [
ctrl.items.map(function(item: Item): _mithril.MithrilVirtualElement {
return m("option", { value: item.value, selected: (item.value === ctrl.value()) }, item.text);
}),
]);
}
}
}
10 changes: 5 additions & 5 deletions ui/ts/models/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ module Models {
return params;
}

constructor() {
this.level(Utils.Format.Severity(2));
this.allEntries = this._data.result;
}

/**
* _url return the url used for queries to the status server.
*/
private _url(): string {
return "/_status" + this.getURL() + "?" + m.route.buildQueryString(this.getParams());
}

constructor() {
this.level(Utils.Format.Severity(2));
this.allEntries = this._data.result;
}
}

/**
Expand Down
11 changes: 6 additions & 5 deletions ui/ts/models/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ module Models {
* derivative function.
*/
export class Selector {
/**
* Construct a new selector which requests data for the given time
* series, downsampling data using the provided aggregator.
*/
constructor(private seriesName: string, private downsampler: Proto.QueryAggregator) {}
/**
* sources returns the data sources to which this query is restrained.
*/
Expand Down Expand Up @@ -182,6 +177,12 @@ module Models {
derivative: this.derivative(),
};
};

/**
* Construct a new selector which requests data for the given time
* series, downsampling data using the provided aggregator.
*/
constructor(private seriesName: string, private downsampler: Proto.QueryAggregator) { }
}

/**
Expand Down
17 changes: 10 additions & 7 deletions ui/ts/pages/helpus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ module AdminViews {
m("input[type=checkbox][name=optin]" + (ctrl.userData.savedAttributes.optin ? "" : "[required=true]"), {id: "optin", checked: ctrl.userData.attributes.optin}),
m("label", {for: "optin"}, "Share data with Cockroach Labs"),
]),
m(".optin-text", [`By enabling this feature, you are agreeing to send us anonymous,
aggregate information about your running CockroachDB cluster,
which may include capacity and usage, server and storage device metadata, basic network topology,
and other information that helps us improve our products and services. We never collect any of
the actual data that you store in your CockroachDB cluster.
Except as set out above, our `, m("a", {href: "/assets/privacyPolicy.html", target: "_blank"}, "Privacy Policy"), ` governs our collection
and use of information from users of our products and services.`, ]),
m(".optin-text", [
`By enabling this feature, you are agreeing to send us anonymous, aggregate
information about your running CockroachDB cluster, which may include
capacity and usage, server and storage device metadata, basic network
topology, and other information that helps us improve our products and
services. We never collect any of the actual data that you store in your
CockroachDB cluster. Except as set out above, our `,
m("a", { href: "/assets/privacyPolicy.html", target: "_blank" }, "Privacy Policy"),
` governs our collection and use of information from users of our products and services.`,
]),
m("", ctrl.userData.savedAttributes.updates ? [m(".email-message", "")] : [
m("input[type=checkbox][name=updates]", {id: "updates", checked: ctrl.userData.attributes.updates}),
m("label", {for: "updates"}, "Send me product and feature updates"),
Expand Down
8 changes: 4 additions & 4 deletions ui/ts/pages/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ module AdminViews {
clearInterval(this._interval);
}

private _Refresh(): void {
entries.refresh();
}

constructor() {
// TODO: keep values on refresh, allow sharing via url
entries = new Models.Log.Entries();
this._Refresh();
this._interval = window.setInterval(() => this._Refresh(), Controller._queryEveryMS);
}

private _Refresh(): void {
entries.refresh();
}
}

export function controller(): Controller {
Expand Down
2 changes: 1 addition & 1 deletion ui/ts/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"forin": true,
"indent": [
true,
2
"spaces"
],
"interface-name": false,
"jsdoc-format": true,
Expand Down