-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/no proxy selected #1459
Conversation
- Refactor old code to ES6 - Added apiUmbrellaIsDefined method - Refactored getApiUmbrellaUrl method
Depends on #1457 |
// Try to create user on API Umbrella | ||
try { | ||
// Add user on API Umbrella | ||
const response = apiUmbrellaWeb.adminApi.v1.apiUsers.createUser(apiUmbrellaUserObj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apiUmbrellaWeb
is no longer a global object. Instead, we now have a createApiUmbrellaWeb
factory method, which outputs an ApiUmbrellaWeb instance. Use the factory to create an ApiUmbrellaWeb instance prior to using it here.
ApiUmbrellaWebThis code shows progress. However, there are significant changes needed to the approach, in light of recent changes to our
File/folder structureThere are also a few structural comments:
|
# Conflicts: # core/client/layouts/master_layout/navbar/navbar.js # home/client/header/homeHeader.html # home/client/header/homeHeader.js
… into feature/no-proxy-selected # Conflicts: # core/client/layouts/master_layout/navbar/navbar.js # home/client/header/homeHeader.html # home/client/header/homeHeader.js
Getting this when trying to delete API: Exception in delivering result of invoking 'deleteApiBackendOnApiUmbrella': TypeError: Cannot read property 'http_status' of undefined
at http://localhost:3000/app/app.js?hash=daca40d98d454f1c963417b3a42c281cf85cdcee:2143:35
at MethodInvoker._callback (http://localhost:3000/packages/meteor.js?hash=ae8b8affa9680bf9720bd8f7fa112f13a62f71c3:1105:22)
at MethodInvoker._maybeInvokeCallback (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3557:12)
at MethodInvoker.receiveResult (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3577:10)
at Connection._livedata_result (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:4736:9)
at onMessage (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3385:12)
at http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2736:11
at Array.forEach (native)
at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?hash=27b3d669b418de8577518760446467e6ff429b1e:149:11)
at REventTarget.self.socket.onmessage (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2735:11) |
That error may have been resolved by PR #1517 |
We hard code the API Umbrella base prefix to make configuration simpler. I.e. we want our settings page only to contain the API Umbrella host/protocol, and not the Admin API path. What alternative do you propose? |
E.g. we might save the |
@brylie, yes, resolved, but getting this right after API is removed: Exception in delivering result of invoking 'getApiStatus': TypeError: Cannot read property 'code' of undefined
at http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:765:30
at MethodInvoker._callback (http://localhost:3000/packages/meteor.js?hash=ae8b8affa9680bf9720bd8f7fa112f13a62f71c3:1105:22)
at MethodInvoker._maybeInvokeCallback (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3557:12)
at MethodInvoker.receiveResult (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3577:10)
at Connection._livedata_result (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:4736:9)
at onMessage (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3385:12)
at http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2736:11
at Array.forEach (native)
at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?hash=27b3d669b418de8577518760446467e6ff429b1e:149:11)
at REventTarget.self.socket.onmessage (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2735:11)
debug.js:41 Exception in template helper: TypeError: Cannot read property '_id' of undefined
at Object.currentUserCanEditBacklog (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:31735:27)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
at Template.apiBacklog.HTML.DIV.HTML.DIV.Blaze.If.HTML.BUTTON.id (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:31688:22)
at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2677:44)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
debug.js:41 Exception from Tracker recompute function:
debug.js:41 TypeError: Cannot read property 'documentationFileId' of undefined
at .<anonymous> (documentation.js:10)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:465)
at view.js:197
at Object.Blaze._withCurrentView (view.js:538)
at viewAutorun (view.js:196)
at Tracker.Computation._compute (tracker.js:311)
at Tracker.Computation._recompute (tracker.js:330)
at Object.Tracker._runFlush (tracker.js:495)
at onGlobalMessage (setimmediate.js:102)
debug.js:41 Exception in template helper: TypeError: Cannot read property 'documentation_link' of undefined
at Object.documentationLink (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:30192:39)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
at Template.documentation.HTML.DIV.HTML.DIV.HTML.DIV.HTML.DIV.Blaze.If.HTML.DIV.class (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:30058:22)
at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2677:44)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
debug.js:41 Exception in template helper: TypeError: Cannot read property 'documentationFileId' of undefined
at Object.codegenServerExists (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:30217:38)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
at Blaze.If.HTML.BUTTON.id (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:30028:24)
at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2677:44)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
debug.js:41 Exception in template helper: TypeError: Cannot read property 'documentationFileId' of undefined
at Object.documentationExists (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:30204:14)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
at http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:30111:24
at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2677:44)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
debug.js:41 Exception in template helper: TypeError: Cannot read property '_id' of undefined
at Object.metadata (http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:34482:36)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
at http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:34321:22
at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2677:44)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
19debug.js:41 Exception in delivering result of invoking 'getApiStatus': TypeError: Cannot read property 'code' of undefined
at http://localhost:3000/app/app.js?hash=032772da68bbcc8fb8cc6456d7262c28a13eee90:765:30
at MethodInvoker._callback (http://localhost:3000/packages/meteor.js?hash=ae8b8affa9680bf9720bd8f7fa112f13a62f71c3:1105:22)
at MethodInvoker._maybeInvokeCallback (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3557:12)
at MethodInvoker.receiveResult (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3577:10)
at Connection._livedata_result (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:4736:9)
at onMessage (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:3385:12)
at http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2736:11
at Array.forEach (native)
at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?hash=27b3d669b418de8577518760446467e6ff429b1e:149:11)
at REventTarget.self.socket.onmessage (http://localhost:3000/packages/ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:2735:11) |
I wonder if we need to create a separate issue for this or to resolve it here? |
@NNN yes, create a separate issue. It is related to template helpers trying to access properties of the API that has been deleted. There is a moment where the API is deleted, but the API template is still rendered. |
Will you be merging this PR @NNN? |
@brylie I'd suggest using Proxy Base URL as a complete url for Api Umbrella - not hardcoding part if it. For example if someone creates API Umbrella instance on separate domain and routes it serve requests without |
One problem is that we would have to strip the In a nutshell:
|
Closes #1382 #1394