Skip to content

Commit

Permalink
Optim Execution screen : filter in server-side & trim exception + con…
Browse files Browse the repository at this point in the history
…tent
  • Loading branch information
dktsni authored Mar 29, 2019
1 parent 905fb01 commit d1dbc13
Show file tree
Hide file tree
Showing 56 changed files with 2,462 additions and 172 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ For instance, on Windows, you can use http://getgreenshot.org/ for screenshots
and https://www.screentogif.com/ for animated-GIFs.
////

== 3.0.1

=== Technical Changes

* *[FIX]* Fix a performance issue which prevents executions to display, and browser's tab
to freeze, when the execution have several errors with detailled exceptions.

== 3.0.0

First version of ARA with a release of the source code.
Expand All @@ -31,8 +38,6 @@ First version of ARA with a release of the source code.
* *[BREAKING CHANGE]* Change the way the final Executable is builded.
* *[FEATURE]* Add the integration to Decathlon's internal CI.

=== User-Visible Changes

== 2.4.3

=== Technical Changes
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.decathlon.ara</groupId>
<artifactId>ara-parent</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</parent>
<artifactId>ara-client</artifactId>
<packaging>jar</packaging>
Expand Down
20 changes: 20 additions & 0 deletions client/src/components/error-popups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
</template>

<script>
import Vue from 'vue'
import scenarioHistoryComponent from '../components/scenario-history'
import util from '../libs/util'
import scenarioUtil from '../libs/scenario-util'
import api from '../libs/api'
export default {
name: 'error-popups',
Expand Down Expand Up @@ -111,13 +113,31 @@
showException (executedScenario, error) {
this.executedScenario = executedScenario
this.error = error
util.ifFeatureEnabled('execution-shortener', function () {
Vue.http
.get(api.paths.errors(this) + '/' + error.id, api.REQUEST_OPTIONS)
.then((response) => {
this.error = response.body
}, (err) => {
api.handleError(err)
})
}.bind(this), function () {})
this.exceptionIsVisible = true
this.currentPopup = 'exception'
},
showScenario (executedScenario, error) {
this.executedScenario = executedScenario
this.error = error
util.ifFeatureEnabled('execution-shortener', function () {
Vue.http
.get(api.paths.executedScenarios(this) + '/' + executedScenario.id, api.REQUEST_OPTIONS)
.then((response) => {
this.executedScenario = response.body
}, (err) => {
api.handleError(err)
})
}.bind(this), function () {})
this.scenarioIsVisible = true
this.currentPopup = 'scenario'
},
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/if-feature-enabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
created () {
Vue.http
.get(api.paths.features() + this.$props.code + '/state', api.REQUEST_OPTIONS)
.get(api.paths.features() + '/' + this.$props.code + '/state', api.REQUEST_OPTIONS)
.then((response) => {
this.active = response.body.enabled
}, (error) => {
Expand All @@ -29,4 +29,3 @@
}
}
</script>

2 changes: 1 addition & 1 deletion client/src/libs/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ api.paths = {
sources: (viewOrProjectCode) => projectPath(viewOrProjectCode) + '/sources',
teams: (viewOrProjectCode) => projectPath(viewOrProjectCode) + '/teams',
types: (viewOrProjectCode) => projectPath(viewOrProjectCode) + '/types',
features: () => API_PATH + '/features/'
features: () => API_PATH + '/features'
}

api.handleError = function (response, callBack) {
Expand Down
16 changes: 16 additions & 0 deletions client/src/libs/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import moment from 'moment'

import Vue from 'vue'
import api from './api'
import store from '../store'

let util = {}
Expand Down Expand Up @@ -99,4 +101,18 @@ util.prettyHoursMinutesFromMillisecondsDuration = function (milliseconds) {
(minutes || !hours ? minutes + (minutes === 1 ? ' minute' : ' minutes') : '')
}

util.ifFeatureEnabled = function (featureCode, callbackIfEnabled, callbackIfDisabled) {
Vue.http
.get(api.paths.features() + '/' + featureCode, api.REQUEST_OPTIONS)
.then((response) => {
if (response.body.enabled) {
callbackIfEnabled()
} else {
callbackIfDisabled()
}
}, (error) => {
api.handleError(error, callbackIfDisabled)
})
}

export default util
Loading

0 comments on commit d1dbc13

Please sign in to comment.