Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
karname-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Reza Sahebgharan
karname-ui
Commits
d4298051
Commit
d4298051
authored
Mar 02, 2020
by
Reza Sahebgharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(remove prerender and update docker-compose): remove prerender and update docker-compose
parent
514e0875
Pipeline
#1108
passed with stage
in 41 minutes and 17 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
36 deletions
+42
-36
README.md
README.md
+7
-4
docker-compose.yml
docker-compose.yml
+2
-0
brands.js
imports/api/methods/brands.js
+3
-2
clients.js
imports/api/methods/clients.js
+4
-4
devicemap.js
imports/api/methods/devicemap.js
+3
-3
hisLink.js
imports/api/methods/hisLink.js
+5
-5
users.js
imports/api/methods/users.js
+5
-5
worklist.js
imports/api/methods/worklist.js
+3
-3
main.js
server/main.js
+10
-10
No files found.
README.md
View file @
d4298051
...
@@ -45,6 +45,8 @@ services:
...
@@ -45,6 +45,8 @@ services:
MONGO_URL: mongodb://mongo-windows:27017/karname
MONGO_URL: mongodb://mongo-windows:27017/karname
PORT: 3000
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes:
- D:\data\logs:C:\app\programs\server\assets\app\logs
networks:
networks:
default:
default:
...
@@ -55,18 +57,18 @@ networks:
...
@@ -55,18 +57,18 @@ networks:
-
navigate to Drive D and create a folder called "data"
-
navigate to Drive D and create a folder called "data"
*
it is better to do not choose drive c
*
it is better to do not choose drive c
-
navigate to D:/data and create a folder called "db"
-
navigate to D:/data and create a folder called "db"
and also create a folder called "logs"
-
if you choose drive other than drive D please edit above yaml file
***volumes**
* section under *
**mongo**
*
service:
-
if you choose drive other than drive D please edit above yaml file
***volumes**
* section under *
**mongo**
*
service:
for example if you choose drive E for creating folder "db" at previous step, change
for example if you choose drive E for creating folder "db" at previous step, change
```
```
volumes:
volumes:
- D:\data\
db:C:\data\db
- D:\data\
logs:C:\app\programs\server\assets\app\logs
```
```
into
into
```
```
volumes:
volumes:
- E:\data\
db:C:\data\db
- E:\data\
logs:C:\app\programs\server\assets\app\logs
```
```
-
open CMD
-
open CMD
...
@@ -79,6 +81,6 @@ networks:
...
@@ -79,6 +81,6 @@ networks:
-
run following command:
-
run following command:
docker-compose up -d --force-recreate
docker-compose
pull app&&docker-compose
up -d --force-recreate
-
goto localhost
-
goto localhost
\ No newline at end of file
docker-compose.yml
View file @
d4298051
...
@@ -16,6 +16,8 @@ services:
...
@@ -16,6 +16,8 @@ services:
MONGO_URL
:
mongodb://mongo-windows:27017/karname
MONGO_URL
:
mongodb://mongo-windows:27017/karname
PORT
:
80
PORT
:
80
METEOR_SETTINGS
:
'
{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
METEOR_SETTINGS
:
'
{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes
:
-
C:\karnameapp\logs:C:\app\programs\server\assets\app\logs
# mongo:
# mongo:
# container_name: mongo-windows
# container_name: mongo-windows
# image: repo.marcopacs.com/karname/mongo-windows
# image: repo.marcopacs.com/karname/mongo-windows
...
...
imports/api/methods/brands.js
View file @
d4298051
...
@@ -38,10 +38,11 @@ Meteor.methods({
...
@@ -38,10 +38,11 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
"getBrands Error"
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
"getBrands Error"
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
else
{
}
else
{
log
.
error
(
"getBrands() => no loggined user for getBrands"
);
log
.
error
(
"getBrands() => no loggined user for getBrands"
);
throw
new
Meteor
.
Error
(
500
,
"error"
);
}
}
},
},
"getBrandsName"
()
{
"getBrandsName"
()
{
...
@@ -56,7 +57,7 @@ Meteor.methods({
...
@@ -56,7 +57,7 @@ Meteor.methods({
})
})
}
catch
(
e
)
{
}
catch
(
e
)
{
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
...
...
imports/api/methods/clients.js
View file @
d4298051
...
@@ -6,7 +6,7 @@ import DeviceMap from '../collections/devicemap.js';
...
@@ -6,7 +6,7 @@ import DeviceMap from '../collections/devicemap.js';
import
{
Logger
}
from
'meteor/ostrio:logger'
;
import
{
Logger
}
from
'meteor/ostrio:logger'
;
import
{
LoggerFile
}
from
'meteor/ostrio:loggerfile'
;
import
{
LoggerFile
}
from
'meteor/ostrio:loggerfile'
;
debugger
var
log
=
new
Logger
();
var
log
=
new
Logger
();
(
new
LoggerFile
(
log
)).
enable
();
(
new
LoggerFile
(
log
)).
enable
();
...
@@ -29,7 +29,7 @@ Meteor.methods({
...
@@ -29,7 +29,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`createClient() => error in create client`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`createClient() => error in create client`
,
e
,
Meteor
.
user
().
username
)
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -51,7 +51,7 @@ Meteor.methods({
...
@@ -51,7 +51,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`editClient() => error in edit client`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`editClient() => error in edit client`
,
e
,
Meteor
.
user
().
username
)
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -84,7 +84,7 @@ Meteor.methods({
...
@@ -84,7 +84,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`deleteClient() => error in delete client`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`deleteClient() => error in delete client`
,
e
,
Meteor
.
user
().
username
)
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
...
imports/api/methods/devicemap.js
View file @
d4298051
...
@@ -27,7 +27,7 @@ Meteor.methods({
...
@@ -27,7 +27,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`createDeviceMap() => error in create DeviceMap`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`createDeviceMap() => error in create DeviceMap`
,
e
,
Meteor
.
user
().
username
)
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -50,7 +50,7 @@ Meteor.methods({
...
@@ -50,7 +50,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`editDevicemap() => error in edit devicemap`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`editDevicemap() => error in edit devicemap`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -72,7 +72,7 @@ Meteor.methods({
...
@@ -72,7 +72,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`deleteDevicemap() => error in delete devicemap`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`deleteDevicemap() => error in delete devicemap`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
...
imports/api/methods/hisLink.js
View file @
d4298051
...
@@ -26,7 +26,7 @@ Meteor.methods({
...
@@ -26,7 +26,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`createHisLink() => error in create HisLink`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`createHisLink() => error in create HisLink`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -48,7 +48,7 @@ Meteor.methods({
...
@@ -48,7 +48,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`editHisLink() => error in edit HisLink`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`editHisLink() => error in edit HisLink`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -76,7 +76,7 @@ Meteor.methods({
...
@@ -76,7 +76,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`deleteHisLink() => error in delete hislink`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`deleteHisLink() => error in delete hislink`
,
e
,
Meteor
.
user
().
username
)
return
e
.
reason
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -98,7 +98,7 @@ Meteor.methods({
...
@@ -98,7 +98,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`activeHisLink() => error in active hislink`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`activeHisLink() => error in active hislink`
,
e
,
Meteor
.
user
().
username
)
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
@@ -120,7 +120,7 @@ Meteor.methods({
...
@@ -120,7 +120,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`deactiveHisLink() => error in deactive hislink`
,
e
,
Meteor
.
user
().
username
)
log
.
error
(
`deactiveHisLink() => error in deactive hislink`
,
e
,
Meteor
.
user
().
username
)
return
false
;
throw
new
Meteor
.
Error
(
500
,
"error"
)
;
}
}
}
}
},
},
...
...
imports/api/methods/users.js
View file @
d4298051
...
@@ -26,7 +26,7 @@ Meteor.methods({
...
@@ -26,7 +26,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`createUser() => error creating user at meteor`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`createUser() => error creating user at meteor`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
},
},
...
@@ -41,7 +41,7 @@ Meteor.methods({
...
@@ -41,7 +41,7 @@ Meteor.methods({
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`editUser() => error editing user`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`editUser() => error editing user`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
},
},
...
@@ -55,7 +55,7 @@ Meteor.methods({
...
@@ -55,7 +55,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`setPassword() => error setPassword`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`setPassword() => error setPassword`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
},
},
...
@@ -71,7 +71,7 @@ Meteor.methods({
...
@@ -71,7 +71,7 @@ Meteor.methods({
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`deleteUser() => error user removing`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`deleteUser() => error user removing`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
},
},
...
@@ -86,7 +86,7 @@ Meteor.methods({
...
@@ -86,7 +86,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`editUserProfile() => error user profile editing`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`editUserProfile() => error user profile editing`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
}
}
...
...
imports/api/methods/worklist.js
View file @
d4298051
...
@@ -60,7 +60,7 @@ Meteor.methods({
...
@@ -60,7 +60,7 @@ Meteor.methods({
return
true
return
true
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`Fetchworklist() => error fetching worklist`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`Fetchworklist() => error fetching worklist`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
},
},
...
@@ -135,7 +135,7 @@ Meteor.methods({
...
@@ -135,7 +135,7 @@ Meteor.methods({
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`EditworklistItem() => error editing worklist`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`EditworklistItem() => error editing worklist`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
},
},
"Register"
(
item
)
{
"Register"
(
item
)
{
...
@@ -162,7 +162,7 @@ Meteor.methods({
...
@@ -162,7 +162,7 @@ Meteor.methods({
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
log
.
error
(
`EditworklistItem() => error editing worklist`
,
e
,
Meteor
.
user
().
username
);
log
.
error
(
`EditworklistItem() => error editing worklist`
,
e
,
Meteor
.
user
().
username
);
return
false
;
throw
new
Meteor
.
Error
(
"error"
)
;
}
}
}
}
...
...
server/main.js
View file @
d4298051
...
@@ -51,15 +51,15 @@ Meteor.startup(() => {
...
@@ -51,15 +51,15 @@ Meteor.startup(() => {
});
});
function
onRoute
(
req
,
res
,
next
)
{
//
function onRoute(req, res, next) {
res
.
writeHead
(
307
,
{
'Location'
:
"/landing.html"
});
//
res.writeHead(307, { 'Location': "/landing.html" });
res
.
end
();
//
res.end();
}
//
}
const
middleWare
=
ConnectRoute
(
function
(
router
)
{
//
const middleWare = ConnectRoute(function(router) {
router
.
get
(
'/'
,
onRoute
);
//
router.get('/', onRoute);
});
//
});
WebApp
.
connectHandlers
// WebApp.connectHandlers
.
use
(
middleWare
);
// .use(middleWare);
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment