File tree Expand file tree Collapse file tree 11 files changed +12
-160
lines changed
Moryx.CommandCenter.Web/app/src/common/api
Moryx.ControlSystem.ProcessEngine.Web/app/src/environments
Moryx.FactoryMonitor.Web/app/src/environments
Moryx.Media.Web/app/src/environments
Moryx.Notifications.Web/app/src/environments
Moryx.Operators.Web/app/src/environments
Moryx.Orders.Web/app/src/environments
Moryx.Products.Web/app/src/environments
Moryx.Resources.Web/app/src/environments
Moryx.VisualInstructions.Web/app/src/environments
Moryx.Workplans.Web/app/src/environments Expand file tree Collapse file tree 11 files changed +12
-160
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export default class RestClientBase {
1616
1717 }
1818
19+ // reimplementation of getPathBase from @moryx /ngx-web-framework/environments,
20+ // because I don't think it's smart to entagle the angualr and react dependencies for this small function
1921 private static getPathBase ( modulePrefix : string ) : string {
2022
2123 const baseElement = document . querySelector ( "base" ) ;
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Processes" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/FactoryMonitor" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Media" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Notifications" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Operators" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Orders" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Products" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/Resources" ) ;
249
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6- function getPathBase ( modulePrefix : string ) {
7-
8- let baseElement = document . querySelector ( 'base' ) ;
9- let href = baseElement ?. href ; // routingPrefix/commandcenter
10- if ( modulePrefix == null || modulePrefix == undefined || modulePrefix == "" )
11- return href ;
12-
13- if ( ! modulePrefix . startsWith ( '/' ) ) {
14- modulePrefix = '/' + modulePrefix ;
15- }
16- if ( href ?. endsWith ( modulePrefix ) ) {
17- return href . substring ( 0 , href . length - modulePrefix . length ) ; // routingPrefix
18- }
19- throw Error ( "Not implemented" ) ;
20- }
21-
6+ import { getPathBase } from @moryx / ngx - web - framework / environments ;
227
238let path_base = getPathBase ( "/VisualInstructions" ) ;
249
You can’t perform that action at this time.
0 commit comments