Skip to content

Commit

Permalink
ui: update dependencies
Browse files Browse the repository at this point in the history
This prevents the following deprecation warning from being printed:

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x3130826c9e59 <JS Object>#0#
    1: .node [module.js:568] [pc=0x1190f72183a4] (this=0x1cc469bec951 <an Object with map 0x7bdf6818161>#1#,module=0x225f801cc5a1 <a Module with map 0x7bdf6818739>#2#,filename=0x225f801cc501 <String[131]: /Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    2: load [module.js:458] [pc=0x1190f71396f2] (this=0x225f801cc5a1 <a Module with map 0x7bdf6818739>#2#,filename=0x225f801cc501 <String[131]: /Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x1190f713921d] (this=0x313082604189 <undefined>,module=0x225f801cc5a1 <a Module with map 0x7bdf6818739>#2#,filename=0x225f801cc501 <String[131]: /Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/node_modules/fsevents/ 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: fse::FSEvents::Initialize(v8::Local<v8::Object>)
 3: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 7: 0x1190f700961b
 8: 0x1190f72183a4
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x3130826c9e59 <JS Object>#0#
    1: .node [module.js:568] [pc=0x1190f72183a4] (this=0x1cc469bec951 <an Object with map 0x7bdf6818161>#1#,module=0x225f801cc5a1 <a Module with map 0x7bdf6818739>#2#,filename=0x225f801cc501 <String[131]: /Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    2: load [module.js:458] [pc=0x1190f71396f2] (this=0x225f801cc5a1 <a Module with map 0x7bdf6818739>#2#,filename=0x225f801cc501 <String[131]: /Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x1190f713921d] (this=0x313082604189 <undefined>,module=0x225f801cc5a1 <a Module with map 0x7bdf6818739>#2#,filename=0x225f801cc501 <String[131]: /Users/tamird/src/go/src/github.com/cockroachdb/cockroach/ui/node_modules/fsevents/ 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: fse::FSEvents::Initialize(v8::Local<v8::Object>)
 3: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 7: 0x1190f700961b
 8: 0x1190f72183a4
  • Loading branch information
tamird committed May 27, 2016
1 parent 41d9d81 commit 7b104c8
Show file tree
Hide file tree
Showing 11 changed files with 716 additions and 336 deletions.
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

0 comments on commit 7b104c8

Please sign in to comment.