Skip to content

Commit 73b1fff

Browse files
committed
Initial commit
0 parents  commit 73b1fff

File tree

133 files changed

+6835
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+6835
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
# General settings for whole project
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
# Format specific overrides
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.{css,js,json,yml}]
17+
indent_style = space
18+
indent_size = 2

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*.user
2+
*.suo
3+
*.log
4+
*.swp
5+
*.exe
6+
*.bak
7+
*.orig
8+
*.zip
9+
10+
.vs/
11+
.idea/
12+
13+
/build/
14+
/packages/
15+
/artifacts/
16+
bower_components/
17+
node_modules/
18+
19+
[Bb]in/
20+
[Oo]bj/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Rasmus John Pedersen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Our.Umbraco.GraphQL.sln

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2018
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{D56E0413-4D79-45DF-BECA-09D6732637F5}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Website", "samples\Website\Website.csproj", "{C2001952-0774-4BFA-AF30-043B3B16D275}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE019E17-BF39-443C-8D62-74940D3B6560}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.GraphQL", "src\Our.Umbraco.GraphQL\Our.Umbraco.GraphQL.csproj", "{59294783-3A17-479B-90C5-A3A2967176DE}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{C2001952-0774-4BFA-AF30-043B3B16D275}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{C2001952-0774-4BFA-AF30-043B3B16D275}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{C2001952-0774-4BFA-AF30-043B3B16D275}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{C2001952-0774-4BFA-AF30-043B3B16D275}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{59294783-3A17-479B-90C5-A3A2967176DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{59294783-3A17-479B-90C5-A3A2967176DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{59294783-3A17-479B-90C5-A3A2967176DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{59294783-3A17-479B-90C5-A3A2967176DE}.Release|Any CPU.Build.0 = Release|Any CPU
28+
EndGlobalSection
29+
GlobalSection(SolutionProperties) = preSolution
30+
HideSolutionNode = FALSE
31+
EndGlobalSection
32+
GlobalSection(NestedProjects) = preSolution
33+
{C2001952-0774-4BFA-AF30-043B3B16D275} = {D56E0413-4D79-45DF-BECA-09D6732637F5}
34+
{59294783-3A17-479B-90C5-A3A2967176DE} = {BE019E17-BF39-443C-8D62-74940D3B6560}
35+
EndGlobalSection
36+
GlobalSection(ExtensibilityGlobals) = postSolution
37+
SolutionGuid = {E20ED350-4522-4159-8FDC-A80A46E7DD7F}
38+
EndGlobalSection
39+
EndGlobal

samples/Website/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/App_Data/
2+
/Media/**
3+
!/Media/web.config
4+
/umbraco/
5+
/umbraco_client/
6+
Web.config
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<browsers>
2+
3+
<browser refID="Default">
4+
<controlAdapters>
5+
<adapter controlType="System.Web.UI.HtmlControls.HtmlForm"
6+
adapterType="umbraco.presentation.urlRewriter.FormRewriterControlAdapter" />
7+
</controlAdapters>
8+
</browser>
9+
10+
</browsers>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<browsers>
2+
<!--
3+
Browser capability file for the w3c validator
4+
5+
sample UA: "W3C_Validator/1.305.2.148 libwww-perl/5.803"
6+
-->
7+
<browser id="w3cValidator" parentID="default">
8+
<identification>
9+
<userAgent match="^W3C_Validator" />
10+
</identification>
11+
12+
<capture>
13+
<userAgent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*" />
14+
</capture>
15+
16+
<capabilities>
17+
<capability name="browser" value="w3cValidator" />
18+
<capability name="majorversion" value="${major}" />
19+
<capability name="minorversion" value="${minor}" />
20+
<capability name="version" value="${version}" />
21+
<capability name="w3cdomversion" value="1.0" />
22+
<capability name="xml" value="true" />
23+
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
24+
</capabilities>
25+
</browser>
26+
</browsers>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
function modelsBuilderController($scope, umbRequestHelper, $log, $http, modelsBuilderResource) {
2+
3+
$scope.generate = function() {
4+
$scope.generating = true;
5+
umbRequestHelper.resourcePromise(
6+
$http.post(umbRequestHelper.getApiUrl("modelsBuilderBaseUrl", "BuildModels")),
7+
'Failed to generate.')
8+
.then(function (result) {
9+
$scope.generating = false;
10+
$scope.dashboard = result;
11+
});
12+
};
13+
14+
$scope.reload = function () {
15+
$scope.ready = false;
16+
modelsBuilderResource.getDashboard().then(function (result) {
17+
$scope.dashboard = result;
18+
$scope.ready = true;
19+
});
20+
};
21+
22+
function init() {
23+
modelsBuilderResource.getDashboard().then(function(result) {
24+
$scope.dashboard = result;
25+
$scope.ready = true;
26+
});
27+
}
28+
29+
init();
30+
}
31+
angular.module("umbraco").controller("Umbraco.Dashboard.ModelsBuilderController", modelsBuilderController);
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<div id="modelsBuilder" ng-controller="Umbraco.Dashboard.ModelsBuilderController">
2+
3+
<div ng-show="ready" style="float: right;">
4+
<button type="button" class="btn" ng-click="reload()"><span>Reload</span></button>
5+
</div>
6+
7+
<h3>Models Builder</h3>
8+
9+
<div ng-show="!ready">
10+
Loading...
11+
</div>
12+
13+
<div ng-show="ready">
14+
<div ng-bind-html-unsafe="dashboard.text"></div>
15+
16+
<div ng-if="dashboard.outOfDateModels">
17+
<p>Models are <strong>out-of-date</strong>.
18+
</p>
19+
</div>
20+
21+
<div ng-if="dashboard.canGenerate">
22+
<div ng-if="dashboard.generateCausesRestart">
23+
<p style="color: red; font-weight: bold;">Generating models will restart the application.</p>
24+
</div>
25+
<div ng-show="!generating">
26+
<button type="button" ng-click="generate()" class="btn btn-danger">
27+
<span>Generate models</span>
28+
</button>
29+
</div>
30+
<div class="umb-loader-wrapper" ng-show="generating">
31+
<div class="umb-loader"></div>
32+
</div>
33+
</div>
34+
35+
<div ng-if="dashboard.lastError" style="margin-top: 32px;" ng-show="!generating">
36+
<span style="color: red; font-weight: bold;">Last generation failed with the following error:</span>
37+
<pre style="width: 80%; white-space: pre-line; background: #f8f8f8; padding: 4px; font-size: small;">{{dashboard.lastError}}</pre>
38+
</div>
39+
</div>
40+
41+
</div>

0 commit comments

Comments
 (0)