Remove correlation iframe (#83)

Co-authored-by: Steve Faulkner <stfaul@microsoft.com>
This commit is contained in:
Steve Faulkner 2020-07-13 09:41:41 -05:00 committed by GitHub
parent 35dcc17768
commit 15f9146ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 56 deletions

View File

@ -271,7 +271,6 @@ src/Shared/AddCollectionUtility.test.ts
src/Shared/AddCollectionUtility.ts
src/Shared/AddDatabaseUtility.test.ts
src/Shared/AddDatabaseUtility.ts
src/Shared/Ajax.ts
src/Shared/Constants.ts
src/Shared/DefaultExperienceUtility.test.ts
src/Shared/DefaultExperienceUtility.ts

View File

@ -2,22 +2,12 @@ import "../less/index.less";
import "./Libs/jquery";
import * as ko from "knockout";
import { CorrelationBackend } from "./Common/Constants";
import Ajax from "./Shared/Ajax";
class Index {
public navigationSelection: ko.Observable<string>;
public correlationSrc: ko.Observable<string>;
constructor() {
this.navigationSelection = ko.observable("quickstart");
this.correlationSrc = ko.observable("");
Ajax.get("/_explorer/installation_id.txt").then(result => {
// TODO: Detect correct URL for each environment automatically.
const url: string = `${CorrelationBackend.Url}?emulator_id=${result}`;
this.correlationSrc(url);
});
}
public quickstart_click() {

View File

@ -1,43 +0,0 @@
import Q from "q";
import $ from "jquery";
export default class Ajax {
public static head<T>(url: string): Q.Promise<any> {
return Ajax._ajax(url, "HEAD");
}
public static post<T>(url: string, data?: any): Q.Promise<any> {
return Ajax._ajax(url, "POST", data);
}
public static put<T>(url: string, data?: any): Q.Promise<any> {
return Ajax._ajax(url, "PUT", data);
}
public static get<T>(url: string, data?: any): Q.Promise<any> {
return Ajax._ajax(url, "GET", data);
}
public static Delete<T>(url: string, data?: any): Q.Promise<any> {
return Ajax._ajax(url, "DELETE", data);
}
static _ajax<T>(url: string, method: string, data?: any): Q.Promise<any> {
return Q($.ajax(url, Ajax._getNetAjaxSettings(url, method, data)));
}
static _getNetAjaxSettings<T>(url: string, method: string, data?: any): JQueryAjaxSettings<T> {
var newSettings: JQueryAjaxSettings<T> = {
url: url,
type: method,
cache: false,
contentType: "application/json",
traditional: true
};
if (!!data) {
newSettings.data = typeof data === "string" ? data : JSON.stringify(data || {});
}
return newSettings;
}
}

View File

@ -56,7 +56,5 @@
data-bind="visible: navigationSelection() === 'explorer'"
>
</iframe>
<iframe id="correlation" class="iframe" data-bind="attr: { src: correlationSrc }"> </iframe>
</body>
</html>