Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ pushd demos\createSolution
call npm install
popd

pushd demos\recreateSolution
call npm install
popd


pushd demos\deleteSolution
call npm install
popd
Expand Down Expand Up @@ -133,6 +138,10 @@ pushd demos\createSolution
call npm run build
popd

pushd demos\recreateSolution
call npm run build
popd

pushd demos\deleteSolution
call npm run build
popd
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cd demos/compareSolutions && npm install ; cd ../..
cd demos/copyItemInfo && npm install ; cd ../..
cd demos/copySolutions && npm install ; cd ../..
cd demos/createSolution && npm install ; cd ../..
cd demos/recreateSolution && npm install ; cd ../..
cd demos/deleteSolution && npm install ; cd ../..
cd demos/deploySolution && npm install ; cd ../..
cd demos/getItemInfo && npm install ; cd ../..
Expand Down Expand Up @@ -61,6 +62,7 @@ cd demos/compareSolutions && npm run build ; cd ../..
cd demos/copyItemInfo && npm run build ; cd ../..
cd demos/copySolutions && npm run build ; cd ../..
cd demos/createSolution && npm run build ; cd ../..
cd demos/recreateSolution && npm run build ; cd ../..
cd demos/deleteSolution && npm run build ; cd ../..
cd demos/deploySolution && npm run build ; cd ../..
cd demos/getItemInfo && npm run build ; cd ../..
Expand Down
18 changes: 11 additions & 7 deletions demos/createSolution/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!doctype html>
<html lang="en" dir="ltr">

<head>
<meta charset="utf-8"/>
<meta charset="utf-8" />
<title>createSolution example</title>
<!--
| Copyright 2023 Esri
Expand All @@ -18,11 +19,13 @@
| See the License for the specific language governing permissions and
| limitations under the License.
-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
.indent {
margin-left: 20px;
}

#subgroupIdsDiv {
display: none;
}
Expand All @@ -31,6 +34,7 @@
var goFcn;
</script>
</head>

<body>
<h3>Create a Solution</h3>
<p>Create a solution item from the contents of a group or from a single item and its dependencies.</p>
Expand Down Expand Up @@ -69,7 +73,7 @@ <h3>Create a Solution</h3>
<input type="text" id="srcPortal" style="width:256px" placeholder="https://www.arcgis.com">
</div>

<br/><br/>
<br /><br />

<div class="section-title">Credentials in destination organization</div>

Expand All @@ -86,8 +90,7 @@ <h3>Create a Solution</h3>
<input type="text" id="destPortal" style="width:256px" placeholder="https://www.arcgis.com">
</div>

<br/><br/>

<br /><br />
<button class="btn btn-default" onclick="goFcn()">Create Solution</button>
</div>

Expand All @@ -97,7 +100,7 @@ <h3>Create a Solution</h3>

<script>

