Central

From wiki.techunit.org
Jump to: navigation, search

Architecture

Server App

Configuration

All app configuration are stored in one XML file

Loggers & audit (/centralAppConfig/logSetting)

All logs are write periodically, the time interval is spécified in timerLogMiliseconds

  • Serverities example:
 
<severities>
  <emergency code="0" keyword="emerg" />
  <alert code="1" keyword="alert" />
  <critical code="2" keyword="crit" />
  <error code="3" keyword="err" />
  <warning code="4" keyword="warning" />
  <notice code="5" keyword="notice" />
  <info code="6" keyword="info" />
  <debug code="7" keyword="debug" />
  <none code="-1" keyword="none" />
</severities>
  • Loggers example:
<loggers>
  <logger name="Test 1.1" filePathFormat="c:\TEMP\{date:yyMM}_{severity:keyword}.log" severitiesCodesToLog="0;1;2;3;4;5;6;7">
    chek it !!! 0({date}) 1({severity:priority}) 2({logSysContext}) 3({user:login}) 4({message})
  </logger>
  <logger name="Test 1.2" filePathFormat="c:\TEMP\logApp-{date:yyyy-MM}.csv" severitiesCodesToLog="0;1;2;3;4;5;6;7">
    chek it !!! 0({date:yyyyMMdd}) 1({severity}) 2({logSysContext}) 3({user}) 4({message})
  </logger>
</loggers>

References

<reference groupName="googleMapTools" name="googleMapKey" isEncrypted="false" referenceType="Key">
  AIzaSyDCO9qzyZpR-n9pzxJB-n7Z1IMewoUf6Rw
</reference>
<reference groupName="apiRef" name="centralApi" isEncrypted="false" referenceType="Url">
  http://localhost:52853/API
</reference>
<reference groupName="commonTools" name="centralApiResources" isEncrypted="false" referenceType="Url">
  {centralApi}/Resources/GetClientResourceFile?fileName=
</reference>
<reference groupName="commonTools" name="customStyle" isEncrypted="false" referenceType="HtmlLink">
  &lt;link href='{centralApiResources}custom.css' rel='stylesheet' /&gt;
</reference>
<reference groupName="commonTools" name="select2Style" isEncrypted="false" referenceType="HtmlLink">
  &lt;link href='{centralApiResources}select2.min.css' rel='stylesheet' /&gt;
</reference>
<reference groupName="commonTools" name="jqueryScript" isEncrypted="false" referenceType="HtmlLink">
  &lt;script src='{centralApiResources}jquery.min.js' type='text/javascript'&gt;&lt;/script&gt;
</reference>
<reference groupName="commonTools" name="select2Script" isEncrypted="false" referenceType="HtmlLink">
  &lt;script src='{centralApiResources}select2.min.js' type='text/javascript'&gt;&lt;/script&gt;
</reference>
<reference groupName="commonTools" name="utilityScript" isEncrypted="false" referenceType="HtmlLink">
  &lt;script src='{centralApiResources}techUnit.central.client.utility.js' type='text/javascript'&gt;&lt;/script&gt;
</reference>
<reference groupName="googleMapTools" name="gMap" isEncrypted="false" referenceType="HtmlLink">
  &lt;script src='http://maps.googleapis.com/maps/api/js?key={googleMapKey}&amp;amp;sensor=false&amp;amp;libraries=places' type='text/javascript'&gt;&lt;/script&gt;
</reference>
<reference groupName="googleMapTools" name="gMapUtilityScript" isEncrypted="false" referenceType="HtmlLink">
  &lt;script src='{centralApiResources}techUnit.central.client.gMapUtility.js' type='text/javascript'&gt;&lt;/script&gt;
</reference>
<reference groupName="worldTools" name="countryFlagStyles" isEncrypted="false" referenceType="HtmlLink">
  &lt;link href='{centralApiResources}techUnit.central.webClient.countryFlag.css' rel='stylesheet' /&gt;
</reference>
<reference groupName="worldTools" name="countryFlagsImg16" isEncrypted="false" referenceType="Url">
  {centralApiResources}techUnit.central.webClient.countryFlags16.png
</reference>
<reference groupName="worldTools" name="countryFlagsImg32" isEncrypted="false" referenceType="Url">
  {centralApiResources}techUnit.central.webClient.countryFlags32.png
</reference>

Tasks scheduling

Datasources

Built in
Custom
<datasource isEncrypted="false" connectionString="<SERVER>§<DATASOURCE>§<USERLOG>§<USERPASSWORD>" serviceType="Mongo" codeName="techUnitResources" maxElementsToReturn="127" timeOutSeconds="127">
    <properties>
      <property sourceName="_id" codeName="id" dataType="String" translationCodeNameLabel="PROPREF_LABEL_DATAID" translationCodeNameDescription="PROPREF_DESC_DATAID" staticProperty="DataId" />
      <property sourceName="_entityId" codeName="entityId" dataType="String" translationCodeNameLabel="PROPREF_LABEL_ENTITYID" translationCodeNameDescription="PROPREF_DESC_ENTITYID" staticProperty="EntityId" />
      <property sourceName="_codeName" codeName="codeName" dataType="String" translationCodeNameLabel="PROPREF_LABEL_CODENAME" translationCodeNameDescription="PROPREF_DESC_CODENAME" staticProperty="CodeName" />
      <property sourceName="trace_created_by" codeName="createdBy" dataType="User" translationCodeNameLabel="PROPREF_LABEL_CREATEDBY" translationCodeNameDescription="PROPREF_DESC_CREATEDBY" staticProperty="CreatedBy" />
      <property sourceName="trace_created_date" codeName="createdDate" dataType="DateTime" translationCodeNameLabel="PROPREF_LABEL_CREATEDDATE" translationCodeNameDescription="PROPREF_DESC_CREATEDDATE" staticProperty="CreatedDate" />
      <property sourceName="trace_updated_by" codeName="updatedBy" dataType="User" translationCodeNameLabel="PROPREF_LABEL_UPDATEDBY" translationCodeNameDescription="PROPREF_DESC_UPDATEDBY" staticProperty="UpdatedBy" />
      <property sourceName="trace_updated_date" codeName="updatedDate" dataType="DateTime" translationCodeNameLabel="PROPREF_LABEL_UPDATEDDATE" translationCodeNameDescription="PROPREF_DESC_UPDATEDDATE" staticProperty="UpdatedDate" />
      <property sourceName="file_name" codeName="fileName" dataType="String" translationCodeNameLabel="PROPREF_LABEL_FILENAME" translationCodeNameDescription="PROPREF_DESC_FILENAME" staticProperty="FileName" />
      <property sourceName="file_binary" codeName="fileBinary" dataType="Binary" translationCodeNameLabel="PROPREF_LABEL_FILEBINARY" translationCodeNameDescription="PROPREF_DESC_FILEBINARY" staticProperty="FileBinary" />
      <property sourceName="data_language_label" codeName="label" dataType="String" translationCodeNameLabel="PROPREF_LABEL_LANGUAGE_LABEL" translationCodeNameDescription="PROPREF_DESC_LANGUAGE_LABEL" />
      <property sourceName="data_language_family" codeName="family" dataType="String" translationCodeNameLabel="PROPREF_LABEL_LANGUAGE_FAMILY" translationCodeNameDescription="PROPREF_DESC_LANGUAGE_FAMILY" />
      ...
    </properties>
    <items>
      <item codeName="language" entityType="AppRes" collectionSourceName="languages">
        <propRef codeName="label" />
        <propRef codeName="family" />
        ...
      </item>
      ...
    </items>
</datasource>

Deployment

Run

Client App