Skip to content

Commit 9dde862

Browse files
authored
Merge pull request #605 from StackStorm/v290_changes
Changes for 3.0.0 release
2 parents 49464b0 + a543c31 commit 9dde862

File tree

6 files changed

+65
-3
lines changed

6 files changed

+65
-3
lines changed

apps/st2-actions/actions-panel.component.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ export default class ActionsPanel extends React.Component {
8484
promise: api.request({
8585
path: '/actions',
8686
query: {
87-
exclude_attributes: 'parameters,notify',
87+
include_attributes: [
88+
'ref',
89+
'pack',
90+
'name',
91+
'description',
92+
'runner_type',
93+
],
8894
},
8995
})
9096
.catch((err) => {

apps/st2-history/history-panel.component.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,19 @@ export default class HistoryPanel extends React.Component {
188188
limit: PER_PAGE,
189189
offset: PER_PAGE * (page - 1),
190190
filter,
191-
exclude_attributes: 'result,trigger_instance',
191+
include_attributes: [
192+
'id',
193+
'status',
194+
'start_timestamp',
195+
'action.ref',
196+
'action.name',
197+
'action.runner_type',
198+
'action.parameters',
199+
'parameters',
200+
'rule.ref',
201+
'trigger.type',
202+
'context.user',
203+
],
192204
},
193205
raw: true, // so we can extract headers
194206
})

apps/st2-rules/rules-details.component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import EnforcementPanel from './panels/enforcements';
4444
packSpec,
4545
}, props) => ({
4646
rule,
47-
47+
4848
enforcements,
4949

5050
triggerParameters,

apps/st2-rules/rules-panel.component.js

+26
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ export default class RulesPanel extends React.Component {
8383
type: 'FETCH_PACKS',
8484
promise: api.request({
8585
path: '/packs',
86+
query: {
87+
include_attributes: [
88+
'name',
89+
'description',
90+
],
91+
},
8692
})
8793
.catch((err) => {
8894
notification.error('Unable to retrieve pack spec.', { err });
@@ -94,6 +100,19 @@ export default class RulesPanel extends React.Component {
94100
type: 'FETCH_TRIGGERS',
95101
promise: api.request({
96102
path: '/triggertypes',
103+
// NOTE: If we don't retrieve all the attributes, "TypeError: Cannot read property 'properties' of undefined"
104+
// error is thrown
105+
/*query: {
106+
include_attributes: [
107+
'id',
108+
'ref',
109+
'pack',
110+
'name',
111+
'description',
112+
'parameters_schema',
113+
'payload_schema',
114+
],
115+
},*/
97116
})
98117
.catch((err) => {
99118
notification.error('Unable to retrieve trigger spec.', { err });
@@ -105,6 +124,13 @@ export default class RulesPanel extends React.Component {
105124
type: 'FETCH_ACTIONS',
106125
promise: api.request({
107126
path: '/actions/views/overview',
127+
query: {
128+
include_attributes: [
129+
'ref',
130+
'description',
131+
'parameters',
132+
],
133+
},
108134
})
109135
.catch((err) => {
110136
notification.error('Unable to retrieve action spec.', { err });

modules/st2-api/api.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import _ from 'lodash';
22
import url from 'url';
33
import axios from 'axios';
4+
import buildURL from 'axios/lib/helpers/buildURL';
45

56
let _source;
67

@@ -174,6 +175,17 @@ export class API {
174175
transformResponse: [],
175176
data,
176177
withCredentials: true,
178+
paramsSerializer: params => {
179+
params = _.mapValues(params, param => {
180+
if (_.isArray(param)) {
181+
return param.join(',');
182+
}
183+
184+
return param;
185+
});
186+
187+
return buildURL('', params).substr(1);
188+
},
177189
};
178190

179191
if (this.rejectUnauthorized === false) {

modules/st2-pack-icon/pack-icon.component.js

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export default class PackIcon extends React.Component {
2929

3030
iconPromise = iconPromise || api.request({
3131
path: '/packs',
32+
query: {
33+
include_attributes: [
34+
'ref',
35+
'files',
36+
],
37+
},
3238
})
3339
.then((packs) => {
3440
packs.map(({ ref, files }) => {

0 commit comments

Comments
 (0)