Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Commit f15a6ba

Browse files
authored
Merge pull request #509 from grtjn/master
Bugfixes for release 1.3.1
2 parents 9e3af89 + 74cf3ee commit f15a6ba

File tree

9 files changed

+63
-67
lines changed

9 files changed

+63
-67
lines changed

README.mdown

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ On Mac or Linux:
6262
npm install
6363
bower install
6464
gulp init-local
65-
./ml local bootstrap
66-
./ml local deploy modules
67-
./ml local deploy content
65+
./ml local install
6866
./ml local mlcp -options_file import-sample-data.options
6967

7068
On Windows:
@@ -73,9 +71,7 @@ On Windows:
7371
npm install
7472
bower install
7573
gulp init-local
76-
ml.bat local bootstrap
77-
ml.bat local deploy modules
78-
ml.bat local deploy content
74+
ml.bat local install
7975
ml.bat local mlcp -options_file import-sample-data.options
8076

8177
## Prepare your Application

app/templates/README.mdown

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,15 @@ On Mac or Linux:
3232
npm install
3333
bower install
3434
gulp init-local
35-
./ml local bootstrap
36-
./ml local deploy modules
37-
./ml local deploy content
35+
./ml local install
3836
./ml local mlcp -options_file import-sample-data.options
3937

4038
On Windows:
4139

4240
npm install
4341
bower install
4442
gulp init-local
45-
ml.bat local bootstrap
46-
ml.bat local deploy modules
47-
ml.bat local deploy content
43+
ml.bat local install
4844
ml.bat local mlcp -options_file import-sample-data.options
4945

5046
## Prepare your Application

app/templates/_gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
bower_components
3+
/mlpm_modules
34
coverage
45
ui/fonts
56
deploy/local.properties

app/templates/bower.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"font-awesome": "~4.6.0",
2121
"highcharts": "^4.2",
2222
"highlightjs": "~8.7.0",
23-
"ng-json-explorer": "8c2a0f9104",
23+
"ng-json-explorer": "f7236fa857",
2424
"ngtoast": "^2.0.0",
2525
"lodash": "~3.10.1",
2626
"ml-search-ng": "~0.2.0",
@@ -57,6 +57,7 @@
5757
"resolutions": {
5858
"angular": "~1.4.4",
5959
"angular-bootstrap": "^1.1",
60-
"highcharts": "^4.2"
60+
"highcharts": "^4.2",
61+
"ng-json-explorer": "f7236fa857"
6162
}
6263
}

app/templates/deploy/app_specific.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def change_permissions(where)
100100
xquery version "1.0-ml";
101101
102102
let $new-permissions := (
103-
xdmp:permission("#{@properties["ml.app-name"]}-role", "read"),
104-
xdmp:permission("#{@properties["ml.app-name"]}-role", "update"),
105-
xdmp:permission("#{@properties["ml.app-name"]}-role", "execute")
103+
xdmp:permission("#{@properties["ml.app-role"]}", "read"),
104+
xdmp:permission("#{@properties["ml.app-role"]}", "update"),
105+
xdmp:permission("#{@properties["ml.app-role"]}", "execute")
106106
)
107107
108108
let $uris :=

