Skip to content

Commit

Permalink
Merge pull request #207 from fga-eps-mds/feature/docapi
Browse files Browse the repository at this point in the history
Documentação da API
  • Loading branch information
Matheus Joranhezon authored Nov 25, 2018
2 parents 3eb0f9f + 0fd230b commit accf879
Show file tree
Hide file tree
Showing 11 changed files with 414 additions and 103 deletions.
40 changes: 29 additions & 11 deletions src/comex_stat/assets/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,18 +719,36 @@ def resolve_total_net_kilogram_trade_bloc(self, info):

class Query(graphene.ObjectType):
all_import = DjangoFilterConnectionField(
AssetImportFactsNode, filterset_class=AssetImportFilter)
AssetImportFactsNode, filterset_class=AssetImportFilter,
description="Método que retorna os objetos do tipo importação")
all_export = DjangoFilterConnectionField(
AssetExportFactsNode, filterset_class=AssetExportFilter)
all_tradeBlocs = DjangoFilterConnectionField(TradeBlocsType)
all_country = DjangoFilterConnectionField(CountryType)
all_federativeUnit = DjangoFilterConnectionField(FederativeUnitType)
all_transportation = DjangoFilterConnectionField(TransportationType)
all_urf = DjangoFilterConnectionField(UrfType)
all_ncm = DjangoFilterConnectionField(NCMType)
all_cuci = DjangoFilterConnectionField(CUCIType)
all_cgce = DjangoFilterConnectionField(CGCEType)
all_sh = DjangoFilterConnectionField(SHType)
AssetExportFactsNode, filterset_class=AssetExportFilter,
description="Método que retorna os objetos do tipo exportação")
all_tradeBlocs = DjangoFilterConnectionField(
TradeBlocsType,
description="Método que retorna os registros de blocos econômicos")
all_country = DjangoFilterConnectionField(
CountryType,
description="Método que retorna os países registrados")
all_federativeUnit = DjangoFilterConnectionField(
FederativeUnitType,
description="Método que retorna as unidades federativas registradas")
all_transportation = DjangoFilterConnectionField(
TransportationType,
description="Método que retorna as vias de trasportação cadastradas")
all_urf = DjangoFilterConnectionField(
UrfType, description="Método que retorna as URFs registradas")
all_ncm = DjangoFilterConnectionField(
NCMType, description="Método que retorna os NCMs dos registros")
all_cuci = DjangoFilterConnectionField(
CUCIType,
description="Método que retorna as nomenclaturas CUCI registradas")
all_cgce = DjangoFilterConnectionField(
CGCEType,
description="Método que retorna as nomenclaturas CGCE registradas")
all_sh = DjangoFilterConnectionField(
SHType,
description="Método que retorna as nomenclaturas SH registradas")
aggregated_import_transportation = DjangoFilterConnectionField(
Aggregated_Import, filterset_class=AssetImportFilter)
aggregated_import_urf = DjangoFilterConnectionField(
Expand Down
5 changes: 4 additions & 1 deletion src/comex_stat/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
class Query(comex_stat.assets.schema.Query, graphene.ObjectType):
# This class will inherit from multiple Queries
# as we begin to add more apps to our project
pass
class Meta:
description = ("Essas são as operações possíveis de pesquisa e seus " +
"respectivos filtros. Abaixo de cada uma pode ser" +
"encontrada uma breve descrição sobre a sua função")


schema = graphene.Schema(query=Query)
155 changes: 129 additions & 26 deletions src/comex_stat/static/css/homepage.css
Original file line number Diff line number Diff line change
@@ -1,34 +1,137 @@
body{
font-family: 'Nunito Sans', sans-serif;
@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";
body {
font-family: "Poppins", sans-serif;
background: #fafafa;
}
.navbar{
padding: .7em 10% .7em 10%;
background-color: #17c13d;

.imgql {
width: 1050;
height: 400;
padding-top: 10px;
padding-bottom: 50px;
}
.imgquery {
padding-bottom: 30px;
padding-top: 30px;
}

p {
font-family: "Poppins", sans-serif;
font-size: 1.1em;
font-weight: 300;
line-height: 1.7em;
color: #999;
}

a,
a:hover,
a:focus {
color: inherit;
text-decoration: none;
transition: all 0.3s;
}

.line {
width: 100%;
height: 1px;
border-bottom: 1px dashed #ddd;
margin: 40px 0;
}

.navbar .nav-item .nav-link {
color: white;
padding-right: 1em;
font-weight: bold;
.wrapper {
display: flex;
width: 100%;
}
.container-doc{
margin-top: 30px;

#sidebar {
width: 250px;
position: fixed;
top: 0;
left: 0;
height: 100vh;
z-index: 999;
background: #04471c;
color: #fff;
transition: all 0.3s;
}

#sidebar.active {
margin-left: -250px;
}

#sidebar .sidebar-header {
padding: 20px;
background: #0d2818;
}
#irapi {
border-bottom: 1px solid #0d2818;
}
.imgql{
width:1050;
height:400;
padding-top:10px;
padding-bottom: 50px;

#sidebar ul.components {
padding: 20px 0;
background: #04471c;
}
.topics{
padding-top:10px;
padding-bottom: 10px;

#sidebar ul p {
color: #fff;
padding: 10px;
}
.imgquery{
padding-bottom: 30px;
padding-top: 30px;

#sidebar ul li a {
padding: 10px;
font-size: 1.1em;
display: block;
}

#sidebar ul li a:hover {
color: #0d2818;
background: #fff;
}

#sidebar ul li.active > a,
a[aria-expanded="true"] {
color: #fff;
background: #0d2818;
}

ul ul a {
font-size: 0.9em !important;
padding-left: 30px !important;
background: #0d2818;
}

#content {
width: calc(100% - 250px);
padding: 40px;
min-height: 100vh;
transition: all 0.3s;
position: absolute;
top: 0;
right: 0;
text-align: justify;
text-justify: inter-word;
}

#content.active {
width: 100%;
}

#content h2,
h4 {
padding-bottom: 20px;
}

@media (max-width: 768px) {
#sidebar {
margin-left: -250px;
}
#sidebar.active {
margin-left: 0;
}
#content {
width: 100%;
}
#content.active {
width: calc(100% - 250px);
}
}
.content{
text-align: justify;
text-justify: inter-word;
}
Binary file added src/comex_stat/static/img/docs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added src/comex_stat/static/img/graphql_auto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/comex_stat/static/img/graphql_auto2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading

0 comments on commit accf879

Please sign in to comment.