Allow changing the ServiceControl API address from the Pulse UI
Closed this issue · 7 comments
Related to: #151
As a developer I have installed on my machine 3 ServiceControl instances, 1 using MSMQ, 1 using SQL Transport and the last one using RabbitMQ, I'd like to be able to temporary point the Pulse UI to a ServiceControl instance other than the one configured in the config.js
That's doable but it needs a bit of UI to achieve maybe a sketch of how you see users would create and manage a context.
In the meantime you could extract ServicePulse to three different IIS sites and adjust and bookmark them in your browser as you like.
What about changing this:
;(function (window, angular, undefined) { 'use strict';
angular.module('sc')
.constant('version', '1.4.0')
.constant('scConfig', {
service_control_url: 'http://localhost:33333/api/'
});
}(window, window.angular));
to:
;(function (window, angular, undefined) { 'use strict';
angular.module('sc')
.constant('version', '1.4.0')
.constant('scConfig', {
service_control_instances: [
{ name: 'local MSMQ', url: 'http://localhost:33333/api/' },
{ name: 'local BlaBla', url: 'http://localhost:33334/api/' },
{ name: 'production', url: 'http://some-server-somewhere:33334/api/' }
]
});
}(window, window.angular));
and then "simply" adding a dropdown in Pulse:
OK, I see, you're still willing to use the config file just not every time.
Originally I was thinking to some way to change that config from Pulse, but why bother? how many times does it happens that a new SC instance is deployed?
I suppose that multiple SC instances is more a dev issue than a production one, so changing the config.js adding instances shouldn't be a problem.
Hey @mauroservienti,
I can definately see a use case where you are doing a new environment and following a servicecontrol instance per environment. I would like to be able to remove and add service control instances that servicepulse talks to without editing a js file manually if possible.
I hear you. We’re in the process of discussing changing/tweaking the ServicePulse hosting model, and this problem could go away entirely. I’ll keep you posted.
1.20.0
supports this. Closing as done.