app/templates/ui/app/error/errorInterceptor.service.js

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,32 @@
1414
responseError: function(rejection) {
1515
var msg;
1616
var toastMsg;
17-
if (rejection.status === 500 || rejection.status === 400) {
18-
var messageBoardService = $injector.get('messageBoardService');
19-
if (rejection.data && rejection.data.errorResponse) {
20-
msg = {
21-
title: rejection.data.errorResponse.status,
22-
body: rejection.data.errorResponse.message
23-
};
24-
} else {
25-
msg = {
26-
title: (rejection.status === 400) ? 'Bad Request' : 'Internal Server Error',
27-
body: ''
28-
};
17+
if (rejection.data && rejection.data.errorResponse) {
18+
msg = {
19+
title: rejection.data.errorResponse.status,
20+
body: rejection.data.errorResponse.message
21+
};
22+
} else {
23+
msg = {
24+
title: (rejection.status === 401) ? 'Unauthorised' : (
25+
(rejection.status >= 400 && rejection.status < 500) ? 'Bad Request' :
26+
'Internal Server Error'
27+
),
28+
body: ''
29+
};
30+
}
31+
toastMsg = '<strong>' + msg.title + '</strong><p>' + msg.body + '</p>';
32+
toast.create({
33+
className: 'danger',
34+
content: toastMsg,
35+
dismissOnTimeout: true,
36+
timeout: 2000,
37+
onDismiss: function () {
2938
}
39+
});
40+
if (rejection.status >= 400 && rejection.status !== 401) {
41+
var messageBoardService = $injector.get('messageBoardService');
3042
messageBoardService.message(msg);
31-
toastMsg = '<strong>' + msg.title + '</strong><p>' + msg.body + '</p>';
32-
toast.danger(toastMsg);
33-
} else if (rejection.status === 401) {
34-
if (rejection.data && rejection.data.errorResponse) {
35-
msg = {
36-
title: rejection.data.errorResponse.status,
37-
body: rejection.data.errorResponse.message
38-
};
39-
} else {
40-
msg = {
41-
title: (rejection.status === 401) ? 'Unauthorised' : 'Internal Server Error',
42-
body: ''
43-
};
44-
}
45-
toastMsg = '<strong>' + msg.title + '</strong><p>' + msg.body + '</p>';
46-
var loginService = $injector.get('loginService');
47-
loginService.logout();
48-
toast.danger(toastMsg);
4943
}
5044
return $q.reject(rejection);
5145
}

app/templates/ui/styles/default.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,5 +260,5 @@ form .required:after {
260260
}
261261

262262
#buttons-detail { overflow: auto; }
263-
#buttons-detail button { width: 30%; float: left; margin: 4px }
263+
#buttons-detail .btn { width: 30%; float: left; margin: 4px }
264264

app/themes/dashboard/ui/app/dashboard/content-box.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,32 @@
1111
replace: true,
1212
scope: {
1313
boxTitle: '@',
14-
boxBordered: '@'
14+
boxBordered: '@',
15+
collapsed: '@'
1516
},
16-
link: function(scope) {
17-
scope.hasBorder = scope.boxBordered !== 'false' && scope.boxBordered !== 'no';
17+
link: function($scope, $elem, $attrs) {
18+
$scope.hasBorder = $scope.boxBordered !== 'false' && $scope.boxBordered !== 'no';
1819

19-
// TODO: what is the purpose of this watch?
20-
scope.$watch(scope.boxTabs, function(newVal) {
21-
if (newVal) {
22-
scope.hasTabs = true;
23-
} else {
24-
scope.hasTabs = false;
25-
}
20+
$scope.toggleCollapsed = function() {
21+
$scope.isCollapsed = !$scope.isCollapsed;
22+
};
23+
24+
$scope.$watch(function() { return $attrs.collapsed; }, function(newVal) {
25+
newVal = '' + newVal;
26+
$scope.isCollapsed = newVal === 'true' || newVal === 'yes';
2627
});
2728
},
2829
/* jshint multistr: true */
2930
/* jscs: disable */
30-
template: '<div class="box">\
31-
<div class="box-header" ng-class="{ \'with-border\': boxBordered }" ng-if="boxTitle">\
31+
template: '<div class="box" ng-init="collapsed = collapsed || false">\
32+
<div class="box-header" ng-class="{ \'with-border\': boxBordered }" ng-if="boxTitle" ng-click="toggleCollapsed()">\
3233
<h3 class="box-title">{{ boxTitle }}</h3>\
34+
<div class="box-tools pull-right">\
35+
<button type="button" class="btn btn-box-tool" ng-hide="isCollapsed"><i class="fa fa-minus"></i></button>\
36+
<button type="button" class="btn btn-box-tool" ng-show="isCollapsed"><i class="fa fa-plus"></i></button>\
37+
</div>\
3338
</div>\
34-
<div class="box-body" ng-transclude></div>\
39+
<div class="box-body" ng-hide="isCollapsed" ng-transclude></div>\
3540
</div>'
3641
/* jscs: enable */
3742
};

slushfile.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ function printUsage() {
4242
process.stdout.write(' fork=<..> Github fork to use for Roxy. Defaults to: marklogic\n');
4343
process.stdout.write(' branch=<..> Github branch to use for Roxy. Defaults to: master\n');
4444
process.stdout.write(' theme=<..> Slush theme to use. Defaults to: default\n');
45-
process.stdout.write(' ml-version=<..> MarkLogic version. Defaults to: 8\n');
45+
process.stdout.write(' ml-version=<..> MarkLogic version. Defaults to: 9\n');
4646
process.stdout.write(' ml-host=<..> Host on which MarkLogic runs. Defaults to: localhost\n');
4747
process.stdout.write(' ml-admin-user=<..> User for MarkLogic deployments. Defaults to: admin\n');
4848
process.stdout.write(' ml-admin-pass=<..> Pass for MarkLogic deployments. Defaults to: <blank>\n');
4949
process.stdout.write(' ml-app-user=<..> MarkLogic user for guest access. Defaults to: <app-name>-user\n');
5050
process.stdout.write(' ml-app-pass=<..> MarkLogic pass for guest access. Defaults to: <roxy-appuser-password>\n');
51-
process.stdout.write(' ml-http-port=<..> Port at which MarkLogic app-server runs. Defaults to: 8040\n');
51+
process.stdout.write(' ml-http-port=<..> Port at which MarkLogic app-server runs. Defaults to: 8070\n');
5252
process.stdout.write(' ml-xcc-port=<..> Port at which MarkLogic xcc-server runs. Defaults to: <ml-app-port>\n');
5353
process.stdout.write(' node-port=<..> Port at which Node.js middle-tier runs. Defaults to: 9070\n');
5454
process.stdout.write(' guest-access=<..> Whether guests are automatically logged in. Defaults to: false\n');
@@ -126,7 +126,10 @@ function processInput() {
126126
branch: 'master'
127127
};
128128
(gulp.args || process.argv).forEach(function(arg) {
129-
if (isFlag(arg)) {
129+
if (arg === 'help') {
130+
printUsage();
131+
process.exit(0);
132+
} else if (isFlag(arg)) {
130133
var splits = arg.split('=');
131134
var flag = splits[0].replace(/^-+/,'');
132135
var value = splits[1];
@@ -474,7 +477,7 @@ gulp.task('init', ['checkForUpdates'], function(done) {
474477
type: 'list',
475478
name: 'mlVersion',
476479
message: 'MarkLogic version?',
477-
choices: ['8', '7', '6', '5'],
480+
choices: ['9', '8', '7'],
478481
default: 0
479482
});
480483
}
@@ -508,15 +511,15 @@ gulp.task('init', ['checkForUpdates'], function(done) {
508511
type: 'input',
509512
name: 'appPort',
510513
message: 'MarkLogic App/Rest port?',
511-
default: 8040
514+
default: 8070
512515
});
513516
}
514517
if (!clArgs['ml-xcc-port']) {
515518
prompts.push({
516519
type: 'input',
517520
name: 'xccPort',
518521
message: 'XCC port?',
519-
default: 8041,
522+
default: 8071,
520523
when: function(answers) {
521524
return (answers.mlVersion || clArgs['ml-version']) < 8;
522525
}

0 commit comments

Comments
 (0)