|
@@ -94,7 +94,7 @@ var DataCatalog = (function () {
|
|
|
* @param {boolean} [apiOptions.silenceErrors]
|
|
* @param {boolean} [apiOptions.silenceErrors]
|
|
|
*/
|
|
*/
|
|
|
var fetchAndSave = function (apiHelperFunction, attributeName, entry, apiOptions) {
|
|
var fetchAndSave = function (apiHelperFunction, attributeName, entry, apiOptions) {
|
|
|
- return ApiHelper.getInstance()[apiHelperFunction]({
|
|
|
|
|
|
|
+ return window.apiHelper[apiHelperFunction]({
|
|
|
sourceType: entry.dataCatalog.sourceType,
|
|
sourceType: entry.dataCatalog.sourceType,
|
|
|
compute: entry.compute,
|
|
compute: entry.compute,
|
|
|
path: entry.path, // Set for DataCatalogEntry
|
|
path: entry.path, // Set for DataCatalogEntry
|
|
@@ -274,7 +274,7 @@ var DataCatalog = (function () {
|
|
|
$.when.apply($, existingPromises).always(function () {
|
|
$.when.apply($, existingPromises).always(function () {
|
|
|
var loadDeferred = $.Deferred();
|
|
var loadDeferred = $.Deferred();
|
|
|
if (pathsToLoad.length) {
|
|
if (pathsToLoad.length) {
|
|
|
- cancellablePromises.push(ApiHelper.getInstance().fetchNavOptPopularity({
|
|
|
|
|
|
|
+ cancellablePromises.push(window.apiHelper.fetchNavOptPopularity({
|
|
|
silenceErrors: options.silenceErrors,
|
|
silenceErrors: options.silenceErrors,
|
|
|
paths: pathsToLoad
|
|
paths: pathsToLoad
|
|
|
}).done(function (data) {
|
|
}).done(function (data) {
|
|
@@ -935,7 +935,7 @@ var DataCatalog = (function () {
|
|
|
if (self.dataCatalog.invalidatePromise) {
|
|
if (self.dataCatalog.invalidatePromise) {
|
|
|
invalidatePromise = self.dataCatalog.invalidatePromise;
|
|
invalidatePromise = self.dataCatalog.invalidatePromise;
|
|
|
} else {
|
|
} else {
|
|
|
- invalidatePromise = ApiHelper.getInstance().invalidateSourceMetadata({
|
|
|
|
|
|
|
+ invalidatePromise = window.apiHelper.invalidateSourceMetadata({
|
|
|
sourceType: self.getSourceType(),
|
|
sourceType: self.getSourceType(),
|
|
|
compute: self.compute,
|
|
compute: self.compute,
|
|
|
invalidate: invalidate,
|
|
invalidate: invalidate,
|
|
@@ -1134,7 +1134,7 @@ var DataCatalog = (function () {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- cancellablePromises.push(ApiHelper.getInstance().searchEntities({
|
|
|
|
|
|
|
+ cancellablePromises.push(window.apiHelper.searchEntities({
|
|
|
query: query,
|
|
query: query,
|
|
|
rawQuery: true,
|
|
rawQuery: true,
|
|
|
limit: children.length,
|
|
limit: children.length,
|
|
@@ -1265,7 +1265,7 @@ var DataCatalog = (function () {
|
|
|
deferred.resolve(childEntries.filter(function (entry) { return entry.navOptPopularity }));
|
|
deferred.resolve(childEntries.filter(function (entry) { return entry.navOptPopularity }));
|
|
|
}).fail(deferred.reject));
|
|
}).fail(deferred.reject));
|
|
|
} else if (self.isDatabase() || self.isTableOrView()) {
|
|
} else if (self.isDatabase() || self.isTableOrView()) {
|
|
|
- cancellablePromises.push(ApiHelper.getInstance().fetchNavOptPopularity({
|
|
|
|
|
|
|
+ cancellablePromises.push(window.apiHelper.fetchNavOptPopularity({
|
|
|
silenceErrors: options && options.silenceErrors,
|
|
silenceErrors: options && options.silenceErrors,
|
|
|
refreshCache: options && options.refreshCache,
|
|
refreshCache: options && options.refreshCache,
|
|
|
paths: [ self.path ]
|
|
paths: [ self.path ]
|
|
@@ -1405,7 +1405,7 @@ var DataCatalog = (function () {
|
|
|
}
|
|
}
|
|
|
self.getNavigatorMeta(apiOptions).done(function (navigatorMeta) {
|
|
self.getNavigatorMeta(apiOptions).done(function (navigatorMeta) {
|
|
|
if (navigatorMeta) {
|
|
if (navigatorMeta) {
|
|
|
- ApiHelper.getInstance().updateNavigatorProperties({
|
|
|
|
|
|
|
+ window.apiHelper.updateNavigatorProperties({
|
|
|
identity: navigatorMeta.identity,
|
|
identity: navigatorMeta.identity,
|
|
|
modifiedCustomMetadata: modifiedCustomMetadata,
|
|
modifiedCustomMetadata: modifiedCustomMetadata,
|
|
|
deletedCustomMetadataKeys: deletedCustomMetadataKeys
|
|
deletedCustomMetadataKeys: deletedCustomMetadataKeys
|
|
@@ -1451,7 +1451,7 @@ var DataCatalog = (function () {
|
|
|
}
|
|
}
|
|
|
self.getNavigatorMeta(apiOptions).done(function (navigatorMeta) {
|
|
self.getNavigatorMeta(apiOptions).done(function (navigatorMeta) {
|
|
|
if (navigatorMeta) {
|
|
if (navigatorMeta) {
|
|
|
- ApiHelper.getInstance().updateNavigatorProperties({
|
|
|
|
|
|
|
+ window.apiHelper.updateNavigatorProperties({
|
|
|
identity: navigatorMeta.identity,
|
|
identity: navigatorMeta.identity,
|
|
|
properties: {
|
|
properties: {
|
|
|
description: comment
|
|
description: comment
|
|
@@ -1472,7 +1472,7 @@ var DataCatalog = (function () {
|
|
|
}
|
|
}
|
|
|
}).fail(deferred.reject);
|
|
}).fail(deferred.reject);
|
|
|
} else {
|
|
} else {
|
|
|
- ApiHelper.getInstance().updateSourceMetadata({
|
|
|
|
|
|
|
+ window.apiHelper.updateSourceMetadata({
|
|
|
sourceType: self.getSourceType(),
|
|
sourceType: self.getSourceType(),
|
|
|
path: self.path,
|
|
path: self.path,
|
|
|
properties: {
|
|
properties: {
|
|
@@ -1504,7 +1504,7 @@ var DataCatalog = (function () {
|
|
|
if (self.canHaveNavigatorMetadata()) {
|
|
if (self.canHaveNavigatorMetadata()) {
|
|
|
self.getNavigatorMeta().done(function (navMeta) {
|
|
self.getNavigatorMeta().done(function (navMeta) {
|
|
|
if (navMeta && typeof navMeta.identity !== 'undefined') {
|
|
if (navMeta && typeof navMeta.identity !== 'undefined') {
|
|
|
- ApiHelper.getInstance().addNavTags(navMeta.identity, tags).done(function (entity) {
|
|
|
|
|
|
|
+ window.apiHelper.addNavTags(navMeta.identity, tags).done(function (entity) {
|
|
|
if (entity) {
|
|
if (entity) {
|
|
|
self.navigatorMeta = entity;
|
|
self.navigatorMeta = entity;
|
|
|
self.navigatorMetaPromise = $.Deferred().resolve(self.navigatorMeta).promise();
|
|
self.navigatorMetaPromise = $.Deferred().resolve(self.navigatorMeta).promise();
|
|
@@ -1537,7 +1537,7 @@ var DataCatalog = (function () {
|
|
|
if (self.canHaveNavigatorMetadata()) {
|
|
if (self.canHaveNavigatorMetadata()) {
|
|
|
self.getNavigatorMeta().done(function (navMeta) {
|
|
self.getNavigatorMeta().done(function (navMeta) {
|
|
|
if (navMeta && typeof navMeta.identity !== 'undefined') {
|
|
if (navMeta && typeof navMeta.identity !== 'undefined') {
|
|
|
- ApiHelper.getInstance().deleteNavTags(navMeta.identity, tags).done(function (entity) {
|
|
|
|
|
|
|
+ window.apiHelper.deleteNavTags(navMeta.identity, tags).done(function (entity) {
|
|
|
if (entity) {
|
|
if (entity) {
|
|
|
self.navigatorMeta = entity;
|
|
self.navigatorMeta = entity;
|
|
|
self.navigatorMetaPromise = $.Deferred().resolve(self.navigatorMeta).promise();
|
|
self.navigatorMetaPromise = $.Deferred().resolve(self.navigatorMeta).promise();
|
|
@@ -1966,7 +1966,7 @@ var DataCatalog = (function () {
|
|
|
|
|
|
|
|
// This prevents caching of any non-standard sample queries, i.e. DISTINCT etc.
|
|
// This prevents caching of any non-standard sample queries, i.e. DISTINCT etc.
|
|
|
if (options && options.operation && options.operation !== 'default') {
|
|
if (options && options.operation && options.operation !== 'default') {
|
|
|
- return applyCancellable(ApiHelper.getInstance().fetchSample({
|
|
|
|
|
|
|
+ return applyCancellable(window.apiHelper.fetchSample({
|
|
|
sourceType: self.dataCatalog.sourceType,
|
|
sourceType: self.dataCatalog.sourceType,
|
|
|
compute: self.compute,
|
|
compute: self.compute,
|
|
|
path: self.path,
|
|
path: self.path,
|
|
@@ -2321,7 +2321,7 @@ var DataCatalog = (function () {
|
|
|
self.allNavigatorTagsPromise = deferred.promise();
|
|
self.allNavigatorTagsPromise = deferred.promise();
|
|
|
|
|
|
|
|
var reloadAllTags = function () {
|
|
var reloadAllTags = function () {
|
|
|
- ApiHelper.getInstance().fetchAllNavigatorTags({
|
|
|
|
|
|
|
+ window.apiHelper.fetchAllNavigatorTags({
|
|
|
silenceErrors: options && options.silenceErrors,
|
|
silenceErrors: options && options.silenceErrors,
|
|
|
}).done(deferred.resolve).fail(deferred.reject);
|
|
}).done(deferred.resolve).fail(deferred.reject);
|
|
|
|
|
|