Replace backoffice usercontrols

This commit is contained in:
Sebastiaan Janssen
2016-09-18 15:59:44 +02:00
parent 205daf1d15
commit b3386c1048
7 changed files with 71 additions and 18 deletions
@@ -0,0 +1,25 @@
angular.module("umbraco").controller("ourManagementController", function ($scope, $http, notificationsService) {
$scope.downloadDocumentation = function () {
notificationsService.success("Downloading and indexing documentation, hold on");
var downloadUrl = "/html/githubpulltrigger";
$http.get(downloadUrl)
.success(function () {
notificationsService.success("Documentation all downloaded and indexed!");
})
.error(function () {
notificationsService.error("Problem with the documentation download/indexing");
});
};
$scope.downloadYoutrackData = function () {
notificationsService.success("Downloading YouTrack data, hold on");
var youtrackUrl = "backoffice/API/YouTrackApi/GetData";
$http.get(youtrackUrl)
.success(function () {
notificationsService.success("YouTrack data all downloaded!");
})
.error(function () {
notificationsService.error("Problem with the YouTrack data downloading");
});
};
});
@@ -0,0 +1,11 @@
<div class="ourManagementDashboard" ng-controller="ourManagementController">
<h3>Documentation</h3>
<button ng-click="downloadDocumentation()">
Download documentation
</button>
<h3>YouTrack</h3>
<button ng-click="downloadYoutrackData()">
Download YouTrack data
</button>
</div>
@@ -0,0 +1,6 @@
{
"$schema": "/App_Plugins/manifestSchema.json",
"javascript": [
"/App_Plugins/OurManagement/ourmanagement.controller.js"
]
}
+3
View File
@@ -352,6 +352,8 @@
<Content Include="App_Plugins\ModelsBuilder\modelsbuilder.controller.js" />
<Content Include="App_Plugins\ModelsBuilder\modelsbuilder.htm" />
<Content Include="App_Plugins\ModelsBuilder\modelsbuilder.resource.js" />
<Content Include="App_Plugins\OurManagement\ourmanagement.controller.js" />
<Content Include="App_Plugins\OurManagement\ourmanagement.html" />
<Content Include="Assets\css\fonts\icomoon\icomoon.svg" />
<Content Include="Assets\css\style.min.css" />
<Content Include="Assets\images\app-icons\acme-tile-large.png" />
@@ -672,6 +674,7 @@
<Content Include="config\EmbeddedMedia.config" />
<Content Include="config\BaseRestExtensions.config" />
<Content Include="masterpages\__Search.master" />
<None Include="App_Plugins\OurManagement\package.manifest" />
<None Include="Properties\PublishProfiles\Local.pubxml" />
<None Include="scripts\jquery-1.4.1-vsdoc.js" />
<Content Include="scripts\jquery-1.4.1.js" />
+7 -18
View File
@@ -30,7 +30,12 @@
<control showOnce="true" addPanel="true" panelCaption="">
views/dashboard/developer/developerdashboardvideos.html
</control>
</tab>
</tab>
<tab caption="Our Management">
<control>
/App_Plugins/OurManagement/ourmanagement.html
</control>
</tab>
<tab caption="Examine Management">
<control>
views/dashboard/developer/examinemanagement.html
@@ -82,27 +87,11 @@
</control>
</tab>
</section>
<section alias="DocumentationDashboard">
<areas>
<area>developer</area>
</areas>
<tab caption="GitHub Documentation">
<control showOnce="false" addPanel="true" panelCaption="">
~/usercontrols/dashboard/ForceDocumentationDownload.ascx
</control>
</tab>
</section>
<section alias="ReleasesDashboard">
<areas>
<area>developer</area>
</areas>
<tab caption="YouTrack Releases">
<control showOnce="false" addPanel="true" panelCaption="">
~/usercontrols/dashboard/ForceYouTrackDownload.ascx
</control>
</tab>
</section>
<section alias="UmbracoHealthCheck">
<areas>
@@ -0,0 +1,18 @@
using System.Net;
using System.Net.Http;
using OurUmbraco.Release;
using Umbraco.Web.WebApi;
namespace OurUmbraco.Our.Api
{
public class YouTrackApiController : UmbracoAuthorizedApiController
{
[System.Web.Http.HttpGet]
public HttpResponseMessage GetData()
{
var import = new Import();
var result = import.SaveAllToFile();
return new HttpResponseMessage(HttpStatusCode.OK);
}
}
}
+1
View File
@@ -408,6 +408,7 @@
<Compile Include="NotificationsWeb\Singleton.cs" />
<Compile Include="Our\Api\CommunityController.cs" />
<Compile Include="Our\Api\SearchController.cs" />
<Compile Include="Our\Api\YouTrackApiController.cs" />
<Compile Include="Our\Businesslogic\ProjectContributor.cs" />
<Compile Include="Our\Controllers\AvatarController.cs" />
<Compile Include="Our\Models\EditScreenshotModel.cs" />