Skip to content

Commit cdad8e8

Browse files
committed
update: bumped ember to 3.0
sysdig-CLA-1.0-signed-off-by: Roberto Scolaro <[email protected]> Signed-off-by: Roberto Scolaro <[email protected]>
1 parent d6c21ed commit cdad8e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1015
-1302
lines changed

.eslintrc.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ module.exports = {
2020
// node files
2121
{
2222
files: [
23-
'testem.js',
2423
'ember-cli-build.js',
24+
'testem.js',
2525
'config/**/*.js',
2626
'lib/*/index.js'
2727
],
@@ -33,15 +33,6 @@ module.exports = {
3333
browser: false,
3434
node: true
3535
}
36-
},
37-
38-
// test files
39-
{
40-
files: ['tests/**/*.js'],
41-
excludedFiles: ['tests/dummy/**/*.js'],
42-
env: {
43-
embertest: true
44-
}
4536
}
4637
]
4738
};

app/app.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import Component from '@ember/component';
18+
19+
import Application from '@ember/application';
1820
import Resolver from './resolver';
1921
import loadInitializers from 'ember-load-initializers';
2022
import config from './config/environment';
2123

22-
const App = Ember.Application.extend({
24+
const App = Application.extend({
2325
modulePrefix: config.modulePrefix,
2426
podModulePrefix: config.podModulePrefix,
2527
Resolver,
2628
});
2729

2830
loadInitializers(App, config.modulePrefix);
2931

30-
Ember.Component.reopen({
32+
Component.reopen({
3133
attributeBindings: ['data-ref'],
3234
});
3335

app/controllers/application.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import Controller from '@ember/controller';
1818

19-
export default Ember.Controller.extend({
19+
export default Controller.extend({
2020
});

app/controllers/capture.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,32 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import { isNone } from '@ember/utils';
18+
19+
import { computed } from '@ember/object';
20+
import { inject as service } from '@ember/service';
21+
import Controller, { inject as controller } from '@ember/controller';
1822
import electronUtils from 'wsd-core/utils/electron';
1923

20-
export default Ember.Controller.extend({
24+
export default Controller.extend({
2125
queryParams: {
2226
drilldownInfoParam: 'dd',
2327
metricTimelinesParam: 'tl',
2428
timeFrom: 'f',
2529
timeTo: 't',
2630
},
2731

28-
application: Ember.inject.controller('application'),
29-
captureTimelines: Ember.inject.service('capture-timelines'),
32+
application: controller('application'),
33+
captureTimelines: service('capture-timelines'),
3034

3135
selectedViewId: null,
3236

3337
filter: null,
3438

3539
drilldownInfoParam: null,
3640
metricTimelinesParam: null,
37-
timeWindow: Ember.computed('model.queryParams.timeFrom', 'model.queryParams.timeTo', function() {
38-
if (Ember.isNone(this.get('model.queryParams.timeFrom')) === false && Ember.isNone(this.get('model.queryParams.timeTo')) === false) {
41+
timeWindow: computed('model.queryParams.timeFrom', 'model.queryParams.timeTo', function() {
42+
if (isNone(this.get('model.queryParams.timeFrom')) === false && isNone(this.get('model.queryParams.timeTo')) === false) {
3943
return {
4044
from: this.get('model.queryParams.timeFrom'),
4145
to: this.get('model.queryParams.timeTo'),

app/controllers/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import { computed } from '@ember/object';
18+
19+
import Controller, { inject as controller } from '@ember/controller';
1820
import electronUtils from 'wsd-core/utils/electron';
1921

20-
export default Ember.Controller.extend({
22+
export default Controller.extend({
2123
queryParams: ['port'],
22-
application: Ember.inject.controller('application'),
24+
application: controller('application'),
2325

24-
isElectron: Ember.computed(function() {
26+
isElectron: computed(function() {
2527
return electronUtils.isElectron();
2628
}),
2729

app/controllers/views/view.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import Ember from 'ember';
1+
import Controller from '@ember/controller';
22

3-
export default Ember.Controller.extend({
3+
export default Controller.extend({
44
queryParams: {
55
filter: 'filter',
66
searchPattern: 'search',

app/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Ember from 'ember';
1+
import EmberRouter from '@ember/routing/router';
22
import config from './config/environment';
33

4-
const Router = Ember.Router.extend({
4+
const Router = EmberRouter.extend({
55
location: config.locationType,
66
rootURL: config.rootURL,
77
});

app/routes/application.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import { isEmpty } from '@ember/utils';
18+
19+
import { inject as service } from '@ember/service';
20+
import Route from '@ember/routing/route';
1821
import electronUtils from 'wsd-core/utils/electron';
1922

20-
export default Ember.Route.extend({
21-
shortcutsService: Ember.inject.service('keyboard-shortcuts'),
22-
colorProvider: Ember.inject.service('color-provider'),
23-
userTracking: Ember.inject.service('user-tracking'),
23+
export default Route.extend({
24+
shortcutsService: service('keyboard-shortcuts'),
25+
colorProvider: service('color-provider'),
26+
userTracking: service('user-tracking'),
2427

2528
setupController() {
2629
this._super(...arguments);
@@ -87,7 +90,7 @@ export default Ember.Route.extend({
8790
if (electronUtils.isElectron()) {
8891
let fileNames = electronUtils.openFileDialog();
8992

90-
if (Ember.isEmpty(fileNames) === false) {
93+
if (isEmpty(fileNames) === false) {
9194
this.send('openFile', fileNames[0]);
9295
} else {
9396
console.log('Not file choosen.');

app/routes/capture.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import { isEmpty, isNone } from '@ember/utils';
1818

19-
export default Ember.Route.extend({
19+
import { inject as service } from '@ember/service';
20+
import Route from '@ember/routing/route';
21+
22+
export default Route.extend({
2023
queryParams: {
2124
drilldownInfoParam: { refreshModel: true },
2225
metricTimelinesParam: { refreshModel: true },
2326
timeFrom: { refreshModel: true },
2427
timeTo: { refreshModel: true },
2528
},
2629

27-
captureTimelines: Ember.inject.service('capture-timelines'),
28-
dataSearchService: Ember.inject.service('data-search'),
29-
userTracking: Ember.inject.service('user-tracking'),
30+
captureTimelines: service('capture-timelines'),
31+
dataSearchService: service('data-search'),
32+
userTracking: service('user-tracking'),
3033

3134
model(params) {
3235
return new CaptureModel(
@@ -86,13 +89,13 @@ export default Ember.Route.extend({
8689
applyFilter(filter) {
8790
this.get('userTracking').action(this.get('userTracking').ACTIONS.INTERACTION, {
8891
name: 'apply sysdig filter',
89-
'is set': Ember.isEmpty(filter) === false,
92+
'is set': isEmpty(filter) === false,
9093
});
9194

9295
console.debug('route:application.capture', 'applyFilter', ...arguments);
9396
this.transitionTo('capture.views.view', this.controller.get('selectedViewId'), {
9497
queryParams: this.getCurrentQueryParams({
95-
filter: Ember.isEmpty(filter) ? undefined : filter,
98+
filter: isEmpty(filter) ? undefined : filter,
9699
}),
97100
});
98101
},
@@ -101,13 +104,13 @@ export default Ember.Route.extend({
101104
console.debug('route:application.capture', 'applySearch', ...arguments);
102105
this.transitionTo('capture.views.view', this.controller.get('selectedViewId'), {
103106
queryParams: this.getCurrentQueryParams({
104-
searchPattern: Ember.isEmpty(searchPattern) ? undefined : searchPattern,
107+
searchPattern: isEmpty(searchPattern) ? undefined : searchPattern,
105108
}),
106109
});
107110
},
108111

109112
selectTimeWindow(from, to) {
110-
if (Ember.isNone(from) === false && Ember.isNone(to) === false) {
113+
if (isNone(from) === false && isNone(to) === false) {
111114
this.replaceWith('capture.views.view', this.controller.get('selectedViewId'), {
112115
queryParams: this.getCurrentQueryParams({
113116
timeFrom: from,

app/routes/capture/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ You should have received a copy of the GNU General Public License
1414
along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17-
import Ember from 'ember';
17+
import { isEmpty } from '@ember/utils';
1818

19-
export default Ember.Route.extend({
20-
drilldownManager: Ember.inject.service('drilldown-manager'),
19+
import { inject as service } from '@ember/service';
20+
import Route from '@ember/routing/route';
21+
22+
export default Route.extend({
23+
drilldownManager: service('drilldown-manager'),
2124

2225
beforeModel() {
2326
const captureModel = this.modelFor('capture');
@@ -27,7 +30,7 @@ export default Ember.Route.extend({
2730
drilldownInfoParam: captureModel.queryParams.drilldownInfoParam,
2831
});
2932

30-
if (Ember.isEmpty(steps)) {
33+
if (isEmpty(steps)) {
3134
this.replaceWith('capture.views.view', 'overview', {
3235
queryParams: Object.assign({}, captureModel.queryParams),
3336
});

0 commit comments

Comments
 (0)