ITEA3-Measure / Measures

Repository of Measures implementations defined in SMM (Structured Metrics Meta-model) format, an executable OMG Standard which can be integrated to Measure Platform.
4 stars 2 forks source link

EMIT Measure bug [evaluation scenario 3] #3

Open Prasoonda opened 7 years ago

Prasoonda commented 7 years ago

There seems to be something wrong with Emit Measure. I am attaching the screenshot here

image

JeromeRocheteau commented 7 years ago

Hi Prasoon,

I'm not able to reproduce the test: I can't create a new measure instance inside a project!

However, the unit tests of the EmitPowerUsage measure are OK.

Bye, Jérôme

2017-10-13 10:46 GMT+02:00 Prasoonda notifications@github.com:

There seems to be something wrong with Emit Measure. I am attaching the screenshot here

[image: image] https://user-images.githubusercontent.com/29273696/31537772-9ea540fc-b003-11e7-9127-03e2e328d8ea.png

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ITEA3-Measure/Measures/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AAX6bZh4G5kyd6UIaOQnahfh2BMd9PhNks5sryNTgaJpZM4P4KUz .

JeromeRocheteau commented 7 years ago

Erro log below:

angular.js:13920 Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: instance in vm.measureInstances track by instance.instanceName, Duplicate key: PeakTech Power Measure on Emit, Duplicate value: {"id":56,"instanceName":"PeakTech Power Measure on Emit","instanceDescription":null,"measureName":"EmitPowerUsage","measureVersion":"1.0.0","isShedule":true,"shedulingExpression":"10000","measureType":"DIRECT","manageLastMeasurement":null,"remoteAdress":null,"remoteLabel":null,"isRemote":false,"project":{"id":7,"projectName":"EMIT SandBox","projectDescription":null,"creationDate":null,"projectImage":null,"owner":{"id":5,"login":"measure","firstName":null,"lastName":null,"email":"antonin.abherve@softeam.fr","activated":true,"langKey":"en","resetKey":null,"resetDate":null}},"properties":[],"ownedReferences":[]} http://errors.angularjs.org/1.5.8/ngRepeat/dupes?p0=instance%20in%20vm.measureInstances%20track%20by%20instance.instanceName&p1=PeakTech%20Power%20Measure%20on%20Emit&p2=%7B%22id%22%3A56%2C%22instanceName%22%3A%22PeakTech%20Power%20Measure%20on%20Emit%22%2C%22instanceDescription%22%3Anull%2C%22measureName%22%3A%22EmitPowerUsage%22%2C%22measureVersion%22%3A%221.0.0%22%2C%22isShedule%22%3Atrue%2C%22shedulingExpression%22%3A%2210000%22%2C%22measureType%22%3A%22DIRECT%22%2C%22manageLastMeasurement%22%3Anull%2C%22remoteAdress%22%3Anull%2C%22remoteLabel%22%3Anull%2C%22isRemote%22%3Afalse%2C%22project%22%3A%7B%22id%22%3A7%2C%22projectName%22%3A%22EMIT%20SandBox%22%2C%22projectDescription%22%3Anull%2C%22creationDate%22%3Anull%2C%22projectImage%22%3Anull%2C%22owner%22%3A%7B%22id%22%3A5%2C%22login%22%3A%22measure%22%2C%22firstName%22%3Anull%2C%22lastName%22%3Anull%2C%22email%22%3A%22antonin.abherve%40softeam.fr%22%2C%22activated%22%3Atrue%2C%22langKey%22%3A%22en%22%2C%22resetKey%22%3Anull%2C%22resetDate%22%3Anull%7D%7D%2C%22properties%22%3A%5B%5D%2C%22ownedReferences%22%3A%5B%5D%7D at angular.js:68 at ngRepeatAction (angular.js:29821) at $watchCollectionAction (angular.js:17385) at Scope.$digest (angular.js:17524) at Scope.$apply (angular.js:17790) at done (angular.js:11831) at completeRequest (angular.js:12033) at XMLHttpRequest.requestLoaded (angular.js:11966)

JeromeRocheteau commented 7 years ago

AngularJs bug

aabherve commented 7 years ago

