@ms-atlas-module/datastudio-datafactory 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @ms-atlas-module/datastudio-datafactory might be problematic. Click here for more details.
- package/_generated/ClientResources.js +1549 -0
- package/_generated/Framework.js +97 -0
- package/_generated/Svg.js +201 -0
- package/bootstrapper/BreadcrumbsKnockoutBinding.js +25 -0
- package/bootstrapper/CSS/Callout.css +43 -0
- package/bootstrapper/CSS/Common.css +22 -0
- package/bootstrapper/CSS/FormFields.css +133 -0
- package/bootstrapper/CSS/InlineBlock.css +34 -0
- package/bootstrapper/CSS/ParameterGroups.css +77 -0
- package/bootstrapper/CSS/Pivot.css +25 -0
- package/bootstrapper/CSS/Wizard.css +197 -0
- package/bootstrapper/CalloutBinding.js +52 -0
- package/bootstrapper/CollapsibleKnockoutBinding.js +70 -0
- package/bootstrapper/CopyBinding.js +150 -0
- package/bootstrapper/FilterFlyoutKnockoutBinding.js +114 -0
- package/bootstrapper/FormFields.js +397 -0
- package/bootstrapper/InlineBlockBinding.js +69 -0
- package/bootstrapper/JQueryUIBindings.js +152 -0
- package/bootstrapper/KnockoutBindings.js +635 -0
- package/bootstrapper/LoadingBinding.js +54 -0
- package/bootstrapper/MonacoEditorKnockoutBinding.js +67 -0
- package/bootstrapper/ParameterGroupsBinding.js +289 -0
- package/bootstrapper/PivotKnockoutBinding.js +61 -0
- package/bootstrapper/StatusCalendarFlyoutKnockoutBinding.js +398 -0
- package/bootstrapper/StatusCalendarKnockoutBinding.js +107 -0
- package/bootstrapper/TelemetryKnockoutBinding.js +68 -0
- package/bootstrapper/WinJSButtonKnockoutBinding.js +72 -0
- package/bootstrapper/WinJSKnockoutBindings.js +49 -0
- package/bootstrapper/WizardBinding.js +611 -0
- package/bootstrapper/startup.js +29 -0
- package/libs/VivaGraphControl/Content/CSS/Graph.css +157 -0
- package/libs/VivaGraphControl/Content/CSS/LightTheme.css +699 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Base/Base.TriggerableLifetimeManager.js +190 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/Base.js +647 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/Image.js +113 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Base/KnockoutExtensions.js +1064 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/DockedBalloon.js +18 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Animation.js +192 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Commands/MoveNodes.js +83 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/Geometry.js +167 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphEntityViewModel.js +260 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphViewModel.js +338 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphWidget.Constants.js +178 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/GraphWidget.js +5190 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/MouseCapture.js +148 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Controls/Visualization/Graph/SvgUtils.js +164 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Detection.js +658 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Resize.js +241 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Util.Private.js +236 -0
- package/libs/VivaGraphControl/Content/Scripts/Viva.Controls/Util/Util.js +905 -0
- package/libs/WinJS/WinJs.min.js +61909 -0
- package/libs/WinJS/ui-light.css +8500 -0
- package/package.json +15 -0
- package/scripts/AppContext.js +262 -0
- package/scripts/ExposureControl.js +11 -0
- package/scripts/Framework/Model/ActivityWindowCache.js +390 -0
- package/scripts/Framework/Model/ArmDataFactoryCache.js +77 -0
- package/scripts/Framework/Model/Contracts/Activity.js +83 -0
- package/scripts/Framework/Model/Contracts/ActivityWindow.js +185 -0
- package/scripts/Framework/Model/Contracts/BaseEncodable.js +106 -0
- package/scripts/Framework/Model/Contracts/Common.js +19 -0
- package/scripts/Framework/Model/Contracts/DataArtifact.js +100 -0
- package/scripts/Framework/Model/Contracts/Diagram.js +9 -0
- package/scripts/Framework/Model/Contracts/Encodable.js +113 -0
- package/scripts/Framework/Model/Contracts/Gateway.js +98 -0
- package/scripts/Framework/Model/Contracts/LinkedService.js +200 -0
- package/scripts/Framework/Model/Contracts/Pipeline.js +197 -0
- package/scripts/Framework/Model/DataCache.js +105 -0
- package/scripts/Framework/Model/DataFactoryCache.js +24 -0
- package/scripts/Framework/Model/Filter.js +186 -0
- package/scripts/Framework/Model/Helpers/ActivityWindowHelper.js +185 -0
- package/scripts/Framework/Model/MonitoringView.js +40 -0
- package/scripts/Framework/Shared/Constants.js +27 -0
- package/scripts/Framework/Shared/DataConstants.js +61 -0
- package/scripts/Framework/Shared/Disposable.js +53 -0
- package/scripts/Framework/Shared/IconResources.js +59 -0
- package/scripts/Framework/Shared/Resources/IbizaSvgs.js +241 -0
- package/scripts/Framework/Shared/TypeDeclarations.js +4 -0
- package/scripts/Framework/Telemetry/Telemetry.js +78 -0
- package/scripts/Framework/UI/Breadcrumbs.js +84 -0
- package/scripts/Framework/UI/Command.js +231 -0
- package/scripts/Framework/UI/ContextMenu.js +80 -0
- package/scripts/Framework/UI/Loader.js +11 -0
- package/scripts/Framework/UI/Menu.js +65 -0
- package/scripts/Framework/UI/PanelMessage.js +25 -0
- package/scripts/Framework/UI/Refresh.js +70 -0
- package/scripts/Framework/UI/Spinner.js +61 -0
- package/scripts/Framework/UI/StatusCalendar.js +1070 -0
- package/scripts/Framework/UI/Toolbar.js +84 -0
- package/scripts/Framework/Util/Datetime.js +258 -0
- package/scripts/Framework/Util/Log.js +10 -0
- package/scripts/Framework/Util/ResourceIdUtil.js +56 -0
- package/scripts/Framework/Util/Security.js +73 -0
- package/scripts/Framework/Util/Util.js +332 -0
- package/scripts/Framework/Views/HoverFlyout.js +92 -0
- package/scripts/Handlers/ErrorHandler.js +176 -0
- package/scripts/Handlers/MessageHandler.js +115 -0
- package/scripts/Handlers/MonitoringViewHandler.js +199 -0
- package/scripts/Handlers/RoutingHandler.js +364 -0
- package/scripts/Handlers/WinJSHandlers.js +265 -0
- package/scripts/MonitoringViewContext.js +75 -0
- package/scripts/Services/AzureInsightsService.js +162 -0
- package/scripts/Services/AzureResourceManagerService.js +869 -0
- package/scripts/Services/BaseService.js +232 -0
- package/scripts/Services/DataFactoryService.js +204 -0
- package/scripts/Services/HDInsightArmService.js +59 -0
- package/scripts/ViewContext.js +9 -0
- package/stylesheets/main.css +1042 -0
- package/views/Edit/DateTimeFilterViewModel.js +211 -0
- package/views/Edit/FilterViewModel.js +131 -0
- package/views/Shared/ProvisioningState.js +11 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
var __extends =
|
|
2
|
+
(this && this.__extends) ||
|
|
3
|
+
function (d, b) {
|
|
4
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
5
|
+
function __() {
|
|
6
|
+
this.constructor = d;
|
|
7
|
+
}
|
|
8
|
+
d.prototype =
|
|
9
|
+
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
|
|
10
|
+
};
|
|
11
|
+
define([
|
|
12
|
+
"require",
|
|
13
|
+
"exports",
|
|
14
|
+
"../AppContext",
|
|
15
|
+
"../Framework/Model/Contracts/ActivityWindow",
|
|
16
|
+
"../Framework/Util/Log",
|
|
17
|
+
"../Framework/Model/Filter",
|
|
18
|
+
"../Framework/Model/MonitoringView",
|
|
19
|
+
"./MessageHandler",
|
|
20
|
+
"./RoutingHandler",
|
|
21
|
+
], function (
|
|
22
|
+
require,
|
|
23
|
+
exports,
|
|
24
|
+
AppContext_1,
|
|
25
|
+
ActivityWindow,
|
|
26
|
+
Log,
|
|
27
|
+
Filter,
|
|
28
|
+
View,
|
|
29
|
+
MessageHandler,
|
|
30
|
+
RoutingHandler
|
|
31
|
+
) {
|
|
32
|
+
"use strict";
|
|
33
|
+
var logger = Log.getLogger({
|
|
34
|
+
loggerName: "MonitoringViewHandler",
|
|
35
|
+
});
|
|
36
|
+
var MonitoringViewHandler = (function (_super) {
|
|
37
|
+
__extends(MonitoringViewHandler, _super);
|
|
38
|
+
function MonitoringViewHandler() {
|
|
39
|
+
var _this = this;
|
|
40
|
+
_super.call(this);
|
|
41
|
+
this.extendedProperties =
|
|
42
|
+
ActivityWindow.ServiceColumnNames.ExtendedProperties;
|
|
43
|
+
this.monitoringViews = {};
|
|
44
|
+
this._currentPipelineName = null;
|
|
45
|
+
this._handleUrlUpdate = function (parsedUrlParams) {
|
|
46
|
+
var pushNotification = false;
|
|
47
|
+
var pipelineName =
|
|
48
|
+
parsedUrlParams[RoutingHandler.urlKeywords.pipeline.value] || null;
|
|
49
|
+
if (pipelineName !== _this._currentPipelineName) {
|
|
50
|
+
pushNotification = true;
|
|
51
|
+
_this._currentPipelineName = pipelineName;
|
|
52
|
+
if (pipelineName) {
|
|
53
|
+
logger.logDebug(
|
|
54
|
+
"Updating filter because of url for pipeline: " + pipelineName
|
|
55
|
+
);
|
|
56
|
+
_this.setGlobalPipelineFilter(pipelineName);
|
|
57
|
+
} else {
|
|
58
|
+
logger.logDebug("Updating filter because of url");
|
|
59
|
+
_this.clearGlobalPipelineFilter();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
var monitoringView =
|
|
63
|
+
parsedUrlParams[RoutingHandler.urlKeywords.view.value] ||
|
|
64
|
+
MonitoringViewHandler.systemViewNames.recent;
|
|
65
|
+
if (monitoringView !== _this.getState()) {
|
|
66
|
+
_this.pushState(MonitoringViewHandler.className, monitoringView);
|
|
67
|
+
pushNotification = false;
|
|
68
|
+
}
|
|
69
|
+
if (pushNotification) {
|
|
70
|
+
_this.pushNotification();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var recentFilter = new Filter.State();
|
|
74
|
+
var failedFilter = new Filter.State();
|
|
75
|
+
failedFilter
|
|
76
|
+
.filterState()
|
|
77
|
+
.windowStates([
|
|
78
|
+
View.equalityFilterTemplate.format(
|
|
79
|
+
this.extendedProperties.WindowState,
|
|
80
|
+
ActivityWindow.States.Failed.name
|
|
81
|
+
),
|
|
82
|
+
]);
|
|
83
|
+
var inProgressFilter = new Filter.State();
|
|
84
|
+
inProgressFilter
|
|
85
|
+
.filterState()
|
|
86
|
+
.windowStates([
|
|
87
|
+
View.equalityFilterTemplate.format(
|
|
88
|
+
this.extendedProperties.WindowState,
|
|
89
|
+
ActivityWindow.States.InProgress.name
|
|
90
|
+
),
|
|
91
|
+
]);
|
|
92
|
+
var recentMonitoringView = new View.MonitoringView(
|
|
93
|
+
View.MonitoringViewType.System,
|
|
94
|
+
MonitoringViewHandler.systemViewNames.recent,
|
|
95
|
+
"Recent activity windows",
|
|
96
|
+
recentFilter,
|
|
97
|
+
new View.Sort(
|
|
98
|
+
MonitoringViewHandler.sortColumnNames.WindowStart,
|
|
99
|
+
MonitoringViewHandler.sortDescending
|
|
100
|
+
)
|
|
101
|
+
);
|
|
102
|
+
var failedMonitoringView = new View.MonitoringView(
|
|
103
|
+
View.MonitoringViewType.System,
|
|
104
|
+
MonitoringViewHandler.systemViewNames.failed,
|
|
105
|
+
"Failed activity windows",
|
|
106
|
+
failedFilter,
|
|
107
|
+
new View.Sort(
|
|
108
|
+
MonitoringViewHandler.sortColumnNames.WindowStart,
|
|
109
|
+
MonitoringViewHandler.sortDescending
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
var inProgressMonitoringView = new View.MonitoringView(
|
|
113
|
+
View.MonitoringViewType.System,
|
|
114
|
+
MonitoringViewHandler.systemViewNames.inProgress,
|
|
115
|
+
"In-progress activity windows",
|
|
116
|
+
inProgressFilter,
|
|
117
|
+
new View.Sort(
|
|
118
|
+
MonitoringViewHandler.sortColumnNames.WindowStart,
|
|
119
|
+
MonitoringViewHandler.sortDescending
|
|
120
|
+
)
|
|
121
|
+
);
|
|
122
|
+
this.monitoringViews = {};
|
|
123
|
+
this.monitoringViews[MonitoringViewHandler.systemViewNames.recent] =
|
|
124
|
+
recentMonitoringView;
|
|
125
|
+
this.monitoringViews[MonitoringViewHandler.systemViewNames.failed] =
|
|
126
|
+
failedMonitoringView;
|
|
127
|
+
this.monitoringViews[MonitoringViewHandler.systemViewNames.inProgress] =
|
|
128
|
+
inProgressMonitoringView;
|
|
129
|
+
this._routingHandler =
|
|
130
|
+
AppContext_1.AppContext.getInstance().routingHandler;
|
|
131
|
+
this._handleUrlUpdate(this._routingHandler.getState());
|
|
132
|
+
this._routingHandlerSubscription = {
|
|
133
|
+
name: MonitoringViewHandler.className,
|
|
134
|
+
callback: this._handleUrlUpdate,
|
|
135
|
+
};
|
|
136
|
+
this._routingHandler.register(this._routingHandlerSubscription);
|
|
137
|
+
}
|
|
138
|
+
MonitoringViewHandler.prototype.getSelectedView = function () {
|
|
139
|
+
return this.monitoringViews[this.getState()];
|
|
140
|
+
};
|
|
141
|
+
MonitoringViewHandler.prototype.setGlobalPipelineFilter = function (
|
|
142
|
+
pipelineName
|
|
143
|
+
) {
|
|
144
|
+
for (var monitoringViewId in this.monitoringViews) {
|
|
145
|
+
var monitoringView = this.monitoringViews[monitoringViewId];
|
|
146
|
+
if (monitoringView.type === View.MonitoringViewType.System) {
|
|
147
|
+
monitoringView.filter
|
|
148
|
+
.filterState()
|
|
149
|
+
.pipelineNames([
|
|
150
|
+
View.equalityFilterTemplate.format(
|
|
151
|
+
this.extendedProperties.PipelineName,
|
|
152
|
+
pipelineName
|
|
153
|
+
),
|
|
154
|
+
]);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
MonitoringViewHandler.prototype.clearGlobalPipelineFilter = function () {
|
|
159
|
+
for (var monitoringViewId in this.monitoringViews) {
|
|
160
|
+
var monitoringView = this.monitoringViews[monitoringViewId];
|
|
161
|
+
if (monitoringView.type === View.MonitoringViewType.System) {
|
|
162
|
+
monitoringView.filter.filterState().pipelineNames([]);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
MonitoringViewHandler.prototype.clearFilter = function () {
|
|
167
|
+
var selectedView = this.getSelectedView();
|
|
168
|
+
selectedView.filter.clear();
|
|
169
|
+
this.pushNotification();
|
|
170
|
+
};
|
|
171
|
+
MonitoringViewHandler.prototype.pushNotification = function () {
|
|
172
|
+
this.pushState(MonitoringViewHandler.className, this.getState());
|
|
173
|
+
};
|
|
174
|
+
MonitoringViewHandler.prototype.listMonitoringViews = function () {
|
|
175
|
+
var monitoringViewsArray = [];
|
|
176
|
+
for (var viewKey in this.monitoringViews) {
|
|
177
|
+
var viewValue = this.monitoringViews[viewKey];
|
|
178
|
+
monitoringViewsArray.push(viewValue);
|
|
179
|
+
}
|
|
180
|
+
return monitoringViewsArray;
|
|
181
|
+
};
|
|
182
|
+
MonitoringViewHandler.prototype.dispose = function () {
|
|
183
|
+
this._routingHandler.unregister(this._routingHandlerSubscription);
|
|
184
|
+
};
|
|
185
|
+
MonitoringViewHandler.className = "MonitoringViewHandler";
|
|
186
|
+
MonitoringViewHandler.systemViewNames = {
|
|
187
|
+
recent: "Recent",
|
|
188
|
+
failed: "Failed",
|
|
189
|
+
inProgress: "InProgress",
|
|
190
|
+
};
|
|
191
|
+
MonitoringViewHandler.sortColumnNames =
|
|
192
|
+
ActivityWindow.ServiceColumnNames.ExtendedProperties;
|
|
193
|
+
MonitoringViewHandler.sortAscending = "asc";
|
|
194
|
+
MonitoringViewHandler.sortDescending = "desc";
|
|
195
|
+
return MonitoringViewHandler;
|
|
196
|
+
})(MessageHandler.MessageHandler);
|
|
197
|
+
exports.MonitoringViewHandler = MonitoringViewHandler;
|
|
198
|
+
});
|
|
199
|
+
//# sourceMappingURL=MonitoringViewHandler.js.map
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
var __extends =
|
|
2
|
+
(this && this.__extends) ||
|
|
3
|
+
function (d, b) {
|
|
4
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
5
|
+
function __() {
|
|
6
|
+
this.constructor = d;
|
|
7
|
+
}
|
|
8
|
+
d.prototype =
|
|
9
|
+
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
|
|
10
|
+
};
|
|
11
|
+
define([
|
|
12
|
+
"require",
|
|
13
|
+
"exports",
|
|
14
|
+
"../Framework/Util/ResourceIdUtil",
|
|
15
|
+
"../Framework/Util/Log",
|
|
16
|
+
"../Framework/Util/Util",
|
|
17
|
+
"./MessageHandler",
|
|
18
|
+
], function (require, exports, ResourceIdUtil, Log, Util, MessageHandler) {
|
|
19
|
+
"use strict";
|
|
20
|
+
var logger = Log.getLogger({
|
|
21
|
+
loggerName: "RoutingHandler",
|
|
22
|
+
});
|
|
23
|
+
exports.urlKeywords = {
|
|
24
|
+
moduleName: {
|
|
25
|
+
order: 0,
|
|
26
|
+
label: "moduleName",
|
|
27
|
+
value: "modulename",
|
|
28
|
+
},
|
|
29
|
+
moduleView: {
|
|
30
|
+
order: 1,
|
|
31
|
+
label: "moduleView",
|
|
32
|
+
value: "moduleview",
|
|
33
|
+
},
|
|
34
|
+
subscription: {
|
|
35
|
+
order: 2,
|
|
36
|
+
label: "subscription",
|
|
37
|
+
value: "subscription",
|
|
38
|
+
},
|
|
39
|
+
resourceGroup: {
|
|
40
|
+
order: 3,
|
|
41
|
+
label: "resourceGroup",
|
|
42
|
+
value: "resourcegroup",
|
|
43
|
+
},
|
|
44
|
+
dataFactory: {
|
|
45
|
+
order: 4,
|
|
46
|
+
label: "dataFactory",
|
|
47
|
+
value: "datafactory",
|
|
48
|
+
},
|
|
49
|
+
linkedService: {
|
|
50
|
+
order: 5,
|
|
51
|
+
label: "linkedService",
|
|
52
|
+
value: "linkedservice",
|
|
53
|
+
},
|
|
54
|
+
dataset: {
|
|
55
|
+
order: 6,
|
|
56
|
+
label: "dataset",
|
|
57
|
+
value: "dataset",
|
|
58
|
+
},
|
|
59
|
+
pipeline: {
|
|
60
|
+
order: 7,
|
|
61
|
+
label: "pipeline",
|
|
62
|
+
value: "pipeline",
|
|
63
|
+
},
|
|
64
|
+
view: {
|
|
65
|
+
order: 8,
|
|
66
|
+
label: "view",
|
|
67
|
+
value: "view",
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
exports.moduleName = "datafactory";
|
|
71
|
+
var RoutingHandler = (function (_super) {
|
|
72
|
+
__extends(RoutingHandler, _super);
|
|
73
|
+
function RoutingHandler(appContext) {
|
|
74
|
+
var _this = this;
|
|
75
|
+
_super.call(this);
|
|
76
|
+
this._urlKeywordOrdering = [];
|
|
77
|
+
this._publisherName = null;
|
|
78
|
+
this._refreshId = 0;
|
|
79
|
+
this._onRouteChange = function (route) {
|
|
80
|
+
logger.logDebug("Route changed to: " + route.url);
|
|
81
|
+
var currentRefreshId = ++_this._refreshId;
|
|
82
|
+
var isExternal = false;
|
|
83
|
+
if (!_this._publisherName) {
|
|
84
|
+
isExternal = true;
|
|
85
|
+
_this.state = _this._parseRoute(
|
|
86
|
+
Microsoft.DataStudio.Application.ShellContext.CurrentRoute()
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
var publisherName = _this._publisherName || "DataStudio";
|
|
90
|
+
_this._publisherName = null;
|
|
91
|
+
if (
|
|
92
|
+
_this.state[exports.urlKeywords.subscription.value] &&
|
|
93
|
+
_this.state[exports.urlKeywords.resourceGroup.value] &&
|
|
94
|
+
_this.state[exports.urlKeywords.dataFactory.value]
|
|
95
|
+
) {
|
|
96
|
+
_this._appContext.factoryId(
|
|
97
|
+
ResourceIdUtil.createDataFactoryIdString(
|
|
98
|
+
_this.state[exports.urlKeywords.subscription.value],
|
|
99
|
+
_this.state[exports.urlKeywords.resourceGroup.value],
|
|
100
|
+
_this.state[exports.urlKeywords.dataFactory.value]
|
|
101
|
+
)
|
|
102
|
+
);
|
|
103
|
+
} else {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
var pipelineName = _this.state[exports.urlKeywords.pipeline.value];
|
|
107
|
+
if (isExternal && pipelineName) {
|
|
108
|
+
var pipelineEntityView =
|
|
109
|
+
_this._appContext.armDataFactoryCache.pipelineCacheObject.createView();
|
|
110
|
+
var splitFactoryId_1 = _this._appContext.splitFactoryId();
|
|
111
|
+
pipelineEntityView
|
|
112
|
+
.fetch({
|
|
113
|
+
subscriptionId: splitFactoryId_1.subscriptionId,
|
|
114
|
+
resourceGroupName: splitFactoryId_1.resourceGroupName,
|
|
115
|
+
factoryName: splitFactoryId_1.dataFactoryName,
|
|
116
|
+
pipelineName: pipelineName,
|
|
117
|
+
})
|
|
118
|
+
.then(
|
|
119
|
+
function (pipeline) {
|
|
120
|
+
if (_this._refreshId === currentRefreshId) {
|
|
121
|
+
_this.state[exports.urlKeywords.pipeline.value] =
|
|
122
|
+
pipeline.name();
|
|
123
|
+
_this.notifySubscribers(
|
|
124
|
+
publisherName,
|
|
125
|
+
Object.keys(_this.subscribers)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
function (reason) {
|
|
130
|
+
if (_this._refreshId === currentRefreshId) {
|
|
131
|
+
if (reason.status === 404) {
|
|
132
|
+
_this._appContext.dialogHandler.addRequest({
|
|
133
|
+
title: ClientResources.pipelineNotFound,
|
|
134
|
+
innerHTML: reason.responseJSON.message,
|
|
135
|
+
primaryCommandText: ClientResources.ok,
|
|
136
|
+
dismissalHandler: function () {
|
|
137
|
+
return;
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
_this.state[exports.urlKeywords.pipeline.value] = null;
|
|
141
|
+
Microsoft.DataStudio.Application.Router.navigate(
|
|
142
|
+
_this._buildUrl(_this.state)
|
|
143
|
+
);
|
|
144
|
+
_this.notifySubscribers(
|
|
145
|
+
publisherName,
|
|
146
|
+
Object.keys(_this.subscribers)
|
|
147
|
+
);
|
|
148
|
+
} else {
|
|
149
|
+
var errorMessage = null;
|
|
150
|
+
if (reason.responseJSON && reason.responseJSON.message) {
|
|
151
|
+
errorMessage = reason.responseJSON.message;
|
|
152
|
+
} else {
|
|
153
|
+
errorMessage = JSON.stringify(reason);
|
|
154
|
+
}
|
|
155
|
+
_this._appContext.dialogHandler.addRequest({
|
|
156
|
+
title: ClientResources.failedToLoadPipelineView,
|
|
157
|
+
innerHTML: errorMessage,
|
|
158
|
+
primaryCommandText: ClientResources.ok,
|
|
159
|
+
dismissalHandler: function () {
|
|
160
|
+
return;
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
logger.logError(
|
|
164
|
+
"Could not get pipeline name {0} for factory {1}. Reason: {2}".format(
|
|
165
|
+
pipelineName,
|
|
166
|
+
JSON.stringify(splitFactoryId_1),
|
|
167
|
+
JSON.stringify(reason)
|
|
168
|
+
)
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
} else {
|
|
175
|
+
_this.notifySubscribers(
|
|
176
|
+
publisherName,
|
|
177
|
+
Object.keys(_this.subscribers)
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
return true;
|
|
181
|
+
};
|
|
182
|
+
this._lifetimeManager = appContext._lifetimeManager.createChildLifetime();
|
|
183
|
+
this._appContext = appContext;
|
|
184
|
+
for (var keyword in exports.urlKeywords) {
|
|
185
|
+
var value = exports.urlKeywords[keyword];
|
|
186
|
+
var lowerCaseKeyword = keyword.toLowerCase();
|
|
187
|
+
if (keyword !== lowerCaseKeyword) {
|
|
188
|
+
exports.urlKeywords[lowerCaseKeyword] = value;
|
|
189
|
+
}
|
|
190
|
+
this._urlKeywordOrdering[value.order] = lowerCaseKeyword;
|
|
191
|
+
}
|
|
192
|
+
var currentRoute = this._getCurrentRoute();
|
|
193
|
+
this._onRouteChange(currentRoute);
|
|
194
|
+
this._parseExposureControlStrings(currentRoute.query);
|
|
195
|
+
this._parseTenantExposureControlStrings(currentRoute.query);
|
|
196
|
+
this._lifetimeManager.registerForDispose(
|
|
197
|
+
Microsoft.DataStudio.Application.ShellContext.CurrentRoute.subscribe(
|
|
198
|
+
function (newRoute) {
|
|
199
|
+
try {
|
|
200
|
+
_this._onRouteChange(_this._getCurrentRoute());
|
|
201
|
+
} catch (e) {}
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
RoutingHandler.prototype.pushState = function (publisherName, newState) {
|
|
207
|
+
this.state = this._mergeState(newState);
|
|
208
|
+
var newUrl = this._buildUrl(this.state);
|
|
209
|
+
this._publisherName = publisherName;
|
|
210
|
+
Microsoft.DataStudio.Application.Router.navigate(
|
|
211
|
+
newUrl,
|
|
212
|
+
null,
|
|
213
|
+
ClientResources.factoryPropertiesTitle
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
RoutingHandler.prototype.pushStateExternal = function (newState) {
|
|
217
|
+
var mergedState = this._mergeState(newState);
|
|
218
|
+
var newUrl = window.location.href.replace(window.location.search, "");
|
|
219
|
+
newUrl += "?" + this._buildUrl(mergedState);
|
|
220
|
+
window.open(newUrl, "_blank");
|
|
221
|
+
};
|
|
222
|
+
RoutingHandler.prototype.dispose = function () {
|
|
223
|
+
this._lifetimeManager.dispose();
|
|
224
|
+
};
|
|
225
|
+
RoutingHandler.prototype._getCurrentRoute = function () {
|
|
226
|
+
var currentRoute = Microsoft.DataStudio.Application.Router.currentRoute();
|
|
227
|
+
if (currentRoute.module && currentRoute.arguments) {
|
|
228
|
+
return currentRoute;
|
|
229
|
+
}
|
|
230
|
+
currentRoute.module = RoutingHandler.moduleName;
|
|
231
|
+
var extensionArgs = currentRoute.extensionArgs;
|
|
232
|
+
var argsIndex = extensionArgs.indexOf("/");
|
|
233
|
+
currentRoute.view = extensionArgs.substring(0, argsIndex);
|
|
234
|
+
var queryIndex = extensionArgs.indexOf("?");
|
|
235
|
+
if (queryIndex >= 0) {
|
|
236
|
+
currentRoute.arguments = extensionArgs.substring(
|
|
237
|
+
argsIndex + 1,
|
|
238
|
+
queryIndex
|
|
239
|
+
);
|
|
240
|
+
currentRoute.query = extensionArgs.substring(queryIndex);
|
|
241
|
+
} else {
|
|
242
|
+
currentRoute.arguments = extensionArgs.substring(argsIndex + 1);
|
|
243
|
+
currentRoute.query = "";
|
|
244
|
+
}
|
|
245
|
+
currentRoute.url = [
|
|
246
|
+
currentRoute.module,
|
|
247
|
+
currentRoute.view,
|
|
248
|
+
currentRoute.arguments,
|
|
249
|
+
].join("/");
|
|
250
|
+
return currentRoute;
|
|
251
|
+
};
|
|
252
|
+
RoutingHandler.prototype._mergeState = function (newState) {
|
|
253
|
+
var mergedState = Object.create(null);
|
|
254
|
+
jQuery.extend(mergedState, this.state, newState);
|
|
255
|
+
return mergedState;
|
|
256
|
+
};
|
|
257
|
+
RoutingHandler.prototype._parseRoute = function (route) {
|
|
258
|
+
var parsedUrl = Object.create(null);
|
|
259
|
+
parsedUrl[exports.urlKeywords.moduleName.value] = route.module;
|
|
260
|
+
parsedUrl[exports.urlKeywords.moduleView.value] = route.view;
|
|
261
|
+
var args = route.arguments.split("/").filter(function (value) {
|
|
262
|
+
return !!value;
|
|
263
|
+
});
|
|
264
|
+
var length = args.length;
|
|
265
|
+
for (var i = 0; i < length; i += 2) {
|
|
266
|
+
if (i + 1 < length) {
|
|
267
|
+
parsedUrl[args[i].toLowerCase()] = args[i + 1];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return parsedUrl;
|
|
271
|
+
};
|
|
272
|
+
RoutingHandler.prototype._buildUrl = function (localCaseParsedUrl) {
|
|
273
|
+
var urlString = "";
|
|
274
|
+
this._urlKeywordOrdering.forEach(function (urlKeyword) {
|
|
275
|
+
var value = localCaseParsedUrl[urlKeyword];
|
|
276
|
+
if (value) {
|
|
277
|
+
if (
|
|
278
|
+
urlKeyword === exports.urlKeywords.moduleName.value ||
|
|
279
|
+
urlKeyword === exports.urlKeywords.moduleView.value
|
|
280
|
+
) {
|
|
281
|
+
urlString += value + "/";
|
|
282
|
+
} else {
|
|
283
|
+
urlString +=
|
|
284
|
+
exports.urlKeywords[urlKeyword].value + "/" + value + "/";
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
if (Microsoft.DataStudio.Application.Router.currentRoute().query) {
|
|
289
|
+
urlString +=
|
|
290
|
+
Microsoft.DataStudio.Application.Router.currentRoute().query;
|
|
291
|
+
}
|
|
292
|
+
return urlString;
|
|
293
|
+
};
|
|
294
|
+
RoutingHandler.prototype._parseExposureControlStrings = function (query) {
|
|
295
|
+
if (!query) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
query = query.substring(1);
|
|
299
|
+
query.split("&").forEach(function (queryOption) {
|
|
300
|
+
var _a = queryOption.split("="),
|
|
301
|
+
key = _a[0],
|
|
302
|
+
value = _a[1];
|
|
303
|
+
var namespace = key.split(".");
|
|
304
|
+
if (namespace[0] === "EC") {
|
|
305
|
+
var ecObject = EC,
|
|
306
|
+
length_1 = namespace.length;
|
|
307
|
+
for (var i = 1; i < length_1; i++) {
|
|
308
|
+
var newObject = ecObject[namespace[i]];
|
|
309
|
+
if (Util.propertyHasValue(newObject)) {
|
|
310
|
+
if (newObject instanceof Object) {
|
|
311
|
+
ecObject = newObject;
|
|
312
|
+
} else if (i === length_1 - 1) {
|
|
313
|
+
var ecValue = null;
|
|
314
|
+
switch (value) {
|
|
315
|
+
case "true":
|
|
316
|
+
ecValue = true;
|
|
317
|
+
break;
|
|
318
|
+
case "false":
|
|
319
|
+
ecValue = false;
|
|
320
|
+
break;
|
|
321
|
+
default:
|
|
322
|
+
var int = parseInt(value, 0);
|
|
323
|
+
if (isNaN(int)) {
|
|
324
|
+
ecValue = value;
|
|
325
|
+
} else {
|
|
326
|
+
ecValue = int;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
ecObject[namespace[i]] = ecValue;
|
|
330
|
+
}
|
|
331
|
+
} else {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
if (EC.ADF.authoringDeveloperMode) {
|
|
338
|
+
EC.ADF.authoringPreview = true;
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
RoutingHandler.prototype._parseTenantExposureControlStrings = function (
|
|
342
|
+
query
|
|
343
|
+
) {
|
|
344
|
+
if (!query) {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
var tenantId;
|
|
348
|
+
var match = query.match(/[\?&]tenantId=([^\?&\s]*)/);
|
|
349
|
+
if (match && match[1]) {
|
|
350
|
+
tenantId = match[1].toLowerCase();
|
|
351
|
+
}
|
|
352
|
+
if (
|
|
353
|
+
tenantId === "72f988bf-86f1-41af-91ab-2d7cd011db47" ||
|
|
354
|
+
tenantId === "33e01921-4d64-4f8c-a055-5bdaffd5e33d"
|
|
355
|
+
) {
|
|
356
|
+
EC.ADF.authoringPreview = true;
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
RoutingHandler.moduleName = "datafactory";
|
|
360
|
+
return RoutingHandler;
|
|
361
|
+
})(MessageHandler.MessageHandler);
|
|
362
|
+
exports.RoutingHandler = RoutingHandler;
|
|
363
|
+
});
|
|
364
|
+
//# sourceMappingURL=RoutingHandler.js.map
|