Skip to content
Permalink
Browse files

Fix for IE (#701)

* Fix for IE

* Update github files
  • Loading branch information...
dluc authored and spryor committed Oct 24, 2017
1 parent cbb52b4 commit 2a3a2a03ae4cb4d12dd8e7fde0c36d0f161b6619
@@ -1,58 +1,33 @@
# Type of issue
<!-- Please put an `x` (e.g. [x]) in all the boxes that apply: -->
# Type of issue <!-- [x] all the boxes that apply -->

- [ ] Bug
- [ ] New feature
- [ ] Improvement
- [ ] Enhancement

# Description <!-- Please provide a succinct description -->

# Description
<!-- Please provide a succinct description -->
...

# Steps to reproduce
<!-- Please provide the steps required to reproduce the issue -->
# Steps to reproduce <!-- How can we reproduce the issue? -->

1. [First step]
2. [Second step]
3. [and so on...]

# Expected behavior
<!-- Please provide a description of the behavior you expect -->
# Expected behavior <!-- The behavior you're expecting -->
...

# Current behavior
<!-- Please provide a description of the actual behavior you observe -->
# Current behavior <!-- The actual behavior observed --
...
# Known workarounds
<!-- Please provide a description of any known workarounds -->
# Known workarounds <!-- If any, please share here -->
...

# Possible solution
<!-- If you have a suggestion please describe how the issue could be solved -->
# Possible solution <!-- If you have a suggestion, how the issue could be solved -->
...

# Context and Environment
* Operating System: ...
* GitHub branch: ...
* .NET Runtime: ...

# Code to reproduce the bug
<!-- Possibly include a test to reproduce the issue -->
```
using Xunit;
public class MyTest
{
[Fact]
public void TestToReproduceIssue()
{
// Arrange
...
// Act
...
// Assert
...
}
}
```
* GitHub branch/tag: ...

# Screenshot <!-- If available -->
@@ -1,20 +1,17 @@
# Types of changes
<!-- Please put an `x` (e.g. [x]) in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
# Type of change? <!-- [x] all the boxes that apply -->

# Checklist:
<!-- Please put an `x` (e.g. [x]) in all the boxes that apply: -->
- [ ] The code follows the code style and conventions of this project.
- [ ] The change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] Bug fix
- [ ] New feature
- [ ] Enhancement
- [ ] Breaking change (breaks backward compatibility)

# Description of the change
<!-- Please provide enough information so others can review your pull request -->
...
# Description, Context, Motivation <!-- Please help us reviewing your PR -->

# Motivation for the change
<!-- Please explain the motivation for making this change -->
...

**Checklist:**

- [ ] All tests passed
- [ ] The code follows the code style and conventions of this project
- [ ] The change requires a change to the documentation
- [ ] I have updated the documentation accordingly
@@ -2,7 +2,7 @@ version: "3"

services:
auth:
image: azureiotpcs/pcs-auth-dotnet
image: azureiotpcs/pcs-auth-dotnet:testing
ports:
- "9001:9001"
environment:
@@ -11,10 +11,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

iothubmanager:
image: azureiotpcs/iothub-manager-dotnet
image: azureiotpcs/iothub-manager-dotnet:testing
ports:
- "9002:9002"
environment:
@@ -26,10 +25,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

devicesimulation:
image: azureiotpcs/device-simulation-dotnet:latest
image: azureiotpcs/device-simulation-dotnet:testing
depends_on:
- storageadapter
ports:
@@ -42,10 +40,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

telemetry:
image: azureiotpcs/telemetry-dotnet:latest
image: azureiotpcs/telemetry-dotnet:testing
depends_on:
- storageadapter
ports:
@@ -58,10 +55,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

config:
image: azureiotpcs/pcs-config-dotnet:latest
image: azureiotpcs/pcs-config-dotnet:testing
depends_on:
- storageadapter
ports:
@@ -79,10 +75,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

storageadapter:
image: azureiotpcs/pcs-storage-adapter-dotnet:latest
image: azureiotpcs/pcs-storage-adapter-dotnet:testing
ports:
- "9022:9022"
environment:
@@ -92,10 +87,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

telemetryagent:
image: azureiotpcs/telemetry-agent-dotnet:latest
image: azureiotpcs/telemetry-agent-dotnet:testing
depends_on:
- telemetry
- iothubmanager
@@ -119,4 +113,3 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET
@@ -2,7 +2,7 @@ version: "3"

services:
auth:
image: azureiotpcs/pcs-auth-dotnet
image: azureiotpcs/pcs-auth-dotnet:testing
ports:
- "9001:9001"
environment:
@@ -11,10 +11,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

iothubmanager:
image: azureiotpcs/iothub-manager-java
image: azureiotpcs/iothub-manager-java:testing
ports:
- "9002:9002"
environment:
@@ -26,10 +25,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

devicesimulation:
image: azureiotpcs/device-simulation-dotnet:latest
image: azureiotpcs/device-simulation-dotnet:testing
depends_on:
- storageadapter
ports:
@@ -42,10 +40,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

telemetry:
image: azureiotpcs/telemetry-java:latest
image: azureiotpcs/telemetry-java::testing
depends_on:
- storageadapter
ports:
@@ -58,10 +55,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

config:
image: azureiotpcs/pcs-config-java:latest
image: azureiotpcs/pcs-config-java:testing
depends_on:
- storageadapter
ports:
@@ -79,10 +75,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

storageadapter:
image: azureiotpcs/pcs-storage-adapter-java:latest
image: azureiotpcs/pcs-storage-adapter-java:testing
ports:
- "9022:9022"
environment:
@@ -92,10 +87,9 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET

telemetryagent:
image: azureiotpcs/telemetry-agent-java:latest
image: azureiotpcs/telemetry-agent-java:testing
depends_on:
- telemetry
- iothubmanager
@@ -119,4 +113,3 @@ services:
- PCS_AUTH_REQUIRED
- PCS_CORS_WHITELIST
- PCS_APPLICATION_SECRET
- APPLICATION_SECRET
@@ -105,12 +105,20 @@ if (typeof global.DeploymentConfig.authEnabled !== 'undefined') {
}
}

// Add "endsWith" function, not supported by IE (without touching String.prototype)
// TODO: clean up IoT Suite and remove this "workaround"
// https://github.com/Azure/pcs-remote-monitoring-webui/issues/700
function stringEndsWith(haystack, needle) {
return haystack.substr(haystack.length - needle.length, needle.length) === needle;
};

tenantId = global.DeploymentConfig.aad.tenant;
clientId = global.DeploymentConfig.aad.appId;
appId = global.DeploymentConfig.aad.appId;
aadInstance = global.DeploymentConfig.aad.instance;

if (aadInstance && aadInstance.endsWith('{0}')) {
// TODO: remove this code - https://github.com/Azure/pcs-remote-monitoring-webui/issues/700
if (aadInstance && stringEndsWith(aadInstance, '{0}')) {
aadInstance = aadInstance.substr(0, aadInstance.length - 3);
}

0 comments on commit 2a3a2a0

Please sign in to comment.
You can’t perform that action at this time.