You have 2 measureInstance with the same name in the databses. ( There is already an issue on this subject, i have to check the unicity of measureInstance name).

You can fix the issue by removing one of this measureInstanceform the database. To do that :

JeromeRocheteau commented 7 years ago

Done it works correctly capture du 2017-10-13 11-52-18

JeromeRocheteau commented 7 years ago

The initial problem was that no access token was provided. Then EMIT rejects the request!

The MEASURE platform should check whether or not values are provided to declared parameters.

Prasoonda commented 7 years ago

Thanks Jerome, Do we have any specific values (or types) for token ?

Prasoon

De : Jérôme Rocheteau [mailto:notifications@github.com] Envoyé : Friday, October 13, 2017 11:48 AM À : ITEA3-Measure/Measures Measures@noreply.github.com Cc : DADHICH Prasoon prasoon.dadhich@softeam.fr; Author author@noreply.github.com Objet : Re: [ITEA3-Measure/Measures] EMIT Measure bug [evaluation scenario 3] (#3)

The initial problem was that no access token was provided. Then EMIT rejects the request!

The MEASURE platform should check whether or not values are provided to declared parameters.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ITEA3-Measure/Measures/issues/3#issuecomment-336405520, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ab6uYB3-QX__G51OgU2vQYD4UP2VEUIzks5srzG7gaJpZM4P4KUz.

Prasoonda commented 7 years ago

I put the same value from your screenshot 253f4097-de3e-40bf-b675-1dd70226f64b and It works.

Thanks Prasoon

De : DADHICH Prasoon Envoyé : Friday, October 13, 2017 11:51 AM À : 'ITEA3-Measure/Measures' reply@reply.github.com; ITEA3-Measure/Measures Measures@noreply.github.com Cc : Author author@noreply.github.com Objet : RE: [ITEA3-Measure/Measures] EMIT Measure bug [evaluation scenario 3] (#3)

Thanks Jerome, Do we have any specific values (or types) for token ?

Prasoon

De : Jérôme Rocheteau [mailto:notifications@github.com] Envoyé : Friday, October 13, 2017 11:48 AM À : ITEA3-Measure/Measures Measures@noreply.github.com<mailto:Measures@noreply.github.com> Cc : DADHICH Prasoon prasoon.dadhich@softeam.fr<mailto:prasoon.dadhich@softeam.fr>; Author author@noreply.github.com<mailto:author@noreply.github.com> Objet : Re: [ITEA3-Measure/Measures] EMIT Measure bug [evaluation scenario 3] (#3)

The initial problem was that no access token was provided. Then EMIT rejects the request!

The MEASURE platform should check whether or not values are provided to declared parameters.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ITEA3-Measure/Measures/issues/3#issuecomment-336405520, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ab6uYB3-QX__G51OgU2vQYD4UP2VEUIzks5srzG7gaJpZM4P4KUz.

JeromeRocheteau commented 7 years ago

Yes, in order to get your own access token, please:

  1. log in EMIT (http://emit.icam.fr) as user (username: user, password: itea3measure)
  2. go to menu sub-item Account > Tokens
  3. select an instrument: and select a feature: View > Enable
  4. copy the UUID then provided to the measure AccessToken parameter value
Prasoonda commented 7 years ago

Thanks for the quick replies. I understand now.

Prasoon

De : Jérôme Rocheteau [mailto:notifications@github.com] Envoyé : Friday, October 13, 2017 12:00 PM À : ITEA3-Measure/Measures Measures@noreply.github.com Cc : DADHICH Prasoon prasoon.dadhich@softeam.fr; Author author@noreply.github.com Objet : Re: [ITEA3-Measure/Measures] EMIT Measure bug [evaluation scenario 3] (#3)

Yes, in order to get your own access token, please:

  1. log in EMIT (http://emit.icam.fr) as user (username: user, password: itea3measure)
  2. go to menu sub-item Account > Tokens
  3. select an instrument: and select a feature: View > Enable
  4. copy the UUID then provided to the measure AccessToken parameter value

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ITEA3-Measure/Measures/issues/3#issuecomment-336408522, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ab6uYH8mI3ynnWgSkdyqRO1oxoLBLLKDks5srzScgaJpZM4P4KUz.