Fix the datatype issue and make use of apiHost if available
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Ember from 'ember'
|
||||
import config from 'ember-get-config'
|
||||
|
||||
export default Ember.Component.extend
|
||||
tagName: 'span'
|
||||
@@ -10,12 +11,12 @@ export default Ember.Component.extend
|
||||
on_show: (element, popup) ->
|
||||
return unless identifier = @get('identifier')
|
||||
session = @get('session')
|
||||
url = "#{@get('panda_prefix')}/workflow_action_definitions/#{identifier}/action_info"
|
||||
url = "#{config.apiHost}#{@get('panda_prefix')}/workflow_action_definitions/#{identifier}/action_info"
|
||||
start_time = new Date()
|
||||
request =
|
||||
url: url
|
||||
contentType: "application/json"
|
||||
dataType: "json"
|
||||
dataType: "html"
|
||||
success: (response) ->
|
||||
#debugger
|
||||
#console.log response
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Generated by CoffeeScript 1.12.5
|
||||
import Ember from 'ember';
|
||||
|
||||
import config from 'ember-get-config';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'span',
|
||||
panda_prefix: '/panda/api/v1',
|
||||
@@ -14,12 +16,12 @@ export default Ember.Component.extend({
|
||||
return;
|
||||
}
|
||||
session = this.get('session');
|
||||
url = (this.get('panda_prefix')) + "/workflow_action_definitions/" + identifier + "/action_info";
|
||||
url = "" + config.apiHost + (this.get('panda_prefix')) + "/workflow_action_definitions/" + identifier + "/action_info";
|
||||
start_time = new Date();
|
||||
request = {
|
||||
url: url,
|
||||
contentType: "application/json",
|
||||
dataType: "json",
|
||||
dataType: "html",
|
||||
success: function(response) {
|
||||
var action_info_load_time, finish_time;
|
||||
finish_time = new Date();
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
= ui-popup tagName='i' class='info circle icon' on='click' html=loading_html onShow=(action 'on_show')
|
||||
= ui-popup tagName='i' class='info circle icon' on='click' html=loading_html onShow=(action 'on_show') variation='very wide'
|
||||
= yield
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = function(environment) {
|
||||
rootURL: '/dunlop-app-namespace/app/',
|
||||
locationType: 'auto',
|
||||
//applicationName: "Panda",
|
||||
//apiHost: '',
|
||||
apiHost: '',
|
||||
//apiNamespace: 'dunlop-app-namespace/api/v1',
|
||||
//exportApplicationGlobal: true,
|
||||
EmberENV: {
|
||||
|
||||
Reference in New Issue
Block a user