function changeSubgroupIdsVisibility(
function changeSubgroupIdsVisibility (
changeEvent
) {
document.getElementById("subgroupIdsDiv").style.display =
Expand All @@ -106,4 +109,5 @@ <h3>Create a Solution</h3>

</script>
</body>
</html>

</html>
8 changes: 4 additions & 4 deletions demos/createSolution/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ function go () {
document.getElementById("output").innerHTML = "Creating..." + percentDone.toFixed().toString() + "%";
},
subgroupIds
).then(function (html){
reportElapsedTime(startTime);
document.getElementById("output").innerHTML = html;
},
).then(function(html) {
reportElapsedTime(startTime);
document.getElementById("output").innerHTML = html;
},
error => {
var message = error?.error || JSON.stringify(error) || "Unspecified error";
if (error.itemIds) {
Expand Down
36 changes: 21 additions & 15 deletions demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ArcGIS solutions.js Demos</title>
</head>

<body>
<h3>ArcGIS solutions.js Demos</h3>
<ol>
<li><a href="compareJSON/dist/" target="_blank">Compare two blocks of JSON, with the option to generate the second block as a sanitized version of the first block</a></li>
<li><a href="compareSolutions/dist/" target="_blank">Compare two solution items (files are only compared by name)</a></li>
<li><a href="copyItemInfo/dist/" target="_blank">Creates a copy of an item</li>
<li><a href="copySolutions/dist/" target="_blank">Copy one or more solutions between organizations</a></li>
<li><a href="createSolution/dist/" target="_blank">Create a Solution</a></li>
<li><a href="deleteSolution/dist/" target="_blank">Delete a Solution</a></li>
<li><a href="deploySolution/dist/" target="_blank">Deploy a Solution</a></li>
<li><a href="getItemInfo/dist/" target="_blank">Get information about an item</a></li>
<li><a href="implementedTypes/dist/" target="_blank">List the AGO types that are implemented or being worked on</a></li>
<li><a href="reuseDeployedItems/dist/" target="_blank">Find reusable items and their solutions</a></li>
<li><a href="verifySolution/dist/" target="_blank">Verify a solution</a></li>
</ol>
<h3>ArcGIS solutions.js Demos</h3>
<ol>
<li><a href="compareJSON/dist/" target="_blank">Compare two blocks of JSON, with the option to generate the second
block as a sanitized version of the first block</a></li>
<li><a href="compareSolutions/dist/" target="_blank">Compare two solution items (files are only compared by
name)</a></li>
<li><a href="copyItemInfo/dist/" target="_blank">Creates a copy of an item</li>
<li><a href="copySolutions/dist/" target="_blank">Copy one or more solutions between organizations</a></li>
<li><a href="createSolution/dist/" target="_blank">Create a Solution</a></li>
<li><a href="deleteSolution/dist/" target="_blank">Delete a Solution</a></li>
<li><a href="deploySolution/dist/" target="_blank">Deploy a Solution</a></li>
<li><a href="getItemInfo/dist/" target="_blank">Get information about an item</a></li>
<li><a href="implementedTypes/dist/" target="_blank">List the AGO types that are implemented or being worked on</a>
</li>
<li><a href="recreateSolution/dist/" target="_blank">Create a Solution from a deployed solution</a></li>
<li><a href="reuseDeployedItems/dist/" target="_blank">Find reusable items and their solutions</a></li>
<li><a href="verifySolution/dist/" target="_blank">Verify a solution</a></li>
</ol>
</body>
</html>

</html>
23 changes: 23 additions & 0 deletions demos/recreateSolution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## createSolution

This demo re-creates a ArcGIS Solution using an existing deployed Soution.

### Building

```
npm run build
```

to build the application into the `dist/` folder.

### License

Copyright &copy; 2023 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

> http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's [LICENSE](https://github.com/Esri/solution.js/blob/master/LICENSE) file.
95 changes: 95 additions & 0 deletions demos/recreateSolution/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!doctype html>
<html lang="en" dir="ltr">

<head>
<meta charset="utf-8" />
<title>recreate Solution example</title>
<!--
| Copyright 2023 Esri
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
.indent {
margin-left: 20px;
}

#subgroupIdsDiv {
display: none;
}
</style>
<script>
var goFcn;
</script>
</head>

<body>
<h3>Recreate a Solution</h3>
<p>Create a solution item from a previously deployed solution.</p>

<div id="container" style="display:none">
<div id="input">
<label for="itemOrGroupId">Enter Item ID from a deployed solution:</label>
<input class="form-control" type="text" id="itemOrGroupId">

<br /><br />

<div>
<label for="includeSubgroups">Embed groups in solution?&nbsp;</label>
<input type="checkbox" id="includeSubgroups" onchange="changeSubgroupIdsVisibility(this)">

<div id="subgroupIdsDiv" class="indent">
<label for="subgroupIds">IDs of embedded groups separated by commas:</label>
<input type="text" id="subgroupIds" style="width:485px">
</div>
</div>

<br /><br />

<div class="section-title">Credentials for organization</div>

<div class="labeledItem">
<label for="srcUsername">Username:&nbsp;</label>
<input type="text" id="srcUsername" placeholder="anonymous">
</div>
<div class="labeledItem">
<label for="srcPassword">Password:&nbsp;</label>
<input type="password" id="srcPassword">
</div>
<div class="labeledItem">
<label for="srcPortal">Portal:&nbsp;</label>
<input type="text" id="srcPortal" style="width:256px" placeholder="https://www.arcgis.com">
</div>
<br /><br />
<button class="btn btn-default" onclick="goFcn()">Create Solution</button>
</div>

<br />
</div>
<div id="output" style="display:none">Creating...</div>

<script>

function changeSubgroupIdsVisibility (
changeEvent
) {
document.getElementById("subgroupIdsDiv").style.display =
changeEvent.checked ? "block" : "none";
}

</script>
</body>

</html>
Loading