Revert "Merge pull request #186 from specklesystems/dogukan/cnx-2136-tag-as-markreceived-after-download-in-dataconnector" (#189)
This reverts commitffc0d8ef5e, reversing changes made toc8d858d575. Co-authored-by: bimgeek <mucahitbgoker@gmail.com>
This commit is contained in:
@@ -179,11 +179,6 @@ shared Speckle.Objects.MaterialQuantities = Value.ReplaceType(
|
||||
type function (objectRecord as record, optional outputAsList as logical) as any
|
||||
);
|
||||
|
||||
shared Speckle.MarkReceived = Value.ReplaceType(
|
||||
Speckle.LoadFunction("MarkReceived.pqm"),
|
||||
type function (server as text, projectId as text, versionId as text, sourceApplication as text) as logical
|
||||
);
|
||||
|
||||
shared Speckle.Models.Federate = Value.ReplaceType(
|
||||
Speckle.LoadFunction("Models.Federate.pqm"),
|
||||
type function (tables as list, optional excludeData as logical) as table
|
||||
@@ -191,7 +186,7 @@ shared Speckle.Models.Federate = Value.ReplaceType(
|
||||
|
||||
[DataSource.Kind = "Speckle", Publish="GetByUrl.Publish"]
|
||||
shared Speckle.GetByUrl = Value.ReplaceType(
|
||||
(url as text) => Speckle.LoadFunction("GetByUrl.pqm")(url, Speckle.MarkReceived),
|
||||
Speckle.LoadFunction("GetByUrl.pqm"),
|
||||
type function (
|
||||
url as (
|
||||
Uri.Type meta [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(url as text, MarkReceivedFunc as function) as table =>
|
||||
(url as text) as table =>
|
||||
let
|
||||
// import required functions
|
||||
GetStructuredData = Extension.LoadFunction("GetStructuredData.pqm"),
|
||||
@@ -89,18 +89,9 @@
|
||||
// get structured data
|
||||
structuredData = GetStructuredData(url),
|
||||
|
||||
// Mark the version as received
|
||||
markReceived = MarkReceivedFunc(
|
||||
parsedUrl[baseUrl],
|
||||
parsedUrl[projectId],
|
||||
modelInfo[versionId],
|
||||
"PowerBI"
|
||||
),
|
||||
|
||||
// rename column based on send status
|
||||
newColumnName = "Version Object ID",
|
||||
renamedTable = Table.RenameColumns(structuredData, {{"Version Object ID", newColumnName}}),
|
||||
|
||||
result = if markReceived then renamedTable else renamedTable
|
||||
result = Table.RenameColumns(structuredData, {{"Version Object ID", newColumnName}})
|
||||
in
|
||||
result
|
||||
else
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
(server as text, projectId as text, versionId as text, sourceApplication as text) as logical =>
|
||||
let
|
||||
ApiFetch = Extension.LoadFunction("Api.Fetch.pqm"),
|
||||
|
||||
Extension.LoadFunction = (fileName as text) =>
|
||||
let
|
||||
binary = Extension.Contents(fileName),
|
||||
asText = Text.FromBinary(binary)
|
||||
in
|
||||
try
|
||||
Expression.Evaluate(asText, #shared)
|
||||
catch (e) =>
|
||||
error
|
||||
[
|
||||
Reason = "Extension.LoadFunction Failure",
|
||||
Message.Format = "Loading '#{0}' failed - '#{1}': '#{2}'",
|
||||
Message.Parameters = {fileName, e[Reason], e[Message]},
|
||||
Detail = [File = fileName, Error = e]
|
||||
],
|
||||
|
||||
query = "
|
||||
mutation MarkReceived($input: MarkReceivedVersionInput!) {
|
||||
versionMutations {
|
||||
markReceived(input: $input)
|
||||
}
|
||||
}
|
||||
",
|
||||
|
||||
variables = [
|
||||
input = [
|
||||
versionId = versionId,
|
||||
projectId = projectId,
|
||||
sourceApplication = sourceApplication
|
||||
]
|
||||
],
|
||||
|
||||
result = ApiFetch(server, query, variables)
|
||||
in
|
||||
result[versionMutations][markReceived]
|
||||
Reference in New Issue
Block a user