Coder Social home page Coder Social logo

locksmith's People

Contributors

indygriffiths avatar possum888 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

locksmith's Issues

Sorting on a Certificate column in the Managed Domains GridField fails

ERROR [User Error]: Uncaught SS_DatabaseException: Couldn't run query:

SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"

FROM "Domain"
LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID"

Unknown column 'DataObject.CurrentCertificateID' in 'on clause'
IN POST /admin/domains/Domain/EditForm/field/Domain
Line 55 in /Users/indygriffiths/Dev/PHP7/locksmith/framework/model/connect/DBConnector.php

Source
======
  46:  		if (!empty($sql)) {
  47:  			$formatter = new SQLFormatter();
  48:  			$formattedSQL = $formatter->formatPlain($sql);
  49:  			$msg = "Couldn't run query:\n\n{$formattedSQL}\n\n{$msg}";
  50:  		}
  51:  
  52:  		if($errorLevel === E_USER_ERROR) {
  53:  			// Treating errors as exceptions better allows for responding to errors
  54:  			// in code, such as credential checking during installation
* 55:  			throw new SS_DatabaseException($msg, 0, null, $sql, $parameters);
  56:  		} else {
  57:  			user_error($msg, $errorLevel);
  58:  		}
  59:  	}
  60:  
  61:  	/**

Trace
=====
DBConnector->databaseError(Couldn't run query:

SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"

FROM "Domain"
LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID"

Unknown column 'DataObject.CurrentCertificateID' in 'on clause',256,SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID")
MySQLiConnector.php:155

MySQLiConnector->query(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",256)
MySQLiConnector.php:243

MySQLiConnector->preparedQuery(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Array,256)
Database.php:143

SS_Database->{closure}(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID")
Database.php:193

SS_Database->benchmarkQuery(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Closure,Array)
Database.php:145

SS_Database->preparedQuery(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Array,256)
DB.php:365

DB::prepared_query(SELECT DISTINCT count(DISTINCT "Domain"."ID") AS "Count"
 FROM "Domain" LEFT JOIN "Certificate" AS "CurrentCertificate" ON "CurrentCertificate"."ID" = "DataObject"."CurrentCertificateID",Array)
SQLExpression.php:121

SQLExpression->execute()
SQLSelect.php:599

SQLSelect->count(DISTINCT "Domain"."ID")
DataQuery.php:399

DataQuery->count()
DataList.php:769

DataList->count()
GridFieldPaginator.php:139

GridFieldPaginator->getManipulatedData(GridField,DataList)
GridField.php:257

GridField->getManipulatedList()
GridField.php:300

GridField->FieldHolder()
GridField.php:899

GridField->gridFieldAlterAction(Array,CMSForm,SS_HTTPRequest)
GridField.php:118

GridField->index(SS_HTTPRequest)
RequestHandler.php:296

RequestHandler->handleAction(SS_HTTPRequest,index)
RequestHandler.php:208

RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
GridField.php:1030

GridField->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:230

RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:230

RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:151

Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:472

LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:92

AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:385

Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:149

Director::direct(/admin/domains/Domain/EditForm/field/Domain,DataModel)
main.php:194

Create Freshdesk tickets for expiring domains

Like the OpsGenie alert, the ability to create a Freshdesk ticket when a certificate is approaching expiry would be a useful feature. This would involve the tool creating a ticket, and then bumping up the priority as the expiration date gets closer. Once a new certificate is installed, the ticket should be closed.

Once the ticket reaches P1 status and the ticket is marked as urgent, the ticket status should also be changed to Incident.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.