Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
63643c5
Adding node_modules to gitignore
Oct 28, 2022
90f10dc
Moving all angular related content into angular folder
Oct 28, 2022
d2d7c89
Adding vue template
Oct 28, 2022
811a987
first attempt at menu flow
jpalac Oct 31, 2022
29840dc
Removing package-lock.json to not commit it over and over
Oct 31, 2022
ca3988f
Adding bootstrap and linking it's css to make footer looks the same
Oct 31, 2022
b353c76
Styling of header to match what we have in angular
Oct 31, 2022
55cbb19
update to links
jpalac Nov 1, 2022
992d8ee
added composables for fetching data at an interval and updating the h…
jpalac Nov 2, 2022
c25f97d
Adding DashboardItem.vue and plugging it into the main screen
Nov 2, 2022
b9d0f5d
Started playing with retry redirects
SzymonPobiega Nov 2, 2022
50efa7b
Plugin the pulled values to dashboard items
Nov 2, 2022
f010d97
connections tab - also added some static pages for displaying expired…
jpalac Nov 3, 2022
31f42dd
WIP - Adding events
Nov 3, 2022
453d2e6
Fixing the EventItemShort.vue component to pull down data
Nov 3, 2022
57ff5a3
More styling for event list
Nov 3, 2022
73a8d48
Supporting clicking on the events
Nov 3, 2022
a1fed64
Trigger SC query for status on mounted
SzymonPobiega Nov 4, 2022
270a337
fixed fetching from service control and updated configuration menu
jpalac Nov 4, 2022
92b4859
Merge branch 'vue-feature' of https://github.com/Particular/ServicePu…
jpalac Nov 4, 2022
1866a34
fix components show/hide
jpalac Nov 7, 2022
861c7cf
*replaced provide/inject strings with constants for better safety
jpalac Nov 7, 2022
55cab00
connections almost working - save is still left
jpalac Nov 7, 2022
a92fdbe
license exclamation fix
jpalac Nov 8, 2022
097965c
footer implementation
jpalac Nov 8, 2022
56021dc
footer update
jpalac Nov 8, 2022
15944a7
removed unnecessary style
jpalac Nov 8, 2022
ffb1f92
monitoring additions
jpalac Nov 8, 2022
c65b88e
monitoring fix
jpalac Nov 8, 2022
e4d10c9
Removing the boilerplate code
Nov 8, 2022
6748784
Fixing usage of inject servicecontrolUrl in evenLogItems
Nov 8, 2022
b89aa0a
license view done
jpalac Nov 9, 2022
945f24a
fixing vue component alignment and connections display
jpalac Nov 9, 2022
1d84c25
fixing vue component alignment and connections display
jpalac Nov 9, 2022
400e428
reading SC urls from app.constants.js
jpalac Nov 9, 2022
6421b8e
getting SP version from app.constants.js
jpalac Nov 9, 2022
4029409
update to connection saving
jpalac Nov 9, 2022
dd7350a
route cleanup and connection url saving
jpalac Nov 10, 2022
f0f9f50
fixed loading onMounted plus general cleanup
jpalac Nov 10, 2022
da3f149
Use stats for header badges
SzymonPobiega Nov 10, 2022
a790350
Use stats for DashboardView
SzymonPobiega Nov 10, 2022
e3c6c08
Remove ref variables for badges
SzymonPobiega Nov 10, 2022
24bf00c
Vue and AngularJS side-by-side development setup (#1307)
tmasternak Nov 10, 2022
b6ae901
update reamde.md with new angular app location
tmasternak Nov 10, 2022
4ac2a0f
Update README.md
jpalac Nov 11, 2022
a00d351
Update README.md
jpalac Nov 11, 2022
4df06cd
connection tab
jpalac Nov 11, 2022
b45d088
Merge branch 'vue-feature' of https://github.com/Particular/ServicePu…
jpalac Nov 11, 2022
9581273
style update
jpalac Nov 11, 2022
a4eb97f
renaming and adding required components to all config pages
jpalac Nov 14, 2022
718811a
notification service
jpalac Nov 14, 2022
cf8638b
fixing app.constants.js path
tmasternak Nov 14, 2022
84e4801
started on modal form for email notifications
jpalac Nov 14, 2022
5f316ac
fix the base directory for angular
tmasternak Nov 14, 2022
136fcaa
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 14, 2022
809ecf1
support vue.js routing in ServicePulse.Host
tmasternak Nov 14, 2022
ffa609f
fixing app.constants.config during installation time
tmasternak Nov 14, 2022
fedf3da
saving of modal form working - still needs validation
jpalac Nov 15, 2022
b39c53a
added form validation to email cofig save
jpalac Nov 15, 2022
7dfcea2
routing update between the 2 apps
jpalac Nov 15, 2022
04c2bf5
routing for angular dashboard list items
jpalac Nov 15, 2022
b7c83f7
fixing angular ci build steps
tmasternak Nov 15, 2022
3484b03
the right folder name
tmasternak Nov 15, 2022
49ebac6
fixing .net tests
tmasternak Nov 15, 2022
4f0f1db
tweaking js tests
tmasternak Nov 15, 2022
3f9f51a
fixing links
jpalac Nov 16, 2022
3c8d641
fixing formatting and added missing parts for when no SC
jpalac Nov 16, 2022
5627576
started on redirects
jpalac Nov 16, 2022
3a106a0
started on redirects
jpalac Nov 16, 2022
b5e18e1
Styling highlight
Nov 16, 2022
a500e38
fixing build.ps1 script
tmasternak Nov 16, 2022
797038c
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 16, 2022
fb99129
Fix redirect display
SzymonPobiega Nov 16, 2022
4046475
Modal yes/no
SzymonPobiega Nov 16, 2022
bfc5482
Inlined yes/no modal
SzymonPobiega Nov 16, 2022
97ba513
Deleting redirects
SzymonPobiega Nov 16, 2022
987a8f3
Create/modify redirect dialog first step
SzymonPobiega Nov 16, 2022
9d4d8c7
update to be in line with angular footer
jpalac Nov 17, 2022
957f29a
redirects update and creation
jpalac Nov 17, 2022
3f47a39
property update
jpalac Nov 17, 2022
7e5f07d
Disable source queue when editing a redirect
SzymonPobiega Nov 17, 2022
03e4994
Add handling for the immediate retry
SzymonPobiega Nov 17, 2022
3ea1323
documentation tweaks
tmasternak Nov 17, 2022
57a7479
running site build script outside of csproj file
tmasternak Nov 17, 2022
7358995
fixing js tests
tmasternak Nov 17, 2022
efb67ec
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 17, 2022
734f597
remove build script execution from csproj file
tmasternak Nov 17, 2022
eb9724f
fixing js tests
tmasternak Nov 17, 2022
3490fd5
release workflow
tmasternak Nov 17, 2022
ba02637
Added a test toast
SzymonPobiega Nov 17, 2022
24d8bc7
Added toast lib
SzymonPobiega Nov 17, 2022
30a2c6b
Merge branch 'vue-feature' of https://github.com/Particular/ServicePu…
SzymonPobiega Nov 17, 2022
7e2489e
modal form styles and positioning
jpalac Nov 18, 2022
afd78bd
toast positioning
jpalac Nov 18, 2022
6cbcca0
toast component - needs styling
jpalac Nov 18, 2022
3d1feaa
added tosters for SC and Monitoring connection notifications
jpalac Nov 18, 2022
23b9853
added redirect toasts for success and failure
jpalac Nov 18, 2022
c9c0fe3
Adjust toast colors
SzymonPobiega Nov 18, 2022
9acbdee
Added typeahead component to redirects
SzymonPobiega Nov 18, 2022
561b0cd
Validation. Use select instead of input
SzymonPobiega Nov 18, 2022
f66cb2d
Cleanup
SzymonPobiega Nov 18, 2022
a79678d
update to angular links to vue pages
jpalac Nov 21, 2022
b9b7e09
added licence and healthcheck toast, general cleanup
jpalac Nov 21, 2022
7a8ad52
release workflow for testing
tmasternak Nov 21, 2022
6603591
fixing app components paths in the installer
tmasternak Nov 21, 2022
c932354
one more try
tmasternak Nov 21, 2022
97d9a3a
making release workflow build
tmasternak Nov 21, 2022
9e6b4bb
publish artifacts
tmasternak Nov 21, 2022
4b102da
revert changes to release.yml
tmasternak Nov 21, 2022
03e378d
Fix displaying of the extend license button
SzymonPobiega Nov 21, 2022
39f1998
enable eslinting in vue.js
tmasternak Nov 21, 2022
258df02
linting fixes
tmasternak Nov 21, 2022
ff5a981
fixing lint errors
tmasternak Nov 21, 2022
86e3dd4
turning on es linting on build
tmasternak Nov 21, 2022
fd7268f
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 21, 2022
c8f25c5
fix merge conflicts
tmasternak Nov 21, 2022
5534bdb
excluding app.constants.js from linting
tmasternak Nov 21, 2022
65780e6
breaking lint to test the ci build
tmasternak Nov 21, 2022
95fced2
Revert "breaking lint to test the ci build"
tmasternak Nov 21, 2022
6da882c
Fixing TimeSince, to display text and title
Nov 21, 2022
78f4f33
Removing watch
Nov 21, 2022
3f5d3a9
fail build.ps1 on vue.js linting errors
tmasternak Nov 21, 2022
dd1e8b6
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 21, 2022
87a57d6
Display warning/error on the header bar
SzymonPobiega Nov 21, 2022
87cc12c
TimeSince to work with string - removed moment from components using it
jpalac Nov 22, 2022
575e1c4
Exclamation name update and null check on license status
jpalac Nov 22, 2022
6be19a2
time display fix - dates saved in db are in utc
jpalac Nov 22, 2022
4b62ce3
added monitoring counter to header
jpalac Nov 22, 2022
5b0d86c
added counter for retry redirects on the configuration menu
jpalac Nov 22, 2022
985e8c0
wording and colours to match angular
jpalac Nov 22, 2022
05b3f0e
app.constants.js excluded from embedded resources
tmasternak Nov 22, 2022
631b19d
Fix license toasts
SzymonPobiega Nov 22, 2022
8c9bc7e
Bring back the exclamations in the header
SzymonPobiega Nov 22, 2022
8db7a1d
Create computed license state in license composable
SzymonPobiega Nov 22, 2022
879ce64
fixing lint errors
Nov 22, 2022
99c7bc4
Use single license expired component
SzymonPobiega Nov 22, 2022
b2669ed
do not bundle app.constants.js in vue.js build
tmasternak Nov 22, 2022
8c9a1f8
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 22, 2022
cafd5ed
do not bundle app.constants.js in vue.js build
tmasternak Nov 22, 2022
38894aa
Merge remote-tracking branch 'origin/vue-feature' into vue-feature
tmasternak Nov 22, 2022
f68eda4
removed unused provided and injected keys + renamed exported object t…
jpalac Nov 23, 2022
e580072
toast styling - moved to top and got rid of rounded corners
jpalac Nov 23, 2022
fe36ae7
Update src/ServicePulse.Host/vue/src/App.vue
SzymonPobiega Nov 23, 2022
16cb3b5
Update src/ServicePulse.Host/vue/src/assets/main.css
SzymonPobiega Nov 23, 2022
856f5cc
Fixing styles for the Dashboard
Nov 23, 2022
37c2519
Fixing flow diagram to again work
Nov 23, 2022
88a3824
Merge pull request #1320 from Particular/refactor-license
SzymonPobiega Nov 23, 2022
0ca9703
Try remove ref for computed to see if that works
SzymonPobiega Nov 23, 2022
21fca98
Change the dependency handling of version info
SzymonPobiega Nov 23, 2022
4a8c0b1
Lint
SzymonPobiega Nov 23, 2022
0386d18
Refactor license
SzymonPobiega Nov 23, 2022
7cbd10c
Refactor SC stats and connectivity
SzymonPobiega Nov 23, 2022
3a2b7e3
Fix error handling
SzymonPobiega Nov 23, 2022
43c71d6
Fix connection error handling
SzymonPobiega Nov 23, 2022
62cbecd
heartbeats counter fetch fix + successful connection toast to not sho…
jpalac Nov 24, 2022
3e01ba1
show connections config if service control cannot connect
jpalac Nov 24, 2022
53b1187
made license reactive
jpalac Nov 24, 2022
b4b48a7
added page titles
jpalac Nov 24, 2022
118d724
removing unused properties
jpalac Nov 24, 2022
97594c5
lint
jpalac Nov 24, 2022
504beec
lint
jpalac Nov 24, 2022
1c7aede
Removed all keys
SzymonPobiega Nov 24, 2022
4795e63
Fix lint
SzymonPobiega Nov 24, 2022
2890bf0
standardised naming: exported functions to start with "use", object not
jpalac Nov 25, 2022
7f483c3
fixing link to redirects from dashboard item
jpalac Nov 25, 2022
17127ba
delete not used composable
jpalac Nov 25, 2022
5ad6872
Try .NET 6
SzymonPobiega Nov 25, 2022
b57e6c1
Revert to .net 5
SzymonPobiega Nov 25, 2022
28b382e
Try windows 2022
SzymonPobiega Nov 25, 2022
3560c37
Try to satisfy the build
SzymonPobiega Nov 25, 2022
2da4cef
Merge pull request #1321 from Particular/refactor-service-control-ser…
SzymonPobiega Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
jobs:
build:
name: Windows
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
Expand All @@ -23,11 +23,14 @@ jobs:
dotnet-version: 5.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Install Host npm packages
- name: AngularJs - Install Host npm packages
run: npm run load
working-directory: src/ServicePulse.Host
- name: Run lint
working-directory: src/ServicePulse.Host/angular
- name: AngularJs - Run lint
run: npm run lint
working-directory: src/ServicePulse.Host/angular
- name: Build AngularJS and Vue.js
run: PowerShell -File .\build.ps1
working-directory: src/ServicePulse.Host
- name: Build
run: msbuild src -p:Configuration=Release -restore -m
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
nugets/*
retention-days: 1
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v1.2.0
uses: OctopusDeploy/install-octopus-cli-action@v1.2.1
with:
version: latest
- name: Deploy
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,9 @@ src/scaffolding.config

# Visual Studio Code
.vscode

# Vue build output
src/ServicePulse.Host/vue/dist/

# Combined output for Vue and AngularJs
src/ServicePulse.Host/app/
94 changes: 80 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,36 @@ Keep track of the health of your system's endpoints, monitor for any processing

## Setting up the project for development

### Connecting to ServiceControl and ServiceControl Monitoring
ServicePulse is in the proces of migrating from AngularJS to Vue.js, during which both frameworks are used to serv parts of the application. In development environment process AngularJS and Vue.js http servers are run side-by-side behind a reverse proxy. This enables accessing both applications from the same domain i.e. `localhost:1331` where uri prefixed with `/a/` are served by AngularJS and rest is handled by Vue.js. This mimics the production deployment where the Vue.js application is deployed in the main folder and AngularJS in `/a/` subfolders.

ServicePulse mostly presents data provided by [ServiceControl](http://github.com/Particular/ServiceControl). Endpoint metrics data is provided by [ServiceControl Monitoring](https://github.com/Particular/ServiceControl.Monitoring).
```mermaid
graph LR
subgraph ServiceControl
ScMonitoring
ScError
end

The URLs for both services can be set in `ServicePulse.Host/app/js/app.constants.js` under the constant `scConfig`.
subgraph ServicePulse
AngularJs
VueJs
end

#### URL ACL Reservation
Browser --> Nginx[Nginx<br>Reverse Proxy]
Nginx -- http://host.docker.internal:5174/a/ --> AngularJs[AngularJS<br> Development Server]
Nginx -- http://host.docker.internal:5173 --> VueJs[Vue.js<br> Development Server]

ServicePulse depends on a self-hosted webserver. In order to start the project a URL ACL reservation needs to be setup. Either run Visual Studio with Administrative privileges or run the following command to add the required URL ACL reservation:
AngularJs --> ScMonitoring[Monitoring Instance]
AngularJs --> ScError[Main Instance]

VueJs --> ScMonitoring
VueJs --> ScError
```
netsh http add urlacl url=http://+:8081/ user=Everyone
```
### Setting up ServiceControl Main and ServiceControl Monitoring instances

ServicePulse mostly presents data provided by [ServiceControl](http://github.com/Particular/ServiceControl) and [ServiceControl Monitoring](https://github.com/Particular/ServiceControl.Monitoring) instances.

The URLs for both services can be set in `ServicePulse.Host/vue/public/app/js/app.constants.js` under the constant `scConfig`.


### Setting up package manager

Expand All @@ -31,21 +48,48 @@ Install the following dependencies if you don't have them installed yet

- [Node.js](https://nodejs.org/en/download/)
- [Git for Windows](https://git-for-windows.github.io/)
- [Docker](https://docs.docker.com/get-docker/)
- Chutzpah
- [Test Adapter for the Test Explorer](https://marketplace.visualstudio.com/items?itemName=vs-publisher-2795.ChutzpahTestAdapterfortheTestExplorer)
- [Test Runner Context Menu Extension](https://marketplace.visualstudio.com/items?itemName=vs-publisher-2795.ChutzpahTestRunnerContextMenuExtension)

#### Set development environment
### Set development environment

- Open cmd window and navigate into `ServicePulse\src\ServicePulse.Host` path
- run `npm install` to install all the npm dependencies
- run the following command `npm run dev`. This script will use webpack configuration to finish ServicePulse's required configuration, start watching root folder for changes, and it will host a dev server on port 8080
#### Step 1 - run Nginx reverse proxy

Open a command window and navigate into `ServicePulse\src\ServicePulse.Host` path (NOTE: ensure using cmd, not PowerShell). Run `nginx` that is a reverse proxy for AngularJS and Vue.js applications:
```cmd
> docker run -it --rm -p 1331:1331 -v %cd%/nginx.conf:/etc/nginx/nginx.conf:ro --name service-pulse-dev nginx
```
#### Step 2 - run AngularJS development server

Navigate to `ServicePulse\src\ServicePulse.Host\angular` and:
- run `npm install` to install all the npm dependencies
- run the following command `npm run dev`. This will host a dev server on port 5174 and start watching for changes in `/angular` directory

#### Step 3 - run Vue.js development server

Navigate to `ServicePulse\src\ServicePulse.Host\vue` and:
- run `npm install` to install all the npm dependencies
- run the following command `npm run dev`. This will host a dev server on port 5173 and start watching for changes in `/vue` directory

In case `npm run dev` fails with an error related to git submodule not properly configured, run the `npm install` command again to ensure all required dependencies are available, and then run `npm run dev`.

After doing the above steps one can open Visual Studio or your IDE of choice and continue working on this project. The site will be served for debugging at `http://localhost:8080`.
#### Step 4 - open the browser

After doing the above steps one can open `http://localhost:1331` to see ServicePulse application.

### Provided npm scripts

#### Vue.js

- `dev` - runs `vite` that starts development server doing hot reload over source files
- `build` - runs build script that outputs files to `..\app` folder
- `lint` - checks with eslint all js files
- `preview` - runs `build` and starts static http server that enables smoketesting production build

#### AngularJS

#### Provided npm scripts
- `test` - runs js tests in ServicePulse.Host.Test project
- `setup` - this command runs few commands
- installs the npm packages
Expand All @@ -62,11 +106,33 @@ After doing the above steps one can open Visual Studio or your IDE of choice and
NOTE:
Webpack observes files and updates the artifacts whenever they are changed, however at the moment not every bit of code is processed by webpack. Only monitoring and configuration is.


### Configuring automated tests

For information how to run automated tests please follow [ServicePulse.Host.Tests/Readme](https://github.com/Particular/ServicePulse/blob/master/src/ServicePulse.Host.Tests/README.md).

## Running from ServicePulse.Host.exe

It is possible to run ServicePulse directly via `ServicePulse.Host.exe`.

### Step 1 - reserve URL ACL

ServicePulse.Host.exe depends on a self-hosted webserver. In order to start the project a URL ACL reservation needs to be setup. Either run Visual Studio with Administrative privileges or run the following command to add the required URL ACL reservation:

### Step 2 - build ServicePulse site

Execute build script from commandline:

```cmd
> PowerShell -File .\build.ps1
```

NOTE: It might be necessary to change PowerShell execution policy using `Set-ExecutionPolicy Unrestricted`

### Step 3 - run `ServicePulse.Host.exe`

In the Ide, Build and run `ServicePulse.Host` project.


## Supported browser versions

ServicePulse is supported on the following desktop browser versions:
Expand Down
2 changes: 1 addition & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ src/scaffolding.config
*.received.*

# npm artifacts
ServicePulse.Host/node_modules
**/node_modules
ServicePulse.Host.Tests/node_modules
package-lock.json

Expand Down
8 changes: 4 additions & 4 deletions src/ServicePulse.Host.Tests/Owin/StaticMiddlewareTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task Should_handle_get_and_head(string method)
{
Request =
{
Path = new PathString("/js/app.js"),
Path = new PathString("/a/js/app.js"),
Method = method
},
Response =
Expand All @@ -76,7 +76,7 @@ public async Task Should_find_file_embedded_in_assembly()
{
Request =
{
Path = new PathString("/NoIE.html"),
Path = new PathString("/a/NoIE.html"),
Method = "GET"
},
Response =
Expand All @@ -98,7 +98,7 @@ public async Task Should_find_file_embedded_in_assembly_is_case_insensitive()
{
Request =
{
Path = new PathString("/nOie.html"),
Path = new PathString("/a/nOie.html"),
Method = "GET"
},
Response =
Expand All @@ -121,7 +121,7 @@ public async Task Should_find_deep_linking_file_embedded_in_assembly()
{
Request =
{
Path = new PathString("/js/views/message/editor/messageEditorModal.controller.js"),
Path = new PathString("/a/js/views/message/editor/messageEditorModal.controller.js"),
Method = "GET"
},
Response =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
using ServicePulse.Host.Owin;

[TestFixture]
public class IndexUrlRewriterMiddlewareTests
public class UrlRewriterMiddlewareTests
{
[Test]
public async Task Should_rewrite_slash_url()
{
var middleware = new IndexUrlRewriterMiddleware(new DummyNext());
var middleware = new UrlRewriterMiddleware(new DummyNext());
var context = new OwinContext
{
Request =
Expand All @@ -25,9 +25,25 @@ public async Task Should_rewrite_slash_url()
}

[Test]
public async Task Should_not_rewrite_other_urls()
public async Task Should_rewrite_angular_app_constants_js_url()
{
var middleware = new IndexUrlRewriterMiddleware(new DummyNext());
var middleware = new UrlRewriterMiddleware(new DummyNext());
var context = new OwinContext
{
Request =
{
Path = new PathString("/a/js/app.constants.js"),
Method = "GET"
}
};
await middleware.Invoke(context);
Assert.AreEqual("/js/app.constants.js", context.Request.Path.Value);
}

[Test]
public async Task Should_rewrite_other_urls_to_vue_index()
{
var middleware = new UrlRewriterMiddleware(new DummyNext());
var context = new OwinContext
{
Request =
Expand All @@ -37,7 +53,7 @@ public async Task Should_not_rewrite_other_urls()
}
};
await middleware.Invoke(context);
Assert.AreEqual("/something", context.Request.Path.Value);
Assert.AreEqual("/index.html", context.Request.Path.Value);
}

public class DummyNext : OwinMiddleware
Expand Down
2 changes: 1 addition & 1 deletion src/ServicePulse.Host.Tests/ServicePulse.Host.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<Content Include="..\ServicePulse.Host\app\js\app.constants.js" CopyToOutputDirectory="PreserveNewest" />
<Content Include="..\ServicePulse.Host\vue\public\js\app.constants.js" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/ServicePulse.Host.Tests/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// karma.conf.js
module.exports = function(config) {
module.exports = function (config) {
config.set({
browsers: ['PhantomJS', 'PhantomJS_custom', 'Chrome'],
basePath: '../ServicePulse.Host/app',
basePath: '../ServicePulse.Host/angular/app',
preprocessors: {
'**/*.js': ['eslint']
},
Expand All @@ -11,9 +11,9 @@ module.exports = function(config) {
},
files: [
'./modules/dist/shell.dist.js',
'../../ServicePulse.Host.Tests/tests/js/angular-mocks.js',
'../../../ServicePulse.Host.Tests/tests/js/angular-mocks.js',
'./js/**/*.html',
'./js/app.constants.js',
'../../vue/public/js/app.constants.js',
'./modules/dist/configuration.dist.js',
'./js/app.js',
'./js/app.bootstrap.js',
Expand All @@ -24,7 +24,7 @@ module.exports = function(config) {
'./js/services/**/*.js',
'./js/views/**/*.js',
'./modules/dist/monitoring.dist.js',
'../../ServicePulse.Host.Tests/tests/**/*.spec.js'
'../../../ServicePulse.Host.Tests/tests/**/*.spec.js'
],
frameworks: ['jasmine'],
// you can define custom flags
Expand Down
3 changes: 0 additions & 3 deletions src/ServicePulse.Host/.bowerrc

This file was deleted.

6 changes: 0 additions & 6 deletions src/ServicePulse.Host/Hosting/HostArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ public HostArguments(string[] args)
Password = string.Empty;
OutputPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "app");

#if DEBUG
if (Debugger.IsAttached)
{
OutputPath = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\app"));
}
#endif
var runOptions = new CaseLessOptionSet
{
{
Expand Down
5 changes: 1 addition & 4 deletions src/ServicePulse.Host/Hosting/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,7 @@ public List<string> Parse(IEnumerable<string> arguments)
}
}

if (c.Option != null)
{
c.Option.Invoke(c);
}
c.Option?.Invoke(c);

return unprocessed;
}
Expand Down
42 changes: 0 additions & 42 deletions src/ServicePulse.Host/Owin/IndexUrlRewriterMiddleware.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/ServicePulse.Host/Owin/StaticFileMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ServicePulse.Host.Owin
namespace ServicePulse.Host.Owin
{
using System;
using System.IO;
Expand Down
Loading