Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from jgarverick/develop
Browse files Browse the repository at this point in the history
Merging release 2.4.0 into master
  • Loading branch information
jgarverick committed Apr 20, 2016
2 parents 428fa3d + 833982c commit 4715856
Show file tree
Hide file tree
Showing 16 changed files with 273 additions and 30 deletions.
112 changes: 112 additions & 0 deletions DashboardWidgetItem/DashboardWidgetItem.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>14.0</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{DFEF12F9-B214-407B-9C83-1C9E9D274714}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DashboardWidgetItem</RootNamespace>
<AssemblyName>DashboardWidgetItem</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
<CreateVsixContainer>false</CreateVsixContainer>
<DeployExtension>false</DeployExtension>
<DeployVSTemplates>false</DeployVSTemplates>
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.CoreUtility">
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<VSTemplate Include="DashboardWidgetItem.vstemplate">
<SubType>Designer</SubType>
</VSTemplate>
</ItemGroup>
<ItemGroup>
<Content Include="icon.png" />
<Content Include="VSOE.ico" />
<Content Include="widget.html" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="readme.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
21 changes: 21 additions & 0 deletions DashboardWidgetItem/DashboardWidgetItem.vstemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>VSTS Custom Dashboard Widget</Name>
<Description>Creates a new dashboard widget for use with Visual Studio Team Services.</Description>
<Icon>VSOE.ico</Icon>
<TemplateID>f0f3c850-3590-4ea7-9d4b-f22ff49fc8ee</TemplateID>
<ProjectType>CSharp</ProjectType>
<AppliesTo>Web,JavaScript,TypeScript</AppliesTo>
<RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>DashboardWidgetItem</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
</TemplateData>
<TemplateContent>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$\$fileinputname$.html">widget.html</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$\icon.png">icon.png</ProjectItem>
</TemplateContent>
</VSTemplate>
36 changes: 36 additions & 0 deletions DashboardWidgetItem/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DashboardWidgetItem")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Josh Garverick")]
[assembly: AssemblyProduct("DashboardWidgetItem")]
[assembly: AssemblyCopyright("Copyright © Josh Garverick 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("dfef12f9-b214-407b-9c83-1c9e9d274714")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file added DashboardWidgetItem/VSOE.ico
Binary file not shown.
Binary file added DashboardWidgetItem/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions DashboardWidgetItem/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# VSTS Dashboard Widget Item Template
36 changes: 36 additions & 0 deletions DashboardWidgetItem/widget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>$fileinputname$ Widget</title>
<script src="../scripts/VSS.SDK.js"></script>
<script type="text/javascript">
VSS.init({
explicitNotifyLoaded: true,
usePlatformStyles: true
});

VSS.require(["TFS/Dashboards/WidgetHelpers"], function (WidgetHelpers) {
WidgetHelpers.IncludeWidgetStyles();
VSS.register("$fileinputname$", function () {
return {
load: function (widgetSettings) {
/*
Enter your widget code here
*/

return WidgetHelpers.WidgetStatusHelper.Success();
}
}
});
VSS.notifyLoadSucceeded();
});
</script>

</head>
<body>

</body>
</html>
2 changes: 1 addition & 1 deletion VSTSBuildTask/VSTSBuildTask.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="gruntfile.js" />
<Content Include="img\logo.PNG" />
<Content Include="img\logo.png" />
<Content Include="ExampleTask\icon.png" />
<Content Include="test\TestSpec.js" />
<Content Include="VSOE.ico" />
Expand Down
11 changes: 6 additions & 5 deletions VSTSBuildTask/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-copy": "~0.8.2",
"grunt": "^0.4.5",
"grunt-contrib-copy": "^0.8.2",
"grunt-contrib-jasmine": "^0.9.2",
"grunt-exec": "~0.4.6",
"jasmine": "~2.3.2",
"grunt-exec": "^0.4.6",
"jasmine": "^2.4.1",
"tfx-cli": "^0.3.15",
"vss-web-extension-sdk": "~1.95.2"
"tsd": "^0.6.5",
"vss-web-extension-sdk": "^1.98.0"
},
"name": "",
"private": true,
Expand Down
12 changes: 6 additions & 6 deletions VSTSExt/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-copy": "~0.8.2",
"grunt": "^0.4.5",
"grunt-contrib-copy": "^0.8.2",
"grunt-contrib-jasmine": "^0.9.2",
"grunt-exec": "~0.4.6",
"jasmine": "~2.3.2",
"grunt-exec": "^0.4.6",
"jasmine": "^2.4.1",
"tfx-cli": "^0.3.15",
"tsd": "~0.6.5",
"vss-web-extension-sdk": "~1.95.2"
"tsd": "^0.6.5",
"vss-web-extension-sdk": "^1.98.0"
},
"name": "",
"private": true,
Expand Down
42 changes: 26 additions & 16 deletions VSTSExt/scripts/VSS.SDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ var XDM;
}
return false;
};
XDMChannel.prototype.error = function (data, errorObj) {
var rpcMessage = data;
this._error(rpcMessage, errorObj, rpcMessage.handshakeToken);
};
XDMChannel.prototype._error = function (messageObj, errorObj, handshakeToken) {
// Post back a response as an error which look like this -
// {"id": "5", "error": {"code": -32601, "message": "Method not found."}, "jsonrpc": "2.0", }
Expand Down Expand Up @@ -613,35 +617,32 @@ var XDM;
var i, len, channel;
var rpcMessage;
if (typeof event.data === "string") {
// event.data may not be a valid JSON string, in which case JSON.parse would throw.
try {
rpcMessage = JSON.parse(event.data);
}
catch (error) {
if (window.console) {
console.error("JSON.parse failed for string: " + event.data);
}
}
}
else {
if (window.console) {
console.error("Expected event.data to be a string");
}
}
if (rpcMessage) {
var handled = false, channelOwnerFound = false;
var handled = false;
var channelOwner;
for (i = 0, len = this._channels.length; i < len; i++) {
channel = this._channels[i];
if (channel.owns(event.source, event.origin, rpcMessage)) {
// event belongs to this channel. Dispatch the message
channelOwnerFound = true;
// keep a reference to the channel owner found.
channelOwner = channel;
handled = channel.onMessage(rpcMessage, event.origin) || handled;
}
}
if (channelOwnerFound && !handled) {
if (!!channelOwner && !handled) {
if (window.console) {
console.error("No handler found on any channel for message: " + JSON.stringify(rpcMessage));
}
// for instance based proxies, send an error on the channel owning the message to resolve any control creation promises
// on the host frame.
if (rpcMessage.instanceId) {
channelOwner.error(rpcMessage, "The registered object " + rpcMessage.instanceId + " could not be found.");
}
}
}
};
Expand Down Expand Up @@ -739,7 +740,7 @@ var VSS;
*
* Usage:
*
* VSS.require(["VSS/Controls", "VSS/Controls/Grids", function(Controls, Grids) {
* VSS.require(["VSS/Controls", "VSS/Controls/Grids"], function(Controls, Grids) {
* ...
* });
*
Expand All @@ -760,7 +761,7 @@ var VSS;
}
if (loaderConfigured) {
// Loader already configured, just issue require
window.require(modulesArray, callback);
issueVssRequire(modulesArray, callback);
}
else {
if (!initOptions) {
Expand All @@ -776,11 +777,16 @@ var VSS;
}
}
ready(function () {
window.require(modulesArray, callback);
issueVssRequire(modulesArray, callback);
});
}
}
VSS.require = require;
function issueVssRequire(modules, callback) {
window.require(["VSS/Bundling"], function (VSS_Bundling) {
VSS_Bundling.requireModules(modules, callback);
});
}
/**
* Register a callback that gets called once the initial setup/handshake has completed.
* If the initial setup is already completed, the callback is invoked at the end of the current call stack.
Expand Down Expand Up @@ -1015,6 +1021,9 @@ var VSS;
// we are free to add core bundle. otherwise, load core scripts individually.
scripts = [{ source: getAbsoluteUrl(hostPageContext.coreReferences.coreScriptsBundle.url, hostRootUri) }];
}
if (hostPageContext.coreReferences.extensionCoreReferences) {
scripts.push({ source: getAbsoluteUrl(hostPageContext.coreReferences.extensionCoreReferences.url, hostRootUri) });
}
}
// Define a new config for extension loader
var newConfig = {
Expand Down Expand Up @@ -1201,3 +1210,4 @@ var VSS;
}
}
})(VSS || (VSS = {}));
//dependencies=
11 changes: 11 additions & 0 deletions VSTSExt/settings.tfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"serviceUrl": "https://your.visualstudio.com.account",
"package": {
"manifestGlobs": [ "vss-extension.json" ]
},
"publish": {
"galleryUrl": "https://marketplace.visualstudio.com/",
"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"shareWith": "youraccount"
}
}
1 change: 1 addition & 0 deletions VSTSExtensionPackage/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=============

* Version 2.4: Added dashboard widget item template
* Version 2.3.1: Fixed typo in parameter in gruntfile
* Version 2.3: Added support for parameters with gruntfile
* Version 2.2: Updating manifest for build extension to highlight specifics on task contributions; modified gruntfile to allow for task publish, extension package, and extension publish
* Version 2.1.1: Fix for invalid syntax
Expand Down
Loading

0 comments on commit 4715856

Please sign in to comment.