Commit 4cb8c74d authored by Gladys Forte's avatar Gladys Forte

Merge pull request #571 in RMS/api-main-service from RMSv2 to SIT

* commit '9cc16204':
  title instruction.pdf
  remove extra row generated in csv user_format
  user_instrucion create media folder if not existing
  fixed ordering of imports at ETL file
  removed unused codes on ETL endpoint
  remove instruction.pdf on media directory to check if gitignore all files on media
  remove instruction.pdf on media directory to check if gitignore all files on media
  added media on git ignore
  update delete master attachment
  comment media on git ignore
  user_format
  print
  instructions pdf
parents 8c139e53 9cc16204
...@@ -4,6 +4,9 @@ __pycache__/ ...@@ -4,6 +4,9 @@ __pycache__/
*$py.class *$py.class
env.ini env.ini
media/ media/
.media
media
docker-compose.yml docker-compose.yml
Dockerfile Dockerfile
......
...@@ -567,8 +567,7 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet): ...@@ -567,8 +567,7 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
os.path.join(settings.MEDIA_ROOT, f'cr/{request.user.code}'), os.path.join(settings.MEDIA_ROOT, f'cr/{request.user.code}'),
updated_file.name updated_file.name
) )
file1 = open(completeName, "w") file1 = open(completeName, "w")
file1.close() file1.close()
......
...@@ -31,13 +31,3 @@ class BatchUploadSerializer(serializers.ModelSerializer): ...@@ -31,13 +31,3 @@ class BatchUploadSerializer(serializers.ModelSerializer):
) )
class BatchUploadSerializer(serializers.ModelSerializer):
class Meta:
model = MasterAttachment
fields = '__all__'
read_only_fields = (
'created', 'createdby', 'modified', 'modifiedby', 'code',
)
...@@ -54,7 +54,7 @@ class MasterAttachmentViewSet(viewsets.ModelViewSet): ...@@ -54,7 +54,7 @@ class MasterAttachmentViewSet(viewsets.ModelViewSet):
body['file_name'] = instance.name body['file_name'] = instance.name
body['attch_ref'] = key body['attch_ref'] = key
attachments.append(body) attachments.append(body)
return Response( return Response(
{"results": attachments}, {"results": attachments},
status=status.HTTP_201_CREATED status=status.HTTP_201_CREATED
......
...@@ -526,23 +526,22 @@ class MasterAttachment(models.Model): ...@@ -526,23 +526,22 @@ class MasterAttachment(models.Model):
null=True) null=True)
attch_ref = models.TextField() attch_ref = models.TextField()
def delete(self,*args,**kwargs): def delete(self,*args,**kwargs):
print(self.url.name) # print(self.url.name)
if os.path.isfile(self.url.path): if os.path.isfile(self.url.path):
os.remove(self.url.path) os.remove(self.url.path)
super(MasterAttachment, self).delete(*args,**kwargs) super(MasterAttachment, self).delete(*args,**kwargs)
class Meta: class Meta:
db_table = 'master_attachments' db_table = 'master_attachments'
def delete(self, *args, **kwargs): # def delete(self, *args, **kwargs):
# self.url.delete() # # self.url.delete()
# super().delete(*args, **kwargs) # # super().delete(*args, **kwargs)
os.remove(os.path.join(settings.MEDIA_ROOT, self.url.name)) # os.remove(os.path.join(settings.MEDIA_ROOT, self.url.name))
super(MasterAttachment, self).delete(*args, **kwargs) # super(MasterAttachment, self).delete(*args, **kwargs)
class BaseAttachment(models.Model): class BaseAttachment(models.Model):
......
...@@ -34,7 +34,7 @@ urlpatterns = [ ...@@ -34,7 +34,7 @@ urlpatterns = [
re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}), re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}),
re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}), re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
path('api/v1/asset-management/', include('app.applicationlayer.ams.urls_ams')), path('api/v1/asset-management/', include('app.applicationlayer.ams.urls_ams')),
] ]
......
-- -------------------------------------------------------------
-- TablePlus 2.8.2(256)
--
-- https://tableplus.com/
--
-- Database: OB_IMS
-- Generation Time: 2019-08-28 19:37:20.5910
-- -------------------------------------------------------------
DROP TABLE IF EXISTS [dbo].[Clients];
-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: sequences, indices, triggers. Do not use it as a backup.
CREATE TABLE [dbo].[Clients] (
[id] int,
[name] varchar(128),
[contact] varchar(16),
[email] varchar(128),
[remarks] varchar(MAX),
PRIMARY KEY ([id])
);
INSERT INTO [dbo].[Clients] ([id], [name], [contact], [email], [remarks]) VALUES ('4', 'GuocoLand Property Management Pte Ltd', '87654321', 'TBA@email.com', NULL),
('5', 'Housing & Development Board Housing Management Group ( Car Parks)', '87654321', 'TBA@email.com', NULL),
('6', 'Prosec Services Pte Ltd', '87654321', 'TBA@email.com', NULL),
('7', 'Public Utilities Board (PUB)', '87654321', 'TBA@email.com', NULL),
('8', 'SimonVoss Security Technologies (Asia) Pte Ltd', '87654321', 'TBA@email.com', NULL),
('9', 'Sunlight Electrical Pte Ltd', '87654321', 'TBA@email.com', NULL),
('10', 'Shine Security Agency And Investigation Pte Ltd', '87654321', 'TBA@email.com', NULL),
('11', 'Prosegur Singapore Pte Ltd', '87654321', 'TBA@email.com', NULL),
('12', 'Agri-Food and Veterinary Authority', '87654321', 'TBA@email.com', NULL),
('13', 'National Environment Authority', '+65 6708 6077', 'chow_mun_wai@nea.gov.sg', 'CHOW Mun Wai'),
('14', 'Keppel Bay Pte. Ltd', '87654321', 'TBA@email.com', NULL),
('15', 'Jurong Town Corporation', '87654321', 'TBA@email.com', NULL),
('16', 'National Research Fund (PMO21)', '87654321', 'TBA@email.com', NULL),
('17', 'Full Pint Microbrewery Pte Ltd', '87654321', 'TBA@email.com', NULL),
('18', 'Cushman & Wakefield Facilities & Engineering (S) Ltd', '68630043', 'fredrick.ooi@cushwake.com', NULL),
('19', 'Excellent Security & Safety Pte Ltd', '87654321', 'TBA@email.com', NULL),
('20', 'Housing Development Board Properties & Land', '87654321', 'TBA@email.com', NULL),
('21', 'Jurong Port Pte Ltd', '87654321', 'TBA@email.com', NULL),
('22', 'Ministry of Health Corporation Services Division', '87654321', 'TBA@email.com', NULL),
('23', 'Prosec Security Services Pte Ltd', '87654321', 'TBA@email.com', NULL),
('24', 'Public Utilities Board Woodleigh Complex', '87654321', 'TBA@email.com', NULL),
('25', 'Public Utilities Board Catchment & Waterways', '87654321', 'TBA@email.com', NULL),
('26', 'Public Utilities Board Technology Department', '87654321', 'TBA@email.com', NULL),
('27', 'Ministry of Home Affairs (SPF)', '87654321', 'TBA@email.com', NULL),
('30', 'Innoverde', '66941814', 'info@innoverde.com.sg', NULL),
('31', 'PUB Water Wheel', 'POC 2016 - PUB00', 'Jimmy@oneberry.com', NULL),
('40', 'Land Transport Authority', '1234567', '123@info.com', NULL),
('41', 'Ministry of Home Affairs (ICA)', '67672193', 'toh_wen_jin@ica.gov.sg', NULL),
('42', 'Oneberry Technologies Pte Ltd', '66926760', 'info@oneberry.com', NULL),
('44', 'Swiss Club', '65132168', 'no@email.com', 'Sheryl Arun Murthy'),
('45', 'Mitsubishi Heavy Industries', '12345678', 'no@email.com', NULL),
('46', 'R&D', '65132168', 'TBA@email.com', 'Oneberry Technologies Pte Ltd'),
('47', 'SMRT', '98355365', 'colin.lam@smrt.com.sg', NULL),
('48', 'Woh Hup Pte Ltd', '12345', '123@456.com', 'Rennel''s sales'),
('49', 'Meritus Hotel & Resort', '62357788', 'sandesh.dessai@meritushotels.com', NULL),
('50', 'Trakomatic Pte Ltd', 'M. +65 9475 9883', 'petertan@trakomatic.com', NULL),
('51', 'SingTel', '97891462', 'muhdfihrin.binsueff@singtel.com', NULL),
('52', 'SMRT 2', '91826145', 'YangLin@smrt.com.sg', 'Contact Person: Yang Lin'),
('53', 'HDB', '+65 81384996', 'Mohammad_KZ_FACHRUZZAMAN@hdb.gov.sg', 'Mohammad KZ FACHRUZZAMAN'),
('54', 'CHC Construction Pte Ltd', '67520886', 'william.lin@chcgroup.com', NULL),
('55', 'Konica Minolta Business Solutions Asia Pte Ltd', '63612824', 'Cynthia.loke@konicaminolta.asia', 'POC : Sara'),
('56', 'Republic Polytechnic', '1234567', 'tba@oneberry.com', NULL),
('57', 'NTUC Trade Union House', '62138000', 'tba@email.com', NULL),
('58', 'MCST 2022 Nouvelle Park', ' 12345678', 'stevie@w-locate.com', NULL),
('59', 'MCST 3309 Murano Condo', '1234567', 'tba@email.com', NULL),
('60', 'MCST 3807 The Tier', '1234567', 'tba@email.com', NULL),
('61', 'Poh Keong Construction Pte Ltd', '98758669', 'pohkeong008@hotmail.com', 'Leave and maintenance of CCTV'),
('62', 'Greenova Landscape Pte Ltd', '1234567', 'TBC@email.com', NULL),
('63', 'Ascendas Services Pte Ltd', '65067416', 'siti.rahmat@ascendas-singbridge.com', 'Siti Nur Khairiyah Bte Rahmat
Asst. Manager
Contracts and Procurement
'),
('64', 'Singapore Post Limited', '62295613', ' TBC@hotmail.com', NULL),
('65', 'FUJI SMBE PTE LTD', '67580988', 'daniel.boo@fsmbe.fujielectric.com', NULL),
('66', 'MCST 4507 Corals at Keppel Bay', '62649710', 'mgtoff@corals.sg', 'The Management Corporation Strata Title Plan No. 4507'),
('67', 'Sam Lain Equipment Services Pte Ltd', 'Mr Myo Aung', 'myo_aung@samlain.com.sg', 'No. 2 Tuas South Street 12 S(636954)
'),
('68', 'Ministry of Manpower (MOM)', '12345678', 'tbc@oneberry.com', NULL),
('69', 'SamWoh Construction Pte Ltd', '62697288', 'scott.ho@samwoh.com.sg', 'PIC : Mr Scott Ho
'),
('70', 'National Gallery Singapore', '66979341', 'lyehock.lim@nationalgallery.sg', 'Lye Hock Lim'),
('71', 'SIA-Singsporeair', '66926760', 'taryar_win@singaporeair.com.sg', 'TR1348 Facial Recognition System'),
('72', 'Singpass', '66926760', 'JonathanSim@tech.gov.sg', 'Supply,design,Development, Installation, Testing,Commission'),
('73', 'Oneberry - Batam', '65132168', 'janet@oneberry.com', 'creation of Batam warehouse'),
('74', 'Bushy Sigsug Ltd', '9062 8717', 'cktan@bushysigsug.com', NULL),
('75', 'Dato Low Tuck Kwong', '97367803', 'angie@energyresource.sg', '14-16 Pierce Hill'),
('76', 'INTERPOL-2019', 'Interpol - 02/07', 'sara@oneberry.com', 'Interpol - 02/07/19-04/07/19'),
('77', 'Mainguard Security Services Pte Ltd', '92965881/2', 'operations@mainguard-int.com.sg', 'Lease and maintenance of mobile surveillance system'),
('78', 'MCST 4654 Coco Palm Condo', '65132168', 'cocopalms.cm@singnet.com.sg', 'High Rise Littering Surveillance'),
('79', 'Sheng Siong Group Ltd', '85886866', 'jack.woo@shengsiong.com.sg', 'POC for Surveillance Camera System'),
('80', 'APM Property Management Pte Ltd', '69092616', 'nurhidayahsupan@apmasia.com.sg', 'POC for SmarClean IoT Sensors for Suntec City'),
('81', 'AETOS Technologies & Solutions Pte Ltd', '97395790', 'chenghwa.chua@aetos.com.sg', 'Cyber Defence Platform'),
('82', 'Temasek Polytechnic', '92340760', 'zuchang@TP.Edu.sg', 'A long flight endurance drone with AI/Analytics enable detection capabilities'),
('83', 'Ocean Properties LLP', '63050885', 'sharine.ng@keppelland.com', 'Provision of Security and concierge service'),
('84', 'Immunis-New Products', '66940251', 'sara@oneberry.com', 'New Product'),
('85', 'OUE Commercial Property Management Pte Ltd', '65130066', 'praveena.mukunthan@ap.jll.com', 'OUR FR POC'),
('86', 'UOE Commercial Property Management Pte Ltd', '65130066', 'praveena.mukunthan@ap.jll.com', 'OUR FR POC'),
('87', 'Logicalis Singapore Pte Ltd', '97777881', 'cltoh@ap.logicalis.com', 'Immunis Next Generation Cyber Defence POC'),
('88', 'Usha Martin Singapore Pte Ltd', '62657756', 'oliver@umsingapore.com', 'Time attendance with Biometrics Access');
This diff is collapsed.
pscp -i C:\Users\USER1\Desktop\my-key.ppk C:\Users\USER1\Documents\test.txt centos@13.251.192.208:/home/centos/test/test.txt ---->copy a file
pscp -r -i C:\Users\USER1\Desktop\my-key.ppk C:\Users\USER1\Documents\test_folder centos@13.251.192.208:/home/centos/test ---->copy a directory
0N3Berry2018
\ No newline at end of file
pscp -i C:\Users\USER1\Desktop\my-key.ppk C:\Users\USER1\Documents\test.txt centos@13.251.192.208:/home/centos/test/test.txt ---->copy a file
pscp -r -i C:\Users\USER1\Desktop\my-key.ppk C:\Users\USER1\Documents\test_folder centos@13.251.192.208:/home/centos/test ---->copy a directory
0N3Berry2018
\ No newline at end of file
<html>
<head>
</head>
<body>
<h1>This file has been downloaded by the browser!</h1>
<p>Facts About the Sun:</p>
<p>The sun is a star.</p>
<p>The temperature at the sun's core is 15 million degrees Celsius.</p>
<p>There would be no life on Earth without the sun's energy.</p>
</body>
</html>
Application Abbreviation:
Resource Management System = rms
Change Request Management System = cms
Asset Management System = ams
Please use Application Abbreviation on default application and application columns
NOTE:
Save this file as .csv (Comma Delimited) to be able to upload it in the system
last active sheet
/*
I decided on the Brush Script MT cursive font for now. Works better for me than FlottFlott.
*/
.mtki,
.mtk4,
.mtk5,
.mtk8,
.mtk11
{
vertical-align: baseline;
font-family: "Operator Mono Light";
height: inherit;
font-size: 1.1em;
line-height: 1rem;
text-rendering: optimizeLegibility;
}
/*
.monaco-scrollable-element {
background-color: #EEE;
}
.content {
background-color: #ccc;
} */
/*
For the tab titles.
*/
/* .monaco-icon-label-description-container .label-name {
font-family: "Operator Mono Light";
font-size: 1.3em;
} */
.tabs-container .monaco-icon-label-description-container .label-name,
.sidebar .monaco-icon-label-description-container .label-name,
.quick-open-row .monaco-icon-label-description-container .label-name {
font-family: -apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,Ubuntu,Droid Sans,sans-serif;
font-size: 1em;
}
\ No newline at end of file
/*
I decided on the Brush Script MT cursive font for now. Works better for me than FlottFlott.
*/
.mtki,
.mtk4,
.mtk5,
.mtk8,
.mtk11
{
vertical-align: baseline;
font-family: "Operator Mono Light";
height: inherit;
font-size: 1.1em;
line-height: 1rem;
text-rendering: optimizeLegibility;
}
/*
.monaco-scrollable-element {
background-color: #EEE;
}
.content {
background-color: #ccc;
} */
/*
For the tab titles.
*/
/* .monaco-icon-label-description-container .label-name {
font-family: "Operator Mono Light";
font-size: 1.3em;
} */
.tabs-container .monaco-icon-label-description-container .label-name,
.sidebar .monaco-icon-label-description-container .label-name,
.quick-open-row .monaco-icon-label-description-container .label-name {
font-family: -apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,Ubuntu,Droid Sans,sans-serif;
font-size: 1em;
}
\ No newline at end of file
/*
I decided on the Brush Script MT cursive font for now. Works better for me than FlottFlott.
*/
.mtki,
.mtk4,
.mtk5,
.mtk8,
.mtk11
{
vertical-align: baseline;
font-family: "Operator Mono Light";
height: inherit;
font-size: 1.1em;
line-height: 1rem;
text-rendering: optimizeLegibility;
}
/*
.monaco-scrollable-element {
background-color: #EEE;
}
.content {
background-color: #ccc;
} */
/*
For the tab titles.
*/
/* .monaco-icon-label-description-container .label-name {
font-family: "Operator Mono Light";
font-size: 1.3em;
} */
.tabs-container .monaco-icon-label-description-container .label-name,
.sidebar .monaco-icon-label-description-container .label-name,
.quick-open-row .monaco-icon-label-description-container .label-name {
font-family: -apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,Ubuntu,Droid Sans,sans-serif;
font-size: 1em;
}
\ No newline at end of file
Lorem,ipsum,dolor,sit,amet,consectetur,adipisicing,elit.,Tenetur,dolore,repellat,nemo,doloremque,suscipit,libero,iusto!,Nobis,numquam,voluptates,amet,tenetur,deleniti,suscipit,ducimus,mollitia,optio,libero,delectus,quisquam,laudantium!
\ No newline at end of file
Username,Name,Company,Department,Department_Code,Email,Contact_No,Application,Default_app,Privilege_Company,Privilege_Department,Privilege_Department_Code,Create_CR,Create_Template,View_All_CR,Approve_CR Username,Name,Company,Department,Department_Code,Email,Contact_No,Application,Default_app,Privilege_Company,Privilege_Department,Privilege_Department_Code,Create_CR,Create_Template,View_All_CR,Approve_CR
ob-john,John Doe,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000064,johndoe@gmail.com,123456,"cms,ams",cms,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000064,Yes,No,Yes,Yes ob-john,John Doe,Oneberry Technologies,Sample Department,DEPARTMENT-20190101-0000000,johndoe@gmail.com,123456,"cms,ams",cms,Oneberry Technologies,Sample Department,DEPARTMENT-20190101-0000000,Yes,No,Yes,Yes
,,,,,,,,,Please use this department code as reference,,,,,, ,,,,,,,,,Please use this department code as reference,,,,,,
,,,,,,,,,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000064,,,, ,,,,,,,,,No Department Data,,,,,,
,,,,,,,,,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,,,,
,,,,,,,,,Jurong Town Corporation,Facilities Management,DEPARTMENT-20191121-0000062,,,,
,,,,,,,,,Jurong Town Corporation,Warehouse Department,DEPARTMENT-20191121-0000065,,,,
Username,Name,Company,Department,Department_Code,Email,Contact_No,Application,Default_app,Privilege_Company,Privilege_Department,Privilege_Department_Code,Create_CR,Create_Template,View_All_CR,Approve_CR
jtc-dos,Dos Doe,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,tirsamemail+dos@gmail.com,123457,"cms,ams",cms,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000065,Yes,No,Yes,Yes
jtc-dos,Dos Doe,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,tirsamemail+dos@gmail.com,123457,"cms,ams",cms,Jurong Town Corporation,Facilities Management,DEPARTMENT-20191121-0000062,No,Yes,Yes,No
jtc-dos,Dos Doe,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,tirsamemail+dos@gmail.com,123457,"cms,ams",cms,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,No,Yes,Yes,No
ob-dos,Dos Doe,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000064,tirsamemail+dos@gmail.com,123458,"cms,ams",cms,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,No,Yes,Yes,No
Username,Name,Company,Department,Department_Code,Email,Contact_No,Application,Default_app,Privilege_Company,Privilege_Department,Privilege_Department_Code,Create_CR,Create_Template,View_All_CR,Approve_CR
jtc-dos,Dos Doe,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,tirsamemail+dos@gmail.com,123457,"cms,ams",cms,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000065,Yes,No,Yes,Yes
jtc-dos,Dos Doe,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,tirsamemail+dos@gmail.com,123457,"cms,ams",cms,Jurong Town Corporation,Facilities Management,DEPARTMENT-20191121-0000062,No,Yes,Yes,No
jtc-dos,Dos Doe,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,tirsamemail+dos@gmail.com,123457,"cms,ams",cms,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,No,Yes,Yes,No
ob-dos,Tres Doe,Oneberry Technologies Pte Ltd,Business Development,DEPARTMENT-20191121-0000064,tirsamemail+tres@gmail.com,123458,"cms,ams",cms,Jurong Town Corporation,Security Division,DEPARTMENT-20191121-0000061,Yes,No,Yes,No
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment