# HG changeset patch # User Andrew Azores # Date 1505768071 14400 # Node ID d37a36efafa323d76a0558fb024e7b9f74615ae3 # Parent 4678908372505bfbf60168385bbb1caa3645a40a Fix bug where jvm-info subview selector does not update Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-September/024912.html diff -r 467890837250 -r d37a36efafa3 src/app/components/jvm-info/jvm-info.controller.js --- a/src/app/components/jvm-info/jvm-info.controller.js Fri Sep 15 14:57:33 2017 -0400 +++ b/src/app/components/jvm-info/jvm-info.controller.js Mon Sep 18 16:54:31 2017 -0400 @@ -49,6 +49,7 @@ } set subView (val) { + this._subView = val; if (val === '') { this._state.go('jvmInfo', { systemId: this.systemId, jvmId: this.jvmId }); } else { @@ -56,6 +57,10 @@ } } + get subView () { + return this._subView; + } + update () { this.jvmInfoService.getJvmInfo(this.systemId, this.jvmId).then( res => { diff -r 467890837250 -r d37a36efafa3 src/app/components/jvm-info/jvm-info.controller.spec.js --- a/src/app/components/jvm-info/jvm-info.controller.spec.js Fri Sep 15 14:57:33 2017 -0400 +++ b/src/app/components/jvm-info/jvm-info.controller.spec.js Mon Sep 18 16:54:31 2017 -0400 @@ -190,6 +190,7 @@ it('should go to specified jvm-info child state on non-empty selection', () => { ctrl.subView = 'fooState'; + ctrl.subView.should.equal('fooState'); state.go.should.be.calledWith(sinon.match('jvmInfo.fooState'), sinon.match.has('jvmId', 'foo-jvmId')); }); });