diff --git a/resources/frontend_client/app/admin/databases/partials/database_edit.html b/resources/frontend_client/app/admin/databases/partials/database_edit.html index de2f6957b9f9a1fd6b1f9cc085780a9881c1b556..c677079a55fc62ac0cc4edad89213f853344b5c7 100644 --- a/resources/frontend_client/app/admin/databases/partials/database_edit.html +++ b/resources/frontend_client/app/admin/databases/partials/database_edit.html @@ -1,40 +1,39 @@ +<section class="wrapper"> + <h2 class="py2" ng-if="!database.id">Add Database</h2> + <h2 class="py2" ng-if="database.id">{{database.name}}</h2> -<div class="wrapper"> - <div class="border-bottom"> - <h2 ng-if="!database.id">Add Database</h2> - <h2 ng-if="database.id">{{database.name}}</h2> - </div> + <form class="bordered bg-white shadowed rounded" novalidate> + <div class="p4"> + <div class="py1"> + <label class="text-grey-4">Type:</label> + <label class="Select ml2"> + <select class="my2" ng-model="database.engine" ng-options="type as properties.name for (type, properties) in databaseTypes"></select> + </label> + </div> - <form novalidate> - <div class="py1"> - <div class="py1"> - <label>Type:</label> - <select class="my2 block full" ng-model="database.engine" ng-options="type as properties.name for (type, properties) in databaseTypes"></select> - </div> + <div class="py1"> + <label>Name:</label> + <input class="input block" type="text" ng-model="database.name"/> + </div> - <div class="py1"> - <label>Name:</label> - <input class="input block full" type="text" ng-model="database.name"/> - </div> + <div class="py1"> + <label>{{databaseTypes[database.engine].name}} Connection String:</label> + <input class="input block" type="text" ng-model="database.details.conn_str"/> + <span class="block mt1 text-grey-3">ex: {{databaseTypes[database.engine].example}}</span> + </div> - <div class="py1"> - <label>{{databaseTypes[database.engine].name}} Connection String:</label> - <input class="input block full" type="text" ng-model="database.details.conn_str"/> - <span>ex: {{databaseTypes[database.engine].example}}</span> - </div> + <div class="py1"> + <label>Timezone:</label> + <label class="Select ml2"> + <select ng-model="database.details.timezone" ng-options="tz for tz in form_input['timezones']"> + <option value="">Select a timezone...</option> + </select> + </label> + </div> + </div> - <div class="py1"> - <label>Timezone:</label> - <select class="block" ng-model="database.details.timezone" ng-options="tz for tz in form_input['timezones']"> - <option value="">----------</option> - </select> - </div> - </div> - - <div class="py2 border-top"> - <div class="inline-block"> - <input class="Button Button--primary" type="button" value="Save" ng-click="save(database)"/> - </div> - </div> + <div class="py3 px4 border-top clearfix"> + <input class="Button Button--primary float-right" type="button" value="Save" ng-click="save(database)"/> + </div> </form> -</div> +</section> diff --git a/resources/frontend_client/app/admin/databases/partials/database_list.html b/resources/frontend_client/app/admin/databases/partials/database_list.html index 660dec274a8156274a57025ac8e19ee36f5f7f92..bd387ac581eca4b049ba7669cec7bff5fd16c999 100644 --- a/resources/frontend_client/app/admin/databases/partials/database_list.html +++ b/resources/frontend_client/app/admin/databases/partials/database_list.html @@ -1,5 +1,5 @@ -<div class="wrapper"> - <div class="py2 border-bottom"> +<section class="wrapper"> + <div class="py2"> <div class="float-right"> <a class="Button Button--primary" cv-org-href="/admin/databases/create">Add Database</a> </div> @@ -7,21 +7,17 @@ </div> <div> - <div ng-if="!databases"> - <h3 class="text-normal text-centered">Loading ...</h3> - </div> - - <ul> - <li class="py2 border-bottom" ng-repeat="database in databases"> - <div class="my1 float-right"> - <a class="Button" ng-click="delete(database.id)" delete-confirm>Delete</a> - </div> + <div ng-if="!databases"> + <h3 class="text-normal text-centered">Loading ...</h3> + </div> - <div> - <h4><a class="link" cv-org-href="/admin/databases/{{database.id}}">{{database.name}}</a></h4> - <span>{{database.engine}}</span> - </div> + <ul class="bordered rounded bg-white shadowed"> + <li class="p2 clearfix" ng-repeat="database in databases"> + <h4 class="inline-block"> + <a class="link" cv-org-href="/admin/databases/{{database.id}}">{{database.name}}</a> + </h4> + <span class="inline-block">{{database.engine}}</span> </li> - </ul> + </ul> </div> -</div> +</section> diff --git a/resources/frontend_client/app/admin/datasets/partials/dataset_edit.html b/resources/frontend_client/app/admin/datasets/partials/dataset_edit.html index 5a9efe2f718b8a1d42210c4c2104be96f872bb3d..b74ce9fde36a8dff972641d92c3435056bb42f56 100644 --- a/resources/frontend_client/app/admin/datasets/partials/dataset_edit.html +++ b/resources/frontend_client/app/admin/datasets/partials/dataset_edit.html @@ -6,82 +6,84 @@ </defs> </svg> -<div class="pb2 clearfix" ng-if="table"> - <div class="clearfix"> - <div class="text-grey-3 float-right" ng-if="table.entity_name"> - <p class="text-right">actual table name: {{table.name}}</p> - <p class="py1 text-right clearfix"> - <a class="link float-right ml3" cv-org-href="/admin/datasets/{{table.id}}/dependents">List Dependents</a> - <a class="link float-right" ng-click="syncMetadata()">Sync Metadata</a> - </p> - </div> - <div class="float-left"> - <h2 class="inline-block"> - <a class="text-brand" href="#" ng-class="{EditedEntity: table.entity_name}" editable-text="table.entity_name" onaftersave="inlineSave()"> - <span ng-if="table.entity_name">{{table.entity_name}}</span> +<section class="wrapper"> + <div class="pb2 clearfix" ng-if="table"> + <div class="clearfix"> + <div class="text-grey-3 float-right" ng-if="table.entity_name"> + <p class="text-right">actual table name: {{table.name}}</p> + <p class="py1 text-right clearfix"> + <a class="link float-right ml3" cv-org-href="/admin/datasets/{{table.id}}/dependents">List Dependents</a> + <a class="link float-right" ng-click="syncMetadata()">Sync Metadata</a> + </p> + </div> + <div class="float-left"> + <h2 class="inline-block"> + <a class="text-brand" href="#" ng-class="{EditedEntity: table.entity_name}" editable-text="table.entity_name" onaftersave="inlineSave()"> + <span ng-if="table.entity_name">{{table.entity_name}}</span> - <span ng-if="!table.entity_name">{{table.name}}</span> - </a> - </h2> - <label class="Select mx2 inline-block"> - <select ng-class="{CustomTypeApplied: table.entity_type }" ng-model="table.entity_type" ng-change="inlineSave()" ng-options="ent_type.id as ent_type.name for ent_type in utils.table_entity_types"> - </select> - </label> - <div class="text-grey-4 mt1"> - <a e-class="full" href="#" ng-class="{EditedEntity: table.description }" editable-text="table.description" onaftersave="inlineSave()"> - {{table.description}} - <span ng-if="!table.description">Add a description ...</span> - </a> + <span ng-if="!table.entity_name">{{table.name}}</span> + </a> + </h2> + <label class="Select mx2 inline-block"> + <select ng-class="{CustomTypeApplied: table.entity_type }" ng-model="table.entity_type" ng-change="inlineSave()" ng-options="ent_type.id as ent_type.name for ent_type in utils.table_entity_types"> + </select> + </label> + <div class="text-grey-4 mt1"> + <a e-class="full" href="#" ng-class="{EditedEntity: table.description }" editable-text="table.description" onaftersave="inlineSave()"> + {{table.description}} + <span ng-if="!table.description">Add a description ...</span> + </a> + </div> </div> </div> - </div> - <cv-annotation-form model="table" id="{{table.id}}"></cv-annotation-form> -</div> + <cv-annotation-form model="table" id="{{table.id}}"></cv-annotation-form> + </div> -<div class="DragBoundary mt2 border-bottom"> - <ul as-sortable="dragControlListeners" ng-model="fields"> - <li class="border-top py2 relative text-grey-3" ng-repeat="field in table.fields" as-sortable-item> - <div class="Drag-handle" title="Reorder" as-sortable-item-handle> - <svg width="9" height="36"> - <rect class="Dragger" fill="url(#dragger)" width="6" height="42"> - </svg> - </div> - <div class="ml3 mr1 clearfix"> - <div class="float-right"> - <span class="EntityOriginalType float-left">{{field.base_type}}</span> + <div class="DragBoundary mt2 border-bottom"> + <ul as-sortable="dragControlListeners" ng-model="fields"> + <li class="border-top py2 relative text-grey-3" ng-repeat="field in table.fields" as-sortable-item> + <div class="Drag-handle" title="Reorder" as-sortable-item-handle> + <svg width="9" height="36"> + <rect class="Dragger" fill="url(#dragger)" width="6" height="42"> + </svg> </div> - <div> - <input ng-model="field.preview_display" type="checkbox" ng-change="inlineSaveField($index)"> - <h3 class="text-bold inline-block"> - <a class="link mr1" cv-org-href="/admin/datasets/field/{{field.id}}">{{field.name}}</a> - </h3> + <div class="ml3 mr1 clearfix"> + <div class="float-right"> + <span class="EntityOriginalType float-left">{{field.base_type}}</span> + </div> + <div> + <input ng-model="field.preview_display" type="checkbox" ng-change="inlineSaveField($index)"> + <h3 class="text-bold inline-block"> + <a class="link mr1" cv-org-href="/admin/datasets/field/{{field.id}}">{{field.name}}</a> + </h3> - <label class="Select mx1"> - <select ng-class="{CustomTypeApplied: field.field_type }" ng-model="field.field_type" ng-change="inlineSaveField($index)" ng-options="spec_type.id as spec_type.name for spec_type in utils.field_field_types"> - </select> - </label> - <label class="Select mx1"> - <select ng-class="{CustomTypeApplied: field.special_type }" ng-model="field.special_type" ng-change="inlineSpecialTypeChange($index)" ng-options="spec_type.id as spec_type.name for spec_type in utils.field_special_types"> - </select> - </label> - <label class="Select mx1" ng-if="field.special_type=='fk'"> - <select ng-model="field.target_id" ng-change="inlineChangeFKTarget($index)" ng-options="idf.id as idf.displayName for idf in idfields"> - <option value="" disabled selected>Target Field</option> - </select> - </label> + <label class="Select mx1"> + <select ng-class="{CustomTypeApplied: field.field_type }" ng-model="field.field_type" ng-change="inlineSaveField($index)" ng-options="spec_type.id as spec_type.name for spec_type in utils.field_field_types"> + </select> + </label> + <label class="Select mx1"> + <select ng-class="{CustomTypeApplied: field.special_type }" ng-model="field.special_type" ng-change="inlineSpecialTypeChange($index)" ng-options="spec_type.id as spec_type.name for spec_type in utils.field_special_types"> + </select> + </label> + <label class="Select mx1" ng-if="field.special_type=='fk'"> + <select ng-model="field.target_id" ng-change="inlineChangeFKTarget($index)" ng-options="idf.id as idf.displayName for idf in idfields"> + <option value="" disabled selected>Target Field</option> + </select> + </label> + </div> + <div class="pt1 full"> + <a e-class="full" href="#" ng-class="{EditedEntity: field.description }" editable-text="field.description" onaftersave="inlineSaveField($index)"> + {{field.description}} + <span ng-if="!field.description">Add a description...</span> + </a> + </div> </div> - <div class="pt1 full"> - <a e-class="full" href="#" ng-class="{EditedEntity: field.description }" editable-text="field.description" onaftersave="inlineSaveField($index)"> - {{field.description}} - <span ng-if="!field.description">Add a description...</span> - </a> + <div class="mt2 ml3 mr1"> + <cv-annotation-form model="field" id="{{field.id}}"></cv-annotation-form> </div> - </div> - <div class="mt2 ml3 mr1"> - <cv-annotation-form model="field" id="{{field.id}}"></cv-annotation-form> - </div> - </li> - </ul> -</div> + </li> + </ul> + </div> +</section> diff --git a/resources/frontend_client/app/admin/datasets/partials/dataset_list.html b/resources/frontend_client/app/admin/datasets/partials/dataset_list.html index 446456e061e3e1e2c6ad595bcd56a78c4b95ef7d..f14b9bdcf866c32ccc1ea041450f7b173fbcb06a 100644 --- a/resources/frontend_client/app/admin/datasets/partials/dataset_list.html +++ b/resources/frontend_client/app/admin/datasets/partials/dataset_list.html @@ -1,19 +1,20 @@ -<div class="wrapper"> +<section class="wrapper"> <div ng-repeat="db in databases"> - <div class="py2 border-bottom"> + <div class="py2 clearfix"> <div class="float-right"> <a class="Button Button--primary" ng-click="syncDatabase(db.id)">Re-Sync Database</a> </div> <h2>{{db.name}}</h2> </div> - <ul> - <li class="py2 border-bottom" ng-repeat="table in db.tables"> - <h4><a class="EntityListItem" ng-class="{ EditedEntity: table.entity_name, EditedEntityMarker: table.entity_name }" cv-org-href="/admin/datasets/{{table.id}}"> - <span class="ModifiedEntity">{{table.entity_name}}</span> - <span ng-if="!table.entity_name">{{table.name}}</span> - </a> + <ul class="bg-white bordered rounded shadowed"> + <li class="p2 border-bottom" ng-repeat="table in db.tables"> + <h4> + <a class="EntityListItem link" ng-class="{ EditedEntity: table.entity_name, EditedEntityMarker: table.entity_name }" cv-org-href="/admin/datasets/{{table.id}}"> + <span class="ModifiedEntity">{{table.entity_name}}</span> + <span ng-if="!table.entity_name">{{table.name}}</span> + </a> </h4> </li> </ul> </div> -</div> +</section> diff --git a/resources/frontend_client/app/admin/datasets/partials/field_detail.html b/resources/frontend_client/app/admin/datasets/partials/field_detail.html index 7b9df7ab31d323fbdbc361fc739aff029b3ff462..69942f63a1b155583025d4ea4c037e359c8ef337 100644 --- a/resources/frontend_client/app/admin/datasets/partials/field_detail.html +++ b/resources/frontend_client/app/admin/datasets/partials/field_detail.html @@ -1,91 +1,82 @@ -<!-- -<ol class="px2"> - <li><a href="/explore/org/{{field.table.db.organization.id}}">{{field.table.db.organization.name}}</a></li> - <li><a href="/explore/db/{{field.table.db.id}}">{{field.table.db.name}}</a></li> - <li><a href="/explore/table/{{field.table.id}}">{{field.table.name}}</a></li> - <li class="active">{{field.name}}</li> -</ol> ---> +<section class="wrapper"> + <div class="clearfix"> + <div class="px1 py1"> + <div> + <h3>Information</h3> + <b>Database:</b> <a cv-org-href="/explore/db/{{field.table.db.id}}">{{field.table.db.name}}</a><br/> + <b>Table:</b> <a cv-org-href="/explore/table/{{field.table.id}}">{{field.table.name}}</a><br/> + <b>Data Type:</b> {{field.base_type}} <br/> + <b>User Assigned Type:</b> <a href="#" editable-select="field.special_type" onaftersave="inlineSave()" e-ng-options="spec_type.id as spec_type.name for spec_type in utils.field_special_types">{{utils.fieldSpecialType(field.special_type)}}</a> <br/> + <b>Display in preview:</b> <a href="#" editable-select="field.preview_display" onaftersave="inlineSave()" e-ng-options="spec_type.id as spec_type.name for spec_type in utils.boolean_types">{{field.preview_display && "Yes" || "No"}}</a> <br/> -<div class="EntityGroup bordered clearfix"> - <div class="px1 py1"> - <div> - <h3>Information</h3> - <b>Database:</b> <a cv-org-href="/explore/db/{{field.table.db.id}}">{{field.table.db.name}}</a><br/> - <b>Table:</b> <a cv-org-href="/explore/table/{{field.table.id}}">{{field.table.name}}</a><br/> - <b>Data Type:</b> {{field.base_type}} <br/> - <b>User Assigned Type:</b> <a href="#" editable-select="field.special_type" onaftersave="inlineSave()" e-ng-options="spec_type.id as spec_type.name for spec_type in utils.field_special_types">{{utils.fieldSpecialType(field.special_type)}}</a> <br/> - <b>Display in preview:</b> <a href="#" editable-select="field.preview_display" onaftersave="inlineSave()" e-ng-options="spec_type.id as spec_type.name for spec_type in utils.boolean_types">{{field.preview_display && "Yes" || "No"}}</a> <br/> + <b>Description:</b> <a href="#" editable-textarea="field.description" e-rows="4" e-cols="50" onaftersave="inlineSave()">{{field.description}}<span ng-if="!field.description">Description</span></a> <br/> + <div ng-if="fks"> + <b>Relationships:</b><br> + <table class="Table"> + <thead> - <b>Description:</b> <a href="#" editable-textarea="field.description" e-rows="4" e-cols="50" onaftersave="inlineSave()">{{field.description}}<span ng-if="!field.description">Description</span></a> <br/> - <div ng-if="fks"> - <b>Relationships:</b><br> - <table class="Table"> - <thead> - - <tr> - <th>Destination Table</th> - <th>Destination Field</th> - <th>Relationship Type</th> - <th>Delete</th> - </tr> - </thead> - <tbody> - <tr ng-repeat="fk in fks"> - <td>{{fk.destination.table.name}}</td> - <td>{{fk.destination.name}}</td> - <td>{{fk.relationship}}</td> - <td> <a class="Button Button--remove" href="#" ng-click="deleteRelationship(fk.id)" delete-confirm>x</a></td> - </tr> - </tbody> - </table> - </div> - <hr /> - <cv-comments type="field" id="field.id" title="Notes"></cv-comments> - </div> - <div> + <tr> + <th>Destination Table</th> + <th>Destination Field</th> + <th>Relationship Type</th> + <th>Delete</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="fk in fks"> + <td>{{fk.destination.table.name}}</td> + <td>{{fk.destination.name}}</td> + <td>{{fk.relationship}}</td> + <td> <a class="Button Button--remove" href="#" ng-click="deleteRelationship(fk.id)" delete-confirm>x</a></td> + </tr> + </tbody> + </table> + </div> + <hr /> + <cv-comments type="field" id="field.id" title="Notes"></cv-comments> + </div> + <div> + <h3>Summary</h3> - <h3>Summary</h3> + <table class="table table-striped"> + <thead> + <tr> + <th>Characteristic</th> + <th>Value</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="item in field_summary"> + <td>{{item[0]}}</td> + <td>{{item[1]}}</td> + </tr> + </tbody> + </table> + <div class="border-top py2"> + <div class="py2"> + <input class="Button Button--primary float-right" type="button" value="Update Mapped Values" role="button" ng-click="updateMappedValues()" /> + <h3>Valid Values</h3> + </div> - <table class="table table-striped"> - <thead> - <tr> - <th>Characteristic</th> - <th>Value</th> - </tr> - </thead> - <tbody> - <tr ng-repeat="item in field_summary"> - <td>{{item[0]}}</td> - <td>{{item[1]}}</td> - </tr> - </tbody> - </table> - <div class="border-top py2"> - <div class="border-bottom py2"> + <table class="Table"> - <input type="button" value="Update Mapped Values" class="Button Button--primary float-right" role="button" ng-click="updateMappedValues()" /> - <h3>Valid Values</h3> - </div> + <thead> + <tr> + <th>Value</th> + <th>Remapped Value</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="value in field_values.values"> + <td>{{value || "Empty Field"}}</td> + <td> <input class="input" ng-model="field_values.human_readable_values[value]"> </td> + </tr> - <table class="Table"> - - <thead> - <tr> - <th>Value</th> - <th>Remapped Value</th> - </tr> - </thead> - <tbody> - <tr ng-repeat="value in field_values.values"> - <td>{{value || "Empty Field"}}</td> - <td> <input class="input" ng-model="field_values.human_readable_values[value]"> </td> - </tr> - - </tbody> - </table> - </div> - </div> -</div> + </tbody> + </table> + </div> + </div> + </div> +</section> <cv-field-relationship-modal title="sendCardTitle" field="field" show="modalShown" callback="relationshipAdded" /> diff --git a/resources/frontend_client/app/admin/emailreport/partials/emailreport_detail.html b/resources/frontend_client/app/admin/emailreport/partials/emailreport_detail.html index d5c3f3df1372c8ae33d6e1fe37f2d30c2540dab3..1c5b529adbb711d45028636a880e646cf43ee470 100644 --- a/resources/frontend_client/app/admin/emailreport/partials/emailreport_detail.html +++ b/resources/frontend_client/app/admin/emailreport/partials/emailreport_detail.html @@ -1,10 +1,17 @@ +<section class="wrapper"> + <h2 class="py2">New Email Report</h2> + + <form novalidate class="bg-white bordered rounded shadowed"> + <div class="p4 border-bottom"> + <div class="py1"> + <label >Report Name:</label> + <input class="input block" size="80" maxlength="255" type="text" ng-model="report.name"/> + </div> -<div class="wrapper"> - <form class="Form" novalidate> - <div class="py2 border-bottom"> - <h2>Email Report</h2> - - <div class="py1 float-right"> + <div class="py1"> + <label >Description:</label> + <input class="input block" size="80" maxlength="255" type="text" ng-model="report.description"/> + </div> <div> <label class="block">Mode:</label> <div class="Button-group"> @@ -19,42 +26,33 @@ </select> </div> </div> - </div> - - <div class="py1"> - <label >Report Name:</label> - <input class="input block" size="80" maxlength="255" type="text" ng-model="report.name"/> - </div> - - <div class="py1"> - <label >Description:</label> - <input class="input block" size="80" maxlength="255" type="text" ng-model="report.description"/> - </div> </div> - <div class="py2 border-bottom"> - <h2>Recipients</h2> + <div class="p4 border-bottom"> + <h3>Recipients</h3> <div class="py1"> <label >Team Members:</label> - <table class="Table"> - <tr ng-repeat="user in form_input.users"> - <td><input type="checkbox" ng-model="user.incl" /></td> - <td class="full">{{user.name}}</td> - </tr> - </table> + <div class="Table-wrapper"> + <table class="Table bordered bg-white"> + <tr ng-repeat="user in form_input.users"> + <td><input type="checkbox" ng-model="user.incl" /></td> + <td class="full">{{user.name}}</td> + </tr> + </table> + </div> </div> <div class="py1"> <label >Email Aliases:</label> - <input class="input block full" size="80" maxlength="255" type="text" ng-model="report.email_addresses"/> + <input class="input block" size="80" maxlength="255" type="text" ng-model="report.email_addresses"/> </div> </div> - <div class="py2 border-bottom"> - <h2>Data</h2> + <div class="p4 border-bottom"> + <h3>Data</h3> - <div class="py1"> + <div class="py1 inline-block mr3"> <label class="block">Database:</label> <div class="Select block"> <select class="block" ng-model="report.dataset_query.database" ng-options="db.id as db.name for db in form_input.databases" ng-change="refreshTableList(report.dataset_query.database)"> @@ -62,7 +60,7 @@ </div> </div> - <div class="py1"> + <div class="py1 inline-block"> <label class="block">Table:</label> <div class="Select block"> <select class="block" ng-model="report.dataset_query.query.source_table" ng-options="tbl.id as tbl.name for tbl in tables"> @@ -71,8 +69,8 @@ </div> </div> - <div class="py1"> - <h2>Schedule</h2> + <div class="p4"> + <h3>Schedule</h3> <div class="Button-group"> <label class="Button" ng-class="{ 'Button--selected' : report.schedule.days_of_week[day.id] }" ng-model="report.schedule.days_of_week[day.id]" ng-repeat="day in form_input.days_of_week" btn-checkbox>{{day.name}}</label> @@ -97,11 +95,15 @@ </div> <div class="my1 py2 border-top"> - <div class="float-right"> - <input class="Button" type="button" value="Send Now" ng-if="report.id" ng-click="executeReport(report.id)"/> - </div> + <div class="clearfix"> + <div class="float-left"> + <input class="Button" type="button" value="Send Now" ng-if="report.id" ng-click="executeReport(report.id)"/> + </div> - <input class="Button Button--primary" type="button" value="Save" ng-click="save(report)"/> + <div class="float-right"> + <input class="Button Button--primary" type="button" value="Save" ng-click="save(report)"/> + </div> + </div> <div class="inline-block" ng-cloak> <span class="px2 text-success" ng-if="success_message" cv-delayed-call="clearStatus()">{{success_message}}</span> @@ -111,4 +113,4 @@ </div> </div> </form> -</div> +</section> diff --git a/resources/frontend_client/app/admin/emailreport/partials/emailreport_list.html b/resources/frontend_client/app/admin/emailreport/partials/emailreport_list.html index 3d4a3d179d1589f9a4f620f59400b162335ce057..8a935bfb9014026c03b1929c8e8ee757b78f2c09 100644 --- a/resources/frontend_client/app/admin/emailreport/partials/emailreport_list.html +++ b/resources/frontend_client/app/admin/emailreport/partials/emailreport_list.html @@ -1,41 +1,40 @@ - -<div class="wrapper"> - <div class="py2 border-bottom"> +<section class="wrapper"> + <div class="py2"> <div class="float-right"> <a class="Button Button--primary" cv-org-href="/admin/emailreport/create">Create Email Report</a> </div> - <h2>Email Report List</h2> + <h2>Reports</h2> </div> - <div> - <div class="List-filters List-section clearfix"> - <div class="List-filterCategories float-left"> - <span class="List-filterLabel float-left">filter:</span> + <div class="py4 rounded bordered bg-white shadowed"> + <div class="clearfix" ng-show="reports.length > 0"> + <div class="float-right"> + <span class="inline-block text-grey-3">Filter:</span> <div class="Button-group"> <a class="Button" ng-class="{ 'Button--selected' : filterMode == 'all' }" ng-click="filter('all')">all</a> <a class="Button" ng-class="{ 'Button--selected' : filterMode == 'mine' }" ng-click="filter('mine')">mine</a> </div> </div> - <div class="float-left"> - <input class="mx3 input" type="text" ng-model="searchFilter" placeholder="Search executions ..."> - </div> - <div class="float-right"> <span>Sort by:</span> - <select ng-init="sortMode = 'name'" ng-model="sortMode" ng-change="sort()"> - <option value="name">Name (default)</option> - <option value="owner">Owner</option> - <option value="date">Last Updated</option> - </select> + <label class="Select"> + <select ng-init="sortMode = 'name'" ng-model="sortMode" ng-change="sort()"> + <option value="name">Name (default)</option> + <option value="owner">Owner</option> + <option value="date">Last Updated</option> + </select> + </label> </div> - </div> - - <div ng-if="!reports"> - <h3>Loading ...</h3> + <input class="ml4 input" type="text" ng-model="searchFilter" placeholder="Search reports ..."> </div> <ul> + <div ng-if="!reports"> + <cv-loading-icon></cv-loading-icon> + <h3>Loading ...</h3> + </div> + <li class="py2 border-bottom" ng-repeat="report in reports | filter:searchFilter"> <div class="my1 float-right"> <a class="Button mx1" ng-click="executeReport(report.id)">Send Now</a> @@ -50,4 +49,4 @@ </li> </ul> </div> -</div> +</section> diff --git a/resources/frontend_client/app/admin/people/partials/people.html b/resources/frontend_client/app/admin/people/partials/people.html index 0a306b27ac6874fbd6e9ee6a25d465ab3880da74..a656a250cbc66d2f3d566d75e716f7bf9b605aa2 100644 --- a/resources/frontend_client/app/admin/people/partials/people.html +++ b/resources/frontend_client/app/admin/people/partials/people.html @@ -1,25 +1,20 @@ -<div> +<div class="wrapper"> + <div ng-cloak> <alert class="alert" ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)" ng-animate=" 'animate' " cv-delayed-call="closeAlert($index)">{{alert.msg}}</alert> </div> - <div class="clearfix"> - <a class="Button float-right" cv-admin-create-user organization="currentOrg" callback="createdUser">Add teammate</a> + <div class="py2 clearfix"> + <a class="Button Button--primary float-right" cv-admin-create-user organization="currentOrg" callback="createdUser">Add teammate</a> <h2>People</h2> </div> - <ul class="List"> + <ul class="bordered bg-white shadowed rounded"> <li class="List-item List-section clearfix" ng-repeat="perm in people"> - <div class="float-right"> - <a class="Button" ng-if="perm.admin" ng-click="revokeAdmin($index)">Revoke Admin</a> - <a class="Button" ng-if="!perm.admin" ng-click="grantAdmin($index)">Grant Admin</a> - <a class="Button" cv-org-href="/admin/people/{{perm.user.id}}/modify" >Edit</a> - <a class="Button" cv-org-href="/admin/people/{{perm.user.id}}/change_password" >Change password</a> - <a class="Button" ng-click="removeMember(perm.user.id)" delete-confirm>x</a> - </div> - <h4>{{perm.user.common_name}} ({{perm.user.email}})</h4> - <span ng-if="perm.admin">Administrator</span> - <span ng-if="!perm.admin">Member</span> + <h4 class="inline-block"> + <a class="link" cv-org-href="/admin/people/{{perm.user.id}}/modify">{{perm.user.common_name}}</a> + </h4> + <span class="User-perms inline-block" ng-if="perm.admin">Admin</span> </li> </ul> </div> diff --git a/resources/frontend_client/app/admin/people/partials/user_edit.html b/resources/frontend_client/app/admin/people/partials/user_edit.html index e9c038dd8dbe2ae28a3b45ab7eda49c1dbbd7450..ba73f6023f3127cc4b826e4e72c670644aad3ceb 100644 --- a/resources/frontend_client/app/admin/people/partials/user_edit.html +++ b/resources/frontend_client/app/admin/people/partials/user_edit.html @@ -1,28 +1,36 @@ -<div> - <div class="Form-group border-bottom clearfix"> - <h3 class="text-normal">Edit teammate</h3> - </div> - <div ng-cloak> - <alert class="alert" ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)" ng-animate=" 'animate' " cv-delayed-call="closeAlert($index)">{{alert.msg}}</alert> +<section class="wrapper"> + <div class="py2"> + <h2 class="text-normal">Edit teammate</h2> </div> - <form name="editUserAdmin" novalidate ng-submit="submit()" cv-form="user"> - <div class="clearfix"> - <div class="Form-group" cv-error-flag="first_name"> - <input class="input block full" ng-model="user.first_name" type="text" name="first_name" placeholder="First Name" autofocus> - <fielderrors for="first_name"></fielderrors> + <div class="bg-white bordered rounded shadowed"> + <form name="editUserAdmin" novalidate ng-submit="submit()"> + <div class="p4"> + <div class="py2"> + <label class="block mb1" for="first_name">First name:</label> + <input class="input block" ng-model="user.first_name" type="text" name="first_name" placeholder="First Name" autofocus> + </div> + <div class="py2"> + <label class="block mb1" for="last_name">Last name:</label> + <input class="input block" ng-model="user.last_name" type="text" name="last_name" placeholder="Last Name"> + </div> + <div class="py2"> + <label class="block mb1" for="email">Email</label> + <input class="input block" ng-model="user.email" type="email" name="email" placeholder="Email address" required> + </div> + <div class="py2"> + <a class="Button" ng-if="user.is_superuser" ng-click="revokeAdmin()">Revoke Admin</a> + <a class="Button" ng-if="!user.is_superuser" ng-click="grantAdmin()">Grant Admin</a> + <a class="Button" cv-org-href="/admin/people/{{perm.user.id}}/change_password" >Change password</a> + <a class="Button" ng-click="removeMember(perm.user.id)" delete-confirm>Delete user</a> + </div> </div> - <div class="Form-group" cv-error-flag="last_name"> - <input class="input block full" ng-model="user.last_name" type="text" name="last_name" placeholder="Last Name"> - <fielderrors for="last_name"></fielderrors> + <div ng-cloak> + <alert class="alert" ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)" ng-animate=" 'animate' " cv-delayed-call="closeAlert($index)">{{alert.msg}}</alert> </div> - <div class="Form-group" cv-error-flag="email"> - <input class="input block full" ng-model="user.email" type="email" name="email" placeholder="Email address" required> - <fielderrors for="email"></fielderrors> + <div class="border-top py2 px4 clearfix"> + <button class="Button Button--primary float-right" type="submit" ng-disabled="!form.$dirty || form.$invalid">Save changes</button> </div> - </div> - <div class="Form-group border-top clearfix"> - <button class="Button Button--primary float-right" type="submit" ng-disabled="!form.$dirty || form.$invalid">Save changes</button> - </div> - </form> -</div> + </form> + </div> +</section> diff --git a/resources/frontend_client/app/admin/people/people.controllers.js b/resources/frontend_client/app/admin/people/people.controllers.js index 2f3c4c87be03845932f438d328703ab1e2599bdf..cd1081b651b98faba5dac76f5405b14f6f9c43b8 100644 --- a/resources/frontend_client/app/admin/people/people.controllers.js +++ b/resources/frontend_client/app/admin/people/people.controllers.js @@ -22,53 +22,6 @@ PeopleControllers.controller('PeopleList', ['$scope', '$routeParams', 'Organizat $scope.people.unshift(newUser); }; - $scope.grantAdmin = function(index) { - if ($scope.people) { - console.log('grant'); - Organization.member_update({ - 'orgId': $scope.currentOrg.id, - 'userId': $scope.people[index].user.id, - 'admin': true - }, function (result) { - $scope.people[index].admin = true; - }, function (error) { - console.log('error', error); - $scope.alertError('failed to grant admin to user'); - }); - } - }; - - $scope.revokeAdmin = function(index) { - if ($scope.people) { - Organization.member_update({ - 'orgId': $scope.currentOrg.id, - 'userId': $scope.people[index].user.id, - 'admin': false - }, function(result) { - $scope.people[index].admin = false; - }, function (error) { - console.log('error', error); - $scope.alertError('failed to revoke admin from user'); - }); - } - }; - - $scope.removeMember = function(userId) { - if ($scope.people) { - Organization.member_remove({ - 'orgId': $scope.currentOrg.id, - 'userId': userId - }, function(result) { - $scope.people = _.filter($scope.people, function(perm){ - return perm.user.id != userId; - }); - }, function (error) { - console.log('error', error); - $scope.alertError('failed to remove user from org'); - }); - } - }; - }]); @@ -78,7 +31,54 @@ PeopleControllers.controller('PeopleView', ['$scope', '$routeParams', 'User', 'C } $scope.password = null; $scope.password_verify = null; - + + $scope.grantAdmin = function() { + if ($scope.user) { + console.log('grant'); + Organization.member_update({ + 'orgId': $scope.currentOrg.id, + 'userId': $scope.people[index].user.id, + 'admin': true + }, function (result) { + $scope.people[index].admin = true; + }, function (error) { + console.log('error', error); + $scope.alertError('failed to grant admin to user'); + }); + } + }; + + $scope.revokeAdmin = function() { + if ($scope.user) { + Organization.member_update({ + 'orgId': $scope.currentOrg.id, + 'userId': $scope.people[index].user.id, + 'admin': false + }, function(result) { + $scope.people[index].admin = false; + }, function (error) { + console.log('error', error); + $scope.alertError('failed to revoke admin from user'); + }); + } + }; + + $scope.removeMember = function() { + if ($scope.user) { + Organization.member_remove({ + 'orgId': $scope.currentOrg.id, + 'userId': userId + }, function(result) { + $scope.people = _.filter($scope.people, function(perm){ + return perm.user.id != userId; + }); + }, function (error) { + console.log('error', error); + $scope.alertError('failed to remove user from org'); + }); + } + }; + $scope.submit = function() { User.update($scope.user, function(result) { CorvusAlert.alertInfo("Successfully updated!"); @@ -120,6 +120,4 @@ PeopleControllers.controller('PeopleView', ['$scope', '$routeParams', 'User', 'C } }); }; - - -}]); \ No newline at end of file +}]); diff --git a/resources/frontend_client/app/admin/query/partials/query_detail_results.html b/resources/frontend_client/app/admin/query/partials/query_detail_results.html index f4c441d46df7750ecd67e93f24b704ed9f4f5f46..97fef1af8b10881c9fb54abb8494281e777824bb 100644 --- a/resources/frontend_client/app/admin/query/partials/query_detail_results.html +++ b/resources/frontend_client/app/admin/query/partials/query_detail_results.html @@ -1,35 +1,34 @@ +<div class="my2 py1 px2 bordered rounded" ng-if="queryResultData"> + <h2>Results</h2> -<div class="my2 py1 px2 bordered rounded bg-grey-1" ng-if="queryResultData"> - <h2>Results</h2> + <div ng-if="queryResultData.error"> + <pre ng-if="queryResultData.sql_error">{{queryResultData.sql_error}}</pre> + <pre ng-if="!queryResultData.sql_error && queryResultData.error">{{queryResultData.error}}</pre> + </div> - <div ng-if="queryResultData.error"> - <pre ng-if="queryResultData.sql_error">{{queryResultData.sql_error}}</pre> - <pre ng-if="!queryResultData.sql_error && queryResultData.error">{{queryResultData.error}}</pre> - </div> + <div ng-if="!queryResultData.error"> + <div ng-if="queryResultData.status != 'completed'"> + Executing .... + </div> - <div ng-if="!queryResultData.error"> - <div ng-if="queryResultData.status != 'completed'"> - Executing .... - </div> + <div ng-if="queryResultData.status == 'completed' && queryResultData.row_count == 0"> + <pre>No Data: query completed but returned 0 rows.</pre> + </div> - <div ng-if="queryResultData.status == 'completed' && queryResultData.row_count == 0"> - <pre>No Data: query completed but returned 0 rows.</pre> - </div> + <div ng-if="queryResultData.row_count > 5000"> + <p>Too many rows to display: {{queryResultData.row_count}}</p> + </div> - <div ng-if="queryResultData.row_count > 5000"> - <p>Too many rows to display: {{queryResultData.row_count}}</p> - </div> + <div class="TableWrapper" ng-if="queryResultData.status == 'completed' && queryResultData.row_count > 0"> + <table class="Table table table-striped table-condensed" ng-if="queryResultData.row_count < 5000"> + <tr> + <th ng-repeat="column_name in queryResultData.data.columns">{{column_name}}</th> + </tr> - <div class="TableWrapper" ng-if="queryResultData.status == 'completed' && queryResultData.row_count > 0"> - <table class="Table table table-striped table-condensed" ng-if="queryResultData.row_count < 5000"> - <tr> - <th ng-repeat="column_name in queryResultData.data.columns">{{column_name}}</th> - </tr> - - <tr ng-repeat="row in queryResultData.data.rows"> - <td ng-repeat="cell in row track by $index">{{cell}}</td> - </tr> - </table> - </div> - </div> + <tr ng-repeat="row in queryResultData.data.rows"> + <td ng-repeat="cell in row track by $index">{{cell}}</td> + </tr> + </table> + </div> + </div> </div> diff --git a/resources/frontend_client/app/admin/query/partials/query_list.html b/resources/frontend_client/app/admin/query/partials/query_list.html index 5e9b7b96351605d9b49dd2207ffc539e5f783ea4..829fce1d83743d2d2963d1a5d64ca94817ac8903 100644 --- a/resources/frontend_client/app/admin/query/partials/query_list.html +++ b/resources/frontend_client/app/admin/query/partials/query_list.html @@ -1,66 +1,54 @@ - -<div class="wrapper"> - <div class="py1 border-bottom"> - <h2>Queries</h2> - </div> +<section class="wrapper"> + <h2 class="py2">Queries</h2> <div ng-cloak> <alert class="alert" ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)" ng-animate=" 'animate' " cv-delayed-call="closeAlert($index)">{{alert.msg}}</alert> </div> - <div class="List-filters List-section clearfix"> - <div class="List-filterCategories float-left"> - <span class="List-filterLabel float-left">Filter:</span> - <div class="Button-group"> - <a class="Button" ng-class="{ 'Button--selected' : filterMode == 'all' }" ng-click="filter('all')">all</a> - <a class="Button" ng-class="{ 'Button--selected' : filterMode == 'mine' }" ng-click="filter('mine')">mine</a> - </div> - </div> - <div class="mx3 float-left"> - <input class="input" type="text" ng-model="searchFilter" placeholder="Search queries ..."> - </div> - <div class="float-right"> - <span>Sort by:</span> - <select ng-init="sortMode = 'name'" ng-model="sortMode" ng-change="sort()"> - <option value="name">Name (default)</option> - <option value="owner">Owner</option> - <option value="db">Database</option> - <option value="date">Last Updated</option> - </select> - </div> - </div> + <div class="bg-white bordered shadowed rounded p4"> + <div class="clearfix"> + <div class="float-right"> + <span>Filter:</span> + <div class="Button-group"> + <a class="Button" ng-class="{ 'Button--selected' : filterMode == 'all' }" ng-click="filter('all')">all</a> + <a class="Button" ng-class="{ 'Button--selected' : filterMode == 'mine' }" ng-click="filter('mine')">mine</a> + </div> + </div> + <input class="input" type="text" ng-model="searchFilter" placeholder="Search queries ..."> + </div> - <div class="TableWrapper my2"> - <table class="Table"> - <thead> - <th>Name</th> - <th>Owner</th> - <th>Visibility</th> - <th>Database</th> - <th>Last Updated</th> - <th>Details</th> - <th>Delete</th> - </thead> + <div class="TableWrapper my2"> + <table class="Table"> + <thead> + <th>Name</th> + <th>Owner</th> + <th>Visibility</th> + <th>Database</th> + <th>Last Updated</th> + <th>Details</th> + <th>Delete</th> + </thead> - <tfoot> - <tr ng-if="!queries"> - <td colspan="7" style="text-align:center;"><h3>Loading ...</h3></td> - </tr> - </tfoot> + <tfoot> + <tr ng-if="!queries"> + <td colspan="7" style="text-align:center;"><h3>Loading ...</h3></td> + </tr> + </tfoot> - <tbody> - <tr ng-repeat="query in queries | filter:searchFilter"> - <td><a cv-org-href="/admin/query/{{query.id}}">{{query.name}}</a></td> - <td>{{query.creator.common_name}}</td> - <td style="white-space:nowrap;"> - <a href="#" ng-if="query.can_write" editable-select="query.public_perms" onaftersave="inlineSave(query, $index)" e-ng-options="perm.id as perm.name for perm in utils.perms">{{utils.permName(query.public_perms)}}</a> - <span ng-if="!query.can_write">{{utils.permName(query.public_perms)}}</span> - </td> - <td>{{query.database.name}}</td> - <td style="white-space:nowrap;">{{query.updated_at | date : 'MMMM d, y, hh:mm a'}}</td> - <td width="40%">{{query.details.sql | limitTo : 200}}</td> - <td style="text-align:center;"><input class="Button" type="button" value="Delete" ng-if="query.can_write" ng-click="deleteQuery(query.id)" delete-confirm/></td> - </tr> - </tbody> - </table> - </div> -</div> + <tbody> + <tr ng-repeat="query in queries | filter:searchFilter"> + <td><a cv-org-href="/admin/query/{{query.id}}">{{query.name}}</a></td> + <td>{{query.creator.common_name}}</td> + <td style="white-space:nowrap;"> + <a href="#" ng-if="query.can_write" editable-select="query.public_perms" onaftersave="inlineSave(query, $index)" e-ng-options="perm.id as perm.name for perm in utils.perms">{{utils.permName(query.public_perms)}}</a> + <span ng-if="!query.can_write">{{utils.permName(query.public_perms)}}</span> + </td> + <td>{{query.database.name}}</td> + <td style="white-space:nowrap;">{{query.updated_at | date : 'MMMM d, y, hh:mm a'}}</td> + <td width="40%">{{query.details.sql | limitTo : 200}}</td> + <td style="text-align:center;"><input class="Button" type="button" value="Delete" ng-if="query.can_write" ng-click="deleteQuery(query.id)" delete-confirm/></td> + </tr> + </tbody> + </table> + </div> + </div> +</section> diff --git a/resources/frontend_client/app/admin/query/partials/query_run.html b/resources/frontend_client/app/admin/query/partials/query_run.html index d07b3c966094911b57f926f8a898bd48fefcc6a4..72bd74fa5db689a370697161993958dcc7876dd7 100644 --- a/resources/frontend_client/app/admin/query/partials/query_run.html +++ b/resources/frontend_client/app/admin/query/partials/query_run.html @@ -1,45 +1,44 @@ -<div class="wrapper"> - <form id="query_form" novalidate> +<section class="wrapper"> + <h2 class="py2">Run Query</h2> + <form novalidate> <input type="hidden" name="q" value="{{queryResultData.uuid}}" ng-if="queryResultData"/> - <div class="py2"> - <h2>Run Query</h2> - - <div class="py1"> - <label for="id_sql">SQL:</label> - <cv-ace-sql-editor sql="query.sql" database="query.database" onload="onEditorLoaded"></cv-ace-sql-editor> - </div> - - <div class=""> - <label>Database:</label> - <select class="input" ng-model="query.database" ng-options="db.id as db.name for db in form_input['databases']"> - </select> - - <label class="mx2"> - Connection Timezone: - <select class="input" ng-model="query.timezone" ng-options="tz for tz in form_input['timezones']"> - <option value="">----- (database tz)</option> + <div class="bg-white bordered rounded shadowed"> + <div class="p3"> + <label class="Select"> + <select class="input" ng-model="query.database" ng-options="db.id as db.name for db in form_input['databases']"> + <option value="">Select a database...</option> </select> </label> + <label class="Select mx2"> + <select ng-model="query.timezone" ng-options="tz for tz in form_input['timezones']"> + <option value="">Select a Timezone</option> + </select> + </label> </div> - </div> - <div class="my1 py2 border-top"> - <div class="float-right"> - <a class="Button" href="/api/qs/{{queryResultData.uuid}}/csv" target="_self" ng-if="queryResultData">Download Results</a> + <div class="border-top"> + <cv-ace-sql-editor sql="query.sql" database="query.database" onload="onEditorLoaded"> + </cv-ace-sql-editor> </div> - <div class="inline-block"> - <input class="Button Button--primary" type="button" value="Run" ng-click="runAdhocQuery(query)"/> - </div> + <div class="p3 border-top"> + <div class="float-right"> + <a class="Button" href="/api/qs/{{queryResultData.uuid}}/csv" target="_self" ng-if="queryResultData">Download Results</a> + </div> + + <div class="inline-block"> + <input class="Button Button--primary" type="button" value="Run" ng-click="runAdhocQuery(query)"/> + </div> - <div class="inline-block"> - <input class="Button" type="button" value="Save" ng-click="saveAdhocQuery(query)"/> + <div class="inline-block"> + <input class="Button" type="button" value="Save" ng-click="saveAdhocQuery(query)"/> + </div> </div> </div> </form> <div ng-include="'/app/admin/query/partials/query_detail_results.html?cb=4'"></div> -</div> +</section> diff --git a/resources/frontend_client/app/controllers.js b/resources/frontend_client/app/controllers.js index 3855872d0081630620c02d27552fbd7a33f09137..3961672887a579e8677c9a447bb2060bb691c1fc 100644 --- a/resources/frontend_client/app/controllers.js +++ b/resources/frontend_client/app/controllers.js @@ -124,16 +124,23 @@ CorvusControllers.controller('Unauthorized', ['$scope', '$location', function($s CorvusControllers.controller('Nav', ['$scope', '$routeParams', '$location', function($scope, $routeParams, $location) { - $scope.nav = 'main' + $scope.nav = 'main'; + $scope.activeClass = 'is--selected'; + + $scope.isActive = function (location) { + var active = ($location.path().indexOf(location) > 0); + return active; + } + $scope.$on('$routeChangeSuccess', function () { if($routeParams.orgSlug && $location.path().indexOf('admin') > 0) { - $scope.nav = 'admin' - } else if ($location.path().indexOf('setup') >0 ) { - $scope.nav = 'setup' - } else if ($location.path().indexOf('superadmin') >0 ) { - $scope.nav = 'superadmin' + $scope.nav = 'admin'; + } else if ($location.path().indexOf('setup') > 0) { + $scope.nav = 'setup'; + } else if ($location.path().indexOf('superadmin') > 0) { + $scope.nav = 'superadmin'; } else { - $scope.nav = 'main' + $scope.nav = 'main'; } }); }]); diff --git a/resources/frontend_client/app/css/admin.css b/resources/frontend_client/app/css/admin.css index c3fbea5f838ebc6698b76dddd98e2bcc972780cd..e7aa279da67fd90f5b4133ce817bc9fae70c395d 100644 --- a/resources/frontend_client/app/css/admin.css +++ b/resources/frontend_client/app/css/admin.css @@ -1,3 +1,17 @@ #id_sql { height: 200px; } + +.AdminNav .NavItem { + padding: 1.15em 0; + margin: 0 1em 0 0; + font-size: 1.12em; +} + +.AdminExit-trigger { + color: #ddd; +} + +.AdminTitle { + color: #222; +} diff --git a/resources/frontend_client/app/css/core/base.css b/resources/frontend_client/app/css/core/base.css index fac759eee45b4e489407ec52186ca025f8948864..98ce40e2ec3ed499f5e2fce354ca85d610bd3f47 100644 --- a/resources/frontend_client/app/css/core/base.css +++ b/resources/frontend_client/app/css/core/base.css @@ -11,6 +11,7 @@ body { font-family: var(--default-font-family), "Helvetica Neue", Helvetica, sans-serif; font-size: var(--default-font-size); margin: 0; + box-sizing: border-box; } /* diff --git a/resources/frontend_client/app/css/core/headings.css b/resources/frontend_client/app/css/core/headings.css index 51afa46166c8beaabfca3665294f6f8929f57235..68941bbd21029e63700c271a6b7703bcbe321b30 100644 --- a/resources/frontend_client/app/css/core/headings.css +++ b/resources/frontend_client/app/css/core/headings.css @@ -16,7 +16,7 @@ h5, h6, .h6 { text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; + -webkit-font-smoothing: subpixel-antialiased; margin-top: var(--default-header-margin); margin-bottom: var(--default-header-margin); color: var(--default-header-text-color); @@ -29,4 +29,3 @@ h6, .h4 { font-size: 1.12em; } .h5 { font-size: .83em; } .h6 { font-size: .75em; } - diff --git a/resources/frontend_client/app/explore/partials/database_list.html b/resources/frontend_client/app/explore/partials/database_list.html index 200c91c8cdd8de9f9461ec562e5b090c38bcb460..5a2998e3e358a52188f4db3f7ebf862432046f02 100644 --- a/resources/frontend_client/app/explore/partials/database_list.html +++ b/resources/frontend_client/app/explore/partials/database_list.html @@ -1,6 +1,5 @@ <div class="wrapper"> <div class="col col-sm-12"> - <div class="row"> <div ng-repeat="(dbId, database) in databases"> <div class="mt2 py2 col col-sm-12 clearfix"> @@ -10,7 +9,7 @@ other tables</a> <h2>Explore {{database.name}}</h2> </div> - <ul class="border-top col col-sm-12 clearfix"> + <ul class="bordered rounded bg-white clearfix"> <li class="border-bottom py2" ng-repeat="table in database.entities"> <span class="float-right text-grey-3 mt2">{{table.rows}} rows</span> <h3 class="text-normal text-brand mt2 mb0"> diff --git a/resources/frontend_client/index.html b/resources/frontend_client/index.html index f5af42d33af2c1171c164c3eae0a12c300a7a72c..73d3da573c2bad032e4450e277d2ba2a17960f2c 100644 --- a/resources/frontend_client/index.html +++ b/resources/frontend_client/index.html @@ -81,60 +81,31 @@ </div> </nav> - <nav ng-show="nav == 'admin'"> - <div class="border-bottom bg-white py1"> - <div class="wrapper"> + <nav class="AdminNav" ng-show="nav == 'admin'"> + <div class="bg-white border-bottom"> + <div class="py2 wrapper"> <label class="Select" ng-if="user.is_multi_org"> <select ng-change="changeCurrOrg(currentOrgSlug)" ng-model="currentOrgSlug" ng-options="organization.slug as organization.name for organization in userAdminOf"></select> - </select> </label> - <a cv-org-href="/admin/"> - <h3 class="AdminPageTitle my2 inline-block"> - <span ng-if="!user.is_multi_org">{{currentOrg.name}} - </span>Admin - </h3> + <a class="AdminTitle link" cv-org-href="/admin/"> + <span ng-if="!user.is_multi_org">{{currentOrg.name}} - </span>Admin </a> - <div class="mx1 my2 float-right"> - <a class="inline-block" cv-org-href="/">Exit Admin</a> + <div class="mx1 float-right"> + <a class="AdminExit-trigger link" cv-org-href="/">Exit Admin</a> </div> </div> + <section class="mt1 wrapper"> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/people')}" cv-org-href="/admin/people/">People</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/databases')}" cv-org-href="/admin/databases">Databases</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/datasets')}" cv-org-href="/admin/datasets">Datasets</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/emailreport')}" cv-org-href="/admin/emailreport/">Email Reports</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/query/run')}"cv-org-href="/admin/query/run">Run Query</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/query')}" cv-org-href="/admin/query/">Saved Queries</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/search')}" cv-org-href="/admin/search">Search</a> + <a class="NavItem" ng-class="{ 'is--selected' : isActive('/admin/settings')}" cv-org-href="/admin">Settings</a> + </section> </div> </nav> - <nav class="my4 col col-sm-3" ng-show="nav == 'admin'"> - <ul class="CoreNav"> - <li> - <a class="NavItem" cv-org-href="/admin/">Organization</a> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/people/">People</a> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/databases">Databases</a> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/datasets">Datasets</a> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/emailreport/">Email Reports</a> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/query/run/">Query</a> - <ul class="ContextNav"> - <li> - <a class="NavItem" cv-org-href="/admin/query/run">Run Query</a> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/query/">Saved Queries</a> - </li> - </ul> - </li> - <li> - <a class="NavItem" cv-org-href="/admin/search">Search</a> - </li> - <li ng-if="user.is_superuser"> - <a class="NavItem" cv-org-href="/admin/settings">Settings</a> - </li> - </ul> - </nav> <nav ng-show="nav == 'superadmin'"> <div class="border-bottom bg-white py1">