Skip to content

Commit f5330a9

Browse files
authored
COMPASS-315: Don't auto-cast numeric types (#623)
1 parent 10a4efd commit f5330a9

File tree

6 files changed

+43
-8
lines changed

6 files changed

+43
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"font-awesome": "https://github.com/FortAwesome/Font-Awesome/archive/v4.4.0.tar.gz",
105105
"get-object-path": "azer/get-object-path#74eb42de0cfd02c14ffdd18552f295aba723d394",
106106
"hadron-action": "^0.1.0",
107-
"hadron-app-registry": "^3.3.0",
107+
"hadron-app-registry": "^3.4.0",
108108
"hadron-auto-update-manager": "^0.0.12",
109109
"hadron-compile-cache": "^0.3.0",
110110
"hadron-document": "^0.29.0",

src/internal-packages/crud/lib/component/document.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Document extends React.Component {
8383
this.ns,
8484
{ _id: object._id },
8585
object,
86-
{ returnOriginal: false },
86+
{ returnOriginal: false, promoteValues: false },
8787
this.handleResult
8888
);
8989
},

src/internal-packages/crud/lib/store/load-more-documents-store.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ const LoadMoreDocumentsStore = Reflux.createStore({
2828
*/
2929
loadMoreDocuments: function(skip) {
3030
const filter = app.queryOptions.query;
31-
const options = { skip: skip, limit: 20, sort: [[ '_id', 1 ]], readPreference: READ };
31+
const options = {
32+
skip: skip,
33+
limit: 20,
34+
sort: [[ '_id', 1 ]],
35+
readPreference: READ,
36+
promoteValues: false
37+
};
3238
app.dataService.find(NamespaceStore.ns, filter, options, (error, documents) => {
3339
if (!error) {
3440
this.trigger(documents);

src/internal-packages/crud/lib/store/reset-document-list-store.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ const ResetDocumentListStore = Reflux.createStore({
5353
if (NamespaceStore.ns) {
5454
app.dataService.count(NamespaceStore.ns, filter, OPTIONS, (err, count) => {
5555
if (!err) {
56-
const options = { limit: 20, sort: [[ '_id', 1 ]], readPreference: READ };
56+
const options = {
57+
limit: 20,
58+
sort: [[ '_id', 1 ]],
59+
readPreference: READ,
60+
promoteValues: false
61+
};
5762
app.dataService.find(NamespaceStore.ns, filter, options, (error, documents) => {
5863
if (!error) {
5964
this.trigger(documents, count);

src/internal-packages/crud/styles/editable-element-value.less

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,20 @@
1616
}
1717
}
1818

19-
&-is-int32, &-is-int64, &-is-double, &-is-decimal128 {
20-
color: green;
19+
&-is-int32 {
20+
color: #145a32;
21+
}
22+
23+
&-is-int64 {
24+
color: #196f3d;
25+
}
26+
27+
&-is-double {
28+
color: #1e8449;
29+
}
30+
31+
&-is-decimal128 {
32+
color: #229954;
2133
}
2234

2335
&-is-date {

src/internal-packages/crud/styles/element.less

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,20 @@
3232
}
3333
}
3434

35-
&-is-int32, &-is-int64, &-is-double, &-is-decimal128 {
36-
color: green;
35+
&-is-int32 {
36+
color: #145a32;
37+
}
38+
39+
&-is-int64 {
40+
color: #196f3d;
41+
}
42+
43+
&-is-double {
44+
color: #1e8449;
45+
}
46+
47+
&-is-decimal128 {
48+
color: #229954;
3749
}
3850

3951
&-is-date {

0 commit comments

Comments
 